@uxda/appkit 4.2.61 → 4.2.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -125,9 +125,10 @@ function requestWxH5Pay(options) {
125
125
  timeStamp: options.timeStamp
126
126
  },
127
127
  function(res) {
128
- console.log(res, "res");
129
128
  if (res.err_msg == "get_brand_wcpay_request:ok") {
130
- resolve(res);
129
+ resolve(true);
130
+ } else {
131
+ resolve(false);
131
132
  }
132
133
  }
133
134
  );
@@ -1784,8 +1785,11 @@ var script$B = /* @__PURE__ */ defineComponent({
1784
1785
  channelCode: "centergzh",
1785
1786
  payFinishJumpUrl: props.payFinishJumpUrl
1786
1787
  }).then((result) => {
1788
+ console.log(result, "------requestBrandWCPay");
1787
1789
  state.buttonLoading = false;
1788
- window.location.href = props.payFinishJumpUrl;
1790
+ if (result) {
1791
+ window.location.href = props.payFinishJumpUrl;
1792
+ }
1789
1793
  });
1790
1794
  } else {
1791
1795
  wx.login({
@@ -2160,8 +2164,11 @@ var script$x = /* @__PURE__ */ defineComponent({
2160
2164
  channelCode: "centergzh",
2161
2165
  payFinishJumpUrl: props.payFinishJumpUrl
2162
2166
  }).then((result) => {
2167
+ console.log(result, "------requestBrandWCPay");
2163
2168
  state.buttonLoading = false;
2164
- window.location.href = props.payFinishJumpUrl;
2169
+ if (result) {
2170
+ window.location.href = props.payFinishJumpUrl;
2171
+ }
2165
2172
  });
2166
2173
  } else {
2167
2174
  wx.login({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.61",
3
+ "version": "4.2.62",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -110,8 +110,11 @@ const onPayClick = () => {
110
110
  channelCode: 'centergzh',
111
111
  payFinishJumpUrl: props.payFinishJumpUrl
112
112
  }).then(result => {
113
+ console.log(result, '------requestBrandWCPay')
113
114
  state.buttonLoading = false
114
- window.location.href = props.payFinishJumpUrl as string
115
+ if (result) {
116
+ window.location.href = props.payFinishJumpUrl as string
117
+ }
115
118
  })
116
119
  } else {
117
120
  wx.login({
@@ -181,8 +181,11 @@ const onPayClick = () => {
181
181
  channelCode: 'centergzh',
182
182
  payFinishJumpUrl: props.payFinishJumpUrl
183
183
  }).then(result => {
184
+ console.log(result, '------requestBrandWCPay')
184
185
  state.buttonLoading = false
185
- window.location.href = props.payFinishJumpUrl as string
186
+ if (result) {
187
+ window.location.href = props.payFinishJumpUrl as string
188
+ }
186
189
  })
187
190
  } else {
188
191
  wx.login({
@@ -56,10 +56,11 @@ function requestWxH5Pay(options: PrePayOptions) {
56
56
  timeStamp: options.timeStamp,
57
57
  },
58
58
  function (res) {
59
- console.log(res, 'res')
60
59
  if (res.err_msg == 'get_brand_wcpay_request:ok') {
61
- resolve(res)
62
60
  //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠,商户需进一步调用后端查单确认支付结果。
61
+ resolve(true)
62
+ } else {
63
+ resolve(false)
63
64
  }
64
65
  }
65
66
  )