diff --git a/public/index.html b/public/index.html index 80c65d1..b9dcf00 100644 --- a/public/index.html +++ b/public/index.html @@ -14,6 +14,7 @@
+ diff --git a/src/router/index.js b/src/router/index.js index ac4f0d7..1cf562f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,7 +5,7 @@ import { constantRouterMap } from './router.config.js' import { checkWxmpRegister, login } from '@/api/user' import { title } from '@/config' -const whiteList = ['/login', '/register', '/errorPage','/selectAgency','/houseQR'] +const whiteList = ['/login', '/register', '/errorPage','/selectAgency','/houseQR','/event'] const originalPush = Router.prototype.push Router.prototype.push = function push(location, onResolve, onReject) { if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) @@ -92,7 +92,7 @@ router.beforeEach((to, from, next) => { } }) } else { - if (getQueryStringByName('code') && to.path != '/houseQR') { + if (getQueryStringByName('code') && to.path != '/houseQR'&& to.path != '/event') { login({ wxCode: getQueryStringByName('code'),appId:'wx1078fa1e99424de9'}).then(res => { localStorage.setItem('token', res.token) localStorage.setItem('userId', res.userH5DTO.id) diff --git a/src/utils/jweixin.js b/src/utils/jweixin.js index a533a88..4617c09 100644 --- a/src/utils/jweixin.js +++ b/src/utils/jweixin.js @@ -1,14 +1,14 @@ import { getAutograph } from '@/api/basic' -export const setConfig = function () { +export const setConfig = function (jsApiList = []) { getAutograph({ url: location.href.split('#')[0] }).then(res => { console.log(res) wx.config({ - debug: process.env.NODE_ENV !== 'production', + debug: process.env.NODE_ENV === 'development', appId: res.appId, timestamp: res.timestamp, nonceStr: res.nonceStr, signature: res.signature, - jsApiList:[] + jsApiList }) }) } diff --git a/src/views/communityPublicity/detail.vue b/src/views/communityPublicity/detail.vue index b985d6f..b82346c 100644 --- a/src/views/communityPublicity/detail.vue +++ b/src/views/communityPublicity/detail.vue @@ -30,7 +30,7 @@