From 1d219c418cbca33158b738f42afbbffe29618bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Wed, 3 Dec 2025 15:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E6=96=B0=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=A4=87=E6=A1=88=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=AE=A9?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=87=8D=E6=96=B0=E8=B5=B0=E4=B8=80=E9=81=8D?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=E6=B5=81=E7=A8=8B=E4=BD=86=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/settlement/index.js | 8 ++++---- utils/api.js | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pages/settlement/index.js b/pages/settlement/index.js index fc11394..d7da390 100644 --- a/pages/settlement/index.js +++ b/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); } diff --git a/utils/api.js b/utils/api.js index 6f2f42e..b75649c 100644 --- a/utils/api.js +++ b/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');