main
parent
a511bf3e7b
commit
64f50960a7
|
@ -89,8 +89,10 @@ export default {
|
||||||
// 请求数据
|
// 请求数据
|
||||||
const param = {
|
const param = {
|
||||||
name: store.state.userInfo.nickName,
|
name: store.state.userInfo.nickName,
|
||||||
password: md5(state.formData.oldPass).toUpperCase(),
|
password: state.formData.oldPass,
|
||||||
new_password: md5(state.formData.newPass).toUpperCase()
|
new_password: state.formData.newPass,
|
||||||
|
// password: md5(state.formData.oldPass).toUpperCase(),
|
||||||
|
// new_password: md5(state.formData.newPass).toUpperCase()
|
||||||
}
|
}
|
||||||
const res = await myApi.editPass(param);
|
const res = await myApi.editPass(param);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
|
@ -77,24 +77,25 @@ export default {
|
||||||
// 1. 编码数据
|
// 1. 编码数据
|
||||||
const userInfo = {
|
const userInfo = {
|
||||||
username: state.ruleForm.username,
|
username: state.ruleForm.username,
|
||||||
password: md5(state.ruleForm.password).toUpperCase(),
|
password: state.ruleForm.password
|
||||||
|
// password: md5(state.ruleForm.password).toUpperCase(),
|
||||||
}
|
}
|
||||||
// 模拟登录
|
// 模拟登录
|
||||||
localSet("token", '99999999999999999');
|
// localSet("token", '99999999999999999');
|
||||||
store.commit("setUserInfo", userInfo);
|
// store.commit("setUserInfo", userInfo);
|
||||||
window.location.href = '/';
|
// window.location.href = '/';
|
||||||
|
|
||||||
// myApi.login(userInfo).then(async (res) => {
|
myApi.login(userInfo).then(async (res) => {
|
||||||
// if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// let userInfo = {
|
let userInfo = {
|
||||||
// nickName: state.ruleForm.username,
|
nickName: state.ruleForm.username,
|
||||||
// };
|
};
|
||||||
// store.commit("setUserInfo", userInfo);
|
store.commit("setUserInfo", userInfo);
|
||||||
// getLoginStatus();
|
getLoginStatus();
|
||||||
// } else {
|
} else {
|
||||||
// ElMessage.error(res.message);
|
ElMessage.error(res.message);
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue