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

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

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