Commit 37f3387c9a521db64ac886200ccb0aa1aae1cfda
1 parent
7f3de0e04f
Exists in
master
购物车支付
Showing
2 changed files
with
42 additions
and
22 deletions
Show diff stats
src/components/CommodityCard/CommodityCard.vue
1 | <template> | 1 | <template> |
2 | <view | 2 | <view |
3 | class="card" | 3 | class="card" |
4 | @tap="toGoods(goods.id?goods.id:goods.pid,goods.sk_id)" | 4 | @tap="toGoods(goods.id?goods.id:goods.pid,goods.sk_id)" |
5 | > | 5 | > |
6 | <easy-loadimage mode="widthFix" | 6 | <easy-loadimage mode="widthFix" |
7 | :scroll-top="scrollTop" | 7 | :scroll-top="scrollTop" |
8 | :image-src="goods.imgurl?goods.imgurl:goods.pic" | 8 | :image-src="goods.imgurl?goods.imgurl:goods.pic" |
9 | :viewHeight="viewHeight"></easy-loadimage> | 9 | :viewHeight="viewHeight"></easy-loadimage> |
10 | <!-- <image | 10 | <!-- <image |
11 | mode="widthFix" | 11 | mode="widthFix" |
12 | :src="goods.imgurl?goods.imgurl:goods.pic" | 12 | :src="goods.imgurl?goods.imgurl:goods.pic" |
13 | ></image> --> | 13 | ></image> --> |
14 | <view class="name">{{goods.name?goods.name:goods.p_name}}</view> | 14 | <view class="name">{{goods.name?goods.name:goods.p_name}}</view> |
15 | <view class="info"> | 15 | <view class="info"> |
16 | <view class="priceBox"> | 16 | <view class="priceBox"> |
17 | <view class="price">{{goods.old_price ? goods.old_price : (goods.rsSon && goods.rsSon.Min_Price)}}</view> | 17 | <view class="price">{{goods.old_price ? goods.old_price : (goods.rsSon && goods.rsSon.Min_Price)}}</view> |
18 | <view class="originCost"> | 18 | <view class="originCost"> |
19 | <!-- {{goods.price !== undefined?goods.price:goods.real_price}} --> | 19 | <!-- {{goods.price !== undefined?goods.price:goods.real_price}} --> |
20 | {{goods.real_price ? goods.real_price : parseInt(goods.rsSon && goods.rsSon.Min_Price*(1 + Number(goods.rsSon.discount)/100))}} | 20 | {{goods.real_price ? goods.real_price : parseInt(goods.rsSon && goods.rsSon.Min_Price*(1 + Number(goods.rsSon.discount)/100))}} |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | <view class="trade_num">{{goods.trade_num}}人购买</view> | 23 | <view class="trade_num">{{goods.trade_num}}人购买</view> |
24 | </view> | 24 | </view> |
25 | </view> | 25 | </view> |
26 | </template> | 26 | </template> |
27 | 27 | ||
28 | <script> | 28 | <script> |
29 | import easyLoadimage from '@/components/EasyLoadimage/EasyLoadimage.vue' | 29 | import easyLoadimage from '@/components/EasyLoadimage/EasyLoadimage.vue' |
30 | // const MockData = require('@/static/easy-loadimage/mock-data.json') | 30 | // const MockData = require('@/static/easy-loadimage/mock-data.json') |
31 | export default { | 31 | export default { |
32 | components:{easyLoadimage}, | 32 | components:{easyLoadimage}, |
33 | props: { | 33 | props: { |
34 | /** | 34 | /** |
35 | * 商品数据 | 35 | * 商品数据 |
36 | */ | 36 | */ |
37 | goods: { | 37 | goods: { |
38 | id: Number, | 38 | id: Number, |
39 | imgurl: String, | 39 | imgurl: String, |
40 | name: String, | 40 | name: String, |
41 | rsSon: Object, | 41 | rsSon: Object, |
42 | originCost: String, | 42 | originCost: String, |
43 | price: String, | 43 | price: String, |
44 | trade_num: String, | 44 | trade_num: String, |
45 | goodType: String, | 45 | goodType: String, |
46 | }, | 46 | }, |
47 | scrollTop:Number, | 47 | scrollTop:Number, |
48 | viewHeight:Number, | 48 | viewHeight:Number, |
49 | }, | 49 | }, |
50 | created () { | 50 | created () { |
51 | }, | 51 | }, |
52 | data () { | 52 | data () { |
53 | return { | 53 | return { |
54 | 54 | ||
55 | } | 55 | } |
56 | }, | 56 | }, |
57 | 57 | ||
58 | methods: { | 58 | methods: { |
59 | toGoods (id, skId) { | 59 | toGoods (id, skId) { |
60 | console.log('---', '../frameDetail/frameDetail?pid=' + id + '&sk_id=' + skId) | 60 | console.log('---', '../frameDetail/frameDetail?pid=' + id + '&sk_id=' + skId) |
61 | uni.navigateTo({ | 61 | uni.navigateTo({ |
62 | url: '../frameDetail/frameDetail?pid=' + id + '&sk_id=' + skId, | 62 | url: '../frameDetail/frameDetail?pid=' + id + '&sk_id=' + skId, |
63 | success: res => {}, | 63 | success: res => {}, |
64 | fail: () => {}, | 64 | fail: () => {}, |
65 | complete: () => {}, | 65 | complete: () => {}, |
66 | }) | 66 | }) |
67 | }, | 67 | }, |
68 | }, | 68 | }, |
69 | } | 69 | } |
70 | </script> | 70 | </script> |
71 | 71 | ||
72 | <style lang="scss"> | 72 | <style lang="scss"> |
73 | 73 | ||
74 | image { | 74 | image { |
75 | width: 100%; | 75 | width: 100%; |
76 | height: 120rpx; | 76 | height: 120rpx; |
77 | } | 77 | } |
78 | .name { | 78 | .name { |
79 | width: 92%; | 79 | width: 92%; |
80 | height: 76rpx; | 80 | height: 84rpx; |
81 | padding: 5px 4%; | 81 | padding: 5px 4%; |
82 | box-sizing: border-box; | 82 | box-sizing: border-box; |
83 | display: -webkit-box; | 83 | display: -webkit-box; |
84 | -webkit-box-orient: vertical; | 84 | -webkit-box-orient: vertical; |
85 | -webkit-line-clamp: 2; | 85 | -webkit-line-clamp: 2; |
86 | text-align: justify; | 86 | text-align: justify; |
87 | overflow: hidden; | 87 | overflow: hidden; |
88 | font-size: 26rpx; | 88 | font-size: 26rpx; |
89 | color: #333333; | 89 | color: #333333; |
90 | } | 90 | } |
91 | .info { | 91 | .info { |
92 | display: flex; | 92 | display: flex; |
93 | justify-content: space-between; | 93 | justify-content: space-between; |
94 | align-items: center; | 94 | align-items: center; |
95 | width: 92%; | 95 | width: 92%; |
96 | padding: 5px 4% 5px 4%; | 96 | padding: 5px 4% 5px 4%; |
97 | .priceBox { | 97 | .priceBox { |
98 | display: flex; | 98 | display: flex; |
99 | justify-content: space-between; | 99 | justify-content: space-between; |
100 | align-items: center; | 100 | align-items: center; |
101 | .price { | 101 | .price { |
102 | color: #eb5d3b; | 102 | color: #eb5d3b; |
103 | font-size: 28rpx; | 103 | font-size: 28rpx; |
104 | font-weight: 600; | 104 | font-weight: 600; |
105 | margin-right: 10rpx; | 105 | margin-right: 10rpx; |
106 | } | 106 | } |
107 | .originCost { | 107 | .originCost { |
108 | text-decoration: line-through; | 108 | text-decoration: line-through; |
109 | color: #999999; | 109 | color: #999999; |
110 | font-size: 20rpx; | 110 | font-size: 20rpx; |
111 | } | 111 | } |
112 | } | 112 | } |
113 | .trade_num { | 113 | .trade_num { |
114 | color: #999999; | 114 | color: #999999; |
115 | font-size: 20rpx; | 115 | font-size: 20rpx; |
116 | } | 116 | } |
117 | } | 117 | } |
118 | </style> | 118 | </style> |
119 | 119 |
src/pages/confirmOrder/confirmOrder.vue
1 | <template> | 1 | <template> |
2 | <view class="wrap"> | 2 | <view class="wrap"> |
3 | <view></view> | 3 | <view></view> |
4 | <view | 4 | <view |
5 | class="addAddress" | 5 | class="addAddress" |
6 | @tap="toaddAddress" | 6 | @tap="toaddAddress" |
7 | v-if="this.showAddress" | 7 | v-if="this.showAddress" |
8 | > | 8 | > |
9 | <view class="addIcon"> | 9 | <view class="addIcon"> |
10 | <image | 10 | <image |
11 | src="../../static/add.png" | 11 | src="../../static/add.png" |
12 | mode="aspectFill" | 12 | mode="aspectFill" |
13 | ></image> | 13 | ></image> |
14 | </view> | 14 | </view> |
15 | <view class="addressText">{{addAddress}}</view> | 15 | <view class="addressText">{{addAddress}}</view> |
16 | <image | 16 | <image |
17 | src="../../static/right.png" | 17 | src="../../static/right.png" |
18 | mode="aspectFill" | 18 | mode="aspectFill" |
19 | ></image> | 19 | ></image> |
20 | </view> | 20 | </view> |
21 | <view | 21 | <view |
22 | v-else | 22 | v-else |
23 | @tap="toaddAddress" | 23 | @tap="toaddAddress" |
24 | class="list order-user" | 24 | class="list order-user" |
25 | > | 25 | > |
26 | <view class="order-user-head"> | 26 | <view class="order-user-head"> |
27 | <view class="name"> | 27 | <view class="name"> |
28 | <view | 28 | <view |
29 | v-if="addressInfo.default === '1'" | 29 | v-if="addressInfo.default === '1'" |
30 | class="default" | 30 | class="default" |
31 | ><text>默认</text></view>{{addressInfo.name}} | 31 | ><text>默认</text></view>{{addressInfo.name}} |
32 | </view> | 32 | </view> |
33 | <text class="mobile">{{addressInfo.mobile}}</text> | 33 | <text class="mobile">{{addressInfo.mobile}}</text> |
34 | </view> | 34 | </view> |
35 | <view class="order-user-body"> | 35 | <view class="order-user-body"> |
36 | <image src="../../static/myorder-paying-location.png"></image> | 36 | <image src="../../static/myorder-paying-location.png"></image> |
37 | <text class="address">{{addressInfo.address}}\n{{addressInfo.add_detail}}</text> | 37 | <text class="address">{{addressInfo.address}}\n{{addressInfo.add_detail}}</text> |
38 | </view> | 38 | </view> |
39 | <image | 39 | <image |
40 | class="arrow" | 40 | class="arrow" |
41 | src="../../static/right.png" | 41 | src="../../static/right.png" |
42 | mode="aspectFill" | 42 | mode="aspectFill" |
43 | ></image> | 43 | ></image> |
44 | </view> | 44 | </view> |
45 | <view class="content"> | 45 | <view class="content"> |
46 | <view class="orderInfo"> | 46 | <view class="orderInfo"> |
47 | <view class="title"> | 47 | <view class="title"> |
48 | <image | 48 | <image |
49 | src="../../static/store.png" | 49 | src="../../static/store.png" |
50 | mode="aspectFill" | 50 | mode="aspectFill" |
51 | style="width: 40rpx;height: 40rpx;" | 51 | style="width: 40rpx;height: 40rpx;" |
52 | ></image> | 52 | ></image> |
53 | <text>非常戴镜</text> | 53 | <text>非常戴镜</text> |
54 | </view> | 54 | </view> |
55 | 55 | ||
56 | <view class="infoBox" v-if="isCart == 'true'" v-for="(item, index) in checkedCartLst" :key="index"> | 56 | <view class="infoBox" v-if="isCart == 'true'" v-for="(item, index) in checkedCartLst" :key="index"> |
57 | <view class="infoTop"> | 57 | <view class="infoTop"> |
58 | <image | 58 | <image |
59 | :src="item.img_index_url" | 59 | :src="item.img_index_url" |
60 | mode="aspectFill" | 60 | mode="aspectFill" |
61 | ></image> | 61 | ></image> |
62 | <view class="infoRight"> | 62 | <view class="infoRight"> |
63 | <text class="goodName">{{item.p_name}}</text> | 63 | <text class="goodName">{{item.p_name}}</text> |
64 | <text class="remarks">支持7天无理由退货 顺丰发货</text> | 64 | <text class="remarks">支持7天无理由退货 顺丰发货</text> |
65 | <view class="priceBox"> | 65 | <view class="priceBox"> |
66 | <view class="price">¥{{Number(item.nowPrice) * item.num}}<text class="originCost"> | 66 | <view class="price">¥{{Number(item.nowPrice) * item.num}}<text class="originCost"> |
67 | ¥{{item.oldPrice*item.num}} | 67 | ¥{{item.oldPrice*item.num}} |
68 | </text></view> | 68 | </text></view> |
69 | <view class="counter"> | 69 | <view class="counter"> |
70 | <view | 70 | <view |
71 | class="btn" | 71 | class="btn" |
72 | disabled="this.disabled" | 72 | disabled="this.disabled" |
73 | type="default" | 73 | type="default" |
74 | @click="counter(false,index)" | 74 | @click="counter(false,index)" |
75 | >-</view> | 75 | >-</view> |
76 | <text>{{count}}</text> | 76 | <text>{{checkedCartLst[index].num}}</text> |
77 | <view | 77 | <view |
78 | class="btn" | 78 | class="btn" |
79 | type="default" | 79 | type="default" |
80 | @click="counter(true,index)" | 80 | @click="counter(true,index)" |
81 | >+</view> | 81 | >+</view> |
82 | </view> | 82 | </view> |
83 | </view> | 83 | </view> |
84 | </view> | 84 | </view> |
85 | </view> | 85 | </view> |
86 | <view class="infoBottom"> | 86 | <view class="infoBottom"> |
87 | <view class="norm">规格 <text> | 87 | <view class="norm">规格 <text> |
88 | <!-- 长度超出变省略号未做 --> | 88 | <!-- 长度超出变省略号未做 --> |
89 | <block >{{item.sku_name}}<block v-if="index !== current.length -1">/</block> | 89 | <block >{{item.sku_name}}<block v-if="index !== current.length -1">/</block> |
90 | </block> | 90 | </block> |
91 | </text></view> | 91 | </text></view> |
92 | <view class="shippingMethod">使用人 <text> | 92 | <view class="shippingMethod">使用人 <text> |
93 | {{item.peopleName}} | 93 | {{item.peopleName}} |
94 | </text></view> | 94 | </text></view> |
95 | <view class="shippingMethod">配送方式 <text>快递</text></view> | 95 | <view class="shippingMethod">配送方式 <text>快递</text></view> |
96 | <view class="message">买家留言 | 96 | <view class="message">买家留言 |
97 | <input | 97 | <input |
98 | type="text" | 98 | type="text" |
99 | :value="note" | 99 | :value="note" |
100 | placeholder="建议提前协商(50字以内)" | 100 | placeholder="建议提前协商(50字以内)" |
101 | /> | 101 | /> |
102 | </view> | 102 | </view> |
103 | </view> | 103 | </view> |
104 | </view> | 104 | </view> |
105 | 105 | ||
106 | <view class="infoBox" v-if="isCart !== 'true'"> | 106 | <view class="infoBox" v-if="isCart !== 'true'"> |
107 | <view class="infoTop"> | 107 | <view class="infoTop"> |
108 | <image | 108 | <image |
109 | :src="buyItem.pic" | 109 | :src="buyItem.pic" |
110 | mode="aspectFill" | 110 | mode="aspectFill" |
111 | ></image> | 111 | ></image> |
112 | <view class="infoRight"> | 112 | <view class="infoRight"> |
113 | <text class="goodName">{{goodInfo.p_name}}</text> | 113 | <text class="goodName">{{goodInfo.p_name}}</text> |
114 | <text class="remarks">支持7天无理由退货 顺丰发货</text> | 114 | <text class="remarks">支持7天无理由退货 顺丰发货</text> |
115 | <view class="priceBox"> | 115 | <view class="priceBox"> |
116 | <view class="price">¥{{buyItem.real_price * count}}<text class="originCost"> | 116 | <view class="price">¥{{buyItem.real_price * count}}<text class="originCost"> |
117 | ¥{{buyItem.out_price * count}} | 117 | ¥{{buyItem.out_price * count}} |
118 | </text></view> | 118 | </text></view> |
119 | <view class="counter"> | 119 | <view class="counter"> |
120 | <view | 120 | <view |
121 | class="btn" | 121 | class="btn" |
122 | disabled="this.disabled" | 122 | disabled="this.disabled" |
123 | type="default" | 123 | type="default" |
124 | @click="counter(false)" | 124 | @click="counter(false)" |
125 | >-</view> | 125 | >-</view> |
126 | <text>{{count}}</text> | 126 | <text>{{count}}</text> |
127 | <view | 127 | <view |
128 | class="btn" | 128 | class="btn" |
129 | type="default" | 129 | type="default" |
130 | @click="counter(true)" | 130 | @click="counter(true)" |
131 | >+</view> | 131 | >+</view> |
132 | </view> | 132 | </view> |
133 | </view> | 133 | </view> |
134 | </view> | 134 | </view> |
135 | </view> | 135 | </view> |
136 | <view class="infoBottom"> | 136 | <view class="infoBottom"> |
137 | <view class="norm">规格 <text> | 137 | <view class="norm">规格 <text> |
138 | <!-- 长度超出变省略号未做 --> | 138 | <!-- 长度超出变省略号未做 --> |
139 | <block | 139 | <block |
140 | v-for="(item, index) in current" | 140 | v-for="(item, index) in current" |
141 | :key="index" | 141 | :key="index" |
142 | >{{attrList[index].attr[item].name}}<block v-if="index !== current.length -1">/</block> | 142 | >{{attrList[index].attr[item].name}}<block v-if="index !== current.length -1">/</block> |
143 | </block> | 143 | </block> |
144 | </text></view> | 144 | </text></view> |
145 | <view class="shippingMethod">使用人 <text> | 145 | <view class="shippingMethod">使用人 <text> |
146 | {{name}} | 146 | {{name}} |
147 | </text></view> | 147 | </text></view> |
148 | <view class="shippingMethod">配送方式 <text>快递</text></view> | 148 | <view class="shippingMethod">配送方式 <text>快递</text></view> |
149 | <view class="message">买家留言 | 149 | <view class="message">买家留言 |
150 | <input | 150 | <input |
151 | type="text" | 151 | type="text" |
152 | :value="note" | 152 | :value="note" |
153 | placeholder="建议提前协商(50字以内)" | 153 | placeholder="建议提前协商(50字以内)" |
154 | /> | 154 | /> |
155 | </view> | 155 | </view> |
156 | </view> | 156 | </view> |
157 | </view> | 157 | </view> |
158 | </view> | 158 | </view> |
159 | <view class="payWay"> | 159 | <view class="payWay"> |
160 | <view class="item"> | 160 | <view class="item"> |
161 | <text>支付方式</text> | 161 | <text>支付方式</text> |
162 | <view class="itemRight"> | 162 | <view class="itemRight"> |
163 | <view class="rightText"> | 163 | <view class="rightText"> |
164 | <view class="choosePayWay"> | 164 | <view class="choosePayWay"> |
165 | <image | 165 | <image |
166 | src="../../static/chat_logo.png" | 166 | src="../../static/chat_logo.png" |
167 | mode="aspectFill" | 167 | mode="aspectFill" |
168 | ></image> | 168 | ></image> |
169 | <text>微信支付</text> | 169 | <text>微信支付</text> |
170 | </view> | 170 | </view> |
171 | <!-- <view class="randomSubstraction">最高随机立减¥99</view> --> | 171 | <!-- <view class="randomSubstraction">最高随机立减¥99</view> --> |
172 | </view> | 172 | </view> |
173 | <!-- <image | 173 | <!-- <image |
174 | src="../../static/right.png" | 174 | src="../../static/right.png" |
175 | mode="aspectFill" | 175 | mode="aspectFill" |
176 | ></image> --> | 176 | ></image> --> |
177 | </view> | 177 | </view> |
178 | </view> | 178 | </view> |
179 | <!-- <view class="item"> | 179 | <!-- <view class="item"> |
180 | <text>优惠券</text> | 180 | <text>优惠券</text> |
181 | <view class="itemRight"> | 181 | <view class="itemRight"> |
182 | <view class="rightText"> | 182 | <view class="rightText"> |
183 | <view class="chooseOffers"> | 183 | <view class="chooseOffers"> |
184 | <text>-¥70.00</text> | 184 | <text>-¥70.00</text> |
185 | </view> | 185 | </view> |
186 | <view class="preferentialWay">最大优惠</view> | 186 | <view class="preferentialWay">最大优惠</view> |
187 | </view> | 187 | </view> |
188 | <image | 188 | <image |
189 | src="../../static/right.png" | 189 | src="../../static/right.png" |
190 | mode="aspectFill" | 190 | mode="aspectFill" |
191 | ></image> | 191 | ></image> |
192 | </view> | 192 | </view> |
193 | </view> --> | 193 | </view> --> |
194 | <view class="item"> | 194 | <view class="item"> |
195 | <text>运费</text> | 195 | <text>运费</text> |
196 | <view class="itemRight"> | 196 | <view class="itemRight"> |
197 | <view class="freight">免运费</view> | 197 | <view class="freight">免运费</view> |
198 | </view> | 198 | </view> |
199 | </view> | 199 | </view> |
200 | <view class="item"> | 200 | <view class="item"> |
201 | <text>合计</text> | 201 | <text>合计</text> |
202 | <view class="itemRight"> | 202 | <view class="itemRight"> |
203 | <view class="total">¥{{totalPrice}}</view> | 203 | <view class="total">¥{{totalPrice}}</view> |
204 | <!-- <view class="total" v-else>¥{{Number(skuInfo.real_price) * count}}</view> --> | 204 | <!-- <view class="total" v-else>¥{{Number(skuInfo.real_price) * count}}</view> --> |
205 | </view> | 205 | </view> |
206 | </view> | 206 | </view> |
207 | </view> | 207 | </view> |
208 | <!-- | 208 | <!-- |
209 | <view class="checkBox"> | 209 | <view class="checkBox"> |
210 | <checkbox-group> | 210 | <checkbox-group> |
211 | <label> | 211 | <label> |
212 | <checkbox color="#FF6B4A" value="isAnonymous" checked="true" />匿名购买 | 212 | <checkbox color="#FF6B4A" value="isAnonymous" checked="true" />匿名购买 |
213 | </label> | 213 | </label> |
214 | </checkbox-group> | 214 | </checkbox-group> |
215 | </view> --> | 215 | </view> --> |
216 | </view> | 216 | </view> |
217 | <view class="last_zhanwei"></view> | 217 | <view class="last_zhanwei"></view> |
218 | <view class="footer"> | 218 | <view class="footer"> |
219 | <view class="footerLeft">实付金额: | 219 | <view class="footerLeft">实付金额: |
220 | <text >¥{{totalPrice}}</text> | 220 | <text >¥{{totalPrice}}</text> |
221 | <!-- <text v-else>¥{{Number(skuInfo.real_price) * count}}</text> --> | 221 | <!-- <text v-else>¥{{Number(skuInfo.real_price) * count}}</text> --> |
222 | </view> | 222 | </view> |
223 | <view class="footerRight"> | 223 | <view class="footerRight"> |
224 | <view | 224 | <view |
225 | class="paybtn" | 225 | class="paybtn" |
226 | @tap="orderBuild" | 226 | @tap="orderBuild" |
227 | >立即支付</view> | 227 | >立即支付</view> |
228 | </view> | 228 | </view> |
229 | </view> | 229 | </view> |
230 | </view> | 230 | </view> |
231 | </template> | 231 | </template> |
232 | 232 | ||
233 | <script> | 233 | <script> |
234 | import store from '@/store' | 234 | import store from '@/store' |
235 | import MD5Util from '../../utils/md5' | 235 | import MD5Util from '../../utils/md5' |
236 | 236 | ||
237 | export default { | 237 | export default { |
238 | data() { | 238 | data() { |
239 | return { | 239 | return { |
240 | name:String, | 240 | name:String, |
241 | addAddress: '添加收货地址', | 241 | addAddress: '添加收货地址', |
242 | count: 1, | 242 | count: 1, |
243 | pid: 0, | 243 | pid: 0, |
244 | disabled: false, | 244 | disabled: false, |
245 | freight: 0.0, | 245 | freight: 0.0, |
246 | showAddress: false, | 246 | showAddress: false, |
247 | note: '', | 247 | note: '', |
248 | addressInfo: { | 248 | addressInfo: { |
249 | address: '', | 249 | address: '', |
250 | }, | 250 | }, |
251 | isCart:Boolean, | 251 | isCart:Boolean, |
252 | // isAnonymous: | 252 | // isAnonymous: |
253 | checkedCartLst:[] | 253 | checkedCartLst:[] |
254 | } | 254 | } |
255 | }, | 255 | }, |
256 | onShow(addressId) { | 256 | onShow(addressId) { |
257 | // console.log('+-+-*-*-+-+',addressId) | 257 | // console.log('+-+-*-*-+-+',addressId) |
258 | if (addressId) { | 258 | if (addressId) { |
259 | store | 259 | store |
260 | .dispatch('address/details', { | 260 | .dispatch('address/details', { |
261 | add_id: addressId, | 261 | add_id: addressId, |
262 | }) | 262 | }) |
263 | .then(({ code, data }) => { | 263 | .then(({ code, data }) => { |
264 | if (code === 1) { | 264 | if (code === 1) { |
265 | // console.log('code', code, data) | 265 | // console.log('code', code, data) |
266 | this.showAddress = true | 266 | this.showAddress = true |
267 | this.addressInfo = data | 267 | this.addressInfo = data |
268 | } | 268 | } |
269 | }) | 269 | }) |
270 | } | 270 | } |
271 | }, | 271 | }, |
272 | onLoad({ pid, addressId,isCart ,count,name}) { | 272 | onLoad({ pid, addressId,isCart ,count,name}) { |
273 | this.pid = pid; | 273 | if(isCart == 'false'){ |
274 | |||
275 | this.pid = pid; | ||
276 | store.dispatch('read/fetch', { | ||
277 | pid, | ||
278 | }) | ||
279 | } | ||
274 | this.count = count; | 280 | this.count = count; |
275 | this.name = name; | 281 | this.name = name; |
276 | this.isCart = isCart; | 282 | this.isCart = isCart; |
277 | store.dispatch('read/fetch', { | ||
278 | pid, | ||
279 | }) | ||
280 | 283 | ||
281 | console.log('++++++++++++'+pid,addressId,isCart) | 284 | console.log('++++++++++++'+pid,addressId,isCart) |
282 | this.checkedCartLst = this.$store.state.cart.checkedCartLst | 285 | this.checkedCartLst = this.$store.state.cart.checkedCartLst |
283 | // console.log('++++++++++6666666666++',this.$store.state.cart.checkedCartLst) | 286 | // console.log('++++++++++6666666666++',this.$store.state.cart.checkedCartLst) |
284 | // 若已经选择地址 | 287 | // 若已经选择地址 |
285 | if (addressId) { | 288 | if (addressId) { |
286 | store | 289 | store |
287 | .dispatch('address/details', { | 290 | .dispatch('address/details', { |
288 | add_id: addressId, | 291 | add_id: addressId, |
289 | }) | 292 | }) |
290 | .then(({ code, data }) => { | 293 | .then(({ code, data }) => { |
291 | if (code === 1) { | 294 | if (code === 1) { |
292 | // console.log('code', code, data) | 295 | // console.log('code', code, data) |
293 | this.showAddress = true | 296 | this.showAddress = true |
294 | this.addressInfo = data | 297 | this.addressInfo = data |
295 | } | 298 | } |
296 | }) | 299 | }) |
297 | } else { | 300 | } else { |
298 | store.dispatch('address/default').then(({ code, data }) => { | 301 | store.dispatch('address/default').then(({ code, data }) => { |
299 | if (code === 1) { | 302 | if (code === 1) { |
300 | // console.log('code', code, data) | 303 | // console.log('code', code, data) |
301 | this.showAddress = true | 304 | this.showAddress = true |
302 | this.addressInfo = data | 305 | this.addressInfo = data |
303 | } | 306 | } |
304 | }) | 307 | }) |
305 | } | 308 | } |
306 | }, | 309 | }, |
307 | computed: { | 310 | computed: { |
308 | totalPrice(){ | 311 | totalPrice(){ |
309 | // console.log('isCart',this.isCart) | ||
310 | if(this.isCart == 'true'){ | 312 | if(this.isCart == 'true'){ |
311 | let total = 0 | 313 | let total = 0 |
312 | this.$store.state.cart.checkedCartLst.map(item =>{ | 314 | this.$store.state.cart.checkedCartLst.map(item =>{ |
313 | total += item.nowPrice*item.num | 315 | total += item.nowPrice*item.num |
314 | }) | 316 | }) |
315 | return total | 317 | return total |
316 | }else{ | 318 | }else{ |
317 | return this.buyItem.real_price* this.count | 319 | return this.buyItem.real_price* this.count |
318 | } | 320 | } |
319 | }, | 321 | }, |
320 | buyItem(){ | 322 | buyItem(){ |
321 | return this.$store.state.cart.buyItem | 323 | return this.$store.state.cart.buyItem |
322 | }, | 324 | }, |
323 | // checkedCartLst(){ | 325 | // checkedCartLst(){ |
324 | // console.log('checkedCartLst',this.$store.state.cart.checkedCartLst) | 326 | // console.log('checkedCartLst',this.$store.state.cart.checkedCartLst) |
325 | // return this.$store.state.cart.checkedCartLst | 327 | // return this.$store.state.cart.checkedCartLst |
326 | // }, | 328 | // }, |
327 | goodInfo() { | 329 | goodInfo() { |
328 | console.log('state', this.$store.state.read.goodInfo) | 330 | console.log('state', this.$store.state.read.goodInfo) |
329 | return this.$store.state.read.goodInfo | 331 | return this.$store.state.read.goodInfo |
330 | }, | 332 | }, |
331 | skuInfo() { | 333 | skuInfo() { |
332 | return this.$store.state.order.param.sk_id_arr | 334 | return this.$store.state.order.param.sk_id_arr |
333 | }, | 335 | }, |
334 | attrList() { | 336 | attrList() { |
335 | return this.$store.state.order.param.attrList | 337 | return this.$store.state.order.param.attrList |
336 | }, | 338 | }, |
337 | current() { | 339 | current() { |
338 | return this.$store.state.order.param.current | 340 | return this.$store.state.order.param.current |
339 | }, | 341 | }, |
340 | }, | 342 | }, |
341 | methods: { | 343 | methods: { |
342 | counter(isadd,index) { | 344 | counter(isadd,index) { |
343 | if (isadd) { | 345 | if (isadd) { |
344 | if(this.isCart =='true'){ | 346 | if(this.isCart =='true'){ |
345 | this.checkedCartLst[index].num++ | 347 | this.checkedCartLst[index].num++ |
346 | }else{ | 348 | }else{ |
347 | this.count++ | 349 | this.count++ |
348 | } | 350 | } |
349 | } else { | 351 | } else { |
350 | if(this.isCart =='true'){ | 352 | if(this.isCart =='true'){ |
351 | this.checkedCartLst[index].num<= 1 ? (this.disabled = true) : this.checkedCartLst[index].num-- | 353 | this.checkedCartLst[index].num<= 1 ? (this.disabled = true) : this.checkedCartLst[index].num-- |
352 | }else{ | 354 | }else{ |
353 | this.count <= 1 ? (this.disabled = true) : this.count-- | 355 | this.count <= 1 ? (this.disabled = true) : this.count-- |
354 | } | 356 | } |
355 | } | 357 | } |
356 | }, | 358 | }, |
357 | // 跳转添加地址页面 | 359 | // 跳转添加地址页面 |
358 | toaddAddress() { | 360 | toaddAddress() { |
359 | uni.navigateTo({ | 361 | uni.navigateTo({ |
360 | url: `../address/addressList?edit=${1}`, | 362 | url: `../address/addressList?edit=${1}`, |
361 | success: res => {}, | 363 | success: res => {}, |
362 | fail: error => { | 364 | fail: error => { |
363 | // console.log('跳转到地址列表页面失败====>', error) | 365 | console.log('跳转到地址列表页面失败====>', error) |
364 | }, | 366 | }, |
365 | complete: () => {}, | 367 | complete: () => {}, |
366 | }) | 368 | }) |
367 | }, | 369 | }, |
368 | // 下单 | 370 | // 下单 |
369 | orderBuild() { | 371 | orderBuild() { |
370 | uni.showLoading({ | 372 | uni.showLoading({ |
371 | title: '支付中', | 373 | title: '支付中', |
372 | }) | 374 | }) |
373 | // console.log('this', this.$store.state) | 375 | if(this.isCart == 'true'){ |
374 | const { sk_id_arr: skId, mp_id: mpId } = this.$store.state.order.param | 376 | const checkedGoods = [] |
375 | store.dispatch('order/buyNow', { | 377 | const sk_id_arr = [] |
376 | pid: skId.pid, | 378 | this.checkedCartLst.map(item=>{ |
377 | sk_id: skId.sk_id, | 379 | checkedGoods.push(item.pid) |
378 | number: this.count, | 380 | sk_id_arr.push(item.sk_id) |
379 | mp_id: mpId, | 381 | }) |
380 | address: JSON.stringify(this.addressInfo), | 382 | store.dispatch('order/build', { |
381 | totalPrice: this.totalPrice, | 383 | uid: this.$store.state.user.userInfo.uid, |
382 | liuyan: this.note, | 384 | address: JSON.stringify(this.addressInfo), |
383 | dir: 1, | 385 | checkedGoods:checkedGoods, |
384 | }).then((res) => { | 386 | sk_id_arr: sk_id_arr, |
385 | this.pay(res.data) | 387 | totalPrice: this.totalPrice, |
386 | }) | 388 | }).then((res) => { |
389 | this.pay(res.data) | ||
390 | }) | ||
391 | } | ||
392 | if(this.isCart == 'false'){ | ||
393 | const { sk_id_arr: skId, mp_id: mpId } = this.$store.state.order.param | ||
394 | store.dispatch('order/buyNow', { | ||
395 | pid: skId.pid, | ||
396 | sk_id: skId.sk_id, | ||
397 | number: this.count, | ||
398 | mp_id: mpId, | ||
399 | address: JSON.stringify(this.addressInfo), | ||
400 | totalPrice: this.totalPrice, | ||
401 | liuyan: this.note, | ||
402 | dir: 1, | ||
403 | }).then((res) => { | ||
404 | this.pay(res.data) | ||
405 | }) | ||
406 | } | ||
387 | }, | 407 | }, |
388 | // 支付 | 408 | // 支付 |
389 | pay(res) { | 409 | pay(res) { |
390 | console.log('pay', res) | 410 | console.log('pay', res) |
391 | const { data, exKeyName: keyName } = res | 411 | const { data, exKeyName: keyName } = res |
392 | const uid = uni.getStorageSync('uid') | 412 | const uid = uni.getStorageSync('uid') |
393 | const timeStamp = new Date().getTime().toString() | 413 | const timeStamp = new Date().getTime().toString() |
394 | const nonceStr = 'asfafasfasfasfasf' | 414 | const nonceStr = 'asfafasfasfasfasf' |
395 | // 支付参数 | 415 | // 支付参数 |
396 | const fieldSet = { | 416 | const fieldSet = { |
397 | openid: this.$store.state.user.userInfo.openid, | 417 | openid: this.$store.state.user.userInfo.openid, |
398 | uid: this.$store.state.user.userInfo.uid, | 418 | uid: this.$store.state.user.userInfo.uid, |
399 | shopid: 0, | 419 | shopid: 0, |
400 | payCate: 2020, | 420 | payCate: 2020, |
401 | payMoney: this.totalPrice, | 421 | payMoney: this.totalPrice, |
402 | payWoodId: `fcdj-${uid}-${keyName}`, | 422 | payWoodId: `fcdj-${uid}-${keyName}`, |
403 | payWoodDesc: '在【非常戴镜】的微信付款凭证', | 423 | payWoodDesc: '在【非常戴镜】的微信付款凭证', |
404 | nonceStr, | 424 | nonceStr, |
405 | signType: 'MD5', | 425 | signType: 'MD5', |
406 | app_uid: 2020, | 426 | app_uid: 2020, |
407 | timeStamp, | 427 | timeStamp, |
408 | keyname: keyName, | 428 | keyname: keyName, |
409 | billInfo: JSON.stringify(data), | 429 | billInfo: JSON.stringify(data), |
410 | } | 430 | } |
411 | // 请求后台支付接口 | 431 | // 请求后台支付接口 |
412 | store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => { | 432 | store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => { |
413 | if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') { | 433 | if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') { |
414 | const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}` | 434 | const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}` |
415 | const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789' | 435 | const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789' |
416 | 436 | ||
417 | // 微信支付接口 | 437 | // 微信支付接口 |
418 | uni.requestPayment({ | 438 | uni.requestPayment({ |
419 | appId: data.appid, | 439 | appId: data.appid, |
420 | timeStamp, | 440 | timeStamp, |
421 | nonceStr, | 441 | nonceStr, |
422 | total_fee: this.totalPrice, | 442 | total_fee: this.totalPrice, |
423 | package: `prepay_id=${data.prepay_id}`, | 443 | package: `prepay_id=${data.prepay_id}`, |
424 | signType: 'MD5', | 444 | signType: 'MD5', |
425 | paySign: MD5Util.MD5(stringSignTemp).toUpperCase(), | 445 | paySign: MD5Util.MD5(stringSignTemp).toUpperCase(), |
426 | success: (res) => { | 446 | success: (res) => { |
427 | // 支付成功 | 447 | // 支付成功 |
428 | uni.showModal({ | 448 | uni.showModal({ |
429 | content: '支付成功', | 449 | content: '支付成功', |
430 | showCancel: false, | 450 | showCancel: false, |
431 | }) | 451 | }) |
432 | // 跳转订单详情页->状态 待收货 | 452 | // 跳转订单详情页->状态 待收货 |
433 | uni.reLaunch({ | 453 | uni.reLaunch({ |
434 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&state=1&isPay=1`, | 454 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&state=1&isPay=1`, |
435 | }) | 455 | }) |
436 | }, | 456 | }, |
437 | fail: (res) => { | 457 | fail: (res) => { |
438 | // 支付失败 | 458 | // 支付失败 |
439 | uni.showModal({ | 459 | uni.showModal({ |
440 | content: '支付失败', | 460 | content: '支付失败', |
441 | showCancel: false, | 461 | showCancel: false, |
442 | }) | 462 | }) |
443 | // 跳转订单详情页->状态 待付款 | 463 | // 跳转订单详情页->状态 待付款 |
444 | uni.reLaunch({ | 464 | uni.reLaunch({ |
445 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&state=0&isPay=1`, | 465 | url: `../myOrderPaying/myOrderPaying?payId=${payId}&state=0&isPay=1`, |
446 | }) | 466 | }) |
447 | }, | 467 | }, |
448 | complete: () => { | 468 | complete: () => { |
449 | uni.hideLoading() | 469 | uni.hideLoading() |
450 | }, | 470 | }, |
451 | }) | 471 | }) |
452 | } else { | 472 | } else { |
453 | uni.showModal({ | 473 | uni.showModal({ |
454 | content: '支付失败', | 474 | content: '支付失败', |
455 | showCancel: false, | 475 | showCancel: false, |
456 | }) | 476 | }) |
457 | console.log('支付失败') | 477 | console.log('支付失败') |
458 | uni.hideLoading() | 478 | uni.hideLoading() |
459 | } | 479 | } |
460 | }) | 480 | }) |
461 | }, | 481 | }, |
462 | }, | 482 | }, |
463 | } | 483 | } |
464 | </script> | 484 | </script> |
465 | 485 | ||
466 | <style lang="scss"> | 486 | <style lang="scss"> |
467 | .wrap { | 487 | .wrap { |
468 | height: 100vh; | 488 | height: 100vh; |
469 | background-color: #f2f2f2; | 489 | background-color: #f2f2f2; |
470 | font-family: PingFangSC-Regular; | 490 | font-family: PingFangSC-Regular; |
471 | letter-spacing: -0.23px; | 491 | letter-spacing: -0.23px; |
472 | position: absolute; | 492 | position: absolute; |
473 | } | 493 | } |
474 | .addAddress { | 494 | .addAddress { |
475 | background-color: #ffffff; | 495 | background-color: #ffffff; |
476 | box-sizing: border-box; | 496 | box-sizing: border-box; |
477 | height: 124rpx; | 497 | height: 124rpx; |
478 | width: 100%; | 498 | width: 100%; |
479 | display: flex; | 499 | display: flex; |
480 | align-items: center; | 500 | align-items: center; |
481 | padding: 0 40rpx; | 501 | padding: 0 40rpx; |
482 | .addIcon { | 502 | .addIcon { |
483 | background-color: #f2f2f2; | 503 | background-color: #f2f2f2; |
484 | height: 56rpx; | 504 | height: 56rpx; |
485 | width: 60rpx; | 505 | width: 60rpx; |
486 | border-radius: 4rpx; | 506 | border-radius: 4rpx; |
487 | display: flex; | 507 | display: flex; |
488 | justify-content: center; | 508 | justify-content: center; |
489 | align-items: center; | 509 | align-items: center; |
490 | margin-right: 40rpx; | 510 | margin-right: 40rpx; |
491 | } | 511 | } |
492 | image { | 512 | image { |
493 | height: 28rpx; | 513 | height: 28rpx; |
494 | width: 30rpx; | 514 | width: 30rpx; |
495 | } | 515 | } |
496 | .addressText { | 516 | .addressText { |
497 | font-size: 28rpx; | 517 | font-size: 28rpx; |
498 | color: #333333; | 518 | color: #333333; |
499 | margin-right: 364rpx; | 519 | margin-right: 364rpx; |
500 | } | 520 | } |
501 | } | 521 | } |
502 | .content { | 522 | .content { |
503 | background-color: #f2f2f2; | 523 | background-color: #f2f2f2; |
504 | width: 100%; | 524 | width: 100%; |
505 | display: flex; | 525 | display: flex; |
506 | flex-direction: column; | 526 | flex-direction: column; |
507 | justify-content: center; | 527 | justify-content: center; |
508 | align-items: center; | 528 | align-items: center; |
509 | padding: 40rpx; | 529 | padding: 40rpx; |
510 | box-sizing: border-box; | 530 | box-sizing: border-box; |
511 | .orderInfo { | 531 | .orderInfo { |
512 | width: 670rpx; | 532 | width: 670rpx; |
513 | min-height: 488rpx; | 533 | min-height: 488rpx; |
514 | background-color: #ffffff; | 534 | background-color: #ffffff; |
515 | border-radius: 20rpx; | 535 | border-radius: 20rpx; |
516 | box-sizing: border-box; | 536 | box-sizing: border-box; |
517 | padding: 0 40rpx 40rpx 40rpx; | 537 | padding: 0 40rpx 40rpx 40rpx; |
518 | .title { | 538 | .title { |
519 | display: flex; | 539 | display: flex; |
520 | align-items: center; | 540 | align-items: center; |
521 | font-size: 28rpx; | 541 | font-size: 28rpx; |
522 | color: #333333; | 542 | color: #333333; |
523 | height: 60rpx; | 543 | height: 60rpx; |
524 | line-height: 40rpx; | 544 | line-height: 40rpx; |
525 | padding: 10rpx 10rpx 10rpx 0rpx; | 545 | padding: 10rpx 10rpx 10rpx 0rpx; |
526 | image { | 546 | image { |
527 | margin-right: 20rpx; | 547 | margin-right: 20rpx; |
528 | } | 548 | } |
529 | } | 549 | } |
530 | .infoBox { | 550 | .infoBox { |
531 | margin-top: 42rpx; | 551 | margin-top: 42rpx; |
532 | .infoTop { | 552 | .infoTop { |
533 | display: flex; | 553 | display: flex; |
534 | flex-direction: row; | 554 | flex-direction: row; |
535 | image { | 555 | image { |
536 | height: 188rpx; | 556 | height: 188rpx; |
537 | width: 188rpx; | 557 | width: 188rpx; |
538 | margin-right: 24rpx; | 558 | margin-right: 24rpx; |
539 | } | 559 | } |
540 | .infoRight { | 560 | .infoRight { |
541 | width: 374rpx; | 561 | width: 374rpx; |
542 | display: flex; | 562 | display: flex; |
543 | flex-direction: column; | 563 | flex-direction: column; |
544 | align-items: flex-start; | 564 | align-items: flex-start; |
545 | justify-content: space-between; | 565 | justify-content: space-between; |
546 | .goodName { | 566 | .goodName { |
547 | font-size: 28rpx; | 567 | font-size: 28rpx; |
548 | color: #333333; | 568 | color: #333333; |
549 | } | 569 | } |
550 | .remarks { | 570 | .remarks { |
551 | font-size: 20rpx; | 571 | font-size: 20rpx; |
552 | color: #999999; | 572 | color: #999999; |
553 | } | 573 | } |
554 | .priceBox { | 574 | .priceBox { |
555 | display: flex; | 575 | display: flex; |
556 | justify-content: space-between; | 576 | justify-content: space-between; |
557 | align-items: center; | 577 | align-items: center; |
558 | width: 100%; | 578 | width: 100%; |
559 | .price { | 579 | .price { |
560 | color: #ff6b4a; | 580 | color: #ff6b4a; |
561 | font-size: 28rpx; | 581 | font-size: 28rpx; |
562 | } | 582 | } |
563 | .originCost { | 583 | .originCost { |
564 | text-decoration: line-through; | 584 | text-decoration: line-through; |
565 | color: #999999; | 585 | color: #999999; |
566 | font-size: 20rpx; | 586 | font-size: 20rpx; |
567 | } | 587 | } |
568 | .counter { | 588 | .counter { |
569 | display: flex; | 589 | display: flex; |
570 | flex-direction: row; | 590 | flex-direction: row; |
571 | justify-content: space-between; | 591 | justify-content: space-between; |
572 | font-size: 28rpx; | 592 | font-size: 28rpx; |
573 | color: #333333; | 593 | color: #333333; |
574 | width: 122rpx; | 594 | width: 122rpx; |
575 | .btn { | 595 | .btn { |
576 | display: flex; | 596 | display: flex; |
577 | justify-content: center; | 597 | justify-content: center; |
578 | line-height: 32rpx; | 598 | line-height: 32rpx; |
579 | height: 32rpx; | 599 | height: 32rpx; |
580 | width: 32rpx; | 600 | width: 32rpx; |
581 | background-color: #f2f2f2; | 601 | background-color: #f2f2f2; |
582 | color: #cfcfcf; | 602 | color: #cfcfcf; |
583 | } | 603 | } |
584 | } | 604 | } |
585 | } | 605 | } |
586 | } | 606 | } |
587 | } | 607 | } |
588 | .infoBottom { | 608 | .infoBottom { |
589 | display: flex; | 609 | display: flex; |
590 | flex-direction: column; | 610 | flex-direction: column; |
591 | justify-content: flex-start; | 611 | justify-content: flex-start; |
592 | font-size: 24rpx; | 612 | font-size: 24rpx; |
593 | color: #333333; | 613 | color: #333333; |
594 | text { | 614 | text { |
595 | color: #999999; | 615 | color: #999999; |
596 | margin-left: 20rpx; | 616 | margin-left: 20rpx; |
597 | } | 617 | } |
598 | 618 | ||
599 | .norm { | 619 | .norm { |
600 | margin-top: 28rpx; | 620 | margin-top: 28rpx; |
601 | } | 621 | } |
602 | .shippingMethod { | 622 | .shippingMethod { |
603 | margin-top: 12rpx; | 623 | margin-top: 12rpx; |
604 | } | 624 | } |
605 | .message { | 625 | .message { |
606 | display: flex; | 626 | display: flex; |
607 | flex-direction: row; | 627 | flex-direction: row; |
608 | align-items: center; | 628 | align-items: center; |
609 | margin-top: 18rpx; | 629 | margin-top: 18rpx; |
610 | input { | 630 | input { |
611 | margin-left: 20rpx; | 631 | margin-left: 20rpx; |
612 | width: 75%; | 632 | width: 75%; |
613 | } | 633 | } |
614 | } | 634 | } |
615 | } | 635 | } |
616 | } | 636 | } |
617 | } | 637 | } |
618 | .payWay { | 638 | .payWay { |
619 | height: 464rpx; | 639 | height: 464rpx; |
620 | width: 670rpx; | 640 | width: 670rpx; |
621 | background-color: #ffffff; | 641 | background-color: #ffffff; |
622 | color: #333333; | 642 | color: #333333; |
623 | font-size: 24rpx; | 643 | font-size: 24rpx; |
624 | border-radius: 20rpx; | 644 | border-radius: 20rpx; |
625 | box-sizing: border-box; | 645 | box-sizing: border-box; |
626 | padding: 0 52rpx 0rpx 40rpx; | 646 | padding: 0 52rpx 0rpx 40rpx; |
627 | margin-top: 20rpx; | 647 | margin-top: 20rpx; |
628 | display: flex; | 648 | display: flex; |
629 | flex-direction: column; | 649 | flex-direction: column; |
630 | justify-content: center; | 650 | justify-content: center; |
631 | align-items: flex-start; | 651 | align-items: flex-start; |
632 | .item { | 652 | .item { |
633 | display: flex; | 653 | display: flex; |
634 | flex-direction: row; | 654 | flex-direction: row; |
635 | justify-content: space-between; | 655 | justify-content: space-between; |
636 | align-items: center; | 656 | align-items: center; |
637 | width: 100%; | 657 | width: 100%; |
638 | height: 115rpx; | 658 | height: 115rpx; |
639 | .itemRight { | 659 | .itemRight { |
640 | display: flex; | 660 | display: flex; |
641 | flex-direction: row; | 661 | flex-direction: row; |
642 | justify-content: space-between; | 662 | justify-content: space-between; |
643 | align-items: center; | 663 | align-items: center; |
644 | image { | 664 | image { |
645 | height: 24rpx; | 665 | height: 24rpx; |
646 | width: 12rpx; | 666 | width: 12rpx; |
647 | } | 667 | } |
648 | .rightText { | 668 | .rightText { |
649 | margin-right: 20rpx; | 669 | margin-right: 20rpx; |
650 | text-align: right; | 670 | text-align: right; |
651 | .choosePayWay { | 671 | .choosePayWay { |
652 | display: flex; | 672 | display: flex; |
653 | align-items: center; | 673 | align-items: center; |
654 | text { | 674 | text { |
655 | color: #333333; | 675 | color: #333333; |
656 | } | 676 | } |
657 | image { | 677 | image { |
658 | height: 36rpx; | 678 | height: 36rpx; |
659 | width: 40rpx; | 679 | width: 40rpx; |
660 | margin-right: 8px; | 680 | margin-right: 8px; |
661 | } | 681 | } |
662 | } | 682 | } |
663 | .randomSubstraction { | 683 | .randomSubstraction { |
664 | color: #ff6b4a; | 684 | color: #ff6b4a; |
665 | } | 685 | } |
666 | .preferentialWay { | 686 | .preferentialWay { |
667 | color: #999999; | 687 | color: #999999; |
668 | } | 688 | } |
669 | } | 689 | } |
670 | .freight, | 690 | .freight, |
671 | .total { | 691 | .total { |
672 | margin-right: 32rpx; | 692 | margin-right: 32rpx; |
673 | } | 693 | } |
674 | text { | 694 | text { |
675 | color: #ff6b4a; | 695 | color: #ff6b4a; |
676 | } | 696 | } |
677 | } | 697 | } |
678 | } | 698 | } |
679 | } | 699 | } |
680 | // .checkBox { | 700 | // .checkBox { |
681 | // height: 58rpx; | 701 | // height: 58rpx; |
682 | // line-height: 58rpx; | 702 | // line-height: 58rpx; |
683 | // width: 100%; | 703 | // width: 100%; |
684 | // margin-top: 36rpx; | 704 | // margin-top: 36rpx; |
685 | // margin-left: 40rpx; | 705 | // margin-left: 40rpx; |
686 | // font-size: 12px; | 706 | // font-size: 12px; |
687 | // color: #999999; | 707 | // color: #999999; |
688 | // } | 708 | // } |
689 | } | 709 | } |
690 | .footer { | 710 | .footer { |
691 | height: 112rpx; | 711 | height: 112rpx; |
692 | width: 100%; | 712 | width: 100%; |
693 | background-color: #fff; | 713 | background-color: #fff; |
694 | font-size: 16px; | 714 | font-size: 16px; |
695 | display: flex; | 715 | display: flex; |
696 | justify-content: space-between; | 716 | justify-content: space-between; |
697 | align-items: center; | 717 | align-items: center; |
698 | position: fixed; | 718 | position: fixed; |
699 | bottom: 0; | 719 | bottom: 0; |
700 | z-index: 9999; | 720 | z-index: 9999; |
701 | .footerLeft { | 721 | .footerLeft { |
702 | display: flex; | 722 | display: flex; |
703 | justify-content: center; | 723 | justify-content: center; |
704 | align-items: center; | 724 | align-items: center; |
705 | width: 50%; | 725 | width: 50%; |
706 | color: #333333; | 726 | color: #333333; |
707 | text { | 727 | text { |
708 | color: #ff6b4a; | 728 | color: #ff6b4a; |
709 | } | 729 | } |
710 | } | 730 | } |
711 | .footerRight { | 731 | .footerRight { |
712 | display: flex; | 732 | display: flex; |
713 | justify-content: flex-end; | 733 | justify-content: flex-end; |
714 | align-items: center; | 734 | align-items: center; |
715 | width: 50%; | 735 | width: 50%; |
716 | margin-right: 26rpx; | 736 | margin-right: 26rpx; |
717 | .paybtn { | 737 | .paybtn { |
718 | display: flex; | 738 | display: flex; |
719 | justify-content: center; | 739 | justify-content: center; |
720 | align-items: center; | 740 | align-items: center; |
721 | background: #ff6b4a; | 741 | background: #ff6b4a; |
722 | border-radius: 20px; | 742 | border-radius: 20px; |
723 | border-radius: 20px; | 743 | border-radius: 20px; |
724 | color: #ffffff; | 744 | color: #ffffff; |
725 | width: 204rpx; | 745 | width: 204rpx; |
726 | height: 80rpx; | 746 | height: 80rpx; |
727 | } | 747 | } |
728 | } | 748 | } |
729 | } | 749 | } |
730 | // 地址信息样式 | 750 | // 地址信息样式 |
731 | .order-user { | 751 | .order-user { |
732 | width: 670rpx; | 752 | width: 670rpx; |
733 | height: 228rpx; | 753 | height: 228rpx; |
734 | background: #ffffff; | 754 | background: #ffffff; |
735 | border-radius: 14rpx; | 755 | border-radius: 14rpx; |
736 | margin: 0 auto; | 756 | margin: 0 auto; |
737 | margin-top: 20rpx; | 757 | margin-top: 20rpx; |
738 | position: relative; | 758 | position: relative; |
739 | .order-user-head { | 759 | .order-user-head { |
740 | display: flex; | 760 | display: flex; |
741 | height: 108rpx; | 761 | height: 108rpx; |
742 | width: 100%; | 762 | width: 100%; |
743 | align-items: center; | 763 | align-items: center; |
744 | padding-left: 126rpx; | 764 | padding-left: 126rpx; |
745 | box-sizing: border-box; | 765 | box-sizing: border-box; |
746 | .name { | 766 | .name { |
747 | display: flex; | 767 | display: flex; |
748 | justify-content: space-between; | 768 | justify-content: space-between; |
749 | font-size: 14px; | 769 | font-size: 14px; |
750 | color: #333333; | 770 | color: #333333; |
751 | letter-spacing: -0.26px; | 771 | letter-spacing: -0.26px; |
752 | margin-right: 20rpx; | 772 | margin-right: 20rpx; |
753 | .default { | 773 | .default { |
754 | height: 40rpx; | 774 | height: 40rpx; |
755 | width: 80rpx; | 775 | width: 80rpx; |
756 | background-color: #4a90e2; | 776 | background-color: #4a90e2; |
757 | border-radius: 13px; | 777 | border-radius: 13px; |
758 | border-radius: 13px; | 778 | border-radius: 13px; |
759 | text-align: center; | 779 | text-align: center; |
760 | margin-right: 20rpx; | 780 | margin-right: 20rpx; |
761 | text { | 781 | text { |
762 | display: flex; | 782 | display: flex; |
763 | justify-content: center; | 783 | justify-content: center; |
764 | align-items: center; | 784 | align-items: center; |
765 | font-size: 12px; | 785 | font-size: 12px; |
766 | color: #ffffff; | 786 | color: #ffffff; |
767 | letter-spacing: -0.23px; | 787 | letter-spacing: -0.23px; |
768 | } | 788 | } |
769 | } | 789 | } |
770 | } | 790 | } |
771 | .mobile { | 791 | .mobile { |
772 | font-size: 14px; | 792 | font-size: 14px; |
773 | color: #999999; | 793 | color: #999999; |
774 | letter-spacing: -0.26px; | 794 | letter-spacing: -0.26px; |
775 | } | 795 | } |
776 | } | 796 | } |
777 | .order-user-body { | 797 | .order-user-body { |
778 | display: flex; | 798 | display: flex; |
779 | width: 100%; | 799 | width: 100%; |
780 | image { | 800 | image { |
781 | width: 24px; | 801 | width: 24px; |
782 | height: 28px; | 802 | height: 28px; |
783 | margin: 12rpx 32rpx 0 40rpx; | 803 | margin: 12rpx 32rpx 0 40rpx; |
784 | } | 804 | } |
785 | .address { | 805 | .address { |
786 | font-weight: bold; | 806 | font-weight: bold; |
787 | font-size: 14px; | 807 | font-size: 14px; |
788 | color: #333333; | 808 | color: #333333; |
789 | letter-spacing: -0.26px; | 809 | letter-spacing: -0.26px; |
790 | } | 810 | } |
791 | } | 811 | } |
792 | .arrow { | 812 | .arrow { |
793 | width: 12px; | 813 | width: 12px; |
794 | height: 12px; | 814 | height: 12px; |
795 | position: absolute; | 815 | position: absolute; |
796 | right: 40rpx; | 816 | right: 40rpx; |
797 | bottom: 104rpx; | 817 | bottom: 104rpx; |
798 | } | 818 | } |
799 | } | 819 | } |
800 | .last_zhanwei{ | 820 | .last_zhanwei{ |
801 | background: #f2f2f2; | 821 | background: #f2f2f2; |