Commit e2b4923d61a793ceb72602fd3d4d865d05d4ef36
1 parent
0fae3755
去掉没有用到的
Showing
5 changed files
with
0 additions
and
181 deletions
app.json
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | "pages/index/index/index", | 3 | "pages/index/index/index", |
4 | "pages/goods/categoryList/categoryList", | 4 | "pages/goods/categoryList/categoryList", |
5 | "pages/cart/cart/cart", | 5 | "pages/cart/cart/cart", |
6 | - "pages/cart/cart4/cart4", | ||
7 | "pages/goods/goodsInfo/goodsInfo", | 6 | "pages/goods/goodsInfo/goodsInfo", |
8 | "pages/goods/goodsList/goodsList", | 7 | "pages/goods/goodsList/goodsList", |
9 | "pages/user/index/index", | 8 | "pages/user/index/index", |
pages/cart/cart4/cart4.js deleted
1 | -var r = getApp(), e = r.request,rq=e,oo=r.globalData,os=oo.setting, t = require("../../../utils/pay.js"); | ||
2 | -require("../../../utils/util.js"); | ||
3 | - | ||
4 | -Page({ | ||
5 | - data: { | ||
6 | - url: r.globalData.setting.url, | ||
7 | - resourceUrl: r.globalData.setting.resourceUrl, | ||
8 | - imgUrl: r.globalData.setting.imghost, | ||
9 | - order: {}, | ||
10 | - type:2, | ||
11 | - is_pt:0, | ||
12 | - pt_order_sn:"", | ||
13 | - }, | ||
14 | - onLoad: function(r) { | ||
15 | - console.log("onLoad"); | ||
16 | - var t = this,th=t, data = null, order_m=0; | ||
17 | - //----正常单1 和 组合单2--- | ||
18 | - if(r.type==1){ | ||
19 | - data = { order_sn: r.order_sn, store_id: os.stoid, order_status:0}; | ||
20 | - t.setData({ type:1}); | ||
21 | - }else{ | ||
22 | - data = { parent_sn: r.order_sn, store_id: os.stoid, order_status: 0}; | ||
23 | - } | ||
24 | - | ||
25 | - /*-----读取订单信息-----*/ | ||
26 | - rq.get("/api/weshop/order/page",{ | ||
27 | - data:data, | ||
28 | - success:function(rs){ | ||
29 | - | ||
30 | - if(rs.data.code==0 && rs.data.data && rs.data.data.pageData && rs.data.data.pageData.length>0){ | ||
31 | - //支付的金额 | ||
32 | - rs.data.data.pageData.forEach(function(ie,ind){ | ||
33 | - order_m+=ie.order_amount; | ||
34 | - }) | ||
35 | - t.setData({ | ||
36 | - order: { | ||
37 | - order_sn: r.order_sn, order_amount: order_m, | ||
38 | - } | ||
39 | - }); | ||
40 | - | ||
41 | - //如果是拼单就不做处理 | ||
42 | - if(rs.data.data.pageData[0].pt_prom_id>0) { | ||
43 | - th.data.pt_order_sn=rs.data.data.pageData[0].order_sn; th.data.is_pt=1; | ||
44 | - t.setData({ type:1}); | ||
45 | - return false; | ||
46 | - } | ||
47 | - //如果是只有一单的情况下,就是单号=组合单号 | ||
48 | - if(rs.data.data.pageData[0]['order_sn']==rs.data.data.pageData[0]['parent_sn']){ | ||
49 | - t.setData({ type:2}); | ||
50 | - } | ||
51 | - } | ||
52 | - } | ||
53 | - }) | ||
54 | - | ||
55 | - /*------- | ||
56 | - r.order_sn ? e.get("/api/weshop/order/get/{store_id}/{order_id}", { | ||
57 | - data: { | ||
58 | - order_sn: r.order_sn | ||
59 | - }, | ||
60 | - failRollback: !0, | ||
61 | - success: function(e) { | ||
62 | - var a = e.data.result.order_amount; | ||
63 | - parseFloat(a) < .01 && t.jumpSuccess(), t.setData({ | ||
64 | - order: { | ||
65 | - order_sn: r.order_sn, | ||
66 | - order_amount: a | ||
67 | - } | ||
68 | - }); | ||
69 | - } | ||
70 | - }) : (parseFloat(r.order_amount) < .01 && this.jumpSuccess(), this.setData({ | ||
71 | - order: r | ||
72 | - }));--------*/ | ||
73 | - }, | ||
74 | - payment: function() { | ||
75 | - var r = this,th=r; | ||
76 | - this.data.order && parseFloat(this.data.order.order_amount) < .01 ? this.jumpSuccess() : t.pay(this.data.order.order_sn, function() { | ||
77 | - r.jumpPaymentPage(); | ||
78 | - },null,os.stoid,th.data.type); | ||
79 | - }, | ||
80 | - jumpSuccess: function() { | ||
81 | - r.showSuccess("下单成功", function() { | ||
82 | - var r = getCurrentPages(); | ||
83 | - "pages/cart/cart/cart" == r[r.length - 2].route ? wx.redirectTo({ | ||
84 | - url: "/pages/user/order_list/order_list?type=2" | ||
85 | - }) : (wx.setStorageSync("order:order_list:update", !0), wx.setStorageSync("order:order_detail:update", !0), | ||
86 | - wx.navigateBack()); | ||
87 | - }); | ||
88 | - }, | ||
89 | - jumpPaymentPage: function() { | ||
90 | - wx.setStorageSync("order:order_list:update", !0); | ||
91 | - if(this.data.is_pt==1){ | ||
92 | - wx.redirectTo({ | ||
93 | - url: "/packageG/pages/team/team_success/team_success?ordersn=" + this.data.pt_order_sn, | ||
94 | - }); | ||
95 | - | ||
96 | - }else { | ||
97 | - wx.redirectTo({ | ||
98 | - url: "/packageG/pages/payment/payment/payment?order_sn=" + this.data.order.order_sn + "&order_amount=" + this.data.order.order_amount | ||
99 | - }); | ||
100 | - } | ||
101 | - } | ||
102 | -}); |
pages/cart/cart4/cart4.json deleted
pages/cart/cart4/cart4.wxml deleted
1 | -<view class="order-list pd-bg-fff"> | ||
2 | - <view class="order-id"> | ||
3 | - <view>订单号</view> | ||
4 | - <view class="co-red">{{order.order_sn}}</view> | ||
5 | - </view> | ||
6 | - <view class="order-price"> | ||
7 | - <view>订单金额</view> | ||
8 | - <view class="co-red">{{order.order_amount}}元</view> | ||
9 | - </view> | ||
10 | -</view> | ||
11 | -<view class="pay-way pd-bg-fff"> | ||
12 | - <view class="title">支付方式</view> | ||
13 | - <view class="pay-item"> | ||
14 | - <view class="pay-img"> | ||
15 | - <image class="wh100" src="{{imgUrl}}/miniapp/images/wx-pay.png"></image> | ||
16 | - </view> | ||
17 | - <view>微信支付</view> | ||
18 | - </view> | ||
19 | - <view bindtap="payment" class="pay-now">立即支付</view> | ||
20 | -</view> | ||
21 | - | ||
22 | - | ||
23 | -<warn id="warn"></warn> |
pages/cart/cart4/cart4.wxss deleted
1 | -.order-list { | ||
2 | - margin-bottom: 20rpx; | ||
3 | -} | ||
4 | - | ||
5 | -.order-list>view { | ||
6 | - display: flex; | ||
7 | - justify-content: space-between; | ||
8 | - align-items: center; | ||
9 | - height: 96rpx; | ||
10 | - font-size: 32rpx; | ||
11 | - color: #444; | ||
12 | -} | ||
13 | - | ||
14 | -.title { | ||
15 | - height: 70rpx; | ||
16 | - line-height: 70rpx; | ||
17 | - font-size: 32rpx; | ||
18 | - color: #444; | ||
19 | -} | ||
20 | - | ||
21 | -.pay-way { | ||
22 | - padding-bottom: 150rpx; | ||
23 | -} | ||
24 | - | ||
25 | -.pay-item { | ||
26 | - display: flex; | ||
27 | - height: 100rpx; | ||
28 | - align-items: center; | ||
29 | - border-bottom: 1px solid #f5f5f5; | ||
30 | - font-size: 28rpx; | ||
31 | - color: #444; | ||
32 | -} | ||
33 | - | ||
34 | -.pay-img { | ||
35 | - width: 60rpx; | ||
36 | - height: 52rpx; | ||
37 | - margin: 0 20rpx; | ||
38 | -} | ||
39 | - | ||
40 | -.pay-now { | ||
41 | - width: 680rpx; | ||
42 | - height: 88rpx; | ||
43 | - line-height: 88rpx; | ||
44 | - text-align: center; | ||
45 | - margin: 150rpx auto 0; | ||
46 | - background-color: #f23030; | ||
47 | - color: #fff; | ||
48 | - border-radius: 10rpx; | ||
49 | -} | ||
50 | \ No newline at end of file | 0 | \ No newline at end of file |