payment.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. <template>
  2. <view class="container">
  3. <view class="choose">
  4. <view class="choose_address">
  5. <picker mode="selector" :range="addressList" @change="changeAddress">
  6. <view class="address-item">
  7. <text>收货地址:</text>
  8. <text>{{ selectedAddress }}</text>
  9. <van-icon name="arrow" color="#999" size="14px" />
  10. </view>
  11. </picker>
  12. <view class="add-address" @click="navigateToAddAddress">
  13. <van-icon name="plus" color="#ff6600" size="16px" />
  14. <text>添加地址</text>
  15. </view>
  16. </view>
  17. <view class="choose_time">
  18. <picker mode="selector" :range="timeList" @change="changeTime">
  19. <view class="time-item">
  20. <text>预计送达时间:</text>
  21. <text>{{ selectedTime }}</text>
  22. <van-icon name="arrow" color="#999" size="14px" />
  23. </view>
  24. </picker>
  25. </view>
  26. </view>
  27. <view class="payInfo">
  28. <view class="shop_title">{{ shopTitle }}</view>
  29. <view class="orderList">
  30. <view class="order-item" v-for="item in cart" :key="item.goods_id">
  31. <image class="goods-image" :src="item.goods_small_logo" mode="aspectFill"></image>
  32. <view class="goods-info">
  33. <text class="goods-name">{{ item.goods_name }}</text>
  34. <text class="goods-price">¥{{ item.goods_price }}</text>
  35. <text class="goods-count">x {{ item.goods_count }}</text>
  36. </view>
  37. <view>¥{{ item.goods_price*item.goods_count|toFixed(2) }}</view>
  38. </view>
  39. </view>
  40. <view class="tip">
  41. <text>温馨提示: 餐品已包装,请您尽快食用</text>
  42. </view>
  43. <view class="priceInfo">
  44. <view class="PackingFee">
  45. <text>餐盒费</text>
  46. <text>¥{{ PackingFee }}</text>
  47. </view>
  48. <view class="deliveryFee">
  49. <text>运费</text>
  50. <text>¥{{ deliveryFee }}</text>
  51. </view>
  52. <view class="disCount">
  53. <text>优惠券</text>
  54. <text>-¥{{ PackingFee+deliveryFee }}</text>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="payBtn">
  59. <view class="left_info">
  60. <view class="totalPrice">合计: ¥{{ Number.parseFloat(checkedGoodsAmount()).toFixed(2) }}</view>
  61. <view class="discountPrice">已优惠: ¥{{ checkedGoodsAmount() - checkedGoodsAmount()+PackingFee+deliveryFee }}</view>
  62. </view>
  63. <view class="pay" @click="pay">提交订单</view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import { mapState, mapMutations, mapGetters } from 'vuex'
  69. export default {
  70. onLoad(args) {
  71. this.cart=this.getCart()
  72. this.addressList = this.getAddressList()
  73. console.log(this.addressList,"Listen")
  74. this.shopTitle=args.shopTitle
  75. this.storeId=args.storeId
  76. },
  77. onShow() {
  78. this.cart=this.getCart()
  79. this.addressList = this.getAddressList()
  80. console.log(this.addressList,"Listen")
  81. },
  82. data() {
  83. return {
  84. storeId:0,
  85. addressList: ['江西省上饶市', '南昌市青山湖区', '江西省上饶市', '南昌市青山湖区'],
  86. timeList: ['18:00', '18:30', '19:00', '19:30', '20:00'],
  87. shopTitle: '麦当劳',
  88. selectedAddress: '',
  89. selectedTime: '18:00',
  90. cart:[],
  91. PackingFee: 1.5,
  92. deliveryFee: 3,
  93. orderList: []
  94. }
  95. },
  96. methods: {
  97. ...mapGetters('m_cart', ['total', 'checkedGoodsAmount','getCart']),
  98. ...mapGetters('m_addr', ['getAddressList']),
  99. ...mapMutations('m_cart', ['clearCart']),
  100. ...mapMutations('m_order', ['putOrder']),
  101. changeAddress(e) {
  102. this.selectedAddress = this.addressList[e.detail.value]
  103. },
  104. changeTime(e) {
  105. this.selectedTime = this.timeList[e.detail.value]
  106. },
  107. // pay() {
  108. // console.log(this.cart)
  109. // console.log(this.getCart())
  110. // },
  111. pay() {
  112. // 模拟微信支付流程
  113. uni.requestPayment({
  114. fail: () => {
  115. // 支付成功后生成订单数据
  116. const orderId = this.generateOrderId()
  117. const orderData = {
  118. id: orderId,
  119. addressList: this.addressList,
  120. selectedAddress: this.selectedAddress,
  121. timeList: this.timeList,
  122. orderTime: new Date().toLocaleString(),
  123. selectedTime: this.selectedTime,
  124. shopTitle: this.shopTitle,
  125. PackingFee: this.PackingFee,
  126. deliveryFee: this.deliveryFee,
  127. total: this.checkedGoodsAmount()
  128. }
  129. let userId = 1
  130. if (!uni.getStorageSync('userId')) {
  131. userId = 1
  132. }else{
  133. userId = uni.getStorageSync('userId')
  134. }
  135. let originPay=Number.parseFloat(this.checkedGoodsAmount())+Number.parseFloat(this.PackingFee)+Number.parseFloat(this.deliveryFee)
  136. let data =[]
  137. for(let i=0;i<this.cart.length;i++){
  138. data.push(
  139. {productId:this.cart[i].goods_id,
  140. count:this.cart[i].goods_count,
  141. productName:this.cart[i].goods_name,
  142. amount:this.cart[i].goods_price*this.cart[i].goods_count
  143. ,productIcons:this.cart[i].goods_small_logo})
  144. }
  145. console.log(data,"data")
  146. let order=
  147. {
  148. // "address":this.selectedAddress,
  149. // "phone":"12345678901",
  150. "bidPay":this.checkedGoodsAmount(),
  151. "originPay":originPay,
  152. "addressId":9,
  153. "userId":userId,
  154. "storeId":1,
  155. "orderRemark":"无",
  156. "orderProductsLists":data
  157. }
  158. // {
  159. // "bidPay":this.checkedGoodsAmount(),
  160. // "originPay":originPay,
  161. // "addressId":9,
  162. // "userId":1,
  163. // "orderProductsLists":[
  164. // {
  165. // "productName":"芒果",
  166. // "count":12,
  167. // "cnt":12
  168. // },
  169. // {
  170. // "productName":"芒果",
  171. // "count":12,
  172. // "cnt":12
  173. // }
  174. // ]
  175. // }
  176. console.log(order,"order")
  177. this.orderList.push(order)
  178. this.putOrder(order)
  179. // 保存订单数据到本地
  180. console.log(order)
  181. uni.setStorageSync('orderList', this.orderList)
  182. // 跳转到订单详情页面
  183. // uni.navigateTo({
  184. // url: `/subpkg/orderDetail/orderDetail?orderId=${orderId}`
  185. // })
  186. //清空购物车
  187. this.clearCart()
  188. this.cart=[]
  189. //返回上一页
  190. uni.navigateBack({
  191. delta: 1
  192. })
  193. // 显示支付成功提示
  194. uni.showToast({
  195. title: '支付成功',
  196. icon: 'success',
  197. duration: 3000
  198. })
  199. // 3秒后自动关闭提示
  200. setTimeout(() => {
  201. uni.hideToast()
  202. }, 3000)
  203. },
  204. success: (e) => {
  205. console.log(e,"e")
  206. uni.showToast({
  207. title: '支付失败',
  208. icon: 'none',
  209. duration: 3000
  210. })
  211. }
  212. })
  213. },
  214. generateOrderId() {
  215. // 生成随机订单号
  216. return Math.random().toString(36).substr(2, 9)
  217. },
  218. navigateToAddAddress() {
  219. uni.navigateTo({
  220. url: '/subpkg/addAddress/addAddress'
  221. })
  222. }
  223. },
  224. filters: {
  225. toFixed(val) {
  226. return Number(val).toFixed(2)
  227. }
  228. }
  229. }
  230. </script>
  231. <style lang="scss">
  232. .container {
  233. padding: 20rpx;
  234. background-color: #f7f7f7;
  235. }
  236. .choose {
  237. display: flex;
  238. justify-content: space-between;
  239. background-color: #fff;
  240. //col
  241. flex-direction: column;
  242. padding: 20rpx;
  243. border-radius: 10rpx;
  244. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  245. .choose_address,
  246. .choose_time {
  247. flex: 1;
  248. .address-item,
  249. .time-item {
  250. display: flex;
  251. align-items: flex-start;
  252. justify-content: space-between;
  253. font-size: 35rpx;
  254. color: #333;
  255. }
  256. }
  257. }
  258. .payInfo {
  259. margin-top: 20rpx;
  260. background-color: #fff;
  261. padding: 20rpx;
  262. border-radius: 10rpx;
  263. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  264. .shop_title {
  265. font-size: 32rpx;
  266. font-weight: bold;
  267. margin-bottom: 20rpx;
  268. color: #ff6600;
  269. }
  270. .orderList {
  271. .order-item {
  272. display: flex;
  273. align-items: center;
  274. margin-bottom: 20rpx;
  275. .goods-image {
  276. width: 120rpx;
  277. height: 120rpx;
  278. border-radius: 10rpx;
  279. margin-right: 20rpx;
  280. }
  281. .goods-info {
  282. flex: 1;
  283. .goods-name {
  284. font-size: 28rpx;
  285. color: #333;
  286. }
  287. .goods-price {
  288. font-size: 26rpx;
  289. color: #ff6600;
  290. margin-right: 10rpx;
  291. }
  292. .goods-count {
  293. font-size: 24rpx;
  294. color: #999;
  295. }
  296. }
  297. }
  298. }
  299. .tip {
  300. font-size: 24rpx;
  301. color: #999;
  302. margin: 20rpx 0;
  303. }
  304. .priceInfo {
  305. display: flex;
  306. justify-content: space-between;
  307. font-size: 26rpx;
  308. color: #333;
  309. view {
  310. display: flex;
  311. justify-content: space-between;
  312. margin-bottom: 10rpx;
  313. }
  314. }
  315. }
  316. .payBtn {
  317. display: flex;
  318. justify-content: space-between;
  319. align-items: center;
  320. margin-top: 20rpx;
  321. padding: 20rpx;
  322. background-color: #fff;
  323. border-radius: 10rpx;
  324. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  325. .left_info {
  326. .totalPrice {
  327. font-size: 32rpx;
  328. font-weight: bold;
  329. color: #ff6600;
  330. }
  331. .discountPrice {
  332. font-size: 24rpx;
  333. color: #999;
  334. }
  335. }
  336. .pay {
  337. background-color: #ff6600;
  338. color: #fff;
  339. font-size: 28rpx;
  340. padding: 10rpx 20rpx;
  341. border-radius: 30rpx;
  342. }
  343. }
  344. /* 样式保持不变 */
  345. .choose_address {
  346. display: flex;
  347. justify-content: space-between;
  348. align-items: center;
  349. .add-address {
  350. display: flex;
  351. align-items: center;
  352. font-size: 26rpx;
  353. color: #ff6600;
  354. }
  355. }
  356. </style>
  357. <!--<template>-->
  358. <!-- <view class="container">-->
  359. <!-- <view class="choose">-->
  360. <!-- <view class="choose_address">-->
  361. <!-- <picker mode="selector" :range="addressList" @change="changeAddress">-->
  362. <!-- <view class="address-item">-->
  363. <!-- <text>收货地址</text>-->
  364. <!-- <text>{{ selectedAddress }}</text>-->
  365. <!-- <van-icon type="arrowright" size="16"></van-icon>-->
  366. <!-- </view>-->
  367. <!-- </picker>-->
  368. <!-- </view>-->
  369. <!-- <view class="choose_time">-->
  370. <!-- <picker mode="selector" :range="timeList" @change="changeTime">-->
  371. <!-- <view class="time-item">-->
  372. <!-- <text>预计送达时间</text>-->
  373. <!-- <text>{{ selectedTime }}</text>-->
  374. <!-- <van-icon type="arrowright" size="16"></van-icon>-->
  375. <!-- </view>-->
  376. <!-- </picker>-->
  377. <!-- </view>-->
  378. <!-- </view>-->
  379. <!-- <view class="payInfo">-->
  380. <!-- <view class="shop_title">{{ shopTitle }}</view>-->
  381. <!-- <view class="orderList">-->
  382. <!-- <view class="order-item" v-for="item in cart" :key="item.goods_id">-->
  383. <!-- <image class="goods-image" :src="item.goods_small_logo" mode="aspectFill"></image>-->
  384. <!-- <view class="goods-info">-->
  385. <!-- <text class="goods-name">{{ item.goods_name }}</text>-->
  386. <!-- <text class="goods-price">¥{{ item.goods_price }}</text>-->
  387. <!-- <text class="goods-count">x {{ item.goods_count }}</text>-->
  388. <!-- </view>-->
  389. <!-- </view>-->
  390. <!-- </view>-->
  391. <!-- <view class="tip">-->
  392. <!-- <text>温馨提示: 餐品已包装,请您尽快食用</text>-->
  393. <!-- </view>-->
  394. <!-- <view class="priceInfo">-->
  395. <!-- <view class="PackingFee">-->
  396. <!-- <text>餐盒费</text>-->
  397. <!-- <text>¥{{ PackingFee }}</text>-->
  398. <!-- </view>-->
  399. <!-- <view class="deliveryFee">-->
  400. <!-- <text>运费</text>-->
  401. <!-- <text>¥{{ deliveryFee }}</text>-->
  402. <!-- </view>-->
  403. <!-- <view class="disCount">-->
  404. <!-- <text>优惠券</text>-->
  405. <!-- <text>-¥0</text>-->
  406. <!-- </view>-->
  407. <!-- </view>-->
  408. <!-- </view>-->
  409. <!-- <view class="payBtn">-->
  410. <!-- <view class="left_info">-->
  411. <!-- <view class="totalPrice">合计: ¥{{ total }}</view>-->
  412. <!-- <view class="discountPrice">已优惠: ¥{{ checkedGoodsAmount - total }}</view>-->
  413. <!-- </view>-->
  414. <!-- <view class="pay">提交订单</view>-->
  415. <!-- </view>-->
  416. <!-- </view>-->
  417. <!--</template>-->
  418. <!--<script>-->
  419. <!--import { mapState, mapMutations, mapGetters } from 'vuex'-->
  420. <!--export default {-->
  421. <!-- onLoad() {-->
  422. <!-- console.log('吾问无为谓啊')-->
  423. <!-- },-->
  424. <!-- data() {-->
  425. <!-- return {-->
  426. <!-- addressList: ['江西省上饶市', '南昌市青山湖区'],-->
  427. <!-- timeList: ['18:00', '18:30', '19:00', '19:30', '20:00'],-->
  428. <!-- shopTitle: '麦当劳',-->
  429. <!-- selectedAddress: '江西省上饶市',-->
  430. <!-- selectedTime: '18:00',-->
  431. <!-- ...mapState('m_cart', ['cart']), //cart:商品信息列表。每个{}包括{goods_id,goods_name,goods_price,goods_count,goods_small_logo,goods_state}信息-->
  432. <!-- PackingFee: 1.5,-->
  433. <!-- deliveryFee: 3-->
  434. <!-- }-->
  435. <!-- },-->
  436. <!-- methods: {-->
  437. <!-- ...mapGetters('m_cart', ['total', 'checkedGoodsAmount']), //total:计算数量,checkedGoodsAmount:计算总价-->
  438. <!-- changeAddress(e) {-->
  439. <!-- this.selectedAddress = this.addressList[e.detail.value]-->
  440. <!-- },-->
  441. <!-- changeTime(e) {-->
  442. <!-- this.selectedTime = this.timeList[e.detail.value]-->
  443. <!-- }-->
  444. <!-- }-->
  445. <!--}-->
  446. <!--</script>-->
  447. <!--<style lang="scss">-->
  448. <!--.container {-->
  449. <!-- padding: 20rpx;-->
  450. <!--}-->
  451. <!--.choose {-->
  452. <!-- display: flex;-->
  453. <!-- justify-content: space-between;-->
  454. <!-- background-color: #fff;-->
  455. <!-- padding: 20rpx;-->
  456. <!-- border-radius: 10rpx;-->
  457. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  458. <!-- .choose_address,-->
  459. <!-- .choose_time {-->
  460. <!-- flex: 1;-->
  461. <!-- .address-item,-->
  462. <!-- .time-item {-->
  463. <!-- display: flex;-->
  464. <!-- align-items: center;-->
  465. <!-- justify-content: space-between;-->
  466. <!-- font-size: 28rpx;-->
  467. <!-- color: #333;-->
  468. <!-- }-->
  469. <!-- }-->
  470. <!--}-->
  471. <!--.payInfo {-->
  472. <!-- margin-top: 20rpx;-->
  473. <!-- background-color: #fff;-->
  474. <!-- padding: 20rpx;-->
  475. <!-- border-radius: 10rpx;-->
  476. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  477. <!-- .shop_title {-->
  478. <!-- font-size: 32rpx;-->
  479. <!-- font-weight: bold;-->
  480. <!-- margin-bottom: 20rpx;-->
  481. <!-- }-->
  482. <!-- .orderList {-->
  483. <!-- .order-item {-->
  484. <!-- display: flex;-->
  485. <!-- align-items: center;-->
  486. <!-- margin-bottom: 20rpx;-->
  487. <!-- .goods-image {-->
  488. <!-- width: 120rpx;-->
  489. <!-- height: 120rpx;-->
  490. <!-- border-radius: 10rpx;-->
  491. <!-- margin-right: 20rpx;-->
  492. <!-- }-->
  493. <!-- .goods-info {-->
  494. <!-- flex: 1;-->
  495. <!-- .goods-name {-->
  496. <!-- font-size: 28rpx;-->
  497. <!-- color: #333;-->
  498. <!-- }-->
  499. <!-- .goods-price {-->
  500. <!-- font-size: 26rpx;-->
  501. <!-- color: #ff6600;-->
  502. <!-- margin-right: 10rpx;-->
  503. <!-- }-->
  504. <!-- .goods-count {-->
  505. <!-- font-size: 24rpx;-->
  506. <!-- color: #999;-->
  507. <!-- }-->
  508. <!-- }-->
  509. <!-- }-->
  510. <!-- }-->
  511. <!-- .tip {-->
  512. <!-- font-size: 24rpx;-->
  513. <!-- color: #999;-->
  514. <!-- margin: 20rpx 0;-->
  515. <!-- }-->
  516. <!-- .priceInfo {-->
  517. <!-- display: flex;-->
  518. <!-- justify-content: space-between;-->
  519. <!-- font-size: 26rpx;-->
  520. <!-- color: #333;-->
  521. <!-- view {-->
  522. <!-- display: flex;-->
  523. <!-- justify-content: space-between;-->
  524. <!-- margin-bottom: 10rpx;-->
  525. <!-- }-->
  526. <!-- }-->
  527. <!--}-->
  528. <!--.payBtn {-->
  529. <!-- display: flex;-->
  530. <!-- justify-content: space-between;-->
  531. <!-- align-items: center;-->
  532. <!-- margin-top: 20rpx;-->
  533. <!-- padding: 20rpx;-->
  534. <!-- background-color: #fff;-->
  535. <!-- border-radius: 10rpx;-->
  536. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  537. <!-- .left_info {-->
  538. <!-- .totalPrice {-->
  539. <!-- font-size: 32rpx;-->
  540. <!-- font-weight: bold;-->
  541. <!-- color: #ff6600;-->
  542. <!-- }-->
  543. <!-- .discountPrice {-->
  544. <!-- font-size: 24rpx;-->
  545. <!-- color: #999;-->
  546. <!-- }-->
  547. <!-- }-->
  548. <!-- .pay {-->
  549. <!-- background-color: #ff6600;-->
  550. <!-- color: #fff;-->
  551. <!-- font-size: 28rpx;-->
  552. <!-- padding: 10rpx 20rpx;-->
  553. <!-- border-radius: 30rpx;-->
  554. <!-- }-->
  555. <!--}-->
  556. <!--</style>-->
  557. <!--&lt;!&ndash;<template>&ndash;&gt;-->
  558. <!--&lt;!&ndash; <view>&ndash;&gt;-->
  559. <!--&lt;!&ndash; <view class="choose">&ndash;&gt;-->
  560. <!--&lt;!&ndash; <view class="choose_address"></view>&ndash;&gt;-->
  561. <!--&lt;!&ndash; <view class="choose_time"></view>&ndash;&gt;-->
  562. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  563. <!--&lt;!&ndash; <view class="payInfo">&ndash;&gt;-->
  564. <!--&lt;!&ndash; <view class="shop_title"></view>&ndash;&gt;-->
  565. <!--&lt;!&ndash; <view class="orderList">&ndash;&gt;-->
  566. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  567. <!--&lt;!&ndash; <view class="tip"></view>&ndash;&gt;-->
  568. <!--&lt;!&ndash; <view class="priceInfo">&ndash;&gt;-->
  569. <!--&lt;!&ndash; <view class="PackingFee"></view>&ndash;&gt;-->
  570. <!--&lt;!&ndash; <view class="deliveryFee"></view>&ndash;&gt;-->
  571. <!--&lt;!&ndash; <view class="disCount"></view>&ndash;&gt;-->
  572. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  573. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  574. <!--&lt;!&ndash; <view class="payBtn">&ndash;&gt;-->
  575. <!--&lt;!&ndash; <view class="left_info">&ndash;&gt;-->
  576. <!--&lt;!&ndash; <view class="totalPrice">合计...</view>&ndash;&gt;-->
  577. <!--&lt;!&ndash; <view class="discountPrice">已优惠...</view>&ndash;&gt;-->
  578. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  579. <!--&lt;!&ndash; <view class="pay">提交订单</view>&ndash;&gt;-->
  580. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  581. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  582. <!--&lt;!&ndash;</template>&ndash;&gt;-->
  583. <!--&lt;!&ndash;<script>&ndash;&gt;-->
  584. <!--&lt;!&ndash;import {mapState,mapMutations,mapGetters} from'vuex'&ndash;&gt;-->
  585. <!--&lt;!&ndash;export default {&ndash;&gt;-->
  586. <!--&lt;!&ndash; onLoad() {&ndash;&gt;-->
  587. <!--&lt;!&ndash; console.log('吾问无为谓啊')&ndash;&gt;-->
  588. <!--&lt;!&ndash; },&ndash;&gt;-->
  589. <!--&lt;!&ndash; data() {&ndash;&gt;-->
  590. <!--&lt;!&ndash; return {&ndash;&gt;-->
  591. <!--&lt;!&ndash; addressList:['江西省上饶市','南昌市青山湖区'],&ndash;&gt;-->
  592. <!--&lt;!&ndash; timeList:['18:00','18:30','19:00','19:30','20:00'],&ndash;&gt;-->
  593. <!--&lt;!&ndash; shopTitle:'麦当劳',&ndash;&gt;-->
  594. <!--&lt;!&ndash; ...mapState('m_cart',['cart']),//cart:商品信息列表。每个{}包括{goods_id,goods_name,goods_price,goods_count,goods_small_logo,goods_state}信息&ndash;&gt;-->
  595. <!--&lt;!&ndash; PackingFee:0,&ndash;&gt;-->
  596. <!--&lt;!&ndash; deliveryFee:0,&ndash;&gt;-->
  597. <!--&lt;!&ndash; };&ndash;&gt;-->
  598. <!--&lt;!&ndash; },&ndash;&gt;-->
  599. <!--&lt;!&ndash; methods: {&ndash;&gt;-->
  600. <!--&lt;!&ndash; ...mapGetters('m_cart', {'total':'total','checkedGoodsAmount':'checkedGoodsAmount'}),//total:计算数量,checkedGoodsAmount:计算总价&ndash;&gt;-->
  601. <!--&lt;!&ndash; },&ndash;&gt;-->
  602. <!--&lt;!&ndash;}&ndash;&gt;-->
  603. <!--&lt;!&ndash;</script>&ndash;&gt;-->
  604. <!--&lt;!&ndash;<style lang="scss">&ndash;&gt;-->
  605. <!--&lt;!&ndash;</style>&ndash;&gt;-->