| | |
| | | import topNotice from './top-notice' |
| | | import topLang from "./top-lang"; |
| | | import {changePassword} from "@/api/user" |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | submitSwitch(form, done) { |
| | | let userInfo = JSON.parse(localStorage.getItem('saber-userInfo')); |
| | | |
| | | let params = {userOid:userInfo.content.userOid,...form} |
| | | let params = { |
| | | userOid:userInfo.content.userOid, |
| | | oldPassword:func.encryptData(form.oldPassword,'daliantan0v0vcip'), |
| | | password:func.encryptData(form.password,'daliantan0v0vcip'), |
| | | confirmPassword:func.encryptData(form.confirmPassword,'daliantan0v0vcip'), |
| | | |
| | | } |
| | | changePassword(params).then(res =>{ |
| | | console.log(res); |
| | | if(res.data.code === 200){ |
| | | this.$message.success(res.data.msg); |
| | | this.passwordVisible = false; |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | // this.$store.dispatch("refreshToken", form).then(() => { |
| | | // this.userBox = false; |
| | |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | console.log('123'); |
| | | resetRouter(); |
| | | this.$router.push({path: "/login"}); |
| | | }); |