45 lines
823 B
JavaScript
45 lines
823 B
JavaScript
![]() |
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
|