Skip to content

Commit 916377e

Browse files
committed
fix(comment): fix comments
1 parent 2f897b1 commit 916377e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/page/upgrade/payment.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ export default function Payment() {
9999
http
100100
.post(`/pay/weixin/transactions/${type}/${productId}`, { mute: true })
101101
.then(response => {
102-
const { orderId, ...args } = response;
102+
const { order_id, ...args } = response;
103103
if (type === 'jsapi') {
104104
function onBridgeReady() {
105105
WeixinJSBridge.invoke('getBrandWCPayRequest', args, function () {
106-
queryOrder('weixin', orderId);
106+
queryOrder('weixin', order_id);
107107
});
108108
}
109109
if (typeof WeixinJSBridge == 'undefined') {
@@ -126,12 +126,12 @@ export default function Payment() {
126126
return;
127127
}
128128
if (type === 'h5') {
129-
location.href = `${args.h5_url}&redirect_url=${encodeURIComponent(location.href + '&type=weixin&orderId=' + orderId)}`;
129+
location.href = `${args.h5_url}&redirect_url=${encodeURIComponent(location.href + '&type=weixin&orderId=' + order_id)}`;
130130
return;
131131
}
132132
if (type === 'native') {
133+
codeOrderId.current = order_id;
133134
setCode(args.code_url);
134-
codeOrderId.current = orderId;
135135
return;
136136
}
137137
})
@@ -182,7 +182,7 @@ export default function Payment() {
182182
}, [orderIdFromPay, orderType]);
183183

184184
useEffect(() => {
185-
if (!code || !codeOrderId.current) {
185+
if (!code) {
186186
return;
187187
}
188188

0 commit comments

Comments
 (0)