修改地图
This commit is contained in:
@@ -921,10 +921,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
let reg = /^[0-9a-zA-Z]+$/;
|
||||
if (!reg.test(this.form.serialNumber)) {
|
||||
this.$modal.alertError(this.$t('device.device-edit.148398-66'));
|
||||
return;
|
||||
}
|
||||
//if (!reg.test(this.form.serialNumber)) {
|
||||
// this.$modal.alertError(this.$t('device.device-edit.148398-66'));
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (this.form.productId == null || this.form.productId == 0) {
|
||||
this.$modal.alertError(this.$t('device.device-edit.148398-67'));
|
||||
return;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-form-item v-if="loginForm.bindId != null">
|
||||
<div class="alert-box-wrap">
|
||||
<div v-if="loginForm.bindId != null" class="alert-message-wrap">
|
||||
<i class="el-icon-warning"/>
|
||||
<i class="el-icon-warning" />
|
||||
{{ $t('login.989807-10') }}
|
||||
</div>
|
||||
<el-row>
|
||||
@@ -33,27 +33,24 @@
|
||||
<el-form-item prop="username">
|
||||
<div class="username">
|
||||
<i class="el-icon-user icon"></i>
|
||||
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text"
|
||||
:placeholder="$t('login.989807-4')"/>
|
||||
<input class="form__input" v-model="loginForm.username" auto-complete="off" type="text" :placeholder="$t('login.989807-4')" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password" :class="{ 'is-null': isacount }">
|
||||
<div class="password">
|
||||
<svg-icon icon-class="password" class="icon left"/>
|
||||
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype"
|
||||
:placeholder="$t('login.989807-5')" @keyup.enter="handleLogin"/>
|
||||
<svg-icon icon-class="password" class="icon left" />
|
||||
<input class="form__input" v-model="loginForm.password" auto-complete="off" :type="pwdtype" :placeholder="$t('login.989807-5')" @keyup.enter="handleLogin" />
|
||||
<span class="el-icon-view icon right" @click="changetype()"></span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="captchaOnOff" prop="code" :class="{ 'is-null': ispwd }">
|
||||
<div style="width: 350px" class="check">
|
||||
<svg-icon icon-class="auth-code" class="icon"/>
|
||||
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text"
|
||||
:placeholder="$t('login.989807-6')"/>
|
||||
<svg-icon icon-class="auth-code" class="icon" />
|
||||
<input v-model="loginForm.code" auto-complete="off" class="form__input__code" type="text" :placeholder="$t('login.989807-6')" />
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" style="float: right"/>
|
||||
<img :src="codeUrl" @click="getCode" style="float: right" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -67,8 +64,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- <button class="form__button button submit">登录</button> -->
|
||||
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary"
|
||||
@click.native.prevent="handleLogin">
|
||||
<el-button class="form__button button submit" v-if="!bindAccount" :loading="loading" type="primary" @click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||
<span v-else>{{ $t('login.989807-13') }}</span>
|
||||
</el-button>
|
||||
@@ -86,9 +82,8 @@
|
||||
<!-- <span class="form__span">没有账号?立即注册</span> -->
|
||||
<el-form-item prop="phonenumber">
|
||||
<div class="telphone" style="width: 350px">
|
||||
<svg-icon icon-class="phone" class="icon"/>
|
||||
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off"
|
||||
:placeholder="$t('login.989807-8')" @input="validatePhoneNumber"/>
|
||||
<svg-icon icon-class="phone" class="icon" />
|
||||
<input v-model="smsLoginForm.phonenumber" class="form__input__code" type="text" auto-complete="off" :placeholder="$t('login.989807-8')" @input="validatePhoneNumber" />
|
||||
<div class="sendcode">
|
||||
<el-button
|
||||
slot="append"
|
||||
@@ -106,24 +101,20 @@
|
||||
|
||||
<el-form-item prop="smsCode">
|
||||
<div class="smscode" :class="{ 'is-null': isphone }">
|
||||
<svg-icon icon-class="password" class="icon"/>
|
||||
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off"
|
||||
:placeholder="$t('login.989807-9')"/>
|
||||
<svg-icon icon-class="password" class="icon" />
|
||||
<input class="form__input" type="password" v-model="smsLoginForm.smsCode" auto-complete="off" :placeholder="$t('login.989807-9')" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<div class="other_login">
|
||||
<div class="wechat-login">
|
||||
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading"
|
||||
@click.native.prevent="weChatLogin">
|
||||
<svg-icon icon-class="wechat" style="color: #07c160"/>
|
||||
<el-button v-if="loginForm.bindId == null" type="text" :wxloading="loading" @click.native.prevent="weChatLogin">
|
||||
<svg-icon icon-class="wechat" style="color: #07c160" />
|
||||
{{ $t('login.989807-34') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="other-opt">
|
||||
<router-link v-if="!bindAccount" style="font-size: 14px"
|
||||
:to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}
|
||||
</router-link>
|
||||
<router-link v-if="!bindAccount" style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">{{ $t('login.989807-35') }}</router-link>
|
||||
<router-link v-else style="font-size: 14px" :to="{ path: '/register', query: this.$route.query }">
|
||||
{{ $t('login.989807-36') }}
|
||||
</router-link>
|
||||
@@ -131,8 +122,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-button class="form__button button submit" type="primary" :smsLoading="loading"
|
||||
@click.native.prevent="handleSmsLogin">
|
||||
<el-button class="form__button button submit" type="primary" :smsLoading="loading" @click.native.prevent="handleSmsLogin">
|
||||
<span v-if="!loading">{{ $t('login.989807-3') }}</span>
|
||||
<span v-else>{{ $t('login.989807-13') }}</span>
|
||||
</el-button>
|
||||
@@ -146,7 +136,7 @@
|
||||
<h2 class="switch__title title" style="margin-left: 10px">{{ $t('login.989807-37') }}</h2>
|
||||
</div>
|
||||
<p class="switch__description description">{{ $t('login.989807-38') }}</p>
|
||||
<img src="../assets/images/login3.jpeg" alt="logo" style="width: 220px; height: 220px"/>
|
||||
<img src="../assets/images/login3.jpeg" alt="logo" style="width: 220px; height: 220px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,25 +146,15 @@
|
||||
<script>
|
||||
import 'element-ui/lib/theme-chalk/display.css';
|
||||
import logo from '@/assets/logo/logo.gif';
|
||||
import {
|
||||
getCodeImg,
|
||||
checkBindId,
|
||||
getErrorMsg,
|
||||
socialLogin,
|
||||
bindLogin,
|
||||
getSmsLoginCaptcha,
|
||||
smsLogin,
|
||||
logincas
|
||||
} from '@/api/login';
|
||||
import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin, getSmsLoginCaptcha, smsLogin, logincas } from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import {encrypt, decrypt} from '@/utils/jsencrypt';
|
||||
import {setToken, getToken, setAccessUser} from '@/utils/auth';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
import { setToken, getToken, setAccessUser } from '@/utils/auth';
|
||||
import langSelect from '@/layout/components/langSelect';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: {langSelect},
|
||||
components: { langSelect },
|
||||
data() {
|
||||
return {
|
||||
windowWidth: window.innerWidth,
|
||||
@@ -224,9 +204,7 @@ export default {
|
||||
message: this.$t('login.989807-20'),
|
||||
},
|
||||
],
|
||||
password: [
|
||||
{required: true, message: this.$t('login.989807-21'), trigger: 'blur'},
|
||||
],
|
||||
password: [{ required: true, message: this.$t('login.989807-21'), trigger: 'blur' }],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
@@ -237,7 +215,7 @@ export default {
|
||||
},
|
||||
smsRules: {
|
||||
phonenumber: [
|
||||
{required: true, message: this.$t('login.989807-23'), trigger: 'blur'},
|
||||
{ required: true, message: this.$t('login.989807-23'), trigger: 'blur' },
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: this.$t('login.989807-24'),
|
||||
@@ -309,22 +287,23 @@ export default {
|
||||
// 没有ticket且没有token,跳转统一身份认证
|
||||
const isTs = true;
|
||||
if (isTs) {
|
||||
window.location.href = 'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A9000%2Flogin'+(this.redirect?'&ssUrl='+this.redirect:'');
|
||||
window.location.href =
|
||||
'http://192.168.1.241/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2F192.168.1.241%3A9000%2Flogin' +
|
||||
(this.redirect ? '&ssUrl=' + this.redirect : '');
|
||||
// window.location.href = 'http://localhost:81/login?redirect=/lig/oauth2/oauth2/application&appid=330b4ecb60c9a6802b957fe1e5a5ecd3&url=http%3A%2F%2Flocalhost%3A80%2Flogin' + (this.redirect ? '&ssUrl=' + this.redirect : '');
|
||||
}
|
||||
} else if (ticket && !token) {
|
||||
// 有ticket但没有token,请求登录
|
||||
this.logincasapi();
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
handleLoginFocus() {
|
||||
if (this.loginForm.loginName === "") {
|
||||
if (this.loginForm.loginName === '') {
|
||||
if (this.$refs.loginName) {
|
||||
this.$refs.loginName.focus();
|
||||
}
|
||||
} else if (this.loginForm.password === "") {
|
||||
} else if (this.loginForm.password === '') {
|
||||
if (this.$refs.password) {
|
||||
this.$refs.password.focus();
|
||||
}
|
||||
@@ -339,19 +318,19 @@ export default {
|
||||
|
||||
const obj = {
|
||||
loginName: ticket,
|
||||
password: "demo",
|
||||
verifyCode: "",
|
||||
password: 'demo',
|
||||
verifyCode: '',
|
||||
};
|
||||
|
||||
try {
|
||||
const {code, data, token} = await logincas(obj);
|
||||
const { code, data, token } = await logincas(obj);
|
||||
|
||||
if (code !== 200) {
|
||||
this.$message.error('CAS登录失败: ' + (data?.msg || '未知错误'));
|
||||
// 清除ticket参数,避免循环跳转
|
||||
this.$router.push({
|
||||
path: '/login',
|
||||
query: {redirect: this.redirect}
|
||||
query: { redirect: this.redirect },
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -360,7 +339,7 @@ export default {
|
||||
setAccessUser(data);
|
||||
|
||||
// 跳转到目标页面,清除ticket参数
|
||||
const targetPath = this.redirect || "/";
|
||||
const targetPath = this.redirect || '/';
|
||||
this.$router.push({
|
||||
path: targetPath,
|
||||
query: this.otherQuery,
|
||||
@@ -373,7 +352,7 @@ export default {
|
||||
// 清除ticket参数,避免循环跳转
|
||||
this.$router.push({
|
||||
path: '/login',
|
||||
query: {redirect: this.redirect}
|
||||
query: { redirect: this.redirect },
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -430,8 +409,7 @@ export default {
|
||||
.push({
|
||||
path: this.redirect || '/',
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
.catch(() => {});
|
||||
if (this.captchaOnOff) {
|
||||
this.getCode();
|
||||
this.loading = false;
|
||||
@@ -462,10 +440,9 @@ export default {
|
||||
const errorId = this.$route.query.errorId;
|
||||
if (errorId !== undefined && errorId !== null) {
|
||||
getErrorMsg(errorId)
|
||||
.then((res) => {
|
||||
})
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
this.$router.push({query: {}});
|
||||
this.$router.push({ query: {} });
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
@@ -554,8 +531,7 @@ export default {
|
||||
.push({
|
||||
path: '/',
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
.catch(() => {});
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -588,8 +564,7 @@ export default {
|
||||
.push({
|
||||
path: '/',
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
@@ -644,8 +619,7 @@ export default {
|
||||
.push({
|
||||
path: this.redirect || '/',
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user