提交 02b03968 编写于 作者: X xiaoyu

账户设置增加base64

上级 7ec9dc76
...@@ -87,6 +87,7 @@ import { getUserInfo, updateUserInfo, updateUserPass, upload } from '@/api/manag ...@@ -87,6 +87,7 @@ import { getUserInfo, updateUserInfo, updateUserPass, upload } from '@/api/manag
import AvatarModal from './AvatarModal' import AvatarModal from './AvatarModal'
import store from '@/store' import store from '@/store'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
import { Base64 } from 'js-base64'
export default { export default {
components: { components: {
AvatarModal, AvatarModal,
...@@ -178,6 +179,9 @@ export default { ...@@ -178,6 +179,9 @@ export default {
that.btnLoading = true // 打开按钮上的 loading that.btnLoading = true // 打开按钮上的 loading
that.confirmLoading = true // 显示loading that.confirmLoading = true // 显示loading
that.updateObject.recordId = that.recordId // 用户ID that.updateObject.recordId = that.recordId // 用户ID
that.updateObject.originalPwd = Base64.encode(that.updateObject.originalPwd)
that.updateObject.confirmPwd = Base64.encode(that.updateObject.confirmPwd)
this.$delete(this.updateObject, 'newPwd')
updateUserPass(that.updateObject).then(res => { updateUserPass(that.updateObject).then(res => {
that.$message.success('修改成功') that.$message.success('修改成功')
// 退出登录 // 退出登录
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<script> <script>
import JeepayUpload from '@/components/JeepayUpload/JeepayUpload' import JeepayUpload from '@/components/JeepayUpload/JeepayUpload'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
import { Base64 } from 'js-base64'
import { updateUserInfo, updateUserPass, getUserInfo, upload } from '@/api/manage' import { updateUserInfo, updateUserPass, getUserInfo, upload } from '@/api/manage'
import AvatarModal from './AvatarModal' import AvatarModal from './AvatarModal'
import store from '@/store' import store from '@/store'
...@@ -168,6 +169,9 @@ export default { ...@@ -168,6 +169,9 @@ export default {
that.btnLoading = true // 打开按钮上的 loading that.btnLoading = true // 打开按钮上的 loading
that.confirmLoading = true // 显示loading that.confirmLoading = true // 显示loading
that.updateObject.recordId = that.recordId // 用户ID that.updateObject.recordId = that.recordId // 用户ID
that.updateObject.originalPwd = Base64.encode(that.updateObject.originalPwd)
that.updateObject.confirmPwd = Base64.encode(that.updateObject.confirmPwd)
this.$delete(this.updateObject, 'newPwd')
updateUserPass(that.updateObject).then(res => { updateUserPass(that.updateObject).then(res => {
that.$message.success('修改成功') that.$message.success('修改成功')
// 退出登录 // 退出登录
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册