Commit 2a7fbb51 by lijiabin

【需求 20331】 perf: 优化code跳转相关

parent aca22208
export * from './app'
export * from './wxUtil'
export * from './excel'
import { app_config } from '@/config'
import { localCache } from '@/utils/storage'
import { useUserStore } from '@/stores'
// import { localCache } from '@/utils/storage'
/**
* 跳转企业微信获取最新code
......@@ -7,7 +8,9 @@ import { localCache } from '@/utils/storage'
*/
export function wxLogin(fullPath: string) {
const wxRedirect = app_config[import.meta.env.MODE]?.wxRedirect
localCache.removeCache('token')
const userStore = useUserStore()
userStore.clearAllUserInfo()
// localCache.removeCache('token')
const wxUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize'
const redirect = encodeURIComponent('http://' + wxRedirect + fullPath)
const wxParams = `?appid=ww42a2d34b42b8d721&redirect_uri=${redirect}&response_type=code&scope=snsapi_base&state=#wechat_redirect`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment