需求列表状态刷新优化

This commit is contained in:
Dev
2026-10-14 15:20:05 +08:00
parent 419c578b2c
commit a0149f5f93
3 changed files with 17 additions and 24 deletions
+10 -3
View File
@@ -13,6 +13,7 @@ Page({
actualAccount: 0,
activeValues: [0, 1, 2, 3, 4],
demandInfo: null,
freshPage: false, // 返回本页时是否需要重新拉取详情(签约/发货/支付后置为 true)
copyUrl: '' // 剪贴板复制失败时,弹出可长按选择的链接
},
@@ -239,7 +240,7 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.setStorageSync('bidDemandId', this.data.id);
wx.$util.markDemandRefresh(this.data.id);
wx.requestSubscribeMessage({
tmplIds: ['JGQJ3a-enop3Jfrcb7av4e5bX8p0Cah_5txloDHhBNw', 'fuSe71gltzwYTjNrc6N2bWg4cuO4qlhYjgo-09D3Gg8'],
complete(re) {
@@ -296,14 +297,13 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
wx.showModal({
title: '提示',
showCancel: false,
content: agree ? '确认接单成功,请通过联系方式与客户沟通开发细节' : '已拒绝成功',
success: (res) => {
if (res.confirm) {
//标记该需求需要刷新,返回列表时同步最新状态与按钮
wx.$util.markDemandRefresh(this.data.id);
if (agree) {
//刷新当前页面,等沟通群二维码渲染完成后再回到顶部,方便直接看到
this.loadDemandDetail(this.data.id).then(() => {
@@ -369,6 +369,7 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
wx.showModal({
title: '提示',
showCancel: false,
@@ -430,6 +431,7 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
wx.requestSubscribeMessage({
// 验收结果 + 工单结算 + 订单发货提醒(客户支付尾款后提醒开发者发货)
tmplIds: ['0H4GVHXI9G8RtZ1FuS_BuWN8yzOiBQ0-47ym6f08X_I', 'Xpqqk4si-Jh6HqfD-1VS9IH2AtlgVgGJLzgVS7RRMFk', 'jGxNQ11on1yD0d5tGwk4S8jP_CEdddfAkrp9-xVeeZY'],
@@ -491,6 +493,9 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
//支付页成功后 redirectTo 结果页,返回本页时需重新拉取详情
this.setData({ freshPage: true });
wx.requestSubscribeMessage({
// 合同付款提醒 + 确认收货通知(开发者发货后提醒客户确认收货)
tmplIds: ['RxZ1VlzI5cFl_q8fF-WfQlkUqMKp1HGhDCGzAYcmRtk', 'Utj3mlCNu0uiwshpoCeTPVMggXWYC6hVGqFBgGm9TFk'],
@@ -545,6 +550,7 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
wx.requestSubscribeMessage({
tmplIds: ['Gl_t3R5a_NoAvmVaDLeERCfFmTLiHURv9eIixtnOKYI'],
complete: (re) => {
@@ -605,6 +611,7 @@ Page({
(res) => {
console.log(res);
if (res.code == 1) {
wx.$util.markDemandRefresh(this.data.id);
wx.showModal({
title: '提示',
showCancel: false,