Commit 9394b5df70ebeb2b35b1005dff9c4825b261e0c4

Authored by 范牧
1 parent ecde406930
Exists in master

报错修复

src/pages/details/details.vue
1 <template> 1 <template>
2 <view class="container"> 2 <view class="container">
3 <!-- 基础信息 --> 3 <!-- 基础信息 -->
4 <view class="basic_info"> 4 <view class="basic_info">
5 <!-- 轮播图 --> 5 <!-- 轮播图 -->
6 <swiper 6 <swiper
7 class="swiperImage" 7 class="swiperImage"
8 :indicator-dots="true" 8 :indicator-dots="true"
9 :autoplay="true" 9 :autoplay="true"
10 :interval="4000" 10 :interval="4000"
11 :duration="500" 11 :duration="500"
12 > 12 >
13 <swiper-item 13 <swiper-item
14 v-for="(item, index) in carousel" 14 v-for="(item, index) in carousel"
15 :key="index" 15 :key="index"
16 > 16 >
17 <image 17 <image
18 :src="item" 18 :src="item"
19 mode="scaleToFill" 19 mode="scaleToFill"
20 ></image> 20 ></image>
21 </swiper-item> 21 </swiper-item>
22 </swiper> 22 </swiper>
23 <!-- 产品价格及购买人数 --> 23 <!-- 产品价格及购买人数 -->
24 <view class="info_pay"> 24 <view class="info_pay">
25 <view>¥{{goodsInfo.price || '暂无'}}<span 25 <view>¥{{goodsInfo.price || '暂无'}}<span
26 v-if="goodsInfo.discountPrice" 26 v-if="goodsInfo.discountPrice"
27 class="info_pay_discount" 27 class="info_pay_discount"
28 >¥{{goodsInfo.discountPrice}}</span></view> 28 >¥{{goodsInfo.discountPrice}}</span></view>
29 <span class="info_pay_number">{{goodsInfo.tradeNumber || '暂无'}}人购买过</span> 29 <span class="info_pay_number">{{goodsInfo.tradeNumber || '暂无'}}人购买过</span>
30 </view> 30 </view>
31 <!-- 产品名称 --> 31 <!-- 产品名称 -->
32 <view class="info_name"> 32 <view class="info_name">
33 <text class="info_name_name">{{goodsInfo.name || '暂无'}}</text> 33 <text class="info_name_name">{{goodsInfo.name || '暂无'}}</text>
34 <view 34 <view
35 @tap="confirmShare" 35 @tap="confirmShare"
36 class="info_name_share" 36 class="info_name_share"
37 > 37 >
38 <image src="/static/img/detail/share-icon.png"></image> 38 <image src="/static/img/detail/share-icon.png"></image>
39 <text>分享</text> 39 <text>分享</text>
40 </view> 40 </view>
41 </view> 41 </view>
42 <!-- 产品售后信息 --> 42 <!-- 产品售后信息 -->
43 <view class="info_after"> 43 <view class="info_after">
44 <span>支持7天无理由退货</span> 44 <span>支持7天无理由退货</span>
45 <span>顺丰发货</span> 45 <span>顺丰发货</span>
46 <span>30天质量保证</span> 46 <span>30天质量保证</span>
47 </view> 47 </view>
48 </view> 48 </view>
49 <!-- 详细信息 --> 49 <!-- 详细信息 -->
50 <view class="detail_info"> 50 <view class="detail_info">
51 <!-- 详细信息菜单 --> 51 <!-- 详细信息菜单 -->
52 <view class="screen_bar"> 52 <view class="screen_bar">
53 <view 53 <view
54 v-for="(item, index) in screenItems" 54 v-for="(item, index) in screenItems"
55 :key="index" 55 :key="index"
56 @click="tabChange(index)" 56 @click="tabChange(index)"
57 > 57 >
58 <view 58 <view
59 class="screen_item" 59 class="screen_item"
60 v-bind:class="{ item_active: item_current === index }" 60 v-bind:class="{ item_active: item_current === index }"
61 >{{ screenItems[index] || '暂无' }}</view> 61 >{{ screenItems[index] || '暂无' }}</view>
62 </view> 62 </view>
63 </view> 63 </view>
64 <!-- 商品介绍 --> 64 <!-- 商品介绍 -->
65 <view 65 <view
66 class="screen_item" 66 class="screen_item"
67 v-if="item_current === 0" 67 v-if="item_current === 0"
68 > 68 >
69 <Introduce :tag="tag" /> 69 <Introduce :tag="tag" />
70 </view> 70 </view>
71 <!-- 规格参数 --> 71 <!-- 规格参数 -->
72 <view 72 <view
73 class="screen_item" 73 class="screen_item"
74 v-if="item_current === 1" 74 v-if="item_current === 1"
75 > 75 >
76 <view class="specification"> 76 <view class="specification">
77 <view 77 <view
78 class="spe_item" 78 class="spe_item"
79 v-for="(item, index) in specification" 79 v-for="(item, index) in specification"
80 :key="index" 80 :key="index"
81 > 81 >
82 <image 82 <image
83 class="spe_image" 83 class="spe_image"
84 v-bind:src="item.img" 84 v-bind:src="item.img"
85 ></image> 85 ></image>
86 <span>{{item.standard || '暂无'}}</span> 86 <span>{{item.standard || '暂无'}}</span>
87 <span>{{item.slength || '暂无'}}</span> 87 <span>{{item.slength || '暂无'}}</span>
88 </view> 88 </view>
89 </view> 89 </view>
90 </view> 90 </view>
91 <!-- 售后保障 --> 91 <!-- 售后保障 -->
92 <view 92 <view
93 class="screen_item" 93 class="screen_item"
94 v-if="item_current === 2" 94 v-if="item_current === 2"
95 > 95 >
96 <AfterSails /> 96 <AfterSails />
97 </view> 97 </view>
98 </view> 98 </view>
99 <!-- 评价 --> 99 <!-- 评价 -->
100 <template v-if="item_current !== 2"> 100 <template v-if="item_current !== 2">
101 <view class="evaluate"> 101 <view class="evaluate">
102 <!-- 标题 --> 102 <!-- 标题 -->
103 <view class="evaluate_title"> 103 <view class="evaluate_title">
104 <view><span>宝贝好评率</span><span class="title_rate">{{evaluate.rate}}</span></view> 104 <view><span>宝贝好评率</span><span class="title_rate">{{evaluate.rate}}</span></view>
105 <!-- 星星 --> 105 <!-- 星星 -->
106 <view class="evaluate_star"> 106 <view class="evaluate_star">
107 <view 107 <view
108 class="star" 108 class="star"
109 v-for="(item, index) in evaluate.star" 109 v-for="(item, index) in evaluate.star"
110 :key="index" 110 :key="index"
111 > 111 >
112 <image 112 <image
113 src="../../static/img/detail/d_star.png" 113 src="../../static/img/detail/d_star.png"
114 mode="aspectFill" 114 mode="aspectFill"
115 style="height: 26rpx; width: 28rpx;" 115 style="height: 26rpx; width: 28rpx;"
116 ></image> 116 ></image>
117 </view> 117 </view>
118 </view> 118 </view>
119 </view> 119 </view>
120 <!-- 标签 --> 120 <!-- 标签 -->
121 <view class="evaluate_tag"> 121 <view class="evaluate_tag">
122 <view 122 <view
123 v-for="(item, index) in evaluate.tag" 123 v-for="(item, index) in evaluate.tag"
124 :key="index" 124 :key="index"
125 >{{item.name}}</view> 125 >{{item.name}}</view>
126 </view> 126 </view>
127 </view> 127 </view>
128 </template> 128 </template>
129 <!-- 商品详情页 --> 129 <!-- 商品详情页 -->
130 <template v-if="current !==2"> 130 <template v-if="current !==2">
131 <view class="more_info"> 131 <view class="more_info">
132 <view 132 <view
133 class="more_fixed1" 133 class="more_fixed1"
134 @click="consolg(goodInfo.prodIntro1)" 134 @click="consolg(goodInfo.prodIntro1)"
135 > 135 >
136 <image src="/static/img/detail/hr.png"></image> 136 <image src="/static/img/detail/hr.png"></image>
137 <view>商品详情</view> 137 <view>商品详情</view>
138 <image src="/static/img/detail/hr.png"></image> 138 <image src="/static/img/detail/hr.png"></image>
139 </view> 139 </view>
140 <view 140 <view
141 class="more_all" 141 class="more_all"
142 v-html="more" 142 v-html="more"
143 > 143 >
144 </view> 144 </view>
145 </view> 145 </view>
146 </template> 146 </template>
147 <!-- 底部菜单 --> 147 <!-- 底部菜单 -->
148 <view class="menu"> 148 <view class="menu">
149 <view 149 <view
150 @tap="toCart()" 150 @tap="toCart()"
151 class="menu_1" 151 class="menu_1"
152 > 152 >
153 <view class="cart_icon"> 153 <view class="cart_icon">
154 <image src="/static/tab-cart.png" /> 154 <image src="/static/tab-cart.png" />
155 <text>{{cartNumber}}</text> 155 <text>{{cartNumber}}</text>
156 </view> 156 </view>
157 <view class="menu_image">购物车</view> 157 <view class="menu_image">购物车</view>
158 </view> 158 </view>
159 <view class="menu_2"> 159 <view class="menu_2">
160 <view 160 <view
161 class="menu_input" 161 class="menu_input"
162 @tap="showBottom(1)" 162 @tap="showBottom(1)"
163 >加入购物车</view> 163 >加入购物车</view>
164 <view 164 <view
165 class="menu_now" 165 class="menu_now"
166 @click="showBottom(2)" 166 @click="showBottom(2)"
167 >立即购买</view> 167 >立即购买</view>
168 </view> 168 </view>
169 </view> 169 </view>
170 <!-- 参数选择 --> 170 <!-- 参数选择 -->
171 <template v-if="isShowBottom"> 171 <template v-if="isShowBottom">
172 <BottomSheet 172 <BottomSheet
173 :isCart="isCart" 173 :isCart="isCart"
174 @addCart="addCart" 174 @addCart="addCart"
175 :pid="pid" 175 :pid="pid"
176 :goodInfo="goodInfo" 176 :goodInfo="goodInfo"
177 :isShowBottom="isShowBottom" 177 :isShowBottom="isShowBottom"
178 @closeBottom="closeBottom" 178 @closeBottom="closeBottom"
179 ></BottomSheet> 179 ></BottomSheet>
180 </template> 180 </template>
181 <!-- 分享 --> 181 <!-- 分享 -->
182 <template> 182 <template>
183 <uni-popup 183 <uni-popup
184 ref="popupShare" 184 ref="popupShare"
185 type="share" 185 type="share"
186 > 186 >
187 <uni-popup-share @select="selectShare"></uni-popup-share> 187 <uni-popup-share @select="selectShare"></uni-popup-share>
188 </uni-popup> 188 </uni-popup>
189 </template> 189 </template>
190 <!-- 分享海报 --> 190 <!-- 分享海报 -->
191 <template> 191 <template>
192 <uni-popup 192 <uni-popup
193 ref="uniPopupPost" 193 ref="uniPopupPost"
194 type="center" 194 type="center"
195 > 195 >
196 <uni-popup-post :postUrl="postUrl"></uni-popup-post> 196 <uni-popup-post :postUrl="postUrl"></uni-popup-post>
197 </uni-popup> 197 </uni-popup>
198 </template> 198 </template>
199 </view> 199 </view>
200 </template> 200 </template>
201 201
202 <script> 202 <script>
203 import store from '@/store' 203 import store from '@/store'
204 import Introduce from './components/Introduce' // 商品介绍基本信息组件 204 import Introduce from './components/Introduce' // 商品介绍基本信息组件
205 import AfterSails from './components/AfterSails' // 售后保障组件 205 import AfterSails from './components/AfterSails' // 售后保障组件
206 import uniPopupShare from '@/components/uni-popup/uni-popup-share.vue' // 分享组件 206 import uniPopupShare from '@/components/uni-popup/uni-popup-share.vue' // 分享组件
207 import uniPopupPost from '@/components/uni-popup/uni-popup-post.vue' // 分享组件 207 import uniPopupPost from '@/components/uni-popup/uni-popup-post.vue' // 分享组件
208 import BottomSheet from '@/components/BottomSheet/BottomSheet.vue' // 参数选择组件 208 import BottomSheet from '@/components/BottomSheet/BottomSheet.vue' // 参数选择组件
209 209
210 export default { 210 export default {
211 components: { 211 components: {
212 Introduce, 212 Introduce,
213 AfterSails, 213 AfterSails,
214 BottomSheet, 214 BottomSheet,
215 uniPopupShare, 215 uniPopupShare,
216 uniPopupPost, 216 uniPopupPost,
217 }, 217 },
218 data () { 218 data () {
219 return { 219 return {
220 pid: 7, // 产品ID 220 pid: 7, // 产品ID
221 skId: undefined, // skuId 221 skId: undefined, // skuId
222 // 详细信息菜单 222 // 详细信息菜单
223 item_current: 0, 223 item_current: 0,
224 screenItems: [ 224 screenItems: [
225 '商品介绍', 225 '商品介绍',
226 '规格参数', 226 '规格参数',
227 '售后保障', 227 '售后保障',
228 ], 228 ],
229 showPostImg: false, // 是否展示分享海报 229 showPostImg: false, // 是否展示分享海报
230 isShowBottom: false, // 是否展示参数选择 230 isShowBottom: false, // 是否展示参数选择
231 isCart: 1, // 参数选择 按钮判断 231 isCart: 1, // 参数选择 按钮判断
232 } 232 }
233 }, 233 },
234 onLoad({ pid = this.pid, sk_id: skId }) { 234 onLoad({ pid = this.pid, sk_id: skId }) {
235 // 根据页面传参请求页面数据 235 // 根据页面传参请求页面数据
236 this.pid = pid 236 this.pid = pid
237 this.skId = skId 237 this.skId = skId
238 238
239 // 获取产品详情 239 // 获取产品详情
240 this.getDetails({ pid, skId }) 240 this.getDetails({ pid, skId })
241 // 获取购物车数据 241 // 获取购物车数据
242 this.getCartNum() 242 this.getCartNum()
243 }, 243 },
244 computed: { 244 computed: {
245 // 获取轮播图数据 245 // 获取轮播图数据
246 goodInfo() { 246 goodInfo() {
247 return this.$store.state.details.goodInfo 247 return this.$store.state.details.goodInfo
248 }, 248 },
249 // 获取轮播图数据 249 // 获取轮播图数据
250 carousel() { 250 carousel() {
251 return this.$store.state.details.carousel 251 return this.$store.state.details.carousel
252 }, 252 },
253 // 商品基本信息 253 // 商品基本信息
254 goodsInfo() { 254 goodsInfo() {
255 return this.$store.state.details.goodsInfo 255 return this.$store.state.details.goodsInfo
256 }, 256 },
257 // 商品介绍商品标签 257 // 商品介绍商品标签
258 tag() { 258 tag() {
259 return this.$store.state.details.tag 259 return this.$store.state.details.tag
260 }, 260 },
261 // 规格参数 261 // 规格参数
262 specification() { 262 specification() {
263 return this.$store.state.details.specification 263 return this.$store.state.details.specification
264 }, 264 },
265 // 评价 265 // 评价
266 evaluate() { 266 evaluate() {
267 return this.$store.state.details.evaluate 267 return this.$store.state.details.evaluate
268 }, 268 },
269 // 商品详情 269 // 商品详情
270 more() { 270 more() {
271 return this.$store.state.details.more 271 return this.$store.state.details.more
272 }, 272 },
273 // 购物车数目 273 // 购物车数目
274 cartNumber() { 274 cartNumber() {
275 return this.$store.state.details.cartNumber 275 return this.$store.state.details.cartNumber
276 }, 276 },
277 // 购物车数目 277 // 购物车数目
278 skuList() { 278 skuList() {
279 return this.$store.state.details.skuList 279 return this.$store.state.details.skuList
280 }, 280 },
281 // 分享海报 281 // 分享海报
282 postUrl() { 282 postUrl() {
283 return this.$store.state.details.postUrl 283 return this.$store.state.details.postUrl
284 }, 284 },
285 }, 285 },
286 methods: { 286 methods: {
287 // 获取产品详情 287 // 获取产品详情
288 getDetails({ pid, skId }) { 288 getDetails({ pid, skId }) {
289 store.dispatch('details/details', { 289 store.dispatch('details/details', {
290 pid, 290 pid,
291 sk_id: skId, 291 sk_id: skId,
292 }) 292 })
293 store.dispatch('read/fetch', { 293 store.dispatch('read/fetch', {
294 pid, 294 pid,
295 sk_id: skId, 295 sk_id: skId,
296 }) 296 })
297 }, 297 },
298 // 获取购物车数目 298 // 获取购物车数目
299 getCartNum() { 299 getCartNum() {
300 store.dispatch('details/getCartNumber') 300 store.dispatch('details/getCartNumber')
301 }, 301 },
302 // 切换详细信息菜单 302 // 切换详细信息菜单
303 tabChange (e) { 303 tabChange (e) {
304 if (this.current !== e) { 304 if (this.current !== e) {
305 this.item_current = e 305 this.item_current = e
306 } 306 }
307 }, 307 },
308 // 打开分享界面 308 // 打开分享界面
309 confirmShare() { 309 confirmShare() {
310 this.$refs.popupShare.open() 310 this.$refs.popupShare.open()
311 }, 311 },
312 // 选择分享 312 // 选择分享
313 selectShare(e, done) { 313 selectShare(e, done) {
314 switch (e.item.name) { 314 switch (e.item.name) {
315 // 分享到好物圈 315 // 分享到好物圈
316 case 'recommend': 316 case 'recommend':
317 this.shareRecommend() 317 this.shareRecommend()
318 break 318 break
319 // 分享到朋友圈 319 // 分享到朋友圈
320 case 'friend': 320 case 'friend':
321 break 321 break
322 // 生成海报 322 // 生成海报
323 case 'poster': 323 case 'poster':
324 uni.showLoading({ 324 uni.showLoading({
325 title: '生成图片中', 325 title: '生成图片中',
326 }) 326 })
327 this.sharePost() 327 this.sharePost()
328 break 328 break
329 default: 329 default:
330 break 330 break
331 } 331 }
332 done() 332 done()
333 }, 333 },
334 // 分享到好物圈 334 // 分享到好物圈
335 shareRecommend() { 335 shareRecommend() {
336 if (wx.openBusinessView) { 336 if (wx.openBusinessView) {
337 wx.openBusinessView({ 337 wx.openBusinessView({
338 businessType: 'friendGoodsRecommend', 338 businessType: 'friendGoodsRecommend',
339 extraData: { 339 extraData: {
340 product: { 340 product: {
341 item_code: '58_68', 341 item_code: '58_68',
342 title: this.goodsInfo.name, 342 title: this.goodsInfo.name,
343 image_list: this.carousel, 343 image_list: this.carousel,
344 }, 344 },
345 }, 345 },
346 success: function (res) { 346 success: function (res) {
347 uni.showToast({ 347 uni.showToast({
348 title: '好物圈分享成功!', 348 title: '好物圈分享成功!',
349 icon: 'none', 349 icon: 'none',
350 duration: 2000, 350 duration: 2000,
351 }) 351 })
352 // 向服务器报告这个事情 352 // 向服务器报告这个事情
353 // TODO:::记录这个用户的推广过程。 353 // TODO:::记录这个用户的推广过程。
354 console.log('好物圈分享成功!', res) 354 console.log('好物圈分享成功!', res)
355 }, 355 },
356 fail: function (res) { 356 fail: function (res) {
357 console.log('好物圈分享失败!', res) 357 console.log('好物圈分享失败!', res)
358 }, 358 },
359 }) 359 })
360 } 360 }
361 }, 361 },
362 // 分享到朋友/圈 362 // 分享到朋友/圈
363 shareFriend() { 363 shareFriend() {
364 this.onShareAppMessage() 364 this.onShareAppMessage()
365 }, 365 },
366 // 朋友圈设置页面 366 // 朋友圈设置页面
367 onShareAppMessage() { 367 onShareAppMessage() {
368 let myName = this.$store.state.user.userInfo.nickName 368 let myName = this.$store.state.user.userInfo.nickName
369 if (myName === '' || myName.length < 1 || myName === '匿名用户' || typeof myName === 'undefined') { 369 if (myName === '' || myName.length < 1 || myName === '匿名用户' || typeof myName === 'undefined') {
370 myName = '【神秘人】' 370 myName = '【神秘人】'
371 } else { 371 } else {
372 myName = '【' + myName + '】' 372 myName = '【' + myName + '】'
373 } 373 }
374 return { 374 return {
375 title: 'Hi,' + myName + '送你300元来试戴最新潮流眼镜!', // 默认是小程序的名称(可以写slogan等) 375 title: 'Hi,' + myName + '送你300元来试戴最新潮流眼镜!', // 默认是小程序的名称(可以写slogan等)
376 path: '/pages/details/details?sid=0&pid=' + this.pid, 376 path: '/pages/details/details?sid=0&pid=' + this.pid,
377 imageUrl: this.skuList[0].pic, // 不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 377 imageUrl: this.skuList[0].pic, // 不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
378 success: function (res) { 378 success: function (res) {
379 if (res.errMsg === 'shareAppMessage:ok') { 379 if (res.errMsg === 'shareAppMessage:ok') {
380 console.log('分享成功!', res) 380 console.log('分享成功!', res)
381 } 381 }
382 }, 382 },
383 fail: function (res) { 383 fail: function (res) {
384 if (res.errMsg === 'shareAppMessage:fail cancel') { 384 if (res.errMsg === 'shareAppMessage:fail cancel') {
385 console.log('fail', '放弃分享') 385 console.log('fail', '放弃分享')
386 } else if (res.errMsg === 'shareAppMessage:fail') { 386 } else if (res.errMsg === 'shareAppMessage:fail') {
387 console.log('fail', '分享失败') 387 console.log('fail', '分享失败')
388 } 388 }
389 }, 389 },
390 } 390 }
391 }, 391 },
392 // 生成海报 392 // 生成海报
393 sharePost() { 393 sharePost() {
394 const fromsid = this.$store.state.user.fromInfo.fromsid || 'undefined' 394 const fromsid = this.$store.state.user.fromInfo.fromsid || 'undefined'
395 395
396 store.dispatch('details/post', { 396 store.dispatch('details/post', {
397 pid: this.pid, 397 pid: this.pid,
398 sid: fromsid === 'undefined' ? 0 : fromsid, 398 sid: fromsid === 'undefined' ? 0 : fromsid,
399 }).then((data) => { 399 }).then((data) => {
400 uni.hideLoading() 400 uni.hideLoading()
401 this.$refs.uniPopupPost.open() 401 this.$refs.uniPopupPost.open()
402 }) 402 })
403 }, 403 },
404 // 参数选择弹窗开关 404 // 参数选择弹窗开关
405 showBottom(isCart) { 405 showBottom(isCart) {
406 this.isCart = isCart 406 this.isCart = isCart
407 this.isShowBottom = true 407 this.isShowBottom = true
408 }, 408 },
409 closeBottom() { 409 closeBottom() {
410 this.isShowBottom = false 410 this.isShowBottom = false
411 }, 411 },
412 // 前往购物车 412 // 前往购物车
413 toCart() { 413 toCart() {
414 uni.switchTab({ 414 uni.switchTab({
415 url: '/pages/cart/cart', 415 url: '/pages/cart/cart',
416 success: res => {}, 416 success: res => {},
417 fail: (error) => { console.log('跳转购物车失败======>', error) }, 417 fail: (error) => { console.log('跳转购物车失败======>', error) },
418 complete: () => { console.log('toCart') }, 418 complete: () => { console.log('toCart') },
419 }) 419 })
420 }, 420 },
421 // 加入购物车 421 // 加入购物车
422 addCart (mpId, num, checkedSKU, skId, price) { 422 addCart (mpId, num, checkedSKU, skId, price) {
423 const addCartList = {} 423 const addCartList = {}
424 addCartList.mp_id = mpId 424 addCartList.mp_id = mpId
425 addCartList.sk_id = skId 425 addCartList.sk_id = skId
426 addCartList.num = num 426 addCartList.num = num
427 // addCartList.checkedSKU = checkedSKU 427 // addCartList.checkedSKU = checkedSKU
428 addCartList.pid = this.pid 428 addCartList.pid = this.pid
429 addCartList.price = price 429 addCartList.price = price
430 console.log('添加购物车的参数', addCartList) 430 console.log('添加购物车的参数', addCartList)
431 store.dispatch('cart/addCart', addCartList).then((res) => { 431 store.dispatch('cart/addCart', addCartList).then((res) => {
432 if (res.code === 1) { 432 if (res.code === 1) {
433 uni.showToast({ 433 uni.showToast({
434 title: '添加成功~', 434 title: '添加成功~',
435 icon: 'success', 435 icon: 'success',
436 }) 436 })
437 } 437 }
438 // 再次请求购物车接口,实现实时更新 438 // 再次请求购物车接口,实现实时更新
439 store.dispatch('details/getCartNumber') 439 store.dispatch('details/getCartNumber')
440 }) 440 })
441 }, 441 },
442 }, 442 },
443 } 443 }
444 </script> 444 </script>
445 445
446 <style lang="scss"> 446 <style lang="scss">
447 .container { 447 .container {
448 background-color: #f8f8f8; 448 background-color: #f8f8f8;
449 font-family: "PingFangSC-Regular"; 449 font-family: "PingFangSC-Regular";
450 // 板块样式 450 // 板块样式
451 > view { 451 > view {
452 background: #ffffff; 452 background: #ffffff;
453 margin-bottom: 10px; 453 margin-bottom: 10px;
454 padding: 8px 20px 8px 20px; 454 padding: 8px 20px 8px 20px;
455 box-sizing: border-box; 455 box-sizing: border-box;
456 } 456 }
457 // 基础信息板块 457 // 基础信息板块
458 .basic_info { 458 .basic_info {
459 // 轮播图 459 // 轮播图
460 .swiperImage { 460 .swiperImage {
461 width: 684rpx; 461 width: 684rpx;
462 height: 480rpx; 462 height: 480rpx;
463 text-align: center; 463 text-align: center;
464 image { 464 image {
465 max-width: 100%; 465 max-width: 100%;
466 max-height: 100%; 466 max-height: 100%;
467 border-radius: 16rpx; 467 border-radius: 16rpx;
468 } 468 }
469 } 469 }
470 // 产品价格及购买人数 470 // 产品价格及购买人数
471 .info_pay { 471 .info_pay {
472 color: #eb5d3b; 472 color: #eb5d3b;
473 font-size: 18px; 473 font-size: 18px;
474 margin-top: 5px; 474 margin-top: 5px;
475 font-family: "PingFangSC-Semibold"; 475 font-family: "PingFangSC-Semibold";
476 display: flex; 476 display: flex;
477 justify-content: space-between; 477 justify-content: space-between;
478 .info_pay_discount { 478 .info_pay_discount {
479 text-decoration: line-through; 479 text-decoration: line-through;
480 margin-left: 8rpx; 480 margin-left: 8rpx;
481 color: #999; 481 color: #999;
482 font-size: 14px; 482 font-size: 14px;
483 } 483 }
484 .info_pay_number { 484 .info_pay_number {
485 color: #999; 485 color: #999;
486 font-size: 14px; 486 font-size: 14px;
487 font-family: PingFangSC-Regular; 487 font-family: PingFangSC-Regular;
488 } 488 }
489 } 489 }
490 // 产品名称 490 // 产品名称
491 .info_name { 491 .info_name {
492 margin-top: 5px; 492 margin-top: 5px;
493 display: flex; 493 display: flex;
494 justify-content: space-between; 494 justify-content: space-between;
495 .info_name_name { 495 .info_name_name {
496 margin-right: 10px; 496 margin-right: 10px;
497 font-size: 16px; 497 font-size: 16px;
498 font-family: "PingFangSC-Semibold"; 498 font-family: "PingFangSC-Semibold";
499 max-width: 592rpx; 499 max-width: 592rpx;
500 } 500 }
501 .info_name_share { 501 .info_name_share {
502 display: flex; 502 display: flex;
503 flex-direction: column; 503 flex-direction: column;
504 justify-content: space-between; 504 justify-content: space-between;
505 align-items: center; 505 align-items: center;
506 margin-top: 14rpx; 506 margin-top: 14rpx;
507 > image { 507 > image {
508 height: 40rpx; 508 height: 40rpx;
509 width: 40rpx; 509 width: 40rpx;
510 } 510 }
511 > text { 511 > text {
512 font-family: PingFangSC-Regular; 512 font-family: PingFangSC-Regular;
513 font-size: 12px; 513 font-size: 12px;
514 color: #999; 514 color: #999;
515 letter-spacing: -0.23px; 515 letter-spacing: -0.23px;
516 } 516 }
517 } 517 }
518 } 518 }
519 // 售后服务 519 // 售后服务
520 .info_after { 520 .info_after {
521 font-size: 10px; 521 font-size: 10px;
522 color: #999; 522 color: #999;
523 margin-top: 20rpx; 523 margin-top: 20rpx;
524 > span { 524 > span {
525 height: 14px; 525 height: 14px;
526 margin-right: 10px; 526 margin-right: 10px;
527 } 527 }
528 } 528 }
529 } 529 }
530 // 详细信息 530 // 详细信息
531 .detail_info { 531 .detail_info {
532 margin-bottom: 20rpx; 532 margin-bottom: 20rpx;
533 .screen_bar { 533 .screen_bar {
534 width: 670rpx; 534 width: 670rpx;
535 margin-top: 20rpx; 535 margin-top: 20rpx;
536 margin-bottom: 24rpx; 536 margin-bottom: 24rpx;
537 display: flex; 537 display: flex;
538 flex-direction: row; 538 flex-direction: row;
539 justify-content: space-between; 539 justify-content: space-between;
540 align-items: center; 540 align-items: center;
541 font-size: 14px; 541 font-size: 14px;
542 color: #333333; 542 color: #333333;
543 transition: all 0.2s; 543 transition: all 0.2s;
544 } 544 }
545 .item_active { 545 .item_active {
546 border-bottom: 4rpx solid #ff6b4a; 546 border-bottom: 4rpx solid #ff6b4a;
547 } 547 }
548 .screen_item { 548 .screen_item {
549 font-size: 32rpx; 549 font-size: 32rpx;
550 color: #333333; 550 color: #333333;
551 display: flex; 551 display: flex;
552 transition: all 0.2s; 552 transition: all 0.2s;
553 // 规格参数 553 // 规格参数
554 .specification { 554 .specification {
555 margin-bottom: 4px; 555 margin-bottom: 4px;
556 .spe_item { 556 .spe_item {
557 image { 557 image {
558 width: 50px; 558 width: 50px;
559 height: 25px; 559 height: 25px;
560 margin-right: 6px; 560 margin-right: 6px;
561 vertical-align: middle; 561 vertical-align: middle;
562 } 562 }
563 span { 563 span {
564 margin-left: 24rpx; 564 margin-left: 24rpx;
565 } 565 }
566 } 566 }
567 } 567 }
568 } 568 }
569 // 569 //
570 } 570 }
571 // 宝贝好评率 571 // 宝贝好评率
572 .evaluate { 572 .evaluate {
573 .evaluate_title { 573 .evaluate_title {
574 font-size: 14px; 574 font-size: 14px;
575 color: #333333; 575 color: #333333;
576 display: flex; 576 display: flex;
577 justify-content: space-between; 577 justify-content: space-between;
578 .title_rate { 578 .title_rate {
579 margin-left: 10rpx; 579 margin-left: 10rpx;
580 } 580 }
581 .evaluate_star { 581 .evaluate_star {
582 width: 90px; 582 width: 90px;
583 display: flex; 583 display: flex;
584 align-items: center; 584 align-items: center;
585 justify-content: space-between; 585 justify-content: space-between;
586 } 586 }
587 view { 587 view {
588 font-size: 14px; 588 font-size: 14px;
589 color: #333333; 589 color: #333333;
590 font-weight: bold; 590 font-weight: bold;
591 } 591 }
592 } 592 }
593 .evaluate_tag { 593 .evaluate_tag {
594 view { 594 view {
595 display: inline-block; 595 display: inline-block;
596 margin-right: 20rpx; 596 margin-right: 20rpx;
597 min-width: 180rpx; 597 min-width: 180rpx;
598 margin-top: 10px; 598 margin-top: 10px;
599 height: 48rpx; 599 height: 48rpx;
600 background: #f2f2f2; 600 background: #f2f2f2;
601 border-radius: 2px; 601 border-radius: 2px;
602 font-family: PingFangSC-Regular; 602 font-family: PingFangSC-Regular;
603 font-size: 12px; 603 font-size: 12px;
604 color: #666666; 604 color: #666666;
605 letter-spacing: -0.23px; 605 letter-spacing: -0.23px;
606 text-align: center; 606 text-align: center;
607 padding: 0 48rpx; 607 padding: 0 48rpx;
608 line-height: 48rpx; 608 line-height: 48rpx;
609 } 609 }
610 } 610 }
611 } 611 }
612 // 商品详情 612 // 商品详情
613 .more_info { 613 .more_info {
614 .more_fixed1 { 614 .more_fixed1 {
615 display: flex; 615 display: flex;
616 justify-content: space-between; 616 justify-content: space-between;
617 align-content: center; 617 align-content: center;
618 margin-bottom: 12px; 618 margin-bottom: 12px;
619 view { 619 view {
620 font-size: 14px; 620 font-size: 14px;
621 color: #333333; 621 color: #333333;
622 font-weight: bold; 622 font-weight: bold;
623 font-family: "PingFangSC-Medium"; 623 font-family: "PingFangSC-Medium";
624 line-height: 24px; 624 line-height: 24px;
625 } 625 }
626 image { 626 image {
627 width: 240rpx; 627 width: 240rpx;
628 height: 3px; 628 height: 3px;
629 margin-top: 10px; 629 margin-top: 10px;
630 } 630 }
631 } 631 }
632 .more_all { 632 .more_all {
633 width: 100%; 633 width: 100%;
634 margin-top: 30rpx; 634 margin-top: 30rpx;
635 margin-right: 30rpx; 635 margin-right: 30rpx;
636 margin-bottom: 180rpx; 636 margin-bottom: 180rpx;
637 font-family: "PingFangSC-Regular"; 637 font-family: "PingFangSC-Regular";
638 } 638 }
639 } 639 }
640 // 菜单 640 // 菜单
641 .menu { 641 .menu {
642 position: fixed; 642 position: fixed;
643 bottom: 0; 643 bottom: 0;
644 min-height: 74px; 644 min-height: 74px;
645 width: 100%; 645 width: 100%;
646 background: #ffffff; 646 background: #ffffff;
647 padding: 20px 20px 8px 20px; 647 padding: 20px 20px 8px 20px;
648 font-family: "PingFangSC-Regular"; 648 font-family: "PingFangSC-Regular";
649 box-sizing: border-box; 649 box-sizing: border-box;
650 display: flex; 650 display: flex;
651 justify-content: space-between; 651 justify-content: space-between;
652 align-content: center; 652 align-content: center;
653 margin: 0; 653 margin: 0;
654 /* iphonex 等安全区设置,底部安全区适配 */ 654 /* iphonex 等安全区设置,底部安全区适配 */
655 /* #ifndef APP-NVUE */ 655 /* #ifndef APP-NVUE */
656 padding-bottom: constant(safe-area-inset-bottom); 656 padding-bottom: constant(safe-area-inset-bottom);
657 padding-bottom: env(safe-area-inset-bottom); 657 padding-bottom: env(safe-area-inset-bottom);
658 /* #endif */ 658 /* #endif */
659 .menu_1 { 659 .menu_1 {
660 width: 20%; 660 width: 20%;
661 height: 100%; 661 height: 100%;
662 text-align: center; 662 text-align: center;
663 color: #989898; 663 color: #989898;
664 .cart_icon { 664 .cart_icon {
665 position: relative; 665 position: relative;
666 text { 666 text {
667 position: absolute; 667 position: absolute;
668 color: white; 668 color: white;
669 font-size: 17px; 669 font-size: 17px;
670 background-color: red; 670 background-color: red;
671 min-height: 24px; 671 min-height: 24px;
672 min-width: 24px; 672 min-width: 24px;
673 line-height: 24px; 673 line-height: 24px;
674 right: -12%; 674 right: -12%;
675 top: -12px; 675 top: -12px;
676 text-align: center; 676 text-align: center;
677 border-radius: 24px; 677 border-radius: 24px;
678 padding: 2px; 678 padding: 2px;
679 } 679 }
680 } 680 }
681 } 681 }
682 image { 682 image {
683 width: 42%; 683 width: 42%;
684 height: 26px; 684 height: 26px;
685 } 685 }
686 .menu_image { 686 .menu_image {
687 font-size: 12px; 687 font-size: 12px;
688 text-align: center; 688 text-align: center;
689 } 689 }
690 .menu_2 { 690 .menu_2 {
691 width: 74%; 691 width: 74%;
692 height: 80rpx; 692 height: 80rpx;
693 display: grid; 693 display: grid;
694 grid-template-columns: 50% 50%; 694 grid-template-columns: 50% 50%;
695 } 695 }
696 .menu_input { 696 .menu_input {
697 display: inline-flex; 697 display: inline-flex;
698 align-items: center; 698 align-items: center;
699 justify-content: space-around; 699 justify-content: space-around;
700 background: #fff0ec; 700 background: #fff0ec;
701 font-size: 16px; 701 font-size: 16px;
702 color: #ff6b4a; 702 color: #ff6b4a;
703 border-radius: 20px 0 0 20px; 703 border-radius: 20px 0 0 20px;
704 } 704 }
705 .menu_now { 705 .menu_now {
706 display: inline-flex; 706 display: inline-flex;
707 align-items: center; 707 align-items: center;
708 justify-content: space-around; 708 justify-content: space-around;
709 background: #ff6b4a; 709 background: #ff6b4a;
710 font-size: 16px; 710 font-size: 16px;
711 color: #ffffff; 711 color: #ffffff;
712 border-radius: 0 20px 20px 0; 712 border-radius: 0 20px 20px 0;
713 } 713 }
714 } 714 }
715 /* #endif */
716
717 } 715 }
718 </style> 716 </style>
719 717
src/pages/myOrderPaying/myOrderPaying.vue
1 <!-- 订单待付款 待收货 --> 1 <!-- 订单待付款 待收货 -->
2 <template> 2 <template>
3 <view class="content"> 3 <view class="content">
4 <view 4 <view
5 class="headerBanner" 5 class="headerBanner"
6 v-if="status == '2'||'3'" 6 v-if="status == '2'||'3'"
7 > 7 >
8 <view class="bannerLeft"> 8 <view class="bannerLeft">
9 <view class="T1">订单已完成</view> 9 <view class="T1">订单已完成</view>
10 </view> 10 </view>
11 <image 11 <image
12 src="../../static/car.png" 12 src="../../static/car.png"
13 mode="aspectFill" 13 mode="aspectFill"
14 ></image> 14 ></image>
15 </view> 15 </view>
16 <!-- 待付款 --> 16 <!-- 待付款 -->
17 <view 17 <view
18 class="order-time" 18 class="order-time"
19 v-if="status == '0'" 19 v-if="status == '0'"
20 > 20 >
21 <text>请在</text> 21 <text>请在</text>
22 <uni-countdown 22 <uni-countdown
23 color="#EC5D3B" 23 color="#EC5D3B"
24 splitor-color="#EC5D3B" 24 splitor-color="#EC5D3B"
25 :show-day="false" 25 :show-day="false"
26 :hour="0" 26 :hour="0"
27 :second="getLeftTime" 27 :second="getLeftTime"
28 @timeup="timeup" 28 @timeup="timeup"
29 > 29 >
30 </uni-countdown> 30 </uni-countdown>
31 31
32 <text>内完成付款</text> 32 <text>内完成付款</text>
33 </view> 33 </view>
34 34
35 <view 35 <view
36 class="headerBanner" 36 class="headerBanner"
37 v-if="status == '1'" 37 v-if="status == '1'"
38 > 38 >
39 <view class="bannerLeft"> 39 <view class="bannerLeft">
40 <view class="T1">卖家已发货</view> 40 <view class="T1">卖家已发货</view>
41 <!-- <view class="T2">还剩 确认收货</view> --> 41 <!-- <view class="T2">还剩 确认收货</view> -->
42 </view> 42 </view>
43 <image 43 <image
44 src="../../static/car.png" 44 src="../../static/car.png"
45 mode="aspectFill" 45 mode="aspectFill"
46 ></image> 46 ></image>
47 </view> 47 </view>
48 48
49 <view class="order"> 49 <view class="order">
50 <view class="order-user"> 50 <view class="order-user">
51 <view class="order-user-head"> 51 <view class="order-user-head">
52 <text class="p1">{{orderAddressInfo.name}}</text> 52 <text class="p1">{{orderAddressInfo.name}}</text>
53 <text class="p2">{{orderAddressInfo.mobile}}</text> 53 <text class="p2">{{orderAddressInfo.mobile}}</text>
54 </view> 54 </view>
55 <view class="order-user-body"> 55 <view class="order-user-body">
56 <image src="../../static/myorder-paying-location.png"></image> 56 <image src="../../static/myorder-paying-location.png"></image>
57 <text class="p3">{{orderAddressInfo.address}}</text> 57 <text class="p3">{{orderAddressInfo.address}}</text>
58 </view> 58 </view>
59 </view> 59 </view>
60 <view class="order-info"> 60 <view class="order-info">
61 <view 61 <view
62 class="order-info-head" 62 class="order-info-head"
63 v-for="(orderInfoListItem,index) in orderInfoList" 63 v-for="(orderInfoListItem,index) in orderInfoList"
64 :key="index" 64 :key="index"
65 > 65 >
66 <image 66 <image
67 :src="orderInfoListItem.imgUrl" 67 :src="orderInfoListItem.imgUrl"
68 mode="aspectFill" 68 mode="aspectFill"
69 ></image> 69 ></image>
70 <view class="order-info-head-r"> 70 <view class="order-info-head-r">
71 <text class="p1">{{orderInfoListItem.p_name}}</text> 71 <text class="p1">{{orderInfoListItem.p_name}}</text>
72 <view 72 <view
73 class="p2" 73 class="p2"
74 style="margin: 0;" 74 style="margin: 0;"
75 > 75 >
76 规格:玫瑰金 / 钛合金 / 防日光防紫外线 / 超薄超轻 76 规格:玫瑰金 / 钛合金 / 防日光防紫外线 / 超薄超轻
77 <!-- <view class="arrow"></view> --> 77 <!-- <view class="arrow"></view> -->
78 </view> 78 </view>
79 <view class="infoText-bottom"> 79 <view class="infoText-bottom">
80 <view class="markPrice">{{Number(orderInfoListItem.nowPrice)/100}}</view> 80 <view class="markPrice">{{Number(orderInfoListItem.nowPrice)/100}}</view>
81 <view class="buy-num">X {{orderInfoListItem.num}}</view> 81 <view class="buy-num">X {{orderInfoListItem.num}}</view>
82 </view> 82 </view>
83 </view> 83 </view>
84 </view> 84 </view>
85 <!-- <view class="order-info-goodsnum"> 85 <!-- <view class="order-info-goodsnum">
86 <text>X1</text> 86 <text>X1</text>
87 </view> --> 87 </view> -->
88 <text class="order-info-freight"> 88 <text class="order-info-freight">
89 <text class="p1">运费</text> 89 <text class="p1">运费</text>
90 <text class="p2">免运费</text> 90 <text class="p2">免运费</text>
91 </text> 91 </text>
92 <text class="order-info-discount"> 92 <text class="order-info-discount">
93 <text class="p1">优惠</text> 93 <text class="p1">优惠</text>
94 <text class="p2">-¥{{totalDiscount}}</text> 94 <text class="p2">-¥{{totalDiscount}}</text>
95 </text> 95 </text>
96 <text class="order-info-price"> 96 <text class="order-info-price">
97 <text class="p1">实付</text> 97 <text class="p1">实付</text>
98 <text class="p2">¥{{Number(totalPrice)/100}}</text> 98 <text class="p2">¥{{Number(totalPrice)/100}}</text>
99 </text> 99 </text>
100 <text class="order-info-num"> 100 <text class="order-info-num">
101 <text>订单号:{{payId}}</text> 101 <text>订单号:{{payId}}</text>
102 </text> 102 </text>
103 <text class="order-info-time"> 103 <text class="order-info-time">
104 <text>下单时间:{{orderInfo.pay_time}}</text> 104 <text>下单时间:{{orderInfo.pay_time}}</text>
105 </text> 105 </text>
106 <view class="order-info-hr"></view> 106 <view class="order-info-hr"></view>
107 <view class="order-info-contact"> 107 <view class="order-info-contact">
108 <image src="../../static/myorder-paying-contact.png"></image> 108 <image src="../../static/myorder-paying-contact.png"></image>
109 <text>联系客服</text> 109 <button open-type="contact">联系客服</button>
110 </view> 110 </view>
111 </view> 111 </view>
112 </view> 112 </view>
113 <view 113 <view
114 class="order-confim" 114 class="order-confim"
115 v-if="status == '0'" 115 v-if="status == '0'"
116 > 116 >
117 <button 117 <button
118 class="b1" 118 class="b1"
119 @click="cancleOrder" 119 @click="cancleOrder"
120 >取消订单</button> 120 >取消订单</button>
121 <button 121 <button
122 class="b2" 122 class="b2"
123 @click="paylog" 123 @click="paylog"
124 >立即支付</button> 124 >立即支付</button>
125 </view> 125 </view>
126 126
127 <view 127 <view
128 class="order-confim" 128 class="order-confim"
129 v-if="status == '1'" 129 v-if="status == '1'"
130 > 130 >
131 <!-- <button class="b1">取消订单</button> --> 131 <!-- <button class="b1">取消订单</button> -->
132 <button 132 <button
133 class="b2" 133 class="b2"
134 @click="confirmOrder" 134 @click="confirmOrder"
135 >确认收货</button> 135 >确认收货</button>
136 </view> 136 </view>
137 <view 137 <view
138 class="order-confim" 138 class="order-confim"
139 v-if="status == '2'" 139 v-if="status == '2'"
140 > 140 >
141 <button 141 <button
142 class="b2" 142 class="b2"
143 @click="toDetail" 143 @click="toDetail"
144 >再次购买</button> 144 >再次购买</button>
145 </view> 145 </view>
146 146
147 </view> 147 </view>
148 </template> 148 </template>
149 149
150 <script> 150 <script>
151 import store from '@/store' 151 import store from '@/store'
152 import MD5Util from '../../utils/md5' 152 import MD5Util from '../../utils/md5'
153 import UniCountdown from '../../components/UniCountdown/UniCountdown.vue' 153 import UniCountdown from '../../components/UniCountdown/UniCountdown.vue'
154 export default { 154 export default {
155 components: { 155 components: {
156 UniCountdown, 156 UniCountdown,
157 }, 157 },
158 data() { 158 data() {
159 return { 159 return {
160 payId: '', 160 payId: '',
161 payTime: '', 161 payTime: '',
162 status: '', // status 0 待付款 1 已发货 162 status: '', // status 0 待付款 1 已发货
163 uid: '', 163 uid: '',
164 openid: '', 164 openid: '',
165 lefttime: 0, 165 lefttime: 0,
166 isPay: 0, 166 isPay: 0,
167 totalPrice: 0, 167 totalPrice: 0,
168 } 168 }
169 }, 169 },
170 async onLoad ({ payId, status, isPay }) { 170 async onLoad ({ payId, status, isPay }) {
171 this.payId = payId 171 this.payId = payId
172 this.status = status 172 this.status = status
173 this.isPay = isPay 173 this.isPay = isPay
174 // console.log('++++++++++++++++++',this.status) 174 // console.log('++++++++++++++++++',this.status)
175 const openid = uni.getStorageSync('openid') 175 const openid = uni.getStorageSync('openid')
176 const uid = this.$store.state.user.userInfo.uid 176 const uid = this.$store.state.user.userInfo.uid
177 this.uid = uid 177 this.uid = uid
178 this.openid = openid 178 this.openid = openid
179 await store.dispatch('orderRead/getOrderInfo', { 179 await store.dispatch('orderRead/getOrderInfo', {
180 pay_id: this.payId, 180 pay_id: this.payId,
181 uid: uid, 181 uid: uid,
182 openid: openid, 182 openid: openid,
183 }) 183 })
184 this.totalPrice = this.orderInfo.total_fee 184 this.totalPrice = this.orderInfo.total_fee
185 }, 185 },
186 // 若从支付页面跳转过来,返回直接返回到首页 186 // 若从支付页面跳转过来,返回直接返回到首页
187 onBackPress(option) { 187 onBackPress(option) {
188 if (option.from === 'backbutton' && this.isPay) { 188 if (option.from === 'backbutton' && this.isPay) {
189 uni.switchTab({ 189 uni.switchTab({
190 url: '/pages/index/index', 190 url: '/pages/index/index',
191 }) 191 })
192 return true // 阻止默认返回行为 192 return true // 阻止默认返回行为
193 } 193 }
194 }, 194 },
195 computed: { 195 computed: {
196 orderInfo() { 196 orderInfo() {
197 return this.$store.state.orderRead.orderInfo 197 return this.$store.state.orderRead.orderInfo
198 }, 198 },
199 orderInfoList () { 199 orderInfoList () {
200 return this.orderInfo.order_info ? this.orderInfo.order_info.list : null 200 return this.orderInfo.order_info ? this.orderInfo.order_info.list : null
201 }, 201 },
202 // 获取订单地址信息 202 // 获取订单地址信息
203 orderAddressInfo () { 203 orderAddressInfo () {
204 return this.orderInfo.order_info ? this.orderInfo.order_info.address : null 204 return this.orderInfo.order_info ? this.orderInfo.order_info.address : null
205 }, 205 },
206 // 订单付款时间 206 // 订单付款时间
207 getLeftTime () { 207 getLeftTime () {
208 return this.orderInfo.order_info ? this.orderInfo.order_info.lefttime : 1800 208 return this.orderInfo.order_info ? this.orderInfo.order_info.lefttime : 1800
209 }, 209 },
210 // 计算总优惠额 210 // 计算总优惠额
211 totalDiscount() { 211 totalDiscount() {
212 const discountInfoList = this.orderInfo.discount_info 212 const discountInfoList = this.orderInfo.discount_info
213 let totalDiscount = 0 213 let totalDiscount = 0
214 if (discountInfoList) { 214 if (discountInfoList) {
215 discountInfoList.map((discountItem, index) => { 215 discountInfoList.map((discountItem, index) => {
216 totalDiscount += Number(discountItem.value) 216 totalDiscount += Number(discountItem.value)
217 }) 217 })
218 } 218 }
219 // console.log(totalDiscount) 219 // console.log(totalDiscount)
220 return totalDiscount 220 return totalDiscount
221 }, 221 },
222 }, 222 },
223 223
224 methods: { 224 methods: {
225 // 再次购买 暂时只支持跳转第一个商品 225 // 再次购买 暂时只支持跳转第一个商品
226 toDetail() { 226 toDetail() {
227 const pid = this.orderInfo.order_info.list[0].pid 227 const pid = this.orderInfo.order_info.list[0].pid
228 uni.navigateTo({ 228 uni.navigateTo({
229 url: '../details/details?pid=' + pid, 229 url: '../details/details?pid=' + pid,
230 fail: (res) => { console.log(res) }, 230 fail: (res) => { console.log(res) },
231 }) 231 })
232 }, 232 },
233 // 取消订单 233 // 取消订单
234 timeup() { 234 timeup() {
235 this.cancleOrder() 235 this.cancleOrder()
236 }, 236 },
237 cancleOrder() { 237 cancleOrder() {
238 const uid = this.uid 238 const uid = this.uid
239 const openid = this.openid 239 const openid = this.openid
240 const keyname = this.orderInfo.order_info.keyname 240 const keyname = this.orderInfo.order_info.keyname
241 // console.log('keyname',this.orderInfo.keyname) 241 // console.log('keyname',this.orderInfo.keyname)
242 uni.showModal({ 242 uni.showModal({
243 title: '提示', 243 title: '提示',
244 content: '现在取消,订单不可恢复哦,确认取消吗?', 244 content: '现在取消,订单不可恢复哦,确认取消吗?',
245 success: function(res) { 245 success: function(res) {
246 if (res.confirm) { 246 if (res.confirm) {
247 store.dispatch('cancelOrder/cancel', { 247 store.dispatch('cancelOrder/cancel', {
248 keyname: keyname, 248 keyname: keyname,
249 uid: uid, 249 uid: uid,
250 openid: openid, 250 openid: openid,
251 }) 251 })
252 uni.navigateBack({ 252 uni.navigateBack({
253 delta: 1, 253 delta: 1,
254 }) 254 })
255 } else if (res.cancel) { 255 } else if (res.cancel) {
256 console.log('用户点击取消') 256 console.log('用户点击取消')
257 } 257 }
258 }, 258 },
259 }) 259 })
260 }, 260 },
261 paylog() { 261 paylog() {
262 console.log('pay', this.orderInfo) 262 console.log('pay', this.orderInfo)
263 const { data, exKeyName: keyName } = this.orderInfo 263 const { data, exKeyName: keyName } = this.orderInfo
264 const uid = uni.getStorageSync('uid') 264 const uid = uni.getStorageSync('uid')
265 const timeStamp = new Date().getTime().toString() 265 const timeStamp = new Date().getTime().toString()
266 const nonceStr = 'asfafasfasfasfasf' 266 const nonceStr = 'asfafasfasfasfasf'
267 // 支付参数 267 // 支付参数
268 const fieldSet = { 268 const fieldSet = {
269 openid: this.$store.state.user.userInfo.openid, 269 openid: this.$store.state.user.userInfo.openid,
270 uid: this.$store.state.user.userInfo.uid, 270 uid: this.$store.state.user.userInfo.uid,
271 shopid: 0, 271 shopid: 0,
272 payCate: 2020, 272 payCate: 2020,
273 payMoney: this.totalPrice, 273 payMoney: this.totalPrice,
274 payWoodId: `fcdj-${uid}-${keyName}`, 274 payWoodId: `fcdj-${uid}-${keyName}`,
275 payWoodDesc: '在【非常戴镜】的微信付款凭证', 275 payWoodDesc: '在【非常戴镜】的微信付款凭证',
276 nonceStr, 276 nonceStr,
277 signType: 'MD5', 277 signType: 'MD5',
278 app_uid: 2020, 278 app_uid: 2020,
279 timeStamp, 279 timeStamp,
280 keyname: keyName, 280 keyname: keyName,
281 billInfo: JSON.stringify(data), 281 billInfo: JSON.stringify(data),
282 } 282 }
283 // 请求后台支付接口 283 // 请求后台支付接口
284 store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => { 284 store.dispatch('order/pay', fieldSet).then(({ data, data2, pay_id: payId }) => {
285 if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') { 285 if (data.return_code === 'SUCCESS' && data.result_code === 'SUCCESS') {
286 const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}` 286 const stringA = `appId=wx115b25aa396d27ac&nonceStr=${nonceStr}&package=prepay_id=${data.prepay_id}&signType=MD5&timeStamp=${timeStamp}`
287 const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789' 287 const stringSignTemp = stringA + '&key=NewMoney2017hatemydaddy123456789'
288 288
289 // 微信支付接口 289 // 微信支付接口
290 uni.requestPayment({ 290 uni.requestPayment({
291 appId: data.appid, 291 appId: data.appid,
292 timeStamp, 292 timeStamp,
293 nonceStr, 293 nonceStr,
294 total_fee: this.totalPrice, 294 total_fee: this.totalPrice,
295 package: `prepay_id=${data.prepay_id}`, 295 package: `prepay_id=${data.prepay_id}`,
296 signType: 'MD5', 296 signType: 'MD5',
297 paySign: MD5Util.MD5(stringSignTemp).toUpperCase(), 297 paySign: MD5Util.MD5(stringSignTemp).toUpperCase(),
298 success: (res) => { 298 success: (res) => {
299 // 支付成功 299 // 支付成功
300 uni.showModal({ 300 uni.showModal({
301 content: '支付成功', 301 content: '支付成功',
302 showCancel: false, 302 showCancel: false,
303 }) 303 })
304 // 跳转订单详情页->状态 待收货 304 // 跳转订单详情页->状态 待收货
305 uni.reLaunch({ 305 uni.reLaunch({
306 url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, 306 url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`,
307 }) 307 })
308 }, 308 },
309 fail: (res) => { 309 fail: (res) => {
310 // 支付失败 310 // 支付失败
311 uni.showModal({ 311 uni.showModal({
312 content: '支付失败', 312 content: '支付失败',
313 showCancel: false, 313 showCancel: false,
314 }) 314 })
315 // 跳转订单详情页->刷新本页面 315 // 跳转订单详情页->刷新本页面
316 // uni.redirectTo({ 316 // uni.redirectTo({
317 // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, 317 // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`,
318 // }) 318 // })
319 }, 319 },
320 complete: () => { 320 complete: () => {
321 uni.hideLoading() 321 uni.hideLoading()
322 }, 322 },
323 }) 323 })
324 } else { 324 } else {
325 uni.showModal({ 325 uni.showModal({
326 content: '支付失败', 326 content: '支付失败',
327 showCancel: false, 327 showCancel: false,
328 }) 328 })
329 console.log('支付失败') 329 console.log('支付失败')
330 uni.hideLoading() 330 uni.hideLoading()
331 // uni.redirectTo({ 331 // uni.redirectTo({
332 // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, 332 // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`,
333 // }) 333 // })
334 } 334 }
335 }) 335 })
336 336
337 // 修改订单状态 待付款==>待收货 337 // 修改订单状态 待付款==>待收货
338 store.dispatch('statusConfirm/confirm', { 338 store.dispatch('statusConfirm/confirm', {
339 uid: this.uid, 339 uid: this.uid,
340 openid: this.openid, 340 openid: this.openid,
341 oldway: '0', 341 oldway: '0',
342 way: '1', 342 way: '1',
343 pay_id: this.payId, 343 pay_id: this.payId,
344 judgeContent: '', 344 judgeContent: '',
345 orderInfo: this.orderInfo.order_info, 345 orderInfo: this.orderInfo.order_info,
346 }) 346 })
347 .then( 347 .then(
348 // setTimeout(() => { 348 // setTimeout(() => {
349 // uni.navigateBack(); 349 // uni.navigateBack();
350 // }, 1500) 350 // }, 1500)
351 ) 351 )
352 }, 352 },
353 confirmOrder() { 353 confirmOrder() {
354 // 确认收货 way1 ==>way2 354 // 确认收货 way1 ==>way2
355 store 355 store
356 .dispatch('statusConfirm/confirm', { 356 .dispatch('statusConfirm/confirm', {
357 uid: this.uid, 357 uid: this.uid,
358 openid: this.openid, 358 openid: this.openid,
359 oldway: '1', 359 oldway: '1',
360 way: '2', 360 way: '2',
361 pay_id: this.payId, 361 pay_id: this.payId,
362 judgeContent: '', 362 judgeContent: '',
363 orderInfo: this.orderInfo.order_info, 363 orderInfo: this.orderInfo.order_info,
364 }) 364 })
365 .then((res) => { 365 .then((res) => {
366 if (res.data.code === 1) { 366 if (res.data.code === 1) {
367 uni.showToast({ 367 uni.showToast({
368 title: '已确认', 368 title: '已确认',
369 mask: true, 369 mask: true,
370 duration: 1500, 370 duration: 1500,
371 icon: 'success', 371 icon: 'success',
372 }) 372 })
373 } else { 373 } else {
374 uni.showToast({ 374 uni.showToast({
375 title: '服务器错误,确认失败!', 375 title: '服务器错误,确认失败!',
376 mask: true, 376 mask: true,
377 }) 377 })
378 } 378 }
379 setTimeout(() => { 379 setTimeout(() => {
380 uni.navigateBack() 380 uni.navigateBack()
381 }, 1500) 381 }, 1500)
382 }) 382 })
383 }, 383 },
384 }, 384 },
385 // filters: { 385 // filters: {
386 // timerChange: function(value) { 386 // timerChange: function(value) {
387 // var newDate = new Date() 387 // var newDate = new Date()
388 // newDate.setTime(value * 1000) 388 // newDate.setTime(value * 1000)
389 // return newDate.toLocaleString() 389 // return newDate.toLocaleString()
390 // }, 390 // },
391 // }, 391 // },
392 } 392 }
393 </script> 393 </script>
394 394
395 <style lang="scss" scoped> 395 <style lang="scss" scoped>
396 .content { 396 .content {
397 min-height: 100vh; 397 min-height: 100vh;
398 display: flex; 398 display: flex;
399 flex-direction: column; 399 flex-direction: column;
400 justify-content: flex-start; 400 justify-content: flex-start;
401 align-items: center; 401 align-items: center;
402 background-color: #f2f2f2; 402 background-color: #f2f2f2;
403 } 403 }
404 404
405 .order { 405 .order {
406 margin-bottom: 112rpx; 406 margin-bottom: 112rpx;
407 background: #f2f2f2; 407 background: #f2f2f2;
408 margin-top: 140rpx; 408 margin-top: 140rpx;
409 width: 670rpx; 409 width: 670rpx;
410 } 410 }
411 411
412 .order-time { 412 .order-time {
413 width: 100%; 413 width: 100%;
414 height: 140rpx; 414 height: 140rpx;
415 background-color: #fff; 415 background-color: #fff;
416 display: flex; 416 display: flex;
417 justify-content: center; 417 justify-content: center;
418 align-items: center; 418 align-items: center;
419 position: fixed; 419 position: fixed;
420 top: 0; 420 top: 0;
421 left: 0; 421 left: 0;
422 text { 422 text {
423 // font-family: PingFangSC-Regular; 423 // font-family: PingFangSC-Regular;
424 // margin-top: 48rpx; 424 // margin-top: 48rpx;
425 font-size: 14px; 425 font-size: 14px;
426 color: #333333; 426 color: #333333;
427 letter-spacing: -0.26px; 427 letter-spacing: -0.26px;
428 } 428 }
429 .p2 { 429 .p2 {
430 // font-family: DINAlternate-Bold; 430 // font-family: DINAlternate-Bold;
431 margin: 42rpx 20rpx 0 20rpx; 431 margin: 42rpx 20rpx 0 20rpx;
432 font-size: 18px; 432 font-size: 18px;
433 color: #ec5d3b; 433 color: #ec5d3b;
434 letter-spacing: -0.34px; 434 letter-spacing: -0.34px;
435 } 435 }
436 } 436 }
437 .headerBanner { 437 .headerBanner {
438 width: 100%; 438 width: 100%;
439 height: 140rpx; 439 height: 140rpx;
440 background: #4a90e2; 440 background: #4a90e2;
441 padding: 26rpx 60rpx 24rpx 60rpx; 441 padding: 26rpx 60rpx 24rpx 60rpx;
442 box-sizing: border-box; 442 box-sizing: border-box;
443 color: #ffffff; 443 color: #ffffff;
444 display: flex; 444 display: flex;
445 justify-content: space-between; 445 justify-content: space-between;
446 align-items: center; 446 align-items: center;
447 position: fixed; 447 position: fixed;
448 top: 0; 448 top: 0;
449 left: 0; 449 left: 0;
450 .bannerLeft { 450 .bannerLeft {
451 font-size: 36rpx; 451 font-size: 36rpx;
452 display: flex; 452 display: flex;
453 flex-direction: column; 453 flex-direction: column;
454 justify-content: center; 454 justify-content: center;
455 align-items: center; 455 align-items: center;
456 .T2 { 456 .T2 {
457 font-size: 24rpx; 457 font-size: 24rpx;
458 } 458 }
459 } 459 }
460 image { 460 image {
461 height: 56rpx; 461 height: 56rpx;
462 width: 72rpx; 462 width: 72rpx;
463 } 463 }
464 } 464 }
465 465
466 .order-user { 466 .order-user {
467 height: 228rpx; 467 height: 228rpx;
468 background: #ffffff; 468 background: #ffffff;
469 border-radius: 14rpx; 469 border-radius: 14rpx;
470 margin: 0 auto; 470 margin: 0 auto;
471 margin-top: 20rpx; 471 margin-top: 20rpx;
472 margin-bottom: 20rpx; 472 margin-bottom: 20rpx;
473 .order-user-head { 473 .order-user-head {
474 display: flex; 474 display: flex;
475 height: 108rpx; 475 height: 108rpx;
476 align-items: center; 476 align-items: center;
477 margin-left: 126rpx; 477 margin-left: 126rpx;
478 .p1 { 478 .p1 {
479 // font-family: PingFangSC-Regular; 479 // font-family: PingFangSC-Regular;
480 font-size: 14px; 480 font-size: 14px;
481 color: #333333; 481 color: #333333;
482 letter-spacing: -0.26px; 482 letter-spacing: -0.26px;
483 margin-right: 20rpx; 483 margin-right: 20rpx;
484 } 484 }
485 .p2 { 485 .p2 {
486 // font-family: PingFangSC-Regular; 486 // font-family: PingFangSC-Regular;
487 font-size: 14px; 487 font-size: 14px;
488 color: #999999; 488 color: #999999;
489 letter-spacing: -0.26px; 489 letter-spacing: -0.26px;
490 } 490 }
491 } 491 }
492 .order-user-body { 492 .order-user-body {
493 display: flex; 493 display: flex;
494 width: 100%; 494 width: 100%;
495 image { 495 image {
496 width: 24px; 496 width: 24px;
497 height: 26px; 497 height: 26px;
498 margin: 12rpx 32rpx 0 40rpx; 498 margin: 12rpx 32rpx 0 40rpx;
499 } 499 }
500 .p3 { 500 .p3 {
501 // font-family: PingFangSC-Semibold; 501 // font-family: PingFangSC-Semibold;
502 font-size: 14px; 502 font-size: 14px;
503 color: #333333; 503 color: #333333;
504 letter-spacing: -0.26px; 504 letter-spacing: -0.26px;
505 line-height: 70rpx; 505 line-height: 70rpx;
506 } 506 }
507 } 507 }
508 } 508 }
509 509
510 .order-info { 510 .order-info {
511 background-color: #fff; 511 background-color: #fff;
512 box-shadow: 0 0 20rpx 0 rgba(177, 128, 128, 0.06); 512 box-shadow: 0 0 20rpx 0 rgba(177, 128, 128, 0.06);
513 border-radius: 16rpx; 513 border-radius: 16rpx;
514 margin: 0 auto; 514 margin: 0 auto;
515 view { 515 view {
516 margin-left: 40rpx; 516 margin-left: 40rpx;
517 } 517 }
518 text { 518 text {
519 font-size: 14px; 519 font-size: 14px;
520 } 520 }
521 .order-info-head { 521 .order-info-head {
522 display: flex; 522 display: flex;
523 padding-top: 40rpx; 523 padding-top: 40rpx;
524 image { 524 image {
525 height: 188rpx; 525 height: 188rpx;
526 width: 188rpx; 526 width: 188rpx;
527 } 527 }
528 .order-info-head-r { 528 .order-info-head-r {
529 margin: 0; 529 margin: 0;
530 width: 368rpx; 530 width: 368rpx;
531 margin-left: 24rpx; 531 margin-left: 24rpx;
532 // margin-top: 40rpx; 532 // margin-top: 40rpx;
533 text { 533 text {
534 display: block; 534 display: block;
535 } 535 }
536 // .arrow{ 536 // .arrow{
537 // width: 0; 537 // width: 0;
538 // height: 0; 538 // height: 0;
539 // border-left: 5px transparent; 539 // border-left: 5px transparent;
540 // border-right: 5px transparent; 540 // border-right: 5px transparent;
541 // border-top: 5px #979797; 541 // border-top: 5px #979797;
542 // border-bottom: 0 transparent; 542 // border-bottom: 0 transparent;
543 // border-style: solid; 543 // border-style: solid;
544 // position: relative; 544 // position: relative;
545 // // transform: scaleY(-1); 545 // // transform: scaleY(-1);
546 // } 546 // }
547 // .arrow::after{ 547 // .arrow::after{
548 // content: ''; 548 // content: '';
549 // position: absolute; 549 // position: absolute;
550 // top: -6.5px; 550 // top: -6.5px;
551 // left: -5px; 551 // left: -5px;
552 // border-left: 5px transparent; 552 // border-left: 5px transparent;
553 // border-right: 5px transparent; 553 // border-right: 5px transparent;
554 // border-top: 5px #FFFFFF; 554 // border-top: 5px #FFFFFF;
555 // border-bottom: 0 transparent; 555 // border-bottom: 0 transparent;
556 // border-style: solid; 556 // border-style: solid;
557 // } 557 // }
558 .p1 { 558 .p1 {
559 min-height: 40px; 559 min-height: 40px;
560 // font-family: PingFangSC-Regular; 560 // font-family: PingFangSC-Regular;
561 font-size: 14px; 561 font-size: 14px;
562 color: #333333; 562 color: #333333;
563 letter-spacing: -0.26px; 563 letter-spacing: -0.26px;
564 line-height: 18px; 564 line-height: 18px;
565 // line-height: 20px; 565 // line-height: 20px;
566 } 566 }
567 .p2 { 567 .p2 {
568 height: 34px; 568 height: 34px;
569 padding: 1px 0 3px 0; 569 padding: 1px 0 3px 0;
570 // font-family: PingFangSC-Regular; 570 // font-family: PingFangSC-Regular;
571 font-size: 12px; 571 font-size: 12px;
572 color: #999999; 572 color: #999999;
573 letter-spacing: -0.23px; 573 letter-spacing: -0.23px;
574 } 574 }
575 .infoText-bottom { 575 .infoText-bottom {
576 display: flex; 576 display: flex;
577 flex-direction: row; 577 flex-direction: row;
578 justify-content: flex-start; 578 justify-content: flex-start;
579 align-items: center; 579 align-items: center;
580 width: 100%; 580 width: 100%;
581 margin-left: 0; 581 margin-left: 0;
582 .markPrice { 582 .markPrice {
583 font-size: 14px; 583 font-size: 14px;
584 color: #ff6b4a; 584 color: #ff6b4a;
585 margin-right: 20rpx; 585 margin-right: 20rpx;
586 margin-left: 0rpx; 586 margin-left: 0rpx;
587 } 587 }
588 .buy-num { 588 .buy-num {
589 font-size: 12px; 589 font-size: 12px;
590 color: #999999; 590 color: #999999;
591 } 591 }
592 } 592 }
593 } 593 }
594 } 594 }
595 // .order-info-goodsnum { 595 // .order-info-goodsnum {
596 // display: flex; 596 // display: flex;
597 // align-items: center; 597 // align-items: center;
598 // justify-content: flex-end; 598 // justify-content: flex-end;
599 // text { 599 // text {
600 // margin-right: 44rpx; 600 // margin-right: 44rpx;
601 // // ont-family: PingFangSC-Regular; 601 // // ont-family: PingFangSC-Regular;
602 // font-size: 12px; 602 // font-size: 12px;
603 // color: #999999; 603 // color: #999999;
604 // letter-spacing: -0.23px; 604 // letter-spacing: -0.23px;
605 // } 605 // }
606 // } 606 // }
607 .order-info-freight { 607 .order-info-freight {
608 display: block; 608 display: block;
609 margin-left: 40rpx; 609 margin-left: 40rpx;
610 margin-top: 22rpx; 610 margin-top: 22rpx;
611 .p1 { 611 .p1 {
612 // font-family: PingFangSC-Regular; 612 // font-family: PingFangSC-Regular;
613 font-size: 14px; 613 font-size: 14px;
614 color: #333333; 614 color: #333333;
615 letter-spacing: -0.26px; 615 letter-spacing: -0.26px;
616 line-height: 18px; 616 line-height: 18px;
617 margin-right: 24px; 617 margin-right: 24px;
618 } 618 }
619 .p2 { 619 .p2 {
620 // font-family: PingFangSC-Regular; 620 // font-family: PingFangSC-Regular;
621 font-size: 14px; 621 font-size: 14px;
622 color: #ff6b4a; 622 color: #ff6b4a;
623 letter-spacing: -0.26px; 623 letter-spacing: -0.26px;
624 } 624 }
625 } 625 }
626 .order-info-discount { 626 .order-info-discount {
627 display: block; 627 display: block;
628 margin-left: 40rpx; 628 margin-left: 40rpx;
629 margin-top: 24rpx; 629 margin-top: 24rpx;
630 .p1 { 630 .p1 {
631 // font-family: PingFangSC-Regular; 631 // font-family: PingFangSC-Regular;
632 font-size: 14px; 632 font-size: 14px;
633 color: #333333; 633 color: #333333;
634 letter-spacing: -0.26px; 634 letter-spacing: -0.26px;
635 line-height: 18px; 635 line-height: 18px;
636 margin-right: 24px; 636 margin-right: 24px;
637 } 637 }
638 .p2 { 638 .p2 {
639 // font-family: PingFangSC-Regular; 639 // font-family: PingFangSC-Regular;
640 font-size: 14px; 640 font-size: 14px;
641 color: #ff6b4a; 641 color: #ff6b4a;
642 letter-spacing: -0.26px; 642 letter-spacing: -0.26px;
643 } 643 }
644 } 644 }
645 .order-info-price { 645 .order-info-price {
646 display: block; 646 display: block;
647 margin-left: 40rpx; 647 margin-left: 40rpx;
648 margin-top: 24rpx; 648 margin-top: 24rpx;
649 .p1 { 649 .p1 {
650 // font-family: PingFangSC-Semibold; 650 // font-family: PingFangSC-Semibold;
651 font-size: 14px; 651 font-size: 14px;
652 color: #333333; 652 color: #333333;
653 letter-spacing: -0.26px; 653 letter-spacing: -0.26px;
654 line-height: 18px; 654 line-height: 18px;
655 margin-right: 24px; 655 margin-right: 24px;
656 } 656 }
657 .p2 { 657 .p2 {
658 // font-family: PingFangSC-Semibold; 658 // font-family: PingFangSC-Semibold;
659 font-size: 14px; 659 font-size: 14px;
660 color: #ff6b4a; 660 color: #ff6b4a;
661 letter-spacing: -0.26px; 661 letter-spacing: -0.26px;
662 } 662 }
663 } 663 }
664 .order-info-num { 664 .order-info-num {
665 display: block; 665 display: block;
666 margin-left: 40rpx; 666 margin-left: 40rpx;
667 margin-top: 44rpx; 667 margin-top: 44rpx;
668 text { 668 text {
669 // font-family: PingFangSC-Regular; 669 // font-family: PingFangSC-Regular;
670 font-size: 12px; 670 font-size: 12px;
671 color: #999999; 671 color: #999999;
672 letter-spacing: -0.23px; 672 letter-spacing: -0.23px;
673 } 673 }
674 } 674 }
675 .order-info-time { 675 .order-info-time {
676 display: block; 676 display: block;
677 margin: 8rpx 0 48rpx 40rpx; 677 margin: 8rpx 0 48rpx 40rpx;
678 text { 678 text {
679 // font-family: PingFangSC-Regular; 679 // font-family: PingFangSC-Regular;
680 font-size: 12px; 680 font-size: 12px;
681 color: #999999; 681 color: #999999;
682 letter-spacing: -0.23px; 682 letter-spacing: -0.23px;
683 } 683 }
684 } 684 }
685 .order-info-hr { 685 .order-info-hr {
686 width: 520rpx; 686 width: 520rpx;
687 height: 1px; 687 height: 1px;
688 background-color: #e9e9e9; 688 background-color: #e9e9e9;
689 margin-bottom: 20rpx; 689 margin-bottom: 20rpx;
690 } 690 }
691 .order-info-contact { 691 .order-info-contact {
692 display: flex; 692 display: flex;
693 padding-bottom: 28rpx; 693 padding-bottom: 28rpx;
694 image { 694 image {
695 width: 19px; 695 width: 19px;
696 height: 16px; 696 height: 16px;
697 } 697 }
698 text { 698 text {
699 // font-family: PingFangSC-Regular; 699 // font-family: PingFangSC-Regular;
700 margin-left: 20rpx; 700 margin-left: 20rpx;
701 font-size: 14px; 701 font-size: 14px;
702 color: #333333; 702 color: #333333;
703 letter-spacing: -0.26px; 703 letter-spacing: -0.26px;
704 line-height: 18px; 704 line-height: 18px;
705 } 705 }
706 } 706 }
707 } 707 }
708 708
709 .order-confim { 709 .order-confim {
710 display: flex; 710 display: flex;
711 align-items: center; 711 align-items: center;
712 justify-content: flex-end; 712 justify-content: flex-end;
713 // z-index: 999; 713 // z-index: 999;
714 width: 100%; 714 width: 100%;
715 height: 112rpx; 715 height: 112rpx;
716 position: fixed; 716 position: fixed;
717 bottom: 0; 717 bottom: 0;
718 background: #ffffff; 718 background: #ffffff;
719 button { 719 button {
720 width: 204rpx; 720 width: 204rpx;
721 height: 80rpx; 721 height: 80rpx;
722 border: 1px solid #ff6b4a; 722 border: 1px solid #ff6b4a;
723 border-radius: 40rpx; 723 border-radius: 40rpx;
724 font-size: 32rpx; 724 font-size: 32rpx;
725 letter-spacing: -0.3px; 725 letter-spacing: -0.3px;
726 margin-right: 0; 726 margin-right: 0;
727 } 727 }
728 .b1 { 728 .b1 {
729 // font-family: PingFangSC-Regular; 729 // font-family: PingFangSC-Regular;
730 color: #ff6b4a; 730 color: #ff6b4a;
731 background-color: #ffffff; 731 background-color: #ffffff;
732 } 732 }
733 .b2 { 733 .b2 {
734 // font-family: PingFangSC-Regular; 734 // font-family: PingFangSC-Regular;
735 background-color: #ff6b4a; 735 background-color: #ff6b4a;
736 color: #ffffff; 736 color: #ffffff;
737 margin: 0 26rpx 0 20rpx; 737 margin: 0 26rpx 0 20rpx;
738 } 738 }
739 } 739 }
740 </style> 740 </style>
741 741