{"id":8599,"date":"2024-06-02T17:01:01","date_gmt":"2024-06-02T09:01:01","guid":{"rendered":""},"modified":"2024-06-02T17:01:01","modified_gmt":"2024-06-02T09:01:01","slug":"\u5173\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63a7\u5236\u591a\u6b21\u63d0\u4ea4\u7684\u65b9\u6cd5\u6709\u54ea\u4e9b_\u5c0f\u7a0b\u5e8f\u65e0\u9650\u5237\u9080\u8bf7","status":"publish","type":"post","link":"https:\/\/mushiming.com\/8599.html","title":{"rendered":"\u5173\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63a7\u5236\u591a\u6b21\u63d0\u4ea4\u7684\u65b9\u6cd5\u6709\u54ea\u4e9b_\u5c0f\u7a0b\u5e8f\u65e0\u9650\u5237\u9080\u8bf7"},"content":{"rendered":"

\u7b2c\u4e00\u79cd \u76f4\u63a5\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f<\/p>\n

\u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/developers.weixin.qq.com\/miniprogram\/dev\/api\/ui\/interaction\/wx.showLoading.html<\/p>\n

wx.showLoading({\n  title: '\u52a0\u8f7d\u4e2d',\n})<\/code><\/pre>\n

\u5177\u4f53\u4ee3\u7801\u53ef\u4ee5\u8fd9\u6837\u5b50\u5b9e\u73b0\uff1a<\/p>\n

\u7528\u6237\u70b9\u51fb\u6309\u94ae\u540e\u51fa\u53d1comit\u65b9\u6cd5\u4e00\u5f00\u59cb\u662f\u5c31\u76f4\u63a5\u8c03\u7528showloading\u5728\u63a5\u53e3\u6389\u5b8c\u4ee5\u540e\u518dcomplete\u65b9\u6cd5\u4e2d\u4f7f\u7528hideloading\u9690\u85cf\u4e00\u5f00\u59cb\u7684\u52a0\u8f7d\u906e\u7f69\u5c42<\/p>\n

 comit() {\n    wx.showLoading({\n      title: '\u52a0\u8f7d\u4e2d',\n      mask: true\n    })\n    var that = this;\n    var data = {\n      \/\/ isReceiveGoods: this.data.isReceiveGoods,\n      refundAmount: this.data.money,\n      refundReasonCode: this.data.num,\n      subOrderCode: this.data.code,\n      refundType: this.data.chooseRefundType,\n      refundMemoToseller: this.data.remark,\n    }\n    console.log(data);\n    if (that.data.recordIdImg) {\n      data.resourceId = that.data.recordIdImg.join(',')\n    };\n    \/\/\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u8f93\u5165\u91d1\u989d\u53ea\u80fd\u4e3a\u6570\u5b57\u6216\u5c0f\u6570\u70b9\u540e\u4e24\u4f4d\n    var verifyMoney = \/^([0-4][0-9]{9}|[0-9]{1,9})(\\.[0-9][0-9]?)?$\/\n    if (!verifyMoney.test(that.data.money)) {\n      wx.showToast({\n        title: \"\u8ba2\u5355\u91d1\u989d\u683c\u5f0f\u9519\u8bef\",\n        icon: 'none',\n      })\n      return;\n    }\n    if (that.data.money == 0) {\n      wx.showToast({\n        title: '\u9000\u6b3e\u91d1\u989d\u4e0d\u80fd\u4e3a0',\n        icon: 'none',\n      })\n      return;\n    }\n    \/\/\u5224\u65ad  \u82e5\u8f93\u5165\u91d1\u989d\u5927\u4e8e\u5b9e\u4ed8\u91d1\u989d \u5219\u62a5\u9519\n    if (that.data.money > that.data.refundPrice) {\n      wx.showToast({\n        title: '\u9000\u6b3e\u4e0d\u80fd\u5927\u4e8e\u5b9e\u4ed8\u91d1\u989d',\n        icon: \"none\"\n      })\n      return;\n    }\n    that.setData({\n      boCommit: true\n    })\n    $.post({\n      url:'orderRefund\/create',\n      port:'order',\n      data:data,\n      success:res=>{\n        if (res.code == 0) {\n          wx.showToast({\n            title: '\u7533\u8bf7\u6210\u529f',\n            icon: 'none',\n            success: function () {\n              wx.navigateBack({\n                delta: 1\n              })\n            }\n          })\n        } else {\n          that.setData({\n            boCommit: false\n          })\n          wx.showToast({\n            title: res.msg,\n            icon: 'none',\n          })\n          return;\n        }\n      },\n      fail:function(){\n      },\n      complete() {\n        wx.hideLoading()\n      }\n    })\n  },\n  \/\/\u63d0\u4ea4\u8df3\u8f6c\u81f3\u8ba2\u5355\u8be6\u60c5\n  gotoOrder: function () {\n    wx.navigateTo({\n      url: '\/subPackages\/trade\/account\/account?fromPage=order',\n    })\n  }<\/code><\/pre>\n

 \u7b2c\u4e8c\u79cd\u5c31\u662f\u76f4\u63a5\u81ea\u5df1\u5224\u65ad<\/p>\n

\u5728data\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u5c5e\u6027\u4e3afalse\uff0c\u6bcf\u6b21\u4e00\u89e6\u53d1\u5c31\u8bbe\u7f6e\u4e3atrue\u7136\u540e\u5224\u65ad\u5f53\u4ed6\u4e3atrue\u7684\u65f6\u5019\u5c31\u4e0d\u80fd\u518d\u6b21\u70b9\u51fb <\/p>\n

  if (this.data.isClickPay) {\n      wx.showToast({\n        title: '\u8bf7\u52ff\u91cd\u590d\u70b9\u51fb',\n        icon: 'none'\n      })\n      return\n    }\n    this.setData({\n      isClickPay:true\n    })<\/code><\/pre>\n

this.setData\u53ef\u4ee5\u66f4\u6539\u4e3athis.data.isClickPay\u5982\u679c\u9875\u9762\u4e2d\u4e0d\u4f7f\u7528isClickPay\u5b57\u6bb5\u3002\u56e0\u4e3athis.setData\u662f\u9875\u9762\u66f4\u65b0\u662f\u9700\u8981\u7684 \u4ec5\u4ec5\u5b57\u6bb5\u66f4\u65b0\u5c31\u4f7f\u7528this.data\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5173\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63a7\u5236\u591a\u6b21\u63d0\u4ea4\u7684\u65b9\u6cd5\u6709\u54ea\u4e9b_\u5c0f\u7a0b\u5e8f\u65e0\u9650\u5237\u9080\u8bf7\u7b2c\u4e00\u79cd\u76f4\u63a5\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/developers.weixin.qq...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8599"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=8599"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/8599\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=8599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=8599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=8599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}