登录逻辑修改
This commit is contained in:
parent
c67bb910da
commit
cd20bd3f5d
|
|
@ -19,7 +19,7 @@
|
||||||
<view class="zdxqitem" @click="switch2Change('土壤')">
|
<view class="zdxqitem" @click="switch2Change('土壤')">
|
||||||
<image src="../../static/iconsheturangzs.png" mode=""></image>
|
<image src="../../static/iconsheturangzs.png" mode=""></image>
|
||||||
<view class="textss">
|
<view class="textss">
|
||||||
长期定位监测点位
|
长期定位监测点
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -55,9 +55,31 @@
|
||||||
this.mapCtx = uni.createMapContext('map', this);
|
this.mapCtx = uni.createMapContext('map', this);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (!uni.getStorageSync('third_session')) {
|
if(uni.getStorageSync('third_session')){
|
||||||
|
uni.login({
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res.code)
|
||||||
|
this.code = res.code
|
||||||
|
let params = {}
|
||||||
|
params.jsCode = this.code
|
||||||
|
console.log(params,152)
|
||||||
|
api.wxlogin(params).then(res=>{
|
||||||
|
console.log(res,165)
|
||||||
|
if(res.data.code == 0){
|
||||||
|
let userInfo = res.data.data;
|
||||||
|
// uni.setStorageSync('third_session', userInfo.thirdSession);
|
||||||
|
if(!userInfo.id){
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/packDetail/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if(!uni.getStorageSync('third_session')){
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/packDetail/pages/login/login'
|
url:'/packDetail/pages/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -431,7 +453,7 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55);
|
text-shadow: 0rpx 1rpx 0rpx rgba(4, 49, 52, 0.55);
|
||||||
width: 359rpx;
|
width: 240rpx;
|
||||||
background: rgba(0, 0, 0, 0.52);
|
background: rgba(0, 0, 0, 0.52);
|
||||||
border: 1px solid #4B677C;
|
border: 1px solid #4B677C;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue