登录、授权修改

master
Lee 2023-01-03 14:28:18 +08:00
parent e716d22954
commit 0e4341ad10
26 changed files with 79 additions and 54 deletions

View File

@ -156,18 +156,14 @@
uni.setStorageSync('expire',res.data.data.expire); //
uni.setStorageSync('phone_active',res.data.data.phone_active); //
uni.setStorageSync('is_active',res.data.data.is_active)//
if(res.data.data.phone_active!==0 || res.data.data.is_active!==0) {
if(uni.getStorageSync('paramsUrl')!=='/pages/tabbar/my/staffDuan'&&uni.getStorageSync('paramsUrl').indexOf('/pagesA/')!==-1){
if(uni.getStorageSync('authorization')==1){
this.showAuth = true;
}else{
this.showAuth = false;
}
}else{
if(res.data.data.phone_active==0 || res.data.data.is_active==0) {
if(uni.getStorageSync('authorization')==1){
this.showAuth = true;
}else{
this.showAuth = false;
}
// this.$requst.post('user/first-enter',{openid:res.data.data.openid,path:uni.getStorageSync('urlparams')}).then(res=>{})
} else {
}else {
uni.reLaunch({ //
url:uni.getStorageSync('urlparams')
})

View File

@ -92,16 +92,21 @@
},
choosefoot(index){
let existMobile = uni.getStorageSync('phone_active');
let existActive = uni.getStorageSync('is_active');
// this.current = index
switch (index){
case 0:
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
break;
case 1:
existMobile!='' ? uni.reLaunch({url:'/pages/tabbar/cate/cate?index=0'}) : this.goLogin();
if(uni.getStorageSync('authorization')==1){
existMobile!==0 ? uni.reLaunch({url:'/pages/tabbar/cate/cate?index=0'}) : this.goLogin();
}else{
uni.reLaunch({url:'/pages/tabbar/cate/cate?index=0'})
}
break;
case 2:
if(existMobile!=''){
if(existMobile!==0){
// wx.openCustomerServiceChat({
// extInfo: {url: `https://work.weixin.qq.com/kfid/kfcb3bba5b57d9a42ba?enc_scene=ENC616HXDjLYNcmsR49PBE75UERg8Ncv3dygpYjfnh3XVvA&scene_param=${uni.getStorageSync('openid')}`},
// corpId: 'ww1f86f258d4ff5817',
@ -115,10 +120,14 @@
} else this.goLogin()
break;
case 3:
existMobile!='' ? uni.reLaunch({url:'/pages/tabbar/shop/shop'}) : this.goLogin();
if(uni.getStorageSync('authorization')==1){
existMobile!==0 ? uni.reLaunch({url:'/pages/tabbar/shop/shop'}) : this.goLogin();
}else{
uni.reLaunch({url:'/pages/tabbar/shop/shop'})
}
break;
case 4:
existMobile!='' ? uni.reLaunch({url:'/pages/tabbar/my/staffDuan'}) : this.goLogin();
existMobile!==0&&existActive!==0 ? uni.reLaunch({url:'/pages/tabbar/my/staffDuan'}) : this.goLogin();
break;
}
},

View File

@ -148,7 +148,7 @@
<!-- 底部tab -->
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='3'></foot-tab>
<!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
<navigator :url="phone_active!==0?'/pagesA/shopCart/shopCart?isScore=false':'/pages/login/login'" hover-class="none">
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
@ -203,7 +203,8 @@
optionObj:{},
positionMode:'sticky',
gaodu:0,
shareData:[]
shareData:[],
phone_active:uni.getStorageSync('phone_active'),
}
},
computed: {

View File

@ -404,12 +404,17 @@
}
//
this.detailObj = res.data.detail;
if(uni.getStorageSync('phone_active')!=1){
this.ifNeedAuth = this.detailObj.need_permission ? true : false;
this.isLoading = this.detailObj.need_permission ? false : true;
} else {
if(uni.getStorageSync('authorization')==1){
if(uni.getStorageSync('phone_active')!=1){
this.ifNeedAuth = this.detailObj.need_permission ? true : false;
this.isLoading = this.detailObj.need_permission ? false : true;
} else {
this.isLoading = true;
}
}else{
this.isLoading = true;
}
// swiper
this.ifSwiper = this.detailObj.images_show;
if (this.detailObj.published_headimgurl != '') {

View File

@ -447,19 +447,25 @@
},
//
tuneUp(index){
if(this.isNei!=1) {
} else {
if(index==1) {
this.ifAlone = false;
if(uni.getStorageSync('phone_active')!==0){
if(this.isNei!=1) {
} else {
this.ifAlone = true;
if(index==1) {
this.ifAlone = false;
} else {
this.ifAlone = true;
}
}
}
if(this.detailObj.is_close==0){
this.showTK = true;
} else {
this.$toolAll.tools.showToast('该商品活动已结束')
if(this.detailObj.is_close==0){
this.showTK = true;
} else {
this.$toolAll.tools.showToast('该商品活动已结束')
}
}else{
uni.navigateTo({
url:'/pages/login/login'
})
}
},
//
@ -866,9 +872,16 @@
goShopCart(){//
let isScore = '';
if(this.isNei==3) isScore = 'score';
uni.navigateTo({
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
})
if(uni.getStorageSync('phone_active')!==0){
uni.navigateTo({
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
})
}else{
uni.navigateTo({
url:`/pages/login/login`
})
}
},
goDoctor(id){
uni.navigateTo({

View File

@ -106,7 +106,7 @@
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
</view>
<!-- 购物车 -->
<navigator url="/pagesA/shopCart/shopCart?isScore=false" hover-class="none">
<navigator :url="phone_active!==0?'/pagesA/shopCart/shopCart?isScore=false':'/pages/login/login'" hover-class="none">
<view class="cart-box">
<view class="posir">
<image src="/static/public/cart.png" mode="aspectFill"></image>
@ -177,6 +177,7 @@
zanArr:[],
timer:'',
isShowP:false,
phone_active:uni.getStorageSync('phone_active'),
}
},
computed: {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long