提交 8620ddb2 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 be989434
...@@ -114,11 +114,7 @@ export default { ...@@ -114,11 +114,7 @@ export default {
this.passport.checkLoginStatus((isLogin, user = {}) => { this.passport.checkLoginStatus((isLogin, user = {}) => {
this.isLogin = isLogin this.isLogin = isLogin
this.user = user this.user = user
if (this.$route.path === '/card') { window.location.href = this.$route.path
window.location.href = this.$route.fullPath
} else {
this.$router.push('/my')
}
}) })
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<upload-image v-model="form.avatar"></upload-image> <upload-image v-model="form.avatar"></upload-image>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSubmit">保存</el-button> <el-button type="primary" @click="handleSubmit">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -44,21 +44,21 @@ export default { ...@@ -44,21 +44,21 @@ export default {
}, },
getAvatar() { getAvatar() {
getAvatar().then(res => { getAvatar().then(res => {
if (res.status === 200 && res.code === 0) { if (res.status === 400) {
this.form = res.date
} else if (res.status === 400) {
this.$message.error(res.message) this.$message.error(res.message)
} else if (res.status === 403) { } else if (res.status === 403) {
this.$router.push({ path: '/index', query: { needLogin: Date.now() } }) this.$router.push({ query: { needLogin: Date.now() } })
} else {
this.form = res.date
} }
}) })
}, },
uploadAvatar() { uploadAvatar() {
uploadAvatar({ avatar: this.form.avatar }).then(res => { uploadAvatar({ avatar: this.form.avatar }).then(res => {
if (res.status === 200 && res.code === 0) { if (res.status) {
this.$message({ type: 'success', message: '保存成功' })
} else {
this.$message.error(res.message) this.$message.error(res.message)
} else {
this.$message({ type: 'success', message: '提交成功' })
} }
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论