提交 957dd03b authored 作者: pengxiaohui's avatar pengxiaohui

师资培训表单提交时更新登录用户真实姓名

上级 f2074015
......@@ -14,4 +14,5 @@ export default class ArticleAction {
getOrder (obj) { return articleApi.getOrder(obj).then(res => res) }
checkPay (id) { return articleApi.checkPay(id).then(res => res) }
payEnd (obj) { return articleApi.payEnd(obj).then(res => res) }
updateUserInfo (obj) { return articleApi.updateUserInfo(obj).then(res => res) }
}
......@@ -29,4 +29,6 @@ export default class ScoreAPI extends BaseAPI {
checkPay = (id) => this.get(`/api/pay/v1/order/status/${id}`)
// 支付完成通知
payEnd = (obj = {}) => this.post('/api/microservices/api/v3/apply/pay-end', obj)
// 更新用户信息
updateUserInfo = (obj = {}) => this.post('/api/usercenter/user/update-user', obj)
}
......@@ -50,7 +50,6 @@ export default class API {
_config.data = fr
}
/* 创建并根据参数发起请求 */
console.log(_config)
return this._axios(_config).then(beforeSuccess.bind(this), beforeFail.bind(this))
}
......
......@@ -197,7 +197,7 @@ export default {
},
mounted() {
// this.loginSuccess()
console.log(JSON.parse(window.sessionStorage.userInfo))
// console.log(JSON.parse(window.sessionStorage.userInfo))
this.user = JSON.parse(window.sessionStorage.userInfo)
},
methods: {
......
......@@ -52,7 +52,7 @@ export default {
type: Object
},
periods: {
type: String,
type: Number,
default: '1'
}
},
......
......@@ -129,6 +129,7 @@
</template>
<script>
import action from '@action'
// import { updateUserInfo } from '@/api/common'
import breadcrumb from '@/components/breadcrumb'
import payPop from './components/payPop'
import nations from '@/tool/nations'
......@@ -394,6 +395,7 @@ export default {
this.isInfoNull = false
this.getDetail()
this.message('提交成功!','success', 6000)
this.fetchUpdateUserInfo()
// setTimeout(() => {
// this.message('手机号注册成功!','success', 6000)
// }, 300)
......@@ -599,7 +601,16 @@ export default {
type: type || 'info',
duration: dur || 3000
})
}
},
fetchUpdateUserInfo() {
console.log(1111)
const params = {
real_name: this.form.username || ''
}
action.articleAction.updateUserInfo(params).then(res => {
console.log(res)
})
},
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论