diff --git a/src/views/PublicHome/HomeKQ.vue b/src/views/PublicHome/HomeKQ.vue
index 4e4d43c..54a9182 100644
--- a/src/views/PublicHome/HomeKQ.vue
+++ b/src/views/PublicHome/HomeKQ.vue
@@ -77,24 +77,34 @@ export default {
this.headImgUrl = sessionStorage.getItem('headImgUrl')
this.nicknameUser = sessionStorage.getItem('nicknameUser')
- const sUserAgent = window.navigator.userAgent.toLowerCase()
- alert(sUserAgent)
- console.log(sUserAgent)
- const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1
- 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=hswsy`;
- }
-
- if (miniprogram) {
- alert('支付宝')
- // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;
- }
- sessionStorage.setItem('unionId', 'oJPmPuLaAx2x2DaRGfCFeYuLWzLU')
- this.getUserInfoXST()
+ alert(location.href)
+ this.checkAuth()
},
methods: {
+ checkAuth () {
+ let centerNo = this.$route.query.center_no || sessionStorage.getItem('centerNo');
+ if (centerNo) {
+ alert('获取到centerNo,不跳登录')
+ console.log('获取到centerNo,不跳登录')
+ this.centerNo = centerNo
+ sessionStorage.setItem('centerNo', centerNo);
+ } else {
+ const sUserAgent = window.navigator.userAgent.toLowerCase()
+ const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1
+ 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=hswsy`;
+ }
+ else if (miniprogram) {
+ alert('支付宝')
+ // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;
+ }
+ else{
+ alert('非浙里办或支付宝渠道访问')
+ }
+ }
+ },
// 研学码
handleYanxue () {
let isLogin = this.checkLogin()
diff --git a/src/views/PublicService/ServiceBaseKQ.vue b/src/views/PublicService/ServiceBaseKQ.vue
index 89c4eda..f69af54 100644
--- a/src/views/PublicService/ServiceBaseKQ.vue
+++ b/src/views/PublicService/ServiceBaseKQ.vue
@@ -105,13 +105,6 @@ export default {
console.log('base activated')
this.initService()
},
- computed: {
- schoolName() {
- if(!sessionStorage.getItem('userInfo')) return {schoolName: ''}
- console.log(JSON.parse(sessionStorage.getItem('userInfo')).schoolName)
- return JSON.parse(sessionStorage.getItem('userInfo')).schoolName
- }
- },
methods: {
initService(){
this.getUniList()
@@ -287,32 +280,16 @@ export default {
},
// 我的订单
handleMyOrder(){
- let isLogin = this.checkLogin()
- if (!isLogin) return;
this.$router.push({ name: 'ServiceOrderPublic' })
},
// 我的优惠券
handleMyCard(){
- let isLogin = this.checkLogin()
- if (!isLogin) return;
this.$router.push({ name: 'ServiceCardBoxPublic' })
},
// 个人信息
handleMyClass(){
this.$router.push({ name: 'privateXST' })
},
- // 判断是否已登录
- checkLogin () {
- if (process.env.NODE_ENV != "production") return true;
- const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
- if (!userInfo?.phone) {
- sessionStorage.setItem('prePage', 'Service' + this.publicName);
- sessionStorage.setItem('prePageQuery', JSON.stringify({ showTab:this.$route.query.showTab }));
- this.$router.push({ name: 'LoginPublic', query: { publicName: this.publicName } })
- return false;
- }
- return true;
- },
formatWeek(week){
return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';
},
diff --git a/src/views/PublicService/ServiceKQ.vue b/src/views/PublicService/ServiceKQ.vue
index 82b4c13..a282cef 100644
--- a/src/views/PublicService/ServiceKQ.vue
+++ b/src/views/PublicService/ServiceKQ.vue
@@ -1,103 +1,55 @@
-
+
--
libgit2 0.21.0