登录、授权修改
parent
e716d22954
commit
0e4341ad10
|
@ -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')
|
||||
})
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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 != '') {
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue