|
|
@@ -87,7 +87,6 @@ const authReady = ref(false)
|
|
|
const authBusy = ref(false)
|
|
|
const authDeviceId = ref('')
|
|
|
const authPackage = ref('')
|
|
|
-const authMchId = ref('')
|
|
|
|
|
|
onShow(() => {
|
|
|
const token = getToken()
|
|
|
@@ -161,7 +160,6 @@ const prepareAuth = async (deviceId: string) => {
|
|
|
|
|
|
authDeviceId.value = deviceId;
|
|
|
authPackage.value = result.package;
|
|
|
- authMchId.value = result.mchId || '';
|
|
|
authReady.value = true;
|
|
|
} catch (error: any) {
|
|
|
uni.hideLoading();
|
|
|
@@ -181,26 +179,23 @@ const invokePayScore = () => {
|
|
|
if (authBusy.value) return;
|
|
|
authBusy.value = true;
|
|
|
|
|
|
- const mchId = authMchId.value;
|
|
|
const pkg = authPackage.value;
|
|
|
|
|
|
- logger.log('[支付分] invokePayScore - mchId:', mchId, 'package 长度:', pkg?.length);
|
|
|
+ logger.log('[支付分] invokePayScore, package 长度:', pkg?.length);
|
|
|
|
|
|
- // 确保所有参数有效
|
|
|
- if (!pkg || !mchId) {
|
|
|
+ if (!pkg) {
|
|
|
authBusy.value = false;
|
|
|
uni.showModal({
|
|
|
title: '参数异常',
|
|
|
- content: 'package 或 mchId 为空,请重新扫码',
|
|
|
+ content: 'package 为空,请重新扫码',
|
|
|
showCancel: false,
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
wx.openBusinessView({
|
|
|
- businessType: 'payscore',
|
|
|
+ businessType: 'wxpayScoreUse',
|
|
|
extraData: {
|
|
|
- mch_id: mchId,
|
|
|
package: pkg,
|
|
|
},
|
|
|
success: () => {
|