From bbe736bf51a9e8daa8da12b2fb8fb94c6d1a398e Mon Sep 17 00:00:00 2001 From: 夏洋涛 Date: Tue, 11 Jun 2024 11:36:56 +0800 Subject: [PATCH] feat:去除测试数据,修改location.href --- .gitignore | 3 ++- src/components/Background.vue | 2 +- src/views/Authorize.vue | 7 +++---- src/views/Home.vue | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 2ca6b26..428b7e3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -public.zip \ No newline at end of file +public.zip +*.zip diff --git a/src/components/Background.vue b/src/components/Background.vue index 9b525ce..65a0b41 100644 --- a/src/components/Background.vue +++ b/src/components/Background.vue @@ -45,7 +45,7 @@ export default { let isLogin = this.checkLogin() if (!isLogin) return if (process.env.NODE_ENV === 'production' && this.common.isWeiXin()) { - location.href = `http://sao315.com/w/api/saoyisao?redirect_uri=https://zlyanxue.cn/wap/index.html%23/MyClassList` + window.open(`http://sao315.com/w/api/saoyisao?redirect_uri=https://zlyanxue.cn/wap/index.html%23/MyClassList`) } else { this.$router.push({ name: 'MyClassList', query: { qrresult: '188' } }) } diff --git a/src/views/Authorize.vue b/src/views/Authorize.vue index 878fc71..b6c5bc9 100644 --- a/src/views/Authorize.vue +++ b/src/views/Authorize.vue @@ -17,8 +17,7 @@ export default { let openId = localStorage.getItem('openId') if (!openId) { if (!code) { - // location.href = `https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_zlyx` - location.href = `https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_test_auth` + window.open('https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_test_auth') } else { // 通过code获取openId和token this.$toast.loading({ @@ -40,8 +39,8 @@ export default { } else { setTimeout(() => { localStorage.removeItem('openId') - // location.href = `https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_zlyx` - location.href = `https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_test_auth` + window.open('https://ocp.sxsedu.net/szsh/usercenter/api/wx/wx1305e88d2bc74073/getCode/yx_test_auth') + }, 2000) } }) diff --git a/src/views/Home.vue b/src/views/Home.vue index 6ad3469..24e7a97 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -238,10 +238,10 @@ export default { const miniprogram = sUserAgent.indexOf('miniprogram') > -1 && sUserAgent.indexOf('alipay') > -1 if (dtdreamweb) { // alert('浙里办') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2`) } else if (miniprogram) { // alert('支付宝') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2`) } else { // alert('非浙里办渠道访问,显示测试用户数据') // console.log('非浙里办渠道访问,显示测试用户数据', userData) @@ -298,20 +298,20 @@ export default { }).then((res) => { if (dtdreamweb) { // alert('浙里办') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2`) } else if (miniprogram) { // alert('支付宝') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2`) } }) } else { localStorage.setItem('reloadCount', 2) if (dtdreamweb) { // alert('浙里办') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=8301b7fe71594245b97560ff841db1f2`) } else if (miniprogram) { // alert('支付宝') - window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2` + window.open(`https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=8301b7fe71594245b97560ff841db1f2`) } } }, -- libgit2 0.21.0