Commit 0fa34874 authored by 小费同学阿's avatar 小费同学阿 💬

mc角色判断登录跳转

parent 430057e8
<template>
<view class="normal-login-container">
<ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'" :title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'" />
<ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'"
:title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'"
/>
<!-- 中间大图标 -->
<view class="big-icon">
<image
......@@ -11,18 +13,18 @@
</view>
<view class="login-form-content">
<view class="input-item flex align-center">
<view class="iconfont icon-user icon"></view>
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
<view class="iconfont icon-user icon"/>
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30">
</view>
<view class="input-item flex align-center">
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
<view class="iconfont icon-password icon"/>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20">
</view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view v-if="captchaEnabled" class="input-item flex align-center" style="width: 60%;margin: 0px;">
<view class="iconfont icon-code icon"/>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4">
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
<image :src="codeUrl" class="login-code-img" @click="getCode"/>
</view>
</view>
</view>
......@@ -34,7 +36,7 @@
</button>
</view>
<view class="loading">
<u-loading-icon :show="loading" size="30" />
<u-loading-icon :show="loading" size="30"/>
</view>
</view>
</template>
......@@ -76,7 +78,7 @@ export default {
},
onLoad() {
console.log('微信登陆页面')
/*this.getWxCode()
/* this.getWxCode()
this.$store.commit('SET_SHOW_CONFIRM', true)
this.$store.commit('SET_LOGOUT_BTN', false)
setInterval(() => {
......@@ -205,7 +207,7 @@ export default {
getCode() {
getCodeImg().then(res => {
this.loginForm.uuid = res.uuid
/*this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
/* this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.img
this.loginForm.uuid = res.uuid
......@@ -240,7 +242,13 @@ export default {
loginSuccess(result) {
// 设置用户信息
this.$store.dispatch('GetInfo').then(res => {
if (res.data.user.deptName && res.data.user.deptName === '机械加工科') {
// 如果是MC就跳转消息页面
this.$tab.reLaunch('/pages/message/index')
} else {
// 其他情况跳转首页
this.$tab.reLaunch('/pages/index')
}
})
}
}
......@@ -254,7 +262,7 @@ page {
.normal-login-container {
// 背景切图撑开
background: linear-gradient( 240deg, #B9E5FB 0%, #E8E2FD 46%, #95AEF5 100%);
background: linear-gradient(240deg, #B9E5FB 0%, #E8E2FD 46%, #95AEF5 100%);
background-size: 100% auto;
background-repeat: no-repeat;
background-position: top;
......@@ -326,7 +334,7 @@ page {
}
//协议--《百邦宠物隐私政策和用户协议》
/deep/ .text-private, .line-blue, .lines-blue {
::v-deep .text-private, .line-blue, .lines-blue {
font-size: 30rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
......@@ -336,7 +344,7 @@ page {
-webkit-text-fill-color: transparent;
}
/deep/ .text-private-down {
::v-deep .text-private-down {
margin-top: 20rpx;
margin-left: 28rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment