密码加密传递暂时注释掉\swagger设置全局token,解决接口需要token验证的问题

This commit is contained in:
zhangdaihao
2019-08-05 15:36:20 +08:00
parent 29d77c89df
commit 6f831dbb46
3 changed files with 33 additions and 20 deletions

View File

@ -227,17 +227,9 @@
created () {
Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData();
this.getEncrypte();
// update-begin- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能
// this.$http.get('/auth/2step-code')
// .then(res => {
// this.requiredTwoStepCaptcha = res.result.stepCode
// }).catch(err => {
// console.log('2step-code:', err)
// })
// update-end- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能
// this.requiredTwoStepCaptcha = true
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
//this.getEncrypte();
// update-end- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
},
methods: {
...mapActions([ "Login", "Logout","PhoneLogin" ]),
@ -266,8 +258,12 @@
that.form.validateFields([ 'username', 'password','inputCode' ], { force: true }, (err, values) => {
if (!err) {
loginParams.username = values.username
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
//loginParams.password = md5(values.password)
loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv).replace(/\+/g,"%2B");
//loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv)
loginParams.password = values.password
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
that.Login(loginParams).then((res) => {
this.departConfirm(res)
}).catch((err) => {