修改禅道已知bug
This commit is contained in:
+1
-1
@@ -9,4 +9,4 @@ window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/d
|
|||||||
window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe'
|
window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe'
|
||||||
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas'
|
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas'
|
||||||
// 预览文件地址
|
// 预览文件地址
|
||||||
window._CONFIG['onlinePreviewDomainURL'] = 'http://cas.example.org:8443/onlinePreview'
|
window._CONFIG['onlinePreviewDomainURL'] = 'http://127.0.0.1:8012/onlinePreview'
|
||||||
|
|||||||
@@ -196,7 +196,6 @@
|
|||||||
this.fileList = []
|
this.fileList = []
|
||||||
},
|
},
|
||||||
preview(file) {
|
preview(file) {
|
||||||
console.log(file)
|
|
||||||
let fileQuery = file.response ? file.response.result : file
|
let fileQuery = file.response ? file.response.result : file
|
||||||
let fileName = fileQuery.fileName
|
let fileName = fileQuery.fileName
|
||||||
let index1 = fileName.lastIndexOf('.')
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
|||||||
@@ -170,8 +170,22 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
pdfPreview(item) {
|
pdfPreview(fileQuery) {
|
||||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + item.id))
|
let fileName = fileQuery.fileName
|
||||||
|
let index1 = fileName.lastIndexOf('.')
|
||||||
|
let index2 = fileName.length
|
||||||
|
let fileSuffix = fileName.substring(index1, index2)
|
||||||
|
if (fileSuffix == '.pdf') {
|
||||||
|
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
|
||||||
|
} else if (fileSuffix == '.docx') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + fileQuery.id)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else {
|
||||||
|
downloadFile('/sys/common/download', fileQuery.fileName, { id: fileQuery.id })
|
||||||
|
}
|
||||||
},
|
},
|
||||||
download(item) {
|
download(item) {
|
||||||
downloadFile('/sys/common/download', item.fileName, { id: item.id })
|
downloadFile('/sys/common/download', item.fileName, { id: item.id })
|
||||||
|
|||||||
+169
-153
@@ -51,7 +51,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6" style="text-align: right">
|
<a-col :span="6" style="text-align: right">
|
||||||
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode"/>
|
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage"
|
||||||
|
@click="handleChangeCheckCode"/>
|
||||||
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
|
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="3"></a-col>
|
<a-col :span="3"></a-col>
|
||||||
@@ -64,13 +65,13 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6"></a-col>
|
<a-col :span="6"></a-col>
|
||||||
<a-col :span="5" style="text-align: right;color: #1891FF;">
|
<!-- <a-col :span="5" style="text-align: right;color: #1891FF;">-->
|
||||||
<a-form-item>
|
<!-- <a-form-item>-->
|
||||||
<router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
|
<!-- <router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">-->
|
||||||
忘记密码
|
<!-- 忘记密码-->
|
||||||
</router-link>
|
<!-- </router-link>-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="login-btn">
|
<a-row class="login-btn">
|
||||||
<a-col :span="3"></a-col>
|
<a-col :span="3"></a-col>
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
:loading="loginBtn"
|
:loading="loginBtn"
|
||||||
@click.stop.prevent="handleSubmit"
|
@click.stop.prevent="handleSubmit"
|
||||||
:disabled="loginBtn">
|
:disabled="loginBtn">
|
||||||
{{ loginBtn ? "登录中" : "登录" }}
|
{{ loginBtn ? '登录中' : '登录' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -92,7 +93,8 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
<a-form v-if="mobile" :form="form" class="user-layout-login user-layout-login-mobile" ref="formLogin" id="formLogin">
|
<a-form v-if="mobile" :form="form" class="user-layout-login user-layout-login-mobile" ref="formLogin"
|
||||||
|
id="formLogin">
|
||||||
<div class="user-box user-box-mobile">
|
<div class="user-box user-box-mobile">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -136,7 +138,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="10" style="text-align: right">
|
<a-col :span="10" style="text-align: right">
|
||||||
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode"/>
|
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage"
|
||||||
|
@click="handleChangeCheckCode"/>
|
||||||
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
|
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -147,13 +150,13 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="4"></a-col>
|
<a-col :span="4"></a-col>
|
||||||
<a-col :span="9" style="text-align: right;color: #1891FF;">
|
<!-- <a-col :span="9" style="text-align: right;color: #1891FF;">-->
|
||||||
<a-form-item>
|
<!-- <a-form-item>-->
|
||||||
<router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
|
<!-- <router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">-->
|
||||||
忘记密码
|
<!-- 忘记密码-->
|
||||||
</router-link>
|
<!-- </router-link>-->
|
||||||
</a-form-item>
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="login-btn">
|
<a-row class="login-btn">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -166,7 +169,7 @@
|
|||||||
:loading="loginBtn"
|
:loading="loginBtn"
|
||||||
@click.stop.prevent="handleSubmit"
|
@click.stop.prevent="handleSubmit"
|
||||||
:disabled="loginBtn">
|
:disabled="loginBtn">
|
||||||
{{ loginBtn ? "登录中" : "登录" }}
|
{{ loginBtn ? '登录中' : '登录' }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -176,58 +179,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from "vuex"
|
import { mapActions } from 'vuex'
|
||||||
import { timeFix } from "@/utils/util"
|
import { timeFix } from '@/utils/util'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN ,ENCRYPTED_STRING} from "@/store/mutation-types"
|
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
|
||||||
import { putAction,postAction,getAction } from '@/api/manage'
|
import { putAction, postAction, getAction } from '@/api/manage'
|
||||||
import { USER_INFO } from "@/store/mutation-types"
|
import { USER_INFO } from '@/store/mutation-types'
|
||||||
import {getRSAPublicKey} from '@/api/login.js'
|
import { getRSAPublicKey } from '@/api/login.js'
|
||||||
|
|
||||||
const Base64 = require('js-base64').Base64
|
const Base64 = require('js-base64').Base64
|
||||||
import {JSEncrypt} from 'jsencrypt'
|
import { JSEncrypt } from 'jsencrypt'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
loginBtn: false,
|
loginBtn: false,
|
||||||
mobile:isMobile(),
|
mobile: isMobile(),
|
||||||
// login type: 0 email, 1 username, 2 telephone
|
// login type: 0 email, 1 username, 2 telephone
|
||||||
loginType: 0,
|
loginType: 0,
|
||||||
stepCaptchaVisible: false,
|
stepCaptchaVisible: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
state: {
|
state: {
|
||||||
time: 60,
|
time: 60,
|
||||||
smsSendBtn: false,
|
smsSendBtn: false
|
||||||
},
|
},
|
||||||
validatorRules:{
|
validatorRules: {
|
||||||
username:{rules: [{ required: true, message: '请输入用户名!'},{validator: this.handleUsernameOrEmail}]},
|
username: { rules: [{ required: true, message: '请输入用户名!' }, { validator: this.handleUsernameOrEmail }] },
|
||||||
password:{rules: [{ required: true, message: '请输入密码!',validator: 'click'}]},
|
password: { rules: [{ required: true, message: '请输入密码!', validator: 'click' }] },
|
||||||
mobile:{rules: [{validator:this.validateMobile}]},
|
mobile: { rules: [{ validator: this.validateMobile }] },
|
||||||
captcha:{rule: [{ required: true, message: '请输入验证码!'}]},
|
captcha: { rule: [{ required: true, message: '请输入验证码!' }] },
|
||||||
inputCode:{rules: [{ required: true, message: '请输入验证码!'}]}
|
inputCode: { rules: [{ required: true, message: '请输入验证码!' }] }
|
||||||
},
|
},
|
||||||
velorifiedCode:"",
|
velorifiedCode: '',
|
||||||
inputCodeContent:"",
|
inputCodeContent: '',
|
||||||
inputCodeNull:true,
|
inputCodeNull: true,
|
||||||
currentUsername:"",
|
currentUsername: '',
|
||||||
currdatetime:'',
|
currdatetime: '',
|
||||||
randCodeImage:'',
|
randCodeImage: '',
|
||||||
requestCodeSuccess:false,
|
requestCodeSuccess: false,
|
||||||
rsaPublicKey:''
|
rsaPublicKey: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
this.currdatetime = new Date().getTime();
|
this.currdatetime = new Date().getTime()
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
this.getRouterData();
|
this.getRouterData()
|
||||||
this.handleChangeCheckCode();
|
this.handleChangeCheckCode()
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['Login', 'Logout', 'PhoneLogin']),
|
...mapActions(['Login', 'Logout', 'PhoneLogin']),
|
||||||
handleUsernameOrEmail (rule, value, callback) {
|
handleUsernameOrEmail(rule, value, callback) {
|
||||||
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
|
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/
|
||||||
if (regex.test(value)) {
|
if (regex.test(value)) {
|
||||||
this.loginType = 0
|
this.loginType = 0
|
||||||
} else {
|
} else {
|
||||||
@@ -235,194 +239,201 @@
|
|||||||
}
|
}
|
||||||
callback()
|
callback()
|
||||||
},
|
},
|
||||||
handleSubmit () {
|
handleSubmit() {
|
||||||
let that = this
|
let that = this
|
||||||
let loginParams = {};
|
let loginParams = {}
|
||||||
that.loginBtn = true;
|
that.loginBtn = true
|
||||||
that.form.validateFields([ 'username', 'password','inputCode', 'rememberMe' ], { force: true }, (err, values) => {
|
that.form.validateFields(['username', 'password', 'inputCode', 'rememberMe'], { force: true }, (err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
|
||||||
loginParams.remember_me = values.rememberMe
|
loginParams.remember_me = values.rememberMe
|
||||||
loginParams.captcha = that.inputCodeContent
|
loginParams.captcha = that.inputCodeContent
|
||||||
loginParams.checkKey = that.currdatetime
|
loginParams.checkKey = that.currdatetime
|
||||||
loginParams.rsaPublicKey = that.rsaPublicKey;
|
loginParams.rsaPublicKey = that.rsaPublicKey
|
||||||
// 新建JSEncrypt对象
|
// 新建JSEncrypt对象
|
||||||
let encrypt = new JSEncrypt();
|
let encrypt = new JSEncrypt()
|
||||||
encrypt.setPublicKey(loginParams.rsaPublicKey);
|
encrypt.setPublicKey(loginParams.rsaPublicKey)
|
||||||
// 公钥加密
|
// 公钥加密
|
||||||
loginParams.username = encrypt.encrypt(values.username)
|
loginParams.username = encrypt.encrypt(values.username)
|
||||||
loginParams.password = encrypt.encrypt(values.password)
|
loginParams.password = encrypt.encrypt(values.password)
|
||||||
//登录
|
//登录
|
||||||
that.Login(loginParams).then((res) => {
|
that.Login(loginParams).then((res) => {
|
||||||
this.loginSuccess()
|
this.loginSuccess()
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
if (err.code === 500) {
|
if (err.code === 500) {
|
||||||
// 刷新验证码
|
// 刷新验证码
|
||||||
this.handleChangeCheckCode();
|
this.handleChangeCheckCode()
|
||||||
}
|
}
|
||||||
that.requestFailed(err);
|
that.requestFailed(err)
|
||||||
});
|
})
|
||||||
}else {
|
} else {
|
||||||
that.loginBtn = false;
|
that.loginBtn = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCaptcha (e) {
|
getCaptcha(e) {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
let that = this;
|
let that = this
|
||||||
this.form.validateFields([ 'mobile' ], { force: true },(err,values) => {
|
this.form.validateFields(['mobile'], { force: true }, (err, values) => {
|
||||||
if(!values.mobile){
|
if (!values.mobile) {
|
||||||
that.cmsFailed("请输入手机号");
|
that.cmsFailed('请输入手机号')
|
||||||
}else if (!err) {
|
} else if (!err) {
|
||||||
this.state.smsSendBtn = true;
|
this.state.smsSendBtn = true
|
||||||
let interval = window.setInterval(() => {
|
let interval = window.setInterval(() => {
|
||||||
if (that.state.time-- <= 0) {
|
if (that.state.time-- <= 0) {
|
||||||
that.state.time = 60;
|
that.state.time = 60
|
||||||
that.state.smsSendBtn = false;
|
that.state.smsSendBtn = false
|
||||||
window.clearInterval(interval);
|
window.clearInterval(interval)
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000)
|
||||||
|
|
||||||
const hide = this.$message.loading('验证码发送中..', 0);
|
const hide = this.$message.loading('验证码发送中..', 0)
|
||||||
let smsParams = {};
|
let smsParams = {}
|
||||||
smsParams.mobile=values.mobile;
|
smsParams.mobile = values.mobile
|
||||||
smsParams.smsmode="0";
|
smsParams.smsmode = '0'
|
||||||
postAction("/sys/sms",smsParams)
|
postAction('/sys/sms', smsParams)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if(!res.success){
|
if (!res.success) {
|
||||||
setTimeout(hide, 0);
|
setTimeout(hide, 0)
|
||||||
this.cmsFailed(res.message);
|
this.cmsFailed(res.message)
|
||||||
}
|
}
|
||||||
setTimeout(hide, 500);
|
setTimeout(hide, 500)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
setTimeout(hide, 1);
|
setTimeout(hide, 1)
|
||||||
clearInterval(interval);
|
clearInterval(interval)
|
||||||
that.state.time = 60;
|
that.state.time = 60
|
||||||
that.state.smsSendBtn = false;
|
that.state.smsSendBtn = false
|
||||||
this.requestFailed(err);
|
this.requestFailed(err)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
},
|
},
|
||||||
handleChangeCheckCode(){
|
handleChangeCheckCode() {
|
||||||
this.currdatetime = new Date().getTime();
|
this.currdatetime = new Date().getTime()
|
||||||
getAction(`/sys/randomImage/${this.currdatetime}`).then(res=>{
|
getAction(`/sys/randomImage/${this.currdatetime}`).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
this.randCodeImage = res.result
|
this.randCodeImage = res.result
|
||||||
this.requestCodeSuccess=true
|
this.requestCodeSuccess = true
|
||||||
}else{
|
} else {
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message)
|
||||||
this.requestCodeSuccess=false
|
this.requestCodeSuccess = false
|
||||||
}
|
}
|
||||||
}).catch(()=>{
|
}).catch(() => {
|
||||||
this.requestCodeSuccess=false
|
this.requestCodeSuccess = false
|
||||||
})
|
})
|
||||||
this.getPublicKey();
|
this.getPublicKey()
|
||||||
},
|
},
|
||||||
//获取RSA公钥
|
//获取RSA公钥
|
||||||
getPublicKey(){
|
getPublicKey() {
|
||||||
// 获取公钥
|
// 获取公钥
|
||||||
getRSAPublicKey().then(res => {
|
getRSAPublicKey().then(res => {
|
||||||
this.rsaPublicKey = res.result
|
this.rsaPublicKey = res.result
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loginSuccess () {
|
loginSuccess() {
|
||||||
let langCn = localStorage.language
|
let langCn = localStorage.language
|
||||||
// 默认中文
|
// 默认中文
|
||||||
if (!langCn) {
|
if (!langCn) {
|
||||||
localStorage.setItem('language', 'zh-cn')
|
localStorage.setItem('language', 'zh-cn')
|
||||||
}
|
}
|
||||||
this.$router.push({ path: "/dashboard/analysis" }).catch((res)=>{})
|
this.$router.push({ path: '/dashboard/analysis' }).catch((res) => {
|
||||||
|
})
|
||||||
this.$notification.success({
|
this.$notification.success({
|
||||||
message: '欢迎',
|
message: '欢迎',
|
||||||
description: `${timeFix()},欢迎回来`,
|
description: `${timeFix()},欢迎回来`
|
||||||
});
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
cmsFailed(err){
|
cmsFailed(err) {
|
||||||
this.$notification[ 'error' ]({
|
this.$notification['error']({
|
||||||
message: "登录失败",
|
|
||||||
description:err,
|
|
||||||
duration: 4,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
requestFailed (err) {
|
|
||||||
this.$notification[ 'error' ]({
|
|
||||||
message: '登录失败',
|
message: '登录失败',
|
||||||
description: ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试",
|
description: err,
|
||||||
duration: 4,
|
duration: 4
|
||||||
});
|
})
|
||||||
this.loginBtn = false;
|
|
||||||
},
|
},
|
||||||
validateMobile(rule,value,callback){
|
requestFailed(err) {
|
||||||
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)){
|
this.form.resetFields()
|
||||||
callback();
|
this.$notification['error']({
|
||||||
}else{
|
message: '登录失败',
|
||||||
callback("您的手机号码格式不正确!");
|
// description:'账号或密码错误',
|
||||||
|
description: err.message == '验证码错误' ? err.message : '账号或密码错误',
|
||||||
|
duration: 4
|
||||||
|
})
|
||||||
|
this.loginBtn = false
|
||||||
|
},
|
||||||
|
validateMobile(rule, value, callback) {
|
||||||
|
if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {
|
||||||
|
callback()
|
||||||
|
} else {
|
||||||
|
callback('您的手机号码格式不正确!')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateInputCode(rule,value,callback){
|
validateInputCode(rule, value, callback) {
|
||||||
if(!value || this.verifiedCode==this.inputCodeContent){
|
if (!value || this.verifiedCode == this.inputCodeContent) {
|
||||||
callback();
|
callback()
|
||||||
}else{
|
} else {
|
||||||
callback("您输入的验证码不正确!");
|
callback('您输入的验证码不正确!')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
generateCode(value){
|
generateCode(value) {
|
||||||
this.verifiedCode = value.toLowerCase()
|
this.verifiedCode = value.toLowerCase()
|
||||||
},
|
},
|
||||||
inputCodeChange(e){
|
inputCodeChange(e) {
|
||||||
this.inputCodeContent = e.target.value
|
this.inputCodeContent = e.target.value
|
||||||
},
|
},
|
||||||
getRouterData(){
|
getRouterData() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$route.params.username) {
|
if (this.$route.params.username) {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
'username': this.$route.params.username
|
'username': this.$route.params.username
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断当前设备
|
// 判断当前设备
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
var userAgentInfo = navigator.userAgent;
|
var userAgentInfo = navigator.userAgent
|
||||||
|
|
||||||
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
|
var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
|
||||||
|
|
||||||
var mobile_flag = false;
|
var mobile_flag = false
|
||||||
|
|
||||||
//根据userAgent判断是否是手机
|
//根据userAgent判断是否是手机
|
||||||
for (var v = 0; v < mobileAgents.length; v++) {
|
for (var v = 0; v < mobileAgents.length; v++) {
|
||||||
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
||||||
mobile_flag = true;
|
mobile_flag = true
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var screen_width = window.screen.width;
|
var screen_width = window.screen.width
|
||||||
var screen_height = window.screen.height;
|
var screen_height = window.screen.height
|
||||||
|
|
||||||
//根据屏幕分辨率判断是否是手机
|
//根据屏幕分辨率判断是否是手机
|
||||||
if (screen_width < 500 && screen_height < 800) {
|
if (screen_width < 500 && screen_height < 800) {
|
||||||
mobile_flag = true;
|
mobile_flag = true
|
||||||
}
|
}
|
||||||
return mobile_flag;
|
return mobile_flag
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.ant-input-affix-wrapper/deep/ .ant-input:not(:first-child){
|
.ant-input-affix-wrapper /deep/ .ant-input:not(:first-child) {
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
}
|
}
|
||||||
.ant-row{
|
|
||||||
|
.ant-row {
|
||||||
margin-bottom: 4%;
|
margin-bottom: 4%;
|
||||||
}
|
}
|
||||||
.main{
|
|
||||||
|
.main {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.user-layout-login{
|
|
||||||
|
.user-layout-login {
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
width: 24%;
|
width: 24%;
|
||||||
height: 56%;
|
height: 56%;
|
||||||
@@ -435,14 +446,16 @@
|
|||||||
right: 8%;
|
right: 8%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
.user-box{
|
|
||||||
|
.user-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
display: block;
|
display: block;
|
||||||
color: #1891FF;
|
color: #1891FF;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
@@ -450,13 +463,15 @@
|
|||||||
margin: 0 0 5% 0;
|
margin: 0 0 5% 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.login-btn{
|
|
||||||
|
.login-btn {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.user-layout-login-mobile{
|
|
||||||
|
.user-layout-login-mobile {
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0 !important;
|
min-width: 0 !important;
|
||||||
@@ -468,7 +483,8 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
margin-top: 6rem;
|
margin-top: 6rem;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
.ant-row{
|
|
||||||
|
.ant-row {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user