feat;微信支付
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
<view class="content_right_total">
|
<view class="content_right_total">
|
||||||
<view>¥<text style="font-size: 36rpx">{{
|
<view>¥<text style="font-size: 36rpx">{{
|
||||||
pItem.totalPrice
|
pItem.totalPrice
|
||||||
}}</text></view>
|
}}</text></view>
|
||||||
<view>每件到手价¥{{ pItem.unitPrice }}</view>
|
<view>每件到手价¥{{ pItem.unitPrice }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="shopping_info_quantity">
|
<view class="shopping_info_quantity">
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<view class="content_right_total">
|
<view class="content_right_total">
|
||||||
<view>¥<text style="font-size: 36rpx">{{
|
<view>¥<text style="font-size: 36rpx">{{
|
||||||
pItem.totalPrice
|
pItem.totalPrice
|
||||||
}}</text></view>
|
}}</text></view>
|
||||||
<view>每件到手价¥{{ pItem.unitPrice }}</view>
|
<view>每件到手价¥{{ pItem.unitPrice }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="shopping_info_quantity">
|
<view class="shopping_info_quantity">
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
<view class="order_freight_item">
|
<view class="order_freight_item">
|
||||||
<view>运费<text style="color: #c0c3c6; margin-left: 20rpx">{{
|
<view>运费<text style="color: #c0c3c6; margin-left: 20rpx">{{
|
||||||
getValue(PRODUCT_DELIVERY_TIME, addItem.deliveryTime)
|
getValue(PRODUCT_DELIVERY_TIME, addItem.deliveryTime)
|
||||||
}}</text></view>
|
}}</text></view>
|
||||||
<view class="value_">
|
<view class="value_">
|
||||||
{{ orderInfo.postage ? "¥" + orderInfo.postage : "包邮" }}
|
{{ orderInfo.postage ? "¥" + orderInfo.postage : "包邮" }}
|
||||||
</view>
|
</view>
|
||||||
@@ -539,21 +539,28 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// console.log("parmas-----", this.isCoupon);
|
// console.log("parmas-----", this.isCoupon);
|
||||||
|
|
||||||
// if (this.isCoupon) {
|
|
||||||
// parmas["types"] = "1,2,3";
|
|
||||||
// parmas.isDeduction = true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (this.sed?.activedType == "seckill") {
|
// if (this.sed?.activedType == "seckill") {
|
||||||
// parmas["types"] = "1,2,3";
|
// parmas["types"] = "1,2,3";
|
||||||
// }
|
// }
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
parmas["types"] = "1,3";
|
parmas["types"] = "1,3";
|
||||||
|
if (this.isCoupon) {
|
||||||
|
parmas["types"] = "1,3,5";
|
||||||
|
parmas.isDeduction = true;
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
parmas["types"] = "1,2,3";
|
parmas["types"] = "1,2,3";
|
||||||
|
if (this.isCoupon) {
|
||||||
|
parmas["types"] = "1,2,3,5";
|
||||||
|
parmas.isDeduction = true;
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const result = await getSupportPay(parmas);
|
const result = await getSupportPay(parmas);
|
||||||
if (result && result.bizcode === 100) {
|
if (result && result.bizcode === 100) {
|
||||||
const data = result.data || [];
|
const data = result.data || [];
|
||||||
|
|||||||
+3
-3
@@ -9,7 +9,7 @@ import { feedback } from "@/api/payment.js";
|
|||||||
export function appWxpayFun(alipay, orderId, orderNum) {
|
export function appWxpayFun(alipay, orderId, orderNum) {
|
||||||
const type = alipay.type;
|
const type = alipay.type;
|
||||||
const orderStr = alipay.orderStr;
|
const orderStr = alipay.orderStr;
|
||||||
console.log("微信支付---", alipay,type);
|
console.log("微信支付---", alipay, type);
|
||||||
if (type === "app") {
|
if (type === "app") {
|
||||||
// app
|
// app
|
||||||
const orderInfo = {
|
const orderInfo = {
|
||||||
@@ -45,9 +45,9 @@ export function appWxpayFun(alipay, orderId, orderNum) {
|
|||||||
paySign: alipay.sign, // 签名,这里用的 MD5/RSA 签名
|
paySign: alipay.sign, // 签名,这里用的 MD5/RSA 签名
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("微信小程序支付---", orderInfo);
|
console.log("微信小程序支付---", orderInfo);
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
...orderInfo,
|
...orderInfo,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log("success:" + res);
|
console.log("success:" + res);
|
||||||
payFeedbackFun(orderId, orderNum, 1);
|
payFeedbackFun(orderId, orderNum, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user