提交 792f084e authored 作者: pengxiaohui's avatar pengxiaohui

师资报名分期提交

上级 c6bbf9d3
...@@ -10,7 +10,7 @@ export default class ArticleAction { ...@@ -10,7 +10,7 @@ export default class ArticleAction {
register (obj) { return articleApi.register(obj).then(res => res) } register (obj) { return articleApi.register(obj).then(res => res) }
register2 (obj) { return articleApi.register2(obj).then(res => res) } register2 (obj) { return articleApi.register2(obj).then(res => res) }
getUserInfo (obj) { return articleApi.getUserInfo(obj).then(res => res) } getUserInfo (obj) { return articleApi.getUserInfo(obj).then(res => res) }
getFormDetail () { return articleApi.getFormDetail().then(res => res) } getFormDetail (obj) { return articleApi.getFormDetail(obj).then(res => res) }
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) }
......
...@@ -20,7 +20,9 @@ export default class ScoreAPI extends BaseAPI { ...@@ -20,7 +20,9 @@ export default class ScoreAPI extends BaseAPI {
// 获取用户信息 // 获取用户信息
getUserInfo = () => this.get('/api/passport/account/get-user-info') getUserInfo = () => this.get('/api/passport/account/get-user-info')
// 表单回显 // 表单回显
getFormDetail = () => this.get('/api/microservices/api/v3/apply/teacher-form-detail') getFormDetail = (params = {}) => {
return this.get('/api/microservices/api/v3/apply/teacher-form-detail', params, {})
}
// 下单 // 下单
getOrder = (obj = {}) => this.post('/api/microservices/api/v3/apply/unified-order', obj) getOrder = (obj = {}) => this.post('/api/microservices/api/v3/apply/unified-order', obj)
// 查看订单状态 // 查看订单状态
......
...@@ -50,6 +50,7 @@ export default class API { ...@@ -50,6 +50,7 @@ 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))
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<p>培训地点:{{details.addr}}</p> <p>培训地点:{{details.addr}}</p>
<p>培训时间:{{details.time}}</p> <p>培训时间:{{details.time}}</p>
</div> </div>
<router-link to="/train/form"> <router-link :to="{ path: '/train/form', query: { id: details.id }}">
<div class="detail-btn">立即报名</div> <div class="detail-btn">立即报名</div>
</router-link> </router-link>
</div> </div>
...@@ -87,14 +87,16 @@ export default { ...@@ -87,14 +87,16 @@ export default {
title: '2021年第2期“1+X金融产品数字化营销职业技能等级证书(中级)”师资培训班', title: '2021年第2期“1+X金融产品数字化营销职业技能等级证书(中级)”师资培训班',
time: '6月27日-7月1日', time: '6月27日-7月1日',
count: 100, count: 100,
addr: '河南郑州' addr: '河南郑州',
id: 2
}, },
3: { 3: {
imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg', imgUri: 'http://vocational-store.oss-cn-beijing.aliyuncs.com/files/20210225/9e74559a240db3b39b824418353ec3a3.jpg',
title: '2021年第3期“1+X金融产品数字化营销职业技能等级证书(中级)”师资培训班', title: '2021年第3期“1+X金融产品数字化营销职业技能等级证书(中级)”师资培训班',
time: '7月5日-7月9日', time: '7月5日-7月9日',
count: 100, count: 100,
addr: '吉林长春' addr: '吉林长春',
id: 3
} }
} }
} }
......
...@@ -212,6 +212,13 @@ export default { ...@@ -212,6 +212,13 @@ export default {
isLogin: false isLogin: false
} }
}, },
computed: {
id() {
let id = 1
if (this.$route.query.id) id = parseInt(this.$route.query.id)
return id
}
},
created() { created() {
action.articleAction.getUserInfo().then(res => { action.articleAction.getUserInfo().then(res => {
if (res && res.code === 0) { if (res && res.code === 0) {
...@@ -241,7 +248,10 @@ export default { ...@@ -241,7 +248,10 @@ export default {
}, },
getDetail(call) { getDetail(call) {
// 登录状态不需要手机号验证码 // 登录状态不需要手机号验证码
action.articleAction.getFormDetail().then(res => { const params = {
periods: this.id
}
action.articleAction.getFormDetail(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
if (!Object.keys(res.data.detail).length) { if (!Object.keys(res.data.detail).length) {
this.isInfoNull = true this.isInfoNull = true
...@@ -428,6 +438,7 @@ export default { ...@@ -428,6 +438,7 @@ export default {
sendEnrollInfo() { sendEnrollInfo() {
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
const form = {...this.form} const form = {...this.form}
form.periods = this.id
if (form.invoice_type !== '增值税专用发票') { if (form.invoice_type !== '增值税专用发票') {
form.invoice_address_mobile = '' form.invoice_address_mobile = ''
form.opening_bank_account = '' form.opening_bank_account = ''
...@@ -437,8 +448,6 @@ export default { ...@@ -437,8 +448,6 @@ export default {
form.invoice_detail = '' form.invoice_detail = ''
} }
} }
console.log(form)
console.log(this.form)
action.articleAction.formCommit(form).then(res => { action.articleAction.formCommit(form).then(res => {
if (res && res.code === 200) { if (res && res.code === 200) {
resolve({ resolve({
......
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.newsList() // this.newsList()
}, },
methods: { methods: {
HandleTabChange(index) { HandleTabChange(index) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论