import App from './App'
|
|
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
import './uni.promisify.adaptor'
|
|
|
|
Vue.config.productionTip = false
|
|
Vue.config.isCustomElement = tag => tag === 'image' || tag.startsWith('app-')
|
|
App.mpType = 'app'
|
|
const app = new Vue({
|
|
...App
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
// #ifdef VUE3
|
|
import { createSSRApp } from 'vue'
|
|
|
|
import 'vant/lib/index.css';
|
|
import vant from 'vant';
|
|
|
|
import jweixin from './utils/jweixin-module.js'
|
|
|
|
import mixinConfigList from '@/mixins/configList.js'
|
|
import store from '@/store/store'
|
|
|
|
|
|
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
|
import uniDrawer from '@/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue'
|
|
|
|
//获取url中参数的方法
|
|
function GetQueryString(name) {
|
|
var url = window.location.href;
|
|
try {
|
|
var cs = url.split('?')[1]; //获取?之后的参数字符串
|
|
var cs_arr = cs.split('&'); //参数字符串分割为数组
|
|
for (var i = 0; i < cs_arr.length; i++) { //遍历数组,拿到json对象
|
|
if (cs_arr[i].split('=')[0] == name) {
|
|
sessionStorage.setItem('vid',cs_arr[i].split('=')[1]);
|
|
}
|
|
}
|
|
}catch(e){}
|
|
}
|
|
GetQueryString('vid');
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
|
|
app.use(vant)
|
|
app.use(store)
|
|
|
|
|
|
app.mixin(mixinConfigList)
|
|
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
// #endif
|