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.
75 lines
2.1 KiB
75 lines
2.1 KiB
9 months ago
|
import App from './App'
|
||
|
import store from './store'
|
||
|
import './router/my_router.js'; //引入拦截
|
||
|
import VueClipboard from 'vue-clipboard2' //复制粘贴
|
||
|
import uView from './uni_modules/vk-uview-ui';// 引入 uView UI
|
||
|
import comMessage from './mycomponents/common/comMessage.vue'
|
||
|
|
||
|
// #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
|
||
|
|
||
|
import {
|
||
|
createSSRApp
|
||
|
} from "vue";
|
||
|
export function createApp() {
|
||
|
const app = createSSRApp(App);
|
||
|
app.use(store)
|
||
|
app.use(VueClipboard)
|
||
|
app.use(uView)
|
||
|
app.component('comMessage', comMessage)
|
||
|
console.log("网络22请求")
|
||
|
// startApp(app);
|
||
|
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;
|
||
|
// getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value
|
||
|
// Vue.prototype.$dev_url = res.data.baseInfo.dev.value;
|
||
|
// console.log("网络",res.data.baseInfo.request_url.value)
|
||
|
// console.log("开发环境12",res.data.baseInfo.isDevelopment.value)
|
||
|
// uni.setStorageSync("request_url",res.data.baseInfo.request_url.value)
|
||
|
// uni.setStorageSync("isDevelopment",res.data.baseInfo.isDevelopment.value)
|
||
|
}
|
||
|
},
|
||
|
fail: (error) => {
|
||
|
|
||
|
}
|
||
|
})
|
||
|
|
||
|
return {
|
||
|
startApp
|
||
|
};
|
||
|
}
|