From da25227fff7b9c1465ac950f17932759becaa628 Mon Sep 17 00:00:00 2001 From: xingyy <373639591@qq.com> Date: Fri, 16 Aug 2024 21:59:17 +0800 Subject: [PATCH] 12312 --- env/.env.test | 2 +- src/service/index.js | 5 +++-- src/views/vote/index.vue | 6 ++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/env/.env.test b/env/.env.test index fe49b27..af78375 100644 --- a/env/.env.test +++ b/env/.env.test @@ -2,4 +2,4 @@ NODE_ENV = 'test' # 是否去除console 和 debugger VITE_DELETE_CONSOLE = false -VITE_BASEURL = 'https://kid-art-test.szjixun.cn' +VITE_BASEURL = 'http://kid-art-test.szjixun.cn' diff --git a/src/service/index.js b/src/service/index.js index dc74b8e..9a073a4 100644 --- a/src/service/index.js +++ b/src/service/index.js @@ -16,10 +16,11 @@ const request = new Request({ if (config.isFormData) { config.headers['Content-Type'] = 'multipart/form-data'; config.headers['Authorization'] = token - config.headers['Authorization2'] ='1234567' + config.headers['tokenC'] ='1234567' } else { config.headers['Authorization'] = token - config.headers['Authorization2'] ='1234567' + console.log('JSON.parse(localStorage.getItem(\'voteToken\'))?.authorization',JSON.parse(localStorage.getItem('voteToken'))?.authorization) + config.headers['tokenC'] =JSON.parse(localStorage.getItem('voteToken'))?.authorization } return config; }, diff --git a/src/views/vote/index.vue b/src/views/vote/index.vue index 6c9f3e5..e620a6f 100644 --- a/src/views/vote/index.vue +++ b/src/views/vote/index.vue @@ -8,8 +8,7 @@ const router = useRouter() const initLoad=async ()=>{ await getVoteToken() if (route.query.state && route.query.code){ - const res= await viewOpenId({code: Array.isArray(route.query.code)?route.query.code[0]:route.query.code, state: Array.isArray(route.query.state)?route.query.state[0]:route.query.state}) - console.log('openid',res) + const res= await viewOpenId({code: Array.isArray(route.query.code)?route.query.code.at(-1):route.query.code, state: Array.isArray(route.query.state)?route.query.state.at(-1):route.query.state}) if (res.status===0){ } @@ -22,7 +21,6 @@ if (route.query.uid){ getWorkInfo() } const isW=isWechat() -console.log('isW',isW) voteStatus().then((res)=>{ setTimeout(() => { @@ -40,7 +38,7 @@ if(res.status===401){ window.location.href = `https://appointteam.szjixun.cn/api/appointment/wx?notifyUrl=${encodeURIComponent(window.location.href)}` }*/ - /*cWxApi()*/ +/* cWxApi()*/ initLoad() } })