|
@@ -6,8 +6,8 @@
|
|
<view class="login-box">
|
|
<view class="login-box">
|
|
<view class="tabTitle">
|
|
<view class="tabTitle">
|
|
<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
|
|
<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
|
|
- <view class="tabTitle_text">{{item}}</view>
|
|
|
|
- <view class="tabTitle_across"></view>
|
|
|
|
|
|
+ <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
|
|
|
|
+ <view :class="{on:curTab==index}" class="tabTitle_across"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="input-max-box-one">
|
|
<view class="input-max-box-one">
|
|
@@ -50,7 +50,7 @@ export default {
|
|
checkedType:false,
|
|
checkedType:false,
|
|
loginBanner:uni.getStorageSync('loginBanner'),
|
|
loginBanner:uni.getStorageSync('loginBanner'),
|
|
infoList:[],//模板消息Id
|
|
infoList:[],//模板消息Id
|
|
- tabText:['师生登录'],
|
|
|
|
|
|
+ tabText:['师生登录','供应商登录'],
|
|
curTab:0,
|
|
curTab:0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -77,7 +77,7 @@ export default {
|
|
//顶部tab点击
|
|
//顶部tab点击
|
|
tabClick(index) {
|
|
tabClick(index) {
|
|
this.curTab = index;
|
|
this.curTab = index;
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//获取openID
|
|
//获取openID
|
|
async getOpenId(){
|
|
async getOpenId(){
|
|
@@ -157,7 +157,6 @@ export default {
|
|
if(data.code == 200){
|
|
if(data.code == 200){
|
|
uni.setStorageSync('token','Bearer '+data.data.access_token);
|
|
uni.setStorageSync('token','Bearer '+data.data.access_token);
|
|
uni.setStorageSync('userId',data.data.user_id);
|
|
uni.setStorageSync('userId',data.data.user_id);
|
|
- uni.setStorageSync('tenantId',data.data.tenantId);//0 系统 1化工 2能动
|
|
|
|
this.getOpenId();//获取openid
|
|
this.getOpenId();//获取openid
|
|
if(data.data.type == "00" ||data.data.type == "11"){//管理端
|
|
if(data.data.type == "00" ||data.data.type == "11"){//管理端
|
|
uni.setStorageSync('userType',"1");
|
|
uni.setStorageSync('userType',"1");
|
|
@@ -170,7 +169,6 @@ export default {
|
|
uni.setStorageSync('userType',"3");
|
|
uni.setStorageSync('userType',"3");
|
|
this.getToken2()//订阅消息
|
|
this.getToken2()//订阅消息
|
|
}
|
|
}
|
|
-
|
|
|
|
if(this.checkedType){
|
|
if(this.checkedType){
|
|
uni.setStorageSync('userName',this.username)
|
|
uni.setStorageSync('userName',this.username)
|
|
uni.setStorageSync('password',this.password)
|
|
uni.setStorageSync('password',this.password)
|
|
@@ -313,7 +311,7 @@ export default {
|
|
display block;
|
|
display block;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
border-radius:20rpx;
|
|
border-radius:20rpx;
|