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.
 
 
 
 
 
 

93 lines
3.0 KiB

import App from './App'
import store from './store'
import './router/my_router.js';//引入拦截
// 引入 uView UI
import uView from './uni_modules/vk-uview-ui';
// #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.config.globalProperties.$adpid = "1111111111"
app.config.globalProperties.$pageSize = 10
app.config.globalProperties.$backgroundAudioData = {
playing: false,
playTime: 0,
formatedPlayTime: '00:00:00'
}
startApp(app);
return {
app
}
}
export function startApp(app) {
uni.request({
url:'/static/config.json',
method: 'GET',
data:{},
success: (res) => {
console.log("请求",res)
if(res.data!=""){
//在配置中读url,company等信息
app.config.globalProperties.$dev_url = res.data.params.dev;
app.config.globalProperties.$companyCode = res.data.params.companyCode;
app.config.globalProperties.$warehouseCode = res.data.params.warehouseCode;
app.config.globalProperties.$putawayLocationTypes = res.data.params.putawayLocationTypes; //创建上架任务的库存类型
app.config.globalProperties.$putawayInventoryStatus = res.data.params.putawayInventoryStatus; //创建上架任务的库存状态
app.config.globalProperties.$print_url = res.data.params.print_url; //打印的服务地址
app.config.globalProperties.$isScrapScanToLocation = res.data.params.isScrapScanToLocation; //原料报废是否显示库位
app.config.globalProperties.$isReceiptToday = res.data.params.isReceiptToday; //采购收货是否只看今天的采购任务
app.config.globalProperties.$scrapReason = res.data.params.scrapReason; //原料报废原因字典项
app.config.globalProperties.$purchaseReturnReason = res.data.params.purchaseReturnReason; //采购退货原因字典项
app.config.globalProperties.$returnBeforPutawayReason = res.data.params.returnBeforPutawayReason; //上架前退货原因字典项
app.config.globalProperties.$receiptCheckReason = res.data.params.receiptCheckReason; //采购收货不合格原因字典项
app.config.globalProperties.$configList = res.data.configList;
app.config.globalProperties.$isShowQty_receipt = res.data.params.isShowQty_receipt;
app.config.globalProperties.$isEditShowQty_receipt = res.data.params.isEditShowQty_receipt;
getApp().globalData.text = res.data.params.version_update_url;
getApp().globalData.dev_url = res.data.params.dev;
getApp().globalData.print_url = res.data.params.print_url;
// console.log("地址",app.config.globalProperties.$dev_url)
}
},
fail: (error) => {
}
})
return {startApp};
}
// #endif