|
@@ -3,29 +3,34 @@
|
|
<view id="login">
|
|
<view id="login">
|
|
<img class="login-max-big" :src="loginBanner">
|
|
<img class="login-max-big" :src="loginBanner">
|
|
<view class="login-box">
|
|
<view class="login-box">
|
|
|
|
+ <view class="tabTitle">
|
|
|
|
+ <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
|
|
|
|
+ <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
|
|
|
|
+ <view :class="{on:curTab==index}" class="tabTitle_across"></view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view class="input-max-box-one">
|
|
<view class="input-max-box-one">
|
|
<view class="input-box">
|
|
<view class="input-box">
|
|
- <img src="@/images/basicsModules/img_log_in_account.png">
|
|
|
|
|
|
+ <img src="@/images/basicsModules/img_log_in_account.png"/>
|
|
<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
|
|
<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="input-max-box-two">
|
|
<view class="input-max-box-two">
|
|
<view class="input-box">
|
|
<view class="input-box">
|
|
- <img src="@/images/basicsModules/img_log_in_password.png">
|
|
|
|
|
|
+ <img src="@/images/basicsModules/img_log_in_password.png"/>
|
|
<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
|
|
<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="check-max-box">
|
|
|
|
- <view class="check-box" @click="checkboxChange">
|
|
|
|
- <img v-if="checkedType" src="@/images/basicsModules/icon_13.png">
|
|
|
|
- <img v-if="!checkedType" src="@/images/basicsModules/icon_12.png">
|
|
|
|
- <view>记住我</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="check-right-box" @click="nullPasswrod">
|
|
|
|
- 忘记密码
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="check-box" @click="checkboxChange">
|
|
|
|
+ <img v-if="checkedType" src="@/images/basicsModules/icon_13.png"/>
|
|
|
|
+ <img v-if="!checkedType" src="@/images/basicsModules/icon_12.png"/>
|
|
|
|
+ <view>记住我</view>
|
|
</view>
|
|
</view>
|
|
<view class="button-box" @click="login">登录</view>
|
|
<view class="button-box" @click="login">登录</view>
|
|
|
|
+ <view class="supplier" v-if="curTab==1">
|
|
|
|
+ <view class="supplier_l" @click="handleClick('forget')">忘记密码</view>
|
|
|
|
+ <view class="supplier_r" @click="handleClick('register')">没有账号,<text>立即注册</text></view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -49,6 +54,7 @@ export default {
|
|
tabText:['师生登录','供应商登录'],
|
|
tabText:['师生登录','供应商登录'],
|
|
curTab:0,
|
|
curTab:0,
|
|
pageType:0,
|
|
pageType:0,
|
|
|
|
+ supplierType:false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -84,6 +90,7 @@ export default {
|
|
if(data.code == 200){
|
|
if(data.code == 200){
|
|
uni.setStorageSync('token',data.data.token);
|
|
uni.setStorageSync('token',data.data.token);
|
|
uni.setStorageSync('userId',data.data.userId);
|
|
uni.setStorageSync('userId',data.data.userId);
|
|
|
|
+ // userType 0-系统 1-教职工 2-学生 3-大屏
|
|
uni.setStorageSync('userType',data.data.userType==0||data.data.userType==1?'1':
|
|
uni.setStorageSync('userType',data.data.userType==0||data.data.userType==1?'1':
|
|
(data.data.userType==2?'2':(data.data.userType==3?'3':'none')));
|
|
(data.data.userType==2?'2':(data.data.userType==3?'3':'none')));
|
|
if(this.checkedType){
|
|
if(this.checkedType){
|
|
@@ -93,10 +100,26 @@ export default {
|
|
uni.removeStorageSync('userName')
|
|
uni.removeStorageSync('userName')
|
|
uni.removeStorageSync('password')
|
|
uni.removeStorageSync('password')
|
|
}
|
|
}
|
|
- //获取开发配置
|
|
|
|
- this.getConfigByType();
|
|
|
|
- //获取权限字段
|
|
|
|
- this.systemAppletRolePermission();
|
|
|
|
|
|
+ //等待配置与字段获取到后跳转
|
|
|
|
+ Promise.all([
|
|
|
|
+ //获取开发配置
|
|
|
|
+ this.getConfigByType(),
|
|
|
|
+ //获取权限字段
|
|
|
|
+ this.systemAppletRolePermission()
|
|
|
|
+ ]).then((result)=>{
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: '/pages/mine/mine',
|
|
|
|
+ });
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '数据异常,请稍候再试!',
|
|
|
|
+ icon: "none",
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
//获取身份标识
|
|
//获取身份标识
|
|
// this.getGentleIdentifier();
|
|
// this.getGentleIdentifier();
|
|
}
|
|
}
|
|
@@ -155,29 +178,22 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//查询公共配置
|
|
//查询公共配置
|
|
- getConfigInfo(){
|
|
|
|
- this.getCircularLogo();
|
|
|
|
- this.getVideoCover();
|
|
|
|
- this.getBanner();
|
|
|
|
- },
|
|
|
|
- async getCircularLogo(){
|
|
|
|
- const {data} = await configInfo({ type: 1 });
|
|
|
|
|
|
+ async getConfigInfo(){
|
|
|
|
+ const {data} = await configInfo({ type: '1,2,4' });
|
|
if(data.code == 200){
|
|
if(data.code == 200){
|
|
- uni.setStorageSync('circularLogo',config.base_url + data.data.circularLogo)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- async getVideoCover(){
|
|
|
|
- const {data} = await configInfo({ type: 2 });
|
|
|
|
- if(data.code == 200){
|
|
|
|
- uni.setStorageSync('videoCover',config.base_url + data.data.videoCover)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- async getBanner(){
|
|
|
|
- const {data} = await configInfo({ type: 4 });
|
|
|
|
- if(data.code == 200){
|
|
|
|
- this.loginBanner = config.base_url + data.data.loginBanner;
|
|
|
|
- uni.setStorageSync('loginBanner',config.base_url + data.data.loginBanner)
|
|
|
|
- uni.setStorageSync('homepageBanner',config.base_url + data.data.homepageBanner)
|
|
|
|
|
|
+ let list = JSON.parse(data.data)
|
|
|
|
+ let newData = {};
|
|
|
|
+ list.forEach((item) => {
|
|
|
|
+ let obj = JSON.parse(item.configValue)
|
|
|
|
+ newData = {...newData,...obj}
|
|
|
|
+ })
|
|
|
|
+ uni.setStorageSync('circularLogo',config.base_url + newData.circularLogo)
|
|
|
|
+ uni.setStorageSync('videoCover',config.base_url + newData.videoCover)
|
|
|
|
+ this.$set(this,'loginBanner',config.base_url + newData.loginBanner);
|
|
|
|
+ uni.setStorageSync('loginBanner',config.base_url + newData.loginBanner)
|
|
|
|
+ this.$set(this,'supplierType',newData.supplier);
|
|
|
|
+ uni.setStorageSync('supplierType',newData.supplier)
|
|
|
|
+ uni.setStorageSync('homepageBanner',config.base_url + newData.homepageBanner)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取开发配置
|
|
//获取开发配置
|
|
@@ -199,10 +215,6 @@ export default {
|
|
uni.setStorageSync('mqttUser',Decrypt(obj.mqttExtranetUser))
|
|
uni.setStorageSync('mqttUser',Decrypt(obj.mqttExtranetUser))
|
|
//MQTT密码
|
|
//MQTT密码
|
|
uni.setStorageSync('mqttPassword',Decrypt(obj.mqttExtranetPassword))
|
|
uni.setStorageSync('mqttPassword',Decrypt(obj.mqttExtranetPassword))
|
|
- uni.redirectTo({
|
|
|
|
- url: '/pages/mine/mine',
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
checkboxChange() {
|
|
checkboxChange() {
|
|
@@ -240,19 +252,60 @@ export default {
|
|
position relative
|
|
position relative
|
|
.login-max-big{
|
|
.login-max-big{
|
|
width:750rpx;
|
|
width:750rpx;
|
|
- height:1102rpx;
|
|
|
|
|
|
+ height:1177rpx;
|
|
z-index:0;
|
|
z-index:0;
|
|
}
|
|
}
|
|
.login-box{
|
|
.login-box{
|
|
- z-index:1;
|
|
|
|
|
|
+ z-index:3;
|
|
position: absolute
|
|
position: absolute
|
|
top:446rpx;
|
|
top:446rpx;
|
|
left:46rpx;
|
|
left:46rpx;
|
|
width:658rpx;
|
|
width:658rpx;
|
|
- height:655rpx;
|
|
|
|
|
|
+ height:700rpx;
|
|
// background #fff
|
|
// background #fff
|
|
|
|
+ /* 切换按钮 */
|
|
|
|
+ .tabTitle{
|
|
|
|
+ display flex;
|
|
|
|
+ width:100%;
|
|
|
|
+ height: 100rpx;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50rpx;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ >view:nth-of-type(1){
|
|
|
|
+ margin-right: 100rpx;
|
|
|
|
+ }
|
|
|
|
+ .tabTitle_li{
|
|
|
|
+ width:168rpx;
|
|
|
|
+ text-align center;
|
|
|
|
+ .tabTitle_text{
|
|
|
|
+ display: inline-block;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 90rpx;
|
|
|
|
+ &.on{
|
|
|
|
+ color:#0183FA;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .tabTitle_across{
|
|
|
|
+ width: 100rpx;
|
|
|
|
+ height: 4rpx;
|
|
|
|
+ background: #0183FA;
|
|
|
|
+ border-radius: 2rpx;
|
|
|
|
+ margin-left 30rpx;
|
|
|
|
+ display none;
|
|
|
|
+ &.on{
|
|
|
|
+ display block;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
border-radius:20rpx;
|
|
border-radius:20rpx;
|
|
.input-max-box-one{
|
|
.input-max-box-one{
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ margin-top:68rpx;
|
|
.input-box{
|
|
.input-box{
|
|
display flex
|
|
display flex
|
|
width:600rpx;
|
|
width:600rpx;
|
|
@@ -311,28 +364,20 @@ export default {
|
|
margin-left:102rpx;
|
|
margin-left:102rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .check-max-box{
|
|
|
|
- display flex;
|
|
|
|
- .check-box{
|
|
|
|
- margin:30rpx 0 30rpx 104rpx;
|
|
|
|
- width:300rpx;
|
|
|
|
- height:50rpx;
|
|
|
|
- display:flex;
|
|
|
|
- img{
|
|
|
|
- margin-top:10rpx;
|
|
|
|
- width:32rpx;
|
|
|
|
- height:32rpx;
|
|
|
|
- margin-right:10rpx;
|
|
|
|
- }
|
|
|
|
- view{
|
|
|
|
- font-size:24rpx;
|
|
|
|
- line-height:50rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ .check-box{
|
|
|
|
+ margin:30rpx 0 30rpx 104rpx;
|
|
|
|
+ width:300rpx;
|
|
|
|
+ height:50rpx;
|
|
|
|
+ display:flex;
|
|
|
|
+ img{
|
|
|
|
+ margin-top:10rpx;
|
|
|
|
+ width:32rpx;
|
|
|
|
+ height:32rpx;
|
|
|
|
+ margin-right:10rpx;
|
|
}
|
|
}
|
|
- .check-right-box{
|
|
|
|
|
|
+ view{
|
|
font-size:24rpx;
|
|
font-size:24rpx;
|
|
line-height:50rpx;
|
|
line-height:50rpx;
|
|
- margin:30rpx 0 30rpx 30rpx;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.button-box{
|
|
.button-box{
|
|
@@ -345,6 +390,46 @@ export default {
|
|
text-align center
|
|
text-align center
|
|
margin:0 auto 0;
|
|
margin:0 auto 0;
|
|
}
|
|
}
|
|
|
|
+ /* 供应商注册 */
|
|
|
|
+ .supplier{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ margin:30rpx 40rpx 0;
|
|
|
|
+ .supplier_l{
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 24rpx;
|
|
|
|
+ }
|
|
|
|
+ .supplier_r{
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 24rpx;
|
|
|
|
+ >text{
|
|
|
|
+ color: #0183FA;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /* 供应商切换 */
|
|
|
|
+ .switch_btn{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #0183FA;
|
|
|
|
+ line-height: 24rpx;
|
|
|
|
+ margin-top: 60rpx;
|
|
|
|
+ >img{
|
|
|
|
+ width: 24rpx;
|
|
|
|
+ height: 24rpx;
|
|
|
|
+ margin-left: 12rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.top-back{
|
|
.top-back{
|
|
z-index:2;
|
|
z-index:2;
|
|
@@ -355,4 +440,4 @@ export default {
|
|
width:366rpx;
|
|
width:366rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|