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.
 
 
 
 

77 lines
2.3 KiB

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'
import noclick from './common/noclick.js'
// #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)
app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks;
app.config.globalProperties.$throttle = noclick.throttle;
// 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
};
}