Merge branch 'main' of http://8.153.108.90:3000/tengxiangli/YD_Event.miniApp
This commit is contained in:
commit
54f2a7f0a5
@ -146,10 +146,33 @@ Page({
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (!res || !res.confirm) return;
|
||||
// TODO: 接入后端“取消报名/退款”接口后提交所选项目
|
||||
wx.showToast({ title: '已提交(待接接口)', icon: 'none' });
|
||||
this.submitCancelRegistration();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
submitCancelRegistration() {
|
||||
wx.showLoading({ title: '提交中...' });
|
||||
request({
|
||||
path: API.cancelRegistrationRefund,
|
||||
method: 'POST',
|
||||
needAuth: true,
|
||||
data: {
|
||||
registrationId: this.data.registrationId,
|
||||
refundReason: '用户取消报名'
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: '退款申请已提交', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
wx.navigateBack();
|
||||
}, 1500);
|
||||
})
|
||||
.catch((err) => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: (err && err.message) || '提交失败,请稍后重试', icon: 'none' });
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ const API = {
|
||||
myRegistrationDetail: (registrationId) => `/api/eventclient/my-registration/${registrationId}`,
|
||||
apply: '/api/eventclient/apply',
|
||||
calculateAmount: '/api/eventclient/calculate-amount',
|
||||
cancelRegistrationRefund: '/api/eventclient/cancel-registration-refund',
|
||||
|
||||
wechatLogin: '/api/oauth/login',
|
||||
loginByCode: '/api/oauth/login',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user