Explorar o código

cps:处理url上带有wechatToken的问题

panyong %!s(int64=3) %!d(string=hai) anos
pai
achega
dc9de41c0a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      htmldev/cps/src/utils/index.js

+ 3 - 0
htmldev/cps/src/utils/index.js

@@ -53,6 +53,9 @@ export function updateWechatToken () {
   const wechatToken = getQueryString('wechatToken') || ''
   if (wechatToken && platform.isWeixin) {
     Vue.cookie.set('fanbutingwechatToken', wechatToken, { expires: '30D' })
+    setTimeout(() => {
+      location.replace(`${location.href.replace('wechatToken=' + wechatToken, '')}`)
+    }, 500)
   }
 }