|
|
@@ -20,7 +20,7 @@
|
|
|
class="flex flex-justify-end"
|
|
|
style="margin-right: 3px; margin-top: 3px"
|
|
|
>
|
|
|
- <div>
|
|
|
+ <div v-if="!dev">
|
|
|
<img
|
|
|
v-if="qrCodeLogin"
|
|
|
src="../assets/img/com.png"
|
|
|
@@ -124,10 +124,14 @@
|
|
|
<div
|
|
|
class="flex flex-align-center flex-justify-between full-width"
|
|
|
>
|
|
|
- <div></div>
|
|
|
- <el-link :underline="false" class="font-12" type="primary"
|
|
|
- >忘记密码?</el-link
|
|
|
- >
|
|
|
+ <div v-if="dev" class="flex flex-center full-width">
|
|
|
+ <el-button type="primary" plain @click="loginTest(1)"
|
|
|
+ >测试管理员001</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" plain @click="loginTest(2)"
|
|
|
+ >测试用户001</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -140,7 +144,7 @@
|
|
|
>
|
|
|
<div class="flex flex-col mt-10 flex-center">
|
|
|
<span class="grey-6">由梧桐研究院提供技术支持</span>
|
|
|
- <span class="grey-6 mt-5">使用问题请咨询:15887001274</span>
|
|
|
+ <span class="grey-6 mt-5">使用问题请咨询:15587166921</span>
|
|
|
<el-button
|
|
|
color="#558FF1"
|
|
|
@click="
|
|
|
@@ -246,10 +250,6 @@ export default {
|
|
|
created() {
|
|
|
this.permission.cleanPermission()
|
|
|
// fixme prod 环境暂时开启账号登录功能
|
|
|
- // this.dev = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('https://dev.wutongshucloud.com/') > -1 || window.location.href.indexOf('192.168.31') > -1
|
|
|
- this.dev =
|
|
|
- window.location.href.indexOf('localhost') > -1 ||
|
|
|
- window.location.href.indexOf('192.168.31') > -1
|
|
|
removeToken()
|
|
|
this.init()
|
|
|
},
|
|
|
@@ -258,10 +258,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- const dev =
|
|
|
- window.location.href.indexOf('dash.wutongshucloud.com') > -1 ||
|
|
|
- window.location.href.indexOf('localhost') > -1
|
|
|
- sessionStorage.setItem('dev', dev)
|
|
|
+ this.dev =
|
|
|
+ window.location.href.indexOf('localhost') > -1 ||
|
|
|
+ window.location.href.indexOf('https://test.wutongshucloud.com/') > -1 ||
|
|
|
+ window.location.href.indexOf('192.168.31') > -1
|
|
|
+ sessionStorage.setItem('dev', this.dev)
|
|
|
+
|
|
|
this.$api.login.captcha().then(res => {
|
|
|
this.code = res.image
|
|
|
this.header = res.key
|
|
|
@@ -383,6 +385,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ loginTest(type) {
|
|
|
+ if (type === 1) {
|
|
|
+ this.form.name = 'admin001'
|
|
|
+ this.form.pass = 'admin123456'
|
|
|
+ } else if (type === 2) {
|
|
|
+ this.form.name = 'user001'
|
|
|
+ this.form.pass = 'admin123456'
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|