Browse Source

修改重新提交备案功能,让用户重新走一遍入驻流程但保留初始数据

pull/1/head
徐飞洋 3 months ago
parent
commit
1d219c418c
  1. 8
      pages/settlement/index.js
  2. 13
      utils/api.js

8
pages/settlement/index.js

@ -76,7 +76,7 @@ Page({
// 检查是否是从首页登录返回的
const pendingReturnPath = wx.getStorageSync('pendingReturnPath');
if (pendingReturnPath === 'settlement') {
console.log('检测到从首页登录返回,清除标记');
console.log('检测到从首页登录返回,清除标记并自动提交申请');
// 清除返回路径标记
wx.removeStorageSync('pendingReturnPath');
@ -85,11 +85,11 @@ Page({
// 检查是否有保存的表单数据
const savedProgress = wx.getStorageSync('settlementProgress');
if (savedProgress && savedProgress.formData) {
console.log('发现保存的表单数据,自动提交申请');
console.log('发现保存的表单数据,自动提交申请');
// 恢复表单数据
this.setData(savedProgress.formData);
// 自动提交申请已关闭
// this.submitApplication();
// 自动提交申请
this.submitApplication();
}
}, 500);
}

13
utils/api.js

@ -1617,6 +1617,19 @@ module.exports = {
});
},
// 重新提交备案申请
resubmitSettlementApplication: function (applicationId) {
const openid = wx.getStorageSync('openid');
console.log('API.resubmitSettlementApplication - applicationId:', applicationId, 'openid:', openid);
if (!openid) {
return Promise.reject(new Error('用户未登录'));
}
return request(`/api/settlement/resubmit/${applicationId}`, 'POST', {
openid: openid
});
},
// 将商品状态设置为隐藏(软删除)
deleteProduct: function (productId) {
const openid = wx.getStorageSync('openid');

Loading…
Cancel
Save