Merge remote-tracking branch 'origin/dev' into test

This commit is contained in:
fan 2020-03-31 13:47:25 +08:00
commit 724e198f79
7 changed files with 14 additions and 13 deletions

View File

@ -8,7 +8,7 @@
<script>
import { getToken } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth';
import { ProjectIcon, loginInfo } from '@/scripts/ConstDic';
import { loginInfo } from '@/scripts/ConstDic';
import DeomonTopic from '@/views/demonstration/deomonTopic';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
@ -46,8 +46,6 @@ export default {
},
mounted() {
this.prohibitSystemContextMenu();
const project = window.sessionStorage.getItem('project');
document.querySelector("link[rel*='icon']").href = ProjectIcon[project];
var beforeUnload_time = 0;
var gap_time = 0;

View File

@ -17,5 +17,6 @@ export default {
accountOrPasswordIsIncorrect: 'The account number or password is incorrect!',
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
language: 'Language',
clickSwitchLanguage: 'Click switch language'
clickSwitchLanguage: 'Click switch language',
accountName: 'Account name'
};

View File

@ -17,5 +17,6 @@ export default {
accountOrPasswordIsIncorrect: '账号或密码不正确!',
getLoginQrCode: '获取登录二维码失败,请刷新重试',
language: '语言',
clickSwitchLanguage: '点击切换语言'
clickSwitchLanguage: '点击切换语言',
accountName: '账户名'
};

View File

@ -48,7 +48,7 @@ export default {
{
name: 'global.designPlatformEntrance',
handle: this.goToDesign,
hidden: getSessionStorage('project').startsWith('design') || getSessionStorage('project').endsWith('hyd')
hidden: getSessionStorage('project').startsWith('design')
},
{
name: 'global.trainingPlatformEntrance',

View File

@ -15,7 +15,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" :placeholder="this.$t('login.mobilePhoneNumberOrEmail')" @keyup.enter.native="goToNext" />
<el-input v-model="loginForm.username" name="username" type="text" :placeholder="this.$t('login.accountName')" @keyup.enter.native="goToNext" />
</el-form-item>
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
@ -50,7 +50,7 @@
<img :src="QCode" alt="" style="width: 100px; height: 100px; display: block; margin:0 auto;">
<div style="margin-top: 10px; word-break: break-word;text-align: center;">{{ $t('login.perfectInformation') }}</div>
</div>
<div slot="reference">{{ $t('login.unableToLogin') }}</div>
<!--<div slot="reference">{{ $t('login.unableToLogin') }}</div>-->
</el-popover>
</div>
<el-form-item>
@ -68,8 +68,7 @@ import QCode from '@/assets/erCode.jpg';
import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
import Cookies from 'js-cookie';
import md5 from 'js-md5';
import { checkLoginStatus } from '@/api/login';
import { UrlConfig } from '@/scripts/ConstDic';
import { ProjectIcon, UrlConfig } from '@/scripts/ConstDic';
import { removeToken } from '@/utils/auth';
import LangStorage from '@/utils/lang';
import logoImgHyd from '@/assets/logo_hyd.png';
@ -130,6 +129,7 @@ export default {
}
},
created() {
document.querySelector("link[rel*='icon']").href = ProjectIcon['hyd'];
this.computedAttribute();
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken)};
@ -156,7 +156,7 @@ export default {
},
methods: {
computedAttribute() {
let sessionVal = 'hyd';
let sessionVal = 'hyd';
if (this.project.startsWith('design')) {
this.cookiesName = 'UserDesignName';
this.cookiesToken = 'UserDesignToken';

View File

@ -102,7 +102,7 @@ import QrcodeVue from 'qrcode.vue';
import { getLoginWmurl, checkLoginStatus } from '@/api/login';
import { LoginParams } from '@/utils/login';
import bgImg from '@/assets/bg1.jpg';
import { loginInfo, UrlConfig } from '@/scripts/ConstDic';
import { loginInfo, UrlConfig, ProjectIcon } from '@/scripts/ConstDic';
import { removeToken } from '@/utils/auth';
import LangStorage from '@/utils/lang';
import logoImgXty from '@/assets/logo_xty.png';
@ -185,6 +185,7 @@ export default {
}
},
created() {
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.project];
this.computedAttribute();
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken)};

View File

@ -61,7 +61,7 @@ export default {
id: '',
tableData: [],
focus: false,
icloudList: ['lockFirst']
icloudList: ['lockFirst', 'switchSingleHandle']
};
},
computed: {