style:根据支付分免押规范进行页面样式变更(整体)
This commit is contained in:
+32
@@ -48,6 +48,37 @@ const getUserInfo = () => {
|
||||
res(result);
|
||||
});
|
||||
};
|
||||
const initiateWeChatScorePayment = (paymentData) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!paymentData || !paymentData.data || !paymentData.data.package) {
|
||||
reject(new Error("支付参数不完整"));
|
||||
return;
|
||||
}
|
||||
common_vendor.wx$1.openBusinessView({
|
||||
businessType: "wxpayScoreUse",
|
||||
extraData: {
|
||||
mch_id: paymentData.data.mch_id,
|
||||
package: paymentData.data.package
|
||||
},
|
||||
success: (businessRes) => {
|
||||
common_vendor.index.__f__("log", "at util/index.js:92", "微信支付分小程序调用成功", businessRes);
|
||||
if (businessRes.errMsg === "openBusinessView:ok") {
|
||||
resolve(businessRes);
|
||||
} else {
|
||||
reject(new Error("支付流程未完成"));
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("error", "at util/index.js:101", "微信支付分小程序调用失败", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.errMsg || "支付分接口调用失败",
|
||||
icon: "none"
|
||||
});
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
const getQueryString = function(url, name) {
|
||||
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
||||
var r = url.substr(1).match(reg);
|
||||
@@ -58,5 +89,6 @@ const getQueryString = function(url, name) {
|
||||
};
|
||||
exports.getQueryString = getQueryString;
|
||||
exports.getUserInfo = getUserInfo;
|
||||
exports.initiateWeChatScorePayment = initiateWeChatScorePayment;
|
||||
exports.wxLogin = wxLogin;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/util/index.js.map
|
||||
|
||||
Reference in New Issue
Block a user