main
wangqiujuan0808 2024-08-13 21:08:01 +08:00
parent a511bf3e7b
commit 64f50960a7
2 changed files with 20 additions and 17 deletions

View File

@ -89,8 +89,10 @@ export default {
//
const param = {
name: store.state.userInfo.nickName,
password: md5(state.formData.oldPass).toUpperCase(),
new_password: md5(state.formData.newPass).toUpperCase()
password: state.formData.oldPass,
new_password: state.formData.newPass,
// password: md5(state.formData.oldPass).toUpperCase(),
// new_password: md5(state.formData.newPass).toUpperCase()
}
const res = await myApi.editPass(param);
if (res.code == 0) {

View File

@ -77,24 +77,25 @@ export default {
// 1.
const userInfo = {
username: state.ruleForm.username,
password: md5(state.ruleForm.password).toUpperCase(),
password: state.ruleForm.password
// password: md5(state.ruleForm.password).toUpperCase(),
}
//
localSet("token", '99999999999999999');
store.commit("setUserInfo", userInfo);
window.location.href = '/';
// myApi.login(userInfo).then(async (res) => {
// if (res.code == 0) {
// let userInfo = {
// nickName: state.ruleForm.username,
// };
// localSet("token", '99999999999999999');
// store.commit("setUserInfo", userInfo);
// getLoginStatus();
// } else {
// ElMessage.error(res.message);
// }
// })
// window.location.href = '/';
myApi.login(userInfo).then(async (res) => {
if (res.code == 0) {
let userInfo = {
nickName: state.ruleForm.username,
};
store.commit("setUserInfo", userInfo);
getLoginStatus();
} else {
ElMessage.error(res.message);
}
})
} else {
return false;
}