You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.0 KiB
86 lines
2.0 KiB
import App from './App'
|
|
import store from './store'
|
|
import './router/my_router.js'; //引入拦截
|
|
import VueClipboard from 'vue-clipboard2'
|
|
|
|
// 引入 uView UI
|
|
import uView from './uni_modules/vk-uview-ui';
|
|
// import utils from '@/common/utils.js';
|
|
// import uShowModal from "./mycomponents/show-modal/uShowModal.vue"
|
|
// // 如此配置即可
|
|
// uni.$u.config.unit = 'rpx'
|
|
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
console.log("Vuew2222");
|
|
Vue.config.productionTip = false
|
|
Vue.prototype.$store = store
|
|
Vue.prototype.$adpid = "1111111111"
|
|
Vue.prototype.$backgroundAudioData = {
|
|
playing: false,
|
|
playTime: 0,
|
|
formatedPlayTime: '00:00:00'
|
|
}
|
|
App.mpType = 'app'
|
|
const app = new Vue({
|
|
store,
|
|
...App
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
// #ifdef VUE3
|
|
import {
|
|
createSSRApp
|
|
} from 'vue'
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
|
|
// 使用 uView UI
|
|
app.use(store)
|
|
app.use(uView)
|
|
app.use(VueClipboard)
|
|
app.config.globalProperties.$adpid = "1111111111"
|
|
app.config.globalProperties.$pageSize = 100
|
|
// app.config.globalProperties.$utils = utils;
|
|
|
|
app.config.globalProperties.$backgroundAudioData = {
|
|
playing: false,
|
|
playTime: 0,
|
|
formatedPlayTime: '00:00:00'
|
|
}
|
|
startApp(app);
|
|
// app.component('u-show-modal', uShowModal);
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
|
|
|
|
export function startApp(app) {
|
|
uni.request({
|
|
url: `./static/config.json?t=${new Date().getTime()}`,
|
|
method: 'get',
|
|
data: {},
|
|
success: (res) => {
|
|
if (res.data != "") {
|
|
//在配置中读url,company等信息
|
|
app.config.globalProperties.$baseInfo = res.data.baseInfo;
|
|
getApp().globalData.dev_url = res.data.baseInfo.dev.value;
|
|
getApp().globalData.request_url = res.data.baseInfo.request_url.value;
|
|
getApp().globalData.tenantId = res.data.baseInfo.tenantId.value;
|
|
app.config.globalProperties.$recepit_configList = res.data.recepit_configList;
|
|
getApp().globalData.recepit_configList = res.data.recepit_configList;
|
|
getApp().globalData.feed_configList = res.data.feed_configList;
|
|
}
|
|
},
|
|
fail: (error) => {
|
|
|
|
}
|
|
})
|
|
|
|
return {
|
|
startApp
|
|
};
|
|
}
|
|
// #endif
|
|
|