fourPayProject/51uni/main.js

45 lines
823 B
JavaScript
Raw Normal View History

2025-03-31 10:23:28 +08:00
import App from './App'
import uView from '@/uni_modules/uview-ui'
import config from '@/config'
import request from './utils/request.js'
const imgUrl = config.imagesUrl
Vue.prototype.$imgUrl = imgUrl;
Vue.prototype.$getDictList = getDictList;
Vue.use(uView)
//数据字典方法挂载
export async function getDictList(dictType) {
let res = await request({
url: 'app/drop/getDictList?dictType=' + dictType,
method: 'get'
})
if (res.code == 0) {
return res.data
} else {
return []
}
}
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif