Bläddra i källkod

支付参数更新

梁沛聪 6 år sedan
förälder
incheckning
016c0ea889

+ 6
- 6
miniapp/app/pages/goodsDetail/index.js Visa fil

@@ -61,7 +61,7 @@ new $.Page({
61 61
             address,
62 62
             contact: name,
63 63
             phone,
64
-            product_id: 1
64
+            product_id: this.data.detail.id
65 65
         }).then((res) => {
66 66
             if (res.data) {
67 67
                 this.callWXPay(res.data.id, res.data.order_type || 'product_order');
@@ -76,16 +76,16 @@ new $.Page({
76 76
             if (res.msg) {
77 77
                 const {
78 78
                     timestamp,
79
-                    sign,
80
-                    noncestr
79
+                    paySign,
80
+                    nonceStr
81 81
                 } = res.msg;
82 82
                 const pck = res.msg.package;
83 83
                 wx.requestPayment({
84 84
                     timeStamp: timestamp + '',
85
-                    nonceStr: noncestr,
85
+                    nonceStr,
86 86
                     package: pck,
87 87
                     signType: 'MD5',
88
-                    paySign: sign,
88
+                    paySign,
89 89
                     success(res) {
90 90
                         console.log('支付成功', res);
91 91
                         $.wx.showToast({
@@ -101,7 +101,7 @@ new $.Page({
101 101
                         setTimeout(function () {
102 102
                             $.router.goto({
103 103
                                 path: '/pages/order/index',
104
-                                type: $.ROUTER_TYPE.CLOSE_CURRENT
104
+                                type: $.ROUTER_TYPE.SWITCH_TAB
105 105
                             })
106 106
                         }, 2000);
107 107
                     }

+ 2
- 1
miniapp/app/pages/goodsList/index.wxss Visa fil

@@ -30,6 +30,7 @@ page {
30 30
 .details {
31 31
     padding-left: 226rpx;
32 32
     padding-top: 20rpx;
33
+    padding-bottom: 20rpx;
33 34
 }
34 35
 
35 36
 .card {
@@ -37,9 +38,9 @@ page {
37 38
     margin-left: 16rpx;
38 39
     display: inline-block;
39 40
     margin-top: 18rpx;
40
-    box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, .3);
41 41
     padding-bottom: 14rpx;
42 42
     border-radius: 4rpx;
43
+    border:solid 2rpx #efefef;
43 44
 }
44 45
 
45 46
 .goods-img {

+ 4
- 4
miniapp/app/pages/order/index.js Visa fil

@@ -50,16 +50,16 @@ new $.Page({
50 50
                 if (res.msg) {
51 51
                     const {
52 52
                         timestamp,
53
-                        sign,
54
-                        noncestr
53
+                        paySign,
54
+                        nonceStr
55 55
                     } = res.msg;
56 56
                     const pck = res.msg.package;
57 57
                     wx.requestPayment({
58 58
                         timeStamp: timestamp + '',
59
-                        nonceStr: noncestr,
59
+                        nonceStr,
60 60
                         package: pck,
61 61
                         signType: 'MD5',
62
-                        paySign: sign,
62
+                        paySign,
63 63
                         success(res) {
64 64
                             console.log('支付成功', res);
65 65
                             $.wx.hideToast('loading');

+ 2
- 2
miniapp/app/pages/order/index.wxss Visa fil

@@ -64,7 +64,7 @@
64 64
     background-color: #00a0e9;
65 65
 }
66 66
 
67
-.goods {
67
+/* .goods {
68 68
     margin-top: 20rpx;
69 69
     border-top: solid 1rpx #dedede;
70
-}
70
+} */

Loading…
Avbryt
Spara