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.

87 lines
2.0 KiB

import App from './App'
1 year ago
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'
1 year ago
// #ifndef VUE3
import Vue from 'vue'
console.log("Vuew2222");
Vue.config.productionTip = false
Vue.prototype.$store = store
1 year ago
Vue.prototype.$adpid = "1111111111"
Vue.prototype.$backgroundAudioData = {
playing: false,
playTime: 0,
formatedPlayTime: '00:00:00'
}
App.mpType = 'app'
const app = new Vue({
1 year ago
store,
...App
})
app.$mount()
1 year ago
// #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