Commit 9d087e61415733d127dfbd8e3f3a58c14bc6498f
1 parent
3b3e94a8
订单修改
Showing
3 changed files
with
27 additions
and
18 deletions
packageA/pages/cart2_ser/cart2_ser.js
| ... | ... | @@ -166,13 +166,21 @@ Page({ |
| 166 | 166 | for (var i = 0; i < carr.length; i++) { |
| 167 | 167 | var good = null; |
| 168 | 168 | var item = carr[i]; |
| 169 | - await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + oo.stoid + "/" + item.service_id, {}).then( | |
| 169 | + await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + oo.stoid + "/" + item.service_id, {}) | |
| 170 | + .then( | |
| 170 | 171 | res => { |
| 171 | - good = res.data.data; | |
| 172 | + console.log('+++++++++', res.data.code); | |
| 173 | + if(res.data.code == 0) { | |
| 174 | + good = res.data.data; | |
| 175 | + item.img_url = oo.imghost + good.imgUrl; | |
| 176 | + item.erpItemID = good.erpItemID; | |
| 177 | + } | |
| 178 | + | |
| 172 | 179 | }) |
| 173 | - | |
| 174 | - item.img_url = oo.imghost + good.imgUrl; | |
| 175 | - item.erpItemID = good.erpItemID; | |
| 180 | + | |
| 181 | + // console.log('+++++++++', good); | |
| 182 | + // item.img_url = oo.imghost + good.imgUrl; | |
| 183 | + // item.erpItemID = good.erpItemID; | |
| 176 | 184 | |
| 177 | 185 | /*----接口要弄出来的,先顶着-----*/ |
| 178 | 186 | var pcid = item.pick_id; |
| ... | ... | @@ -542,6 +550,7 @@ Page({ |
| 542 | 550 | if (res.statusCode == 200) { |
| 543 | 551 | var data = res.data; |
| 544 | 552 | if (data.code == 0) { |
| 553 | + th.data.order_id = data.data.order_id; | |
| 545 | 554 | // console.log('myyyyyyyyyyyyyyyyyy', data.data); |
| 546 | 555 | if (th.data.is_cart) { |
| 547 | 556 | var list = th.data.cartlist_y; |
| ... | ... | @@ -563,7 +572,9 @@ Page({ |
| 563 | 572 | store_id: oo.stoid |
| 564 | 573 | }, |
| 565 | 574 | success: function(su) { |
| 575 | + | |
| 566 | 576 | var n = su.data.data; |
| 577 | + // console.log('su---->', n); | |
| 567 | 578 | let order_id = data.data.order_id; |
| 568 | 579 | th.weixinPay(n, |
| 569 | 580 | function() { |
| ... | ... | @@ -623,7 +634,7 @@ Page({ |
| 623 | 634 | console.log(n), getApp().showSuccess("支付成功!"); |
| 624 | 635 | "function" == typeof success && success(); |
| 625 | 636 | wx.redirectTo({ |
| 626 | - url: "../deposit/deposit" | |
| 637 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id, | |
| 627 | 638 | }); |
| 628 | 639 | }, |
| 629 | 640 | fail: function(n) { | ... | ... |
packageA/pages/details_serviceCard/details_serviceCard.js
| ... | ... | @@ -434,11 +434,11 @@ Page({ |
| 434 | 434 | var n = res.data.data; |
| 435 | 435 | self.weixinPay(n, function() { |
| 436 | 436 | app.showWarning('支付成功'); |
| 437 | - setTimeout(function() { | |
| 438 | - wx.reLaunch({ | |
| 439 | - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
| 440 | - }) | |
| 441 | - }, 1000) | |
| 437 | + // setTimeout(function() { | |
| 438 | + // wx.reLaunch({ | |
| 439 | + // url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
| 440 | + // }) | |
| 441 | + // }, 1000) | |
| 442 | 442 | }, function() { |
| 443 | 443 | app.showWarning('支付失败'); |
| 444 | 444 | // setTimeout(function() { |
| ... | ... | @@ -455,6 +455,7 @@ Page({ |
| 455 | 455 | //------调起支付框-------- |
| 456 | 456 | weixinPay: function(n, success, fail) { |
| 457 | 457 | if (!n) return false; |
| 458 | + let order_id = this.data.details.order_id; | |
| 458 | 459 | wx.requestPayment({ |
| 459 | 460 | timeStamp: String(n.timeStamp), |
| 460 | 461 | nonceStr: n.nonceStr, |
| ... | ... | @@ -465,7 +466,7 @@ Page({ |
| 465 | 466 | console.log(n), getApp().showSuccess("支付成功!"); |
| 466 | 467 | "function" == typeof success && success(); |
| 467 | 468 | wx.redirectTo({ |
| 468 | - url: "../deposit/deposit" | |
| 469 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
| 469 | 470 | }); |
| 470 | 471 | }, |
| 471 | 472 | fail: function(n) { | ... | ... |
pages/user/order_list/order_list.js
| ... | ... | @@ -2230,11 +2230,7 @@ Page({ |
| 2230 | 2230 | var n = res.data.data; |
| 2231 | 2231 | self.weixinPay(n, function() { |
| 2232 | 2232 | app.showWarning('支付成功'); |
| 2233 | - setTimeout(function() { | |
| 2234 | - wx.reLaunch({ | |
| 2235 | - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
| 2236 | - }) | |
| 2237 | - }, 1000) | |
| 2233 | + | |
| 2238 | 2234 | }, function() { |
| 2239 | 2235 | app.showWarning('支付失败'); |
| 2240 | 2236 | // setTimeout(function() { |
| ... | ... | @@ -2250,6 +2246,7 @@ Page({ |
| 2250 | 2246 | //------调起支付框-------- |
| 2251 | 2247 | weixinPay: function(n, success, fail) { |
| 2252 | 2248 | if (!n) return false; |
| 2249 | + let order_id = item.order_id; | |
| 2253 | 2250 | wx.requestPayment({ |
| 2254 | 2251 | timeStamp: String(n.timeStamp), |
| 2255 | 2252 | nonceStr: n.nonceStr, |
| ... | ... | @@ -2260,7 +2257,7 @@ Page({ |
| 2260 | 2257 | console.log(n), getApp().showSuccess("支付成功!"); |
| 2261 | 2258 | "function" == typeof success && success(); |
| 2262 | 2259 | wx.redirectTo({ |
| 2263 | - url: "../deposit/deposit" | |
| 2260 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
| 2264 | 2261 | }); |
| 2265 | 2262 | }, |
| 2266 | 2263 | fail: function(n) { | ... | ... |