哈尔滨打包调整

This commit is contained in:
fan 2020-07-09 17:38:16 +08:00
parent df3b8eebd7
commit 81de72cab0
2 changed files with 15 additions and 8 deletions

View File

@ -1,6 +1,6 @@
# just a flag
NODE_ENV = 'development'
VUE_APP_PRO = 'local'
# VUE_APP_PRO = 'local'
# base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -8,7 +8,7 @@
element-loading-background="rgba(0, 0, 0, 0)"
>
<el-button v-if="syncLogin && loadingCode" type="text" style="font-size: 24px;font-weight: bold;" @click="loginRefresh">关联设备未登录,点击重新检测</el-button>
<div v-if="loginTitle && !syncLogin" :class="$route.query.project=='hyd'?'text-box':'left-logo-box'">
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('hyd')?'text-box':'left-logo-box'">
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
</div>
@ -21,8 +21,8 @@
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
</el-tooltip>
</div>
<div v-if="!syncLogin" class="content-box" :style="$route.query.project=='hyd'?'width: 450px;':''">
<div v-if="$route.query.project!='hyd'" class="qrcode-main">
<div v-if="!syncLogin" class="content-box" :style="project.endsWith('hyd')?'width: 450px;':''">
<div v-if="!project.endsWith('hyd')" class="qrcode-main">
<div class="login-code-box" @click="loginRefresh">
<qrcode-vue
v-loading="loadingCode"
@ -49,7 +49,7 @@
</div>
</div>
<el-form ref="loginForm" class="login-form" :model="loginForm" :rules="loginRules" label-position="left">
<div v-if="!isProject&&$route.query.project!='hyd'" class="title_box">{{ $t('login.welcomeTo') + title }}</div>
<div v-if="!isProject&&!project.endsWith('hyd')" class="title_box">{{ $t('login.welcomeTo') + title }}</div>
<el-form-item prop="username" class="item_form_box">
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
@ -183,7 +183,11 @@ export default {
project() {
const project = this.$route.query.project;
const split = this.$route.path.split('/')[1];
if (split == 'design') {
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
return split + 'hyd';
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
return 'hyd';
} else if (split == 'design') {
return project ? split + project : split;
} else if (split == 'login') {
return project || 'login';
@ -210,7 +214,7 @@ export default {
return ProjectIcon[projectName];
},
bgImg() {
const bgImgAll = this.$route.query.project == 'hyd' ? '' : bgImg;
const bgImgAll = process.env.VUE_APP_PRO === 'local' ? '' : bgImg;
const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
const imgMap = {
ISCS_LW: bgIscsImg,
@ -236,6 +240,9 @@ export default {
LSW: '检测教研机登录中'
};
return this.$route.query.type ? textMap[this.$route.query.type] : '';
},
isLocal() { //
return process.env.VUE_APP_PRO === 'local';
}
},
created() {
@ -263,7 +270,7 @@ export default {
},
mounted() {
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
if (this.syncLogin || this.$route.query.project != 'hyd') {
if (this.syncLogin || process.env.VUE_APP_PRO !== 'local') {
this.loginRefresh();
}
},