import App from './App' import common from '@/utils/common.js' Vue.prototype.$common =common import request from '@/utils/request.js' Vue.prototype.$http = request.http Vue.prototype.$request =request import store from './store' Vue.prototype.$store = store // 定义成全局组件 //http://112.124.69.194:93/#/ 测试地址 console.log("main.js") if(common.getHashQuery('token')){ var userInfo={ token:common.getHashQuery('token'), uid:common.getHashQuery('uid') } var wxOpenData={ loginInfo:userInfo } console.log(wxOpenData) store.commit('mutationsuserInfo', userInfo) store.commit('mutationswxOpenData', wxOpenData) uni.setStorage({ key: 'wxOpenData', data: wxOpenData, success: function () { } }); console.log(store.state.userInfo) } if(common.getHashQuery('quanxian')){ console.log(common.getHashQuery('quanxian')); uni.setStorage({ key: 'quanxian', data: common.getHashQuery('quanxian'), success: function () { } }); } //console.log(common.getHashQuery('token')) // #ifndef VUE3 import Vue from 'vue' Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$mount() // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif