|
|
@@ -1,7 +1,9 @@ |
|
|
|
import App from "./App"; |
|
|
|
import * as utils from "@/utils/utils"; |
|
|
|
import store from "./stores"; |
|
|
|
import { fileURL } from "@/datas/fileURL.js"; |
|
|
|
import { |
|
|
|
fileURL |
|
|
|
} from "@/datas/fileURL.js"; |
|
|
|
|
|
|
|
//Vue2 内容 |
|
|
|
// #ifndef VUE3 |
|
|
@@ -13,37 +15,41 @@ Vue.config.productionTip = false; |
|
|
|
App.mpType = "app"; |
|
|
|
Vue.prototype.$util = utils; |
|
|
|
const app = new Vue({ |
|
|
|
...App, |
|
|
|
...App, |
|
|
|
}); |
|
|
|
app.$mount(); |
|
|
|
// #endif |
|
|
|
|
|
|
|
//Vue3 内容 |
|
|
|
// #ifdef VUE3 |
|
|
|
import { createSSRApp } from "vue"; |
|
|
|
import { |
|
|
|
createSSRApp |
|
|
|
} from "vue"; |
|
|
|
import uView from "./uni_modules/vk-uview-ui"; |
|
|
|
// import request from '@/utils/network/request.js'; |
|
|
|
import { useCounterStore } from "@/stores/counter"; |
|
|
|
import { |
|
|
|
useCounterStore |
|
|
|
} from "@/stores/counter"; |
|
|
|
|
|
|
|
export function createApp() { |
|
|
|
const app = createSSRApp(App); |
|
|
|
const app = createSSRApp(App); |
|
|
|
|
|
|
|
app.use(store); |
|
|
|
app.use(uView); |
|
|
|
app.use(store); |
|
|
|
app.use(uView); |
|
|
|
|
|
|
|
//系统属性全局注册 |
|
|
|
const counter = useCounterStore(); |
|
|
|
app.config.globalProperties.$systemInfo = counter.systemInfo; |
|
|
|
app.config.globalProperties.$util = utils; |
|
|
|
app.config.globalProperties.$imgUrl = fileURL + "/image/"; |
|
|
|
//系统属性全局注册 |
|
|
|
const counter = useCounterStore(); |
|
|
|
app.config.globalProperties.$systemInfo = counter.systemInfo; |
|
|
|
app.config.globalProperties.$util = utils; |
|
|
|
app.config.globalProperties.$imgUrl = fileURL + "/image/"; |
|
|
|
|
|
|
|
//全局网络注册 |
|
|
|
// app.config.globalProperties.$request = request |
|
|
|
//全局网络注册 |
|
|
|
// app.config.globalProperties.$request = request |
|
|
|
|
|
|
|
return { |
|
|
|
app, |
|
|
|
//Pinia, // 此处必须将 Pinia 返回 |
|
|
|
}; |
|
|
|
return { |
|
|
|
app, |
|
|
|
//Pinia, // 此处必须将 Pinia 返回 |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
// #endif |
|
|
|
// #endif |