会议导出接口修改 登录eslint
This commit is contained in:
@@ -456,7 +456,7 @@ export default {
|
||||
},
|
||||
// 报名链接
|
||||
signUpHerfUrl() {
|
||||
return `${window._CONFIG['singUpQRCodeURL']}/?id=${this.$route.query.id}`
|
||||
return `${window._CONFIG['singUpQRCodeURL']}?id=${this.$route.query.id}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -238,7 +238,7 @@ export default {
|
||||
list: '/meeting/payMeeting/page',
|
||||
delete: '/meeting/payMeeting/delete',
|
||||
deleteBatch: '/meeting/payMeeting/deleteBatch',
|
||||
exportXlsUrl: '/meeting/payMeeting/exportWorkingGroupXls',
|
||||
exportXlsUrl: '/meeting/payMeeting/exportXls',
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ export default {
|
||||
list: '/meeting/payMeeting/page',
|
||||
delete: '/meeting/payMeeting/delete',
|
||||
deleteBatch: '/meeting/payMeeting/deleteBatch',
|
||||
exportXlsUrl: '/meeting/payMeeting/exportWorkingGroupXls',
|
||||
exportXlsUrl: '/meeting/payMeeting/exportXls',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+57
-57
@@ -93,10 +93,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapActions } from "vuex"
|
||||
import { timeFix } from "@/utils/util"
|
||||
import { mapActions } from 'vuex'
|
||||
import { timeFix } from '@/utils/util'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { postAction,getAction } from '@/api/manage'
|
||||
import {getRSAPublicKey} from '@/api/login.js'
|
||||
import {JSEncrypt} from 'jsencrypt'
|
||||
@@ -120,10 +120,10 @@ export default {
|
||||
captcha:{rule: [{ required: true, message: '请输入验证码!'}]},
|
||||
inputCode:{rules: [{ required: true, message: '请输入验证码!'}]}
|
||||
},
|
||||
velorifiedCode:"",
|
||||
inputCodeContent:"",
|
||||
velorifiedCode:'',
|
||||
inputCodeContent:'',
|
||||
inputCodeNull:true,
|
||||
currentUsername:"",
|
||||
currentUsername:'',
|
||||
currdatetime:'',
|
||||
randCodeImage:'',
|
||||
requestCodeSuccess:false,
|
||||
@@ -131,16 +131,16 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.currdatetime = new Date().getTime();
|
||||
this.currdatetime = new Date().getTime()
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
this.getRouterData();
|
||||
this.handleChangeCheckCode();
|
||||
this.getRouterData()
|
||||
this.handleChangeCheckCode()
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['Login', 'Logout', 'PhoneLogin']),
|
||||
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)) {
|
||||
this.loginType = 0
|
||||
} else {
|
||||
@@ -150,81 +150,81 @@ export default {
|
||||
},
|
||||
handleSubmit () {
|
||||
let that = this
|
||||
let loginParams = {};
|
||||
that.loginBtn = true;
|
||||
let loginParams = {}
|
||||
that.loginBtn = true
|
||||
that.form.validateFields([ 'username', 'password','inputCode', 'rememberMe' ], { force: true }, (err, values) => {
|
||||
if (!err) {
|
||||
|
||||
loginParams.remember_me = values.rememberMe
|
||||
loginParams.captcha = that.inputCodeContent
|
||||
loginParams.checkKey = that.currdatetime
|
||||
loginParams.rsaPublicKey = that.rsaPublicKey;
|
||||
loginParams.rsaPublicKey = that.rsaPublicKey
|
||||
// 新建JSEncrypt对象
|
||||
let encrypt = new JSEncrypt();
|
||||
encrypt.setPublicKey(loginParams.rsaPublicKey);
|
||||
let encrypt = new JSEncrypt()
|
||||
encrypt.setPublicKey(loginParams.rsaPublicKey)
|
||||
// 公钥加密
|
||||
loginParams.username = encrypt.encrypt(values.username)
|
||||
loginParams.password = encrypt.encrypt(values.password)
|
||||
//登录
|
||||
that.Login(loginParams).then((res) => {
|
||||
that.Login(loginParams).then(() => {
|
||||
this.loginSuccess()
|
||||
}).catch((err) => {
|
||||
if (err.code === 500) {
|
||||
// 刷新验证码
|
||||
this.handleChangeCheckCode();
|
||||
this.handleChangeCheckCode()
|
||||
}
|
||||
that.requestFailed(err);
|
||||
});
|
||||
that.requestFailed(err)
|
||||
})
|
||||
}else {
|
||||
that.loginBtn = false;
|
||||
that.loginBtn = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getCaptcha (e) {
|
||||
e.preventDefault();
|
||||
let that = this;
|
||||
e.preventDefault()
|
||||
let that = this
|
||||
this.form.validateFields([ 'mobile' ], { force: true },(err,values) => {
|
||||
if(!values.mobile){
|
||||
that.cmsFailed("请输入手机号");
|
||||
that.cmsFailed('请输入手机号')
|
||||
}else if (!err) {
|
||||
this.state.smsSendBtn = true;
|
||||
this.state.smsSendBtn = true
|
||||
let interval = window.setInterval(() => {
|
||||
if (that.state.time-- <= 0) {
|
||||
that.state.time = 60;
|
||||
that.state.smsSendBtn = false;
|
||||
window.clearInterval(interval);
|
||||
that.state.time = 60
|
||||
that.state.smsSendBtn = false
|
||||
window.clearInterval(interval)
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000)
|
||||
|
||||
const hide = this.$message.loading('验证码发送中..', 0);
|
||||
let smsParams = {};
|
||||
smsParams.mobile=values.mobile;
|
||||
smsParams.smsmode="0";
|
||||
postAction("/sys/sms",smsParams)
|
||||
const hide = this.$message.loading('验证码发送中..', 0)
|
||||
let smsParams = {}
|
||||
smsParams.mobile=values.mobile
|
||||
smsParams.smsmode='0'
|
||||
postAction('/sys/sms',smsParams)
|
||||
.then(res => {
|
||||
if(!res.success){
|
||||
setTimeout(hide, 0);
|
||||
this.cmsFailed(res.message);
|
||||
setTimeout(hide, 0)
|
||||
this.cmsFailed(res.message)
|
||||
}
|
||||
setTimeout(hide, 500);
|
||||
setTimeout(hide, 500)
|
||||
})
|
||||
.catch(err => {
|
||||
setTimeout(hide, 1);
|
||||
clearInterval(interval);
|
||||
that.state.time = 60;
|
||||
that.state.smsSendBtn = false;
|
||||
this.requestFailed(err);
|
||||
});
|
||||
setTimeout(hide, 1)
|
||||
clearInterval(interval)
|
||||
that.state.time = 60
|
||||
that.state.smsSendBtn = false
|
||||
this.requestFailed(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
);
|
||||
)
|
||||
},
|
||||
// 忘记密码
|
||||
forgetPassword() {
|
||||
this.$router.push({ name: 'alteration' })
|
||||
},
|
||||
handleChangeCheckCode(){
|
||||
this.currdatetime = new Date().getTime();
|
||||
this.currdatetime = new Date().getTime()
|
||||
getAction(`/sys/randomImage/${this.currdatetime}`).then(res=>{
|
||||
if(res.success){
|
||||
this.randCodeImage = res.result
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
}).catch(()=>{
|
||||
this.requestCodeSuccess=false
|
||||
})
|
||||
this.getPublicKey();
|
||||
this.getPublicKey()
|
||||
},
|
||||
//获取RSA公钥
|
||||
getPublicKey(){
|
||||
@@ -248,39 +248,39 @@ export default {
|
||||
loginSuccess () {
|
||||
// this.$router.push({ path: "/dashboard/analysis" }).catch((res)=>{})
|
||||
// 进入首页
|
||||
this.$router.push({ path: "/" }).catch((res)=>{})
|
||||
this.$router.push({ path: '/' }).catch(()=>{})
|
||||
this.$notification.success({
|
||||
message: '欢迎',
|
||||
description: `${timeFix()},欢迎回来`,
|
||||
});
|
||||
})
|
||||
},
|
||||
cmsFailed(err){
|
||||
this.$notification[ 'error' ]({
|
||||
message: "登录失败",
|
||||
message: '登录失败',
|
||||
description:err,
|
||||
duration: 4,
|
||||
});
|
||||
})
|
||||
},
|
||||
requestFailed (err) {
|
||||
this.$notification[ 'error' ]({
|
||||
message: '登录失败',
|
||||
description: ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试",
|
||||
description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
|
||||
duration: 4,
|
||||
});
|
||||
this.loginBtn = false;
|
||||
})
|
||||
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();
|
||||
callback()
|
||||
}else{
|
||||
callback("您的手机号码格式不正确!");
|
||||
callback('您的手机号码格式不正确!')
|
||||
}
|
||||
},
|
||||
validateInputCode(rule,value,callback){
|
||||
if(!value || this.verifiedCode==this.inputCodeContent){
|
||||
callback();
|
||||
callback()
|
||||
}else{
|
||||
callback("您输入的验证码不正确!");
|
||||
callback('您输入的验证码不正确!')
|
||||
}
|
||||
},
|
||||
generateCode(value){
|
||||
@@ -294,7 +294,7 @@ export default {
|
||||
if (this.$route.params.username) {
|
||||
this.form.setFieldsValue({
|
||||
'username': this.$route.params.username
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user