import App from './App'
|
|
|
|
|
|
// #ifndef VUE3
|
|
import i18n from './locale/index.js'
|
|
import Vue from 'vue'
|
|
import './uni.promisify.adaptor'
|
|
import 'config.js'
|
|
Vue.config.productionTip = false
|
|
App.mpType = 'app'
|
|
import request from './utils/request'
|
|
Vue.prototype.request = request
|
|
|
|
import store from './store/index.js'
|
|
|
|
import './plugin'
|
|
|
|
import 'interceptor/interceptor.js'
|
|
|
|
|
|
import sTabbar from '@/components/base/tabBar.vue'
|
|
Vue.component("sTabbar", sTabbar)
|
|
|
|
//后端返回数据格式过滤
|
|
window.parseList = function(data) {
|
|
if (!data) {
|
|
return [];
|
|
} else if (data.length || data.length == 0) {
|
|
return data
|
|
} else {
|
|
return [data]
|
|
}
|
|
}
|
|
|
|
const app = new Vue({
|
|
...App,
|
|
i18n,
|
|
store,
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
// #ifdef VUE3
|
|
import {
|
|
createSSRApp
|
|
} from 'vue'
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
// #endif
|