123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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
- import store from './store'
- Vue.prototype.$store = store // 定义成全局组件
- console.log("main.js")
- if(common.getHashQuery('token')){
- var userInfo={
- token:common.getHashQuery('token'),
- uid:common.getHashQuery('uid')
- }
- var wxOpenData={
- loginInfo:userInfo
- }
- store.commit('mutationsuserInfo', userInfo)
- store.commit('mutationswxOpenData', wxOpenData)
- console.log(store.state.userInfo)
- }
- //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
|