Commit 48548f48 by huqc

Merge remote-tracking branch 'origin/master'

parents 194620bd 4df7e435
......@@ -43,8 +43,8 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: '',
assetsDir:'./',
assetsPublicPath: '',
assetsDir:'./',
assetsPublicPath: './',
configureWebpack:{
output:{
filename:'./js/[name].js',
......
......@@ -17,6 +17,18 @@ export function login(loginID, loginPas) {
})
})
}
//图形码验证
export function getCode(yzm){
var t = (new Date).getTime(); //每次点击重新取个随机数
return request({
url: 'http://192.168.3.110:8999/diseaseControlManage/api/login/captcha?t='+t+'&code='+yzm,
method:'post',
data: {},
async:false, //同步
})
}
//修改密码
export function updatePassword(uid,pwdold,pwdnew) {
......
......@@ -62,10 +62,19 @@
this.$message.error('用户密码不可为空');
return false
}
if(!this.captcha_code){
this.$message.error('验证码不可为空');
return false
};
let _this = this
// getCode(this.captcha_code).then(res=>{
// console.log(res)
// })
// 用户登录
//login(this.loginID, this.$md5(this.loginPas)).then(res => {
login(this.loginID,this.loginPas).then( res=>{
login(this.loginID, this.$md5(this.loginPas)).then(res => {
//login(this.loginID,this.loginPas).then( res=>{
console.log(res)
if (res.code == 1) {
sessionStorage.setItem('token', res.data.token);
......@@ -107,11 +116,12 @@
console.log("登录报错!");
})
},
//更换验证码
changeCode() {
this.$refs.code.setAttribute(
"src", 'http://shiro.easyweb.vip/assets/captcha' + '?t=' + (new Date).getTime()
"src", 'http://192.168.3.110:8999/diseaseControlManage/api/login/captcha' + '?t=' + (new Date).getTime()
);
}
......@@ -119,7 +129,7 @@
},
mounted() {
this.$refs.code.setAttribute(
"src", 'http://shiro.easyweb.vip/assets/captcha'
"src", 'http://192.168.3.110:8999/diseaseControlManage/api/login/captcha'
);
if (sessionStorage.getItem('userID') && sessionStorage.getItem('userPas')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment