Commit af1111b0 by wangjian

1

parent 8c489047
...@@ -124,6 +124,15 @@ ...@@ -124,6 +124,15 @@
} }
}) })
}, },
changeInfo(value) {
this.$net.post('/staff/modify', {'staffKey':'avatar', 'staffValue':value}).then(res => {
if (res.code === 200) {
this.getUserInfo()
} else {
this.toast(res.message)
}
})
},
getImg() { getImg() {
if (!this.$store.state.isLogin) { if (!this.$store.state.isLogin) {
this.$router.push('Login') this.$router.push('Login')
...@@ -137,7 +146,7 @@ ...@@ -137,7 +146,7 @@
success: function (res) { success: function (res) {
that.$net.uploadImage(res.tempFilePaths[0], 'uploadFile', 1000).then((res)=>{ that.$net.uploadImage(res.tempFilePaths[0], 'uploadFile', 1000).then((res)=>{
if (res && res.code==200) { if (res && res.code==200) {
that.getUserInfo() that.changeInfo(res.data.filePath)
} else { } else {
that.toast(res.message) that.toast(res.message)
} }
......
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