登录、授权修改
parent
e716d22954
commit
0e4341ad10
|
@ -156,18 +156,14 @@
|
||||||
uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式)
|
uni.setStorageSync('expire',res.data.data.expire); // 缓存失效时间(时间戳格式)
|
||||||
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
uni.setStorageSync('phone_active',res.data.data.phone_active); // 是否绑定手机号
|
||||||
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
uni.setStorageSync('is_active',res.data.data.is_active)//是否第一次授权
|
||||||
if(res.data.data.phone_active!==0 || res.data.data.is_active!==0) {
|
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){
|
||||||
if(uni.getStorageSync('authorization')==1){
|
|
||||||
this.showAuth = true;
|
|
||||||
}else{
|
|
||||||
this.showAuth = false;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
this.showAuth = true;
|
this.showAuth = true;
|
||||||
|
}else{
|
||||||
|
this.showAuth = false;
|
||||||
}
|
}
|
||||||
// this.$requst.post('user/first-enter',{openid:res.data.data.openid,path:uni.getStorageSync('urlparams')}).then(res=>{})
|
// this.$requst.post('user/first-enter',{openid:res.data.data.openid,path:uni.getStorageSync('urlparams')}).then(res=>{})
|
||||||
} else {
|
}else {
|
||||||
uni.reLaunch({ // 重新进入当前页面
|
uni.reLaunch({ // 重新进入当前页面
|
||||||
url:uni.getStorageSync('urlparams')
|
url:uni.getStorageSync('urlparams')
|
||||||
})
|
})
|
||||||
|
|
|
@ -92,16 +92,21 @@
|
||||||
},
|
},
|
||||||
choosefoot(index){
|
choosefoot(index){
|
||||||
let existMobile = uni.getStorageSync('phone_active');
|
let existMobile = uni.getStorageSync('phone_active');
|
||||||
|
let existActive = uni.getStorageSync('is_active');
|
||||||
// this.current = index
|
// this.current = index
|
||||||
switch (index){
|
switch (index){
|
||||||
case 0:
|
case 0:
|
||||||
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
||||||
break;
|
break;
|
||||||
case 1:
|
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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if(existMobile!=''){
|
if(existMobile!==0){
|
||||||
// wx.openCustomerServiceChat({
|
// wx.openCustomerServiceChat({
|
||||||
// extInfo: {url: `https://work.weixin.qq.com/kfid/kfcb3bba5b57d9a42ba?enc_scene=ENC616HXDjLYNcmsR49PBE75UERg8Ncv3dygpYjfnh3XVvA&scene_param=${uni.getStorageSync('openid')}`},
|
// extInfo: {url: `https://work.weixin.qq.com/kfid/kfcb3bba5b57d9a42ba?enc_scene=ENC616HXDjLYNcmsR49PBE75UERg8Ncv3dygpYjfnh3XVvA&scene_param=${uni.getStorageSync('openid')}`},
|
||||||
// corpId: 'ww1f86f258d4ff5817',
|
// corpId: 'ww1f86f258d4ff5817',
|
||||||
|
@ -115,10 +120,14 @@
|
||||||
} else this.goLogin()
|
} else this.goLogin()
|
||||||
break;
|
break;
|
||||||
case 3:
|
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;
|
break;
|
||||||
case 4:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
<!-- 底部tab -->
|
<!-- 底部tab -->
|
||||||
<foot-tab :titleList="titleList" :imgList="imgList" :newcurrent='3'></foot-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="cart-box">
|
||||||
<view class="posir">
|
<view class="posir">
|
||||||
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
||||||
|
@ -203,7 +203,8 @@
|
||||||
optionObj:{},
|
optionObj:{},
|
||||||
positionMode:'sticky',
|
positionMode:'sticky',
|
||||||
gaodu:0,
|
gaodu:0,
|
||||||
shareData:[]
|
shareData:[],
|
||||||
|
phone_active:uni.getStorageSync('phone_active'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -404,12 +404,17 @@
|
||||||
}
|
}
|
||||||
// 详情
|
// 详情
|
||||||
this.detailObj = res.data.detail;
|
this.detailObj = res.data.detail;
|
||||||
if(uni.getStorageSync('phone_active')!=1){
|
if(uni.getStorageSync('authorization')==1){
|
||||||
this.ifNeedAuth = this.detailObj.need_permission ? true : false;
|
if(uni.getStorageSync('phone_active')!=1){
|
||||||
this.isLoading = this.detailObj.need_permission ? false : true;
|
this.ifNeedAuth = this.detailObj.need_permission ? true : false;
|
||||||
} else {
|
this.isLoading = this.detailObj.need_permission ? false : true;
|
||||||
|
} else {
|
||||||
|
this.isLoading = true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否显示swiper
|
// 是否显示swiper
|
||||||
this.ifSwiper = this.detailObj.images_show;
|
this.ifSwiper = this.detailObj.images_show;
|
||||||
if (this.detailObj.published_headimgurl != '') {
|
if (this.detailObj.published_headimgurl != '') {
|
||||||
|
|
|
@ -447,19 +447,25 @@
|
||||||
},
|
},
|
||||||
// 调起弹框
|
// 调起弹框
|
||||||
tuneUp(index){
|
tuneUp(index){
|
||||||
if(this.isNei!=1) {
|
if(uni.getStorageSync('phone_active')!==0){
|
||||||
|
if(this.isNei!=1) {
|
||||||
|
|
||||||
} else {
|
|
||||||
if(index==1) {
|
|
||||||
this.ifAlone = false;
|
|
||||||
} else {
|
} else {
|
||||||
this.ifAlone = true;
|
if(index==1) {
|
||||||
|
this.ifAlone = false;
|
||||||
|
} else {
|
||||||
|
this.ifAlone = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if(this.detailObj.is_close==0){
|
||||||
if(this.detailObj.is_close==0){
|
this.showTK = true;
|
||||||
this.showTK = true;
|
} else {
|
||||||
} else {
|
this.$toolAll.tools.showToast('该商品活动已结束')
|
||||||
this.$toolAll.tools.showToast('该商品活动已结束')
|
}
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/login'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 数量输入事件
|
// 数量输入事件
|
||||||
|
@ -866,9 +872,16 @@
|
||||||
goShopCart(){//去购物车事件
|
goShopCart(){//去购物车事件
|
||||||
let isScore = '';
|
let isScore = '';
|
||||||
if(this.isNei==3) isScore = 'score';
|
if(this.isNei==3) isScore = 'score';
|
||||||
uni.navigateTo({
|
if(uni.getStorageSync('phone_active')!==0){
|
||||||
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
|
uni.navigateTo({
|
||||||
})
|
url:`/pagesA/shopCart/shopCart?isScore=${isScore}`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/login/login`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
goDoctor(id){
|
goDoctor(id){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
|
<cate-tu :list="reSearchList" @delev='delev'></cate-tu>
|
||||||
</view>
|
</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="cart-box">
|
||||||
<view class="posir">
|
<view class="posir">
|
||||||
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
<image src="/static/public/cart.png" mode="aspectFill"></image>
|
||||||
|
@ -177,6 +177,7 @@
|
||||||
zanArr:[],
|
zanArr:[],
|
||||||
timer:'',
|
timer:'',
|
||||||
isShowP:false,
|
isShowP:false,
|
||||||
|
phone_active:uni.getStorageSync('phone_active'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
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