payment.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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: [this.getCurOfSet(10), this.getCurOfSet(15), this.getCurOfSet(20), this.getCurOfSet(25), this.getCurOfSet(30)], // 获取当前时间取整数进制+10
  87. shopTitle: '麦当劳',
  88. selectedAddress: '',
  89. selectedTime: this.getCurOfSet(10),
  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. {id:this.cart[i].goods_id, // TODO productId
  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. getCurOfSet(offset){ //获取时间偏移
  224. // 获取当前时间
  225. var currentTime = new Date();
  226. // 获取小时和分钟
  227. var hours = currentTime.getHours();
  228. var minutes = currentTime.getMinutes();
  229. // 添加 10 分钟
  230. minutes = minutes + offset;
  231. if (minutes >= 60) {
  232. hours = hours + 1;
  233. minutes = minutes % 60;
  234. }
  235. // 调整小时,如果超过 24 小时,则回到 0
  236. hours = hours % 24;
  237. // 格式化小时和分钟为两位数
  238. hours = (hours < 10 ? "0" : "") + hours;
  239. minutes = (minutes < 10 ? "0" : "") + minutes;
  240. // 格式化结果
  241. var formattedTime = hours + ":" + minutes;
  242. // 输出结果
  243. return formattedTime
  244. }
  245. },
  246. filters: {
  247. toFixed(val) {
  248. return Number(val).toFixed(2)
  249. }
  250. }
  251. }
  252. </script>
  253. <style lang="scss">
  254. .container {
  255. padding: 20rpx;
  256. background-color: #f7f7f7;
  257. }
  258. .choose {
  259. display: flex;
  260. justify-content: space-between;
  261. background-color: #fff;
  262. //col
  263. flex-direction: column;
  264. padding: 20rpx;
  265. border-radius: 10rpx;
  266. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  267. .choose_address,
  268. .choose_time {
  269. flex: 1;
  270. .address-item,
  271. .time-item {
  272. display: flex;
  273. align-items: flex-start;
  274. justify-content: space-between;
  275. font-size: 35rpx;
  276. color: #333;
  277. }
  278. }
  279. }
  280. .payInfo {
  281. margin-top: 20rpx;
  282. background-color: #fff;
  283. padding: 20rpx;
  284. border-radius: 10rpx;
  285. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  286. .shop_title {
  287. font-size: 32rpx;
  288. font-weight: bold;
  289. margin-bottom: 20rpx;
  290. color: #ff6600;
  291. }
  292. .orderList {
  293. .order-item {
  294. display: flex;
  295. align-items: center;
  296. margin-bottom: 20rpx;
  297. .goods-image {
  298. width: 120rpx;
  299. height: 120rpx;
  300. border-radius: 10rpx;
  301. margin-right: 20rpx;
  302. }
  303. .goods-info {
  304. flex: 1;
  305. .goods-name {
  306. font-size: 28rpx;
  307. color: #333;
  308. }
  309. .goods-price {
  310. font-size: 26rpx;
  311. color: #ff6600;
  312. margin-right: 10rpx;
  313. }
  314. .goods-count {
  315. font-size: 24rpx;
  316. color: #999;
  317. }
  318. }
  319. }
  320. }
  321. .tip {
  322. font-size: 24rpx;
  323. color: #999;
  324. margin: 20rpx 0;
  325. }
  326. .priceInfo {
  327. display: flex;
  328. justify-content: space-between;
  329. font-size: 26rpx;
  330. color: #333;
  331. view {
  332. display: flex;
  333. justify-content: space-between;
  334. margin-bottom: 10rpx;
  335. }
  336. }
  337. }
  338. .payBtn {
  339. display: flex;
  340. justify-content: space-between;
  341. align-items: center;
  342. margin-top: 20rpx;
  343. padding: 20rpx;
  344. background-color: #fff;
  345. border-radius: 10rpx;
  346. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  347. .left_info {
  348. .totalPrice {
  349. font-size: 32rpx;
  350. font-weight: bold;
  351. color: #ff6600;
  352. }
  353. .discountPrice {
  354. font-size: 24rpx;
  355. color: #999;
  356. }
  357. }
  358. .pay {
  359. background-color: #ff6600;
  360. color: #fff;
  361. font-size: 28rpx;
  362. padding: 10rpx 20rpx;
  363. border-radius: 30rpx;
  364. }
  365. }
  366. /* 样式保持不变 */
  367. .choose_address {
  368. display: flex;
  369. justify-content: space-between;
  370. align-items: center;
  371. .add-address {
  372. display: flex;
  373. align-items: center;
  374. font-size: 26rpx;
  375. color: #ff6600;
  376. }
  377. }
  378. </style>
  379. <!--<template>-->
  380. <!-- <view class="container">-->
  381. <!-- <view class="choose">-->
  382. <!-- <view class="choose_address">-->
  383. <!-- <picker mode="selector" :range="addressList" @change="changeAddress">-->
  384. <!-- <view class="address-item">-->
  385. <!-- <text>收货地址</text>-->
  386. <!-- <text>{{ selectedAddress }}</text>-->
  387. <!-- <van-icon type="arrowright" size="16"></van-icon>-->
  388. <!-- </view>-->
  389. <!-- </picker>-->
  390. <!-- </view>-->
  391. <!-- <view class="choose_time">-->
  392. <!-- <picker mode="selector" :range="timeList" @change="changeTime">-->
  393. <!-- <view class="time-item">-->
  394. <!-- <text>预计送达时间</text>-->
  395. <!-- <text>{{ selectedTime }}</text>-->
  396. <!-- <van-icon type="arrowright" size="16"></van-icon>-->
  397. <!-- </view>-->
  398. <!-- </picker>-->
  399. <!-- </view>-->
  400. <!-- </view>-->
  401. <!-- <view class="payInfo">-->
  402. <!-- <view class="shop_title">{{ shopTitle }}</view>-->
  403. <!-- <view class="orderList">-->
  404. <!-- <view class="order-item" v-for="item in cart" :key="item.goods_id">-->
  405. <!-- <image class="goods-image" :src="item.goods_small_logo" mode="aspectFill"></image>-->
  406. <!-- <view class="goods-info">-->
  407. <!-- <text class="goods-name">{{ item.goods_name }}</text>-->
  408. <!-- <text class="goods-price">¥{{ item.goods_price }}</text>-->
  409. <!-- <text class="goods-count">x {{ item.goods_count }}</text>-->
  410. <!-- </view>-->
  411. <!-- </view>-->
  412. <!-- </view>-->
  413. <!-- <view class="tip">-->
  414. <!-- <text>温馨提示: 餐品已包装,请您尽快食用</text>-->
  415. <!-- </view>-->
  416. <!-- <view class="priceInfo">-->
  417. <!-- <view class="PackingFee">-->
  418. <!-- <text>餐盒费</text>-->
  419. <!-- <text>¥{{ PackingFee }}</text>-->
  420. <!-- </view>-->
  421. <!-- <view class="deliveryFee">-->
  422. <!-- <text>运费</text>-->
  423. <!-- <text>¥{{ deliveryFee }}</text>-->
  424. <!-- </view>-->
  425. <!-- <view class="disCount">-->
  426. <!-- <text>优惠券</text>-->
  427. <!-- <text>-¥0</text>-->
  428. <!-- </view>-->
  429. <!-- </view>-->
  430. <!-- </view>-->
  431. <!-- <view class="payBtn">-->
  432. <!-- <view class="left_info">-->
  433. <!-- <view class="totalPrice">合计: ¥{{ total }}</view>-->
  434. <!-- <view class="discountPrice">已优惠: ¥{{ checkedGoodsAmount - total }}</view>-->
  435. <!-- </view>-->
  436. <!-- <view class="pay">提交订单</view>-->
  437. <!-- </view>-->
  438. <!-- </view>-->
  439. <!--</template>-->
  440. <!--<script>-->
  441. <!--import { mapState, mapMutations, mapGetters } from 'vuex'-->
  442. <!--export default {-->
  443. <!-- onLoad() {-->
  444. <!-- console.log('吾问无为谓啊')-->
  445. <!-- },-->
  446. <!-- data() {-->
  447. <!-- return {-->
  448. <!-- addressList: ['江西省上饶市', '南昌市青山湖区'],-->
  449. <!-- timeList: ['18:00', '18:30', '19:00', '19:30', '20:00'],-->
  450. <!-- shopTitle: '麦当劳',-->
  451. <!-- selectedAddress: '江西省上饶市',-->
  452. <!-- selectedTime: '18:00',-->
  453. <!-- ...mapState('m_cart', ['cart']), //cart:商品信息列表。每个{}包括{goods_id,goods_name,goods_price,goods_count,goods_small_logo,goods_state}信息-->
  454. <!-- PackingFee: 1.5,-->
  455. <!-- deliveryFee: 3-->
  456. <!-- }-->
  457. <!-- },-->
  458. <!-- methods: {-->
  459. <!-- ...mapGetters('m_cart', ['total', 'checkedGoodsAmount']), //total:计算数量,checkedGoodsAmount:计算总价-->
  460. <!-- changeAddress(e) {-->
  461. <!-- this.selectedAddress = this.addressList[e.detail.value]-->
  462. <!-- },-->
  463. <!-- changeTime(e) {-->
  464. <!-- this.selectedTime = this.timeList[e.detail.value]-->
  465. <!-- }-->
  466. <!-- }-->
  467. <!--}-->
  468. <!--</script>-->
  469. <!--<style lang="scss">-->
  470. <!--.container {-->
  471. <!-- padding: 20rpx;-->
  472. <!--}-->
  473. <!--.choose {-->
  474. <!-- display: flex;-->
  475. <!-- justify-content: space-between;-->
  476. <!-- background-color: #fff;-->
  477. <!-- padding: 20rpx;-->
  478. <!-- border-radius: 10rpx;-->
  479. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  480. <!-- .choose_address,-->
  481. <!-- .choose_time {-->
  482. <!-- flex: 1;-->
  483. <!-- .address-item,-->
  484. <!-- .time-item {-->
  485. <!-- display: flex;-->
  486. <!-- align-items: center;-->
  487. <!-- justify-content: space-between;-->
  488. <!-- font-size: 28rpx;-->
  489. <!-- color: #333;-->
  490. <!-- }-->
  491. <!-- }-->
  492. <!--}-->
  493. <!--.payInfo {-->
  494. <!-- margin-top: 20rpx;-->
  495. <!-- background-color: #fff;-->
  496. <!-- padding: 20rpx;-->
  497. <!-- border-radius: 10rpx;-->
  498. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  499. <!-- .shop_title {-->
  500. <!-- font-size: 32rpx;-->
  501. <!-- font-weight: bold;-->
  502. <!-- margin-bottom: 20rpx;-->
  503. <!-- }-->
  504. <!-- .orderList {-->
  505. <!-- .order-item {-->
  506. <!-- display: flex;-->
  507. <!-- align-items: center;-->
  508. <!-- margin-bottom: 20rpx;-->
  509. <!-- .goods-image {-->
  510. <!-- width: 120rpx;-->
  511. <!-- height: 120rpx;-->
  512. <!-- border-radius: 10rpx;-->
  513. <!-- margin-right: 20rpx;-->
  514. <!-- }-->
  515. <!-- .goods-info {-->
  516. <!-- flex: 1;-->
  517. <!-- .goods-name {-->
  518. <!-- font-size: 28rpx;-->
  519. <!-- color: #333;-->
  520. <!-- }-->
  521. <!-- .goods-price {-->
  522. <!-- font-size: 26rpx;-->
  523. <!-- color: #ff6600;-->
  524. <!-- margin-right: 10rpx;-->
  525. <!-- }-->
  526. <!-- .goods-count {-->
  527. <!-- font-size: 24rpx;-->
  528. <!-- color: #999;-->
  529. <!-- }-->
  530. <!-- }-->
  531. <!-- }-->
  532. <!-- }-->
  533. <!-- .tip {-->
  534. <!-- font-size: 24rpx;-->
  535. <!-- color: #999;-->
  536. <!-- margin: 20rpx 0;-->
  537. <!-- }-->
  538. <!-- .priceInfo {-->
  539. <!-- display: flex;-->
  540. <!-- justify-content: space-between;-->
  541. <!-- font-size: 26rpx;-->
  542. <!-- color: #333;-->
  543. <!-- view {-->
  544. <!-- display: flex;-->
  545. <!-- justify-content: space-between;-->
  546. <!-- margin-bottom: 10rpx;-->
  547. <!-- }-->
  548. <!-- }-->
  549. <!--}-->
  550. <!--.payBtn {-->
  551. <!-- display: flex;-->
  552. <!-- justify-content: space-between;-->
  553. <!-- align-items: center;-->
  554. <!-- margin-top: 20rpx;-->
  555. <!-- padding: 20rpx;-->
  556. <!-- background-color: #fff;-->
  557. <!-- border-radius: 10rpx;-->
  558. <!-- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);-->
  559. <!-- .left_info {-->
  560. <!-- .totalPrice {-->
  561. <!-- font-size: 32rpx;-->
  562. <!-- font-weight: bold;-->
  563. <!-- color: #ff6600;-->
  564. <!-- }-->
  565. <!-- .discountPrice {-->
  566. <!-- font-size: 24rpx;-->
  567. <!-- color: #999;-->
  568. <!-- }-->
  569. <!-- }-->
  570. <!-- .pay {-->
  571. <!-- background-color: #ff6600;-->
  572. <!-- color: #fff;-->
  573. <!-- font-size: 28rpx;-->
  574. <!-- padding: 10rpx 20rpx;-->
  575. <!-- border-radius: 30rpx;-->
  576. <!-- }-->
  577. <!--}-->
  578. <!--</style>-->
  579. <!--&lt;!&ndash;<template>&ndash;&gt;-->
  580. <!--&lt;!&ndash; <view>&ndash;&gt;-->
  581. <!--&lt;!&ndash; <view class="choose">&ndash;&gt;-->
  582. <!--&lt;!&ndash; <view class="choose_address"></view>&ndash;&gt;-->
  583. <!--&lt;!&ndash; <view class="choose_time"></view>&ndash;&gt;-->
  584. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  585. <!--&lt;!&ndash; <view class="payInfo">&ndash;&gt;-->
  586. <!--&lt;!&ndash; <view class="shop_title"></view>&ndash;&gt;-->
  587. <!--&lt;!&ndash; <view class="orderList">&ndash;&gt;-->
  588. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  589. <!--&lt;!&ndash; <view class="tip"></view>&ndash;&gt;-->
  590. <!--&lt;!&ndash; <view class="priceInfo">&ndash;&gt;-->
  591. <!--&lt;!&ndash; <view class="PackingFee"></view>&ndash;&gt;-->
  592. <!--&lt;!&ndash; <view class="deliveryFee"></view>&ndash;&gt;-->
  593. <!--&lt;!&ndash; <view class="disCount"></view>&ndash;&gt;-->
  594. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  595. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  596. <!--&lt;!&ndash; <view class="payBtn">&ndash;&gt;-->
  597. <!--&lt;!&ndash; <view class="left_info">&ndash;&gt;-->
  598. <!--&lt;!&ndash; <view class="totalPrice">合计...</view>&ndash;&gt;-->
  599. <!--&lt;!&ndash; <view class="discountPrice">已优惠...</view>&ndash;&gt;-->
  600. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  601. <!--&lt;!&ndash; <view class="pay">提交订单</view>&ndash;&gt;-->
  602. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  603. <!--&lt;!&ndash; </view>&ndash;&gt;-->
  604. <!--&lt;!&ndash;</template>&ndash;&gt;-->
  605. <!--&lt;!&ndash;<script>&ndash;&gt;-->
  606. <!--&lt;!&ndash;import {mapState,mapMutations,mapGetters} from'vuex'&ndash;&gt;-->
  607. <!--&lt;!&ndash;export default {&ndash;&gt;-->
  608. <!--&lt;!&ndash; onLoad() {&ndash;&gt;-->
  609. <!--&lt;!&ndash; console.log('吾问无为谓啊')&ndash;&gt;-->
  610. <!--&lt;!&ndash; },&ndash;&gt;-->
  611. <!--&lt;!&ndash; data() {&ndash;&gt;-->
  612. <!--&lt;!&ndash; return {&ndash;&gt;-->
  613. <!--&lt;!&ndash; addressList:['江西省上饶市','南昌市青山湖区'],&ndash;&gt;-->
  614. <!--&lt;!&ndash; timeList:['18:00','18:30','19:00','19:30','20:00'],&ndash;&gt;-->
  615. <!--&lt;!&ndash; shopTitle:'麦当劳',&ndash;&gt;-->
  616. <!--&lt;!&ndash; ...mapState('m_cart',['cart']),//cart:商品信息列表。每个{}包括{goods_id,goods_name,goods_price,goods_count,goods_small_logo,goods_state}信息&ndash;&gt;-->
  617. <!--&lt;!&ndash; PackingFee:0,&ndash;&gt;-->
  618. <!--&lt;!&ndash; deliveryFee:0,&ndash;&gt;-->
  619. <!--&lt;!&ndash; };&ndash;&gt;-->
  620. <!--&lt;!&ndash; },&ndash;&gt;-->
  621. <!--&lt;!&ndash; methods: {&ndash;&gt;-->
  622. <!--&lt;!&ndash; ...mapGetters('m_cart', {'total':'total','checkedGoodsAmount':'checkedGoodsAmount'}),//total:计算数量,checkedGoodsAmount:计算总价&ndash;&gt;-->
  623. <!--&lt;!&ndash; },&ndash;&gt;-->
  624. <!--&lt;!&ndash;}&ndash;&gt;-->
  625. <!--&lt;!&ndash;</script>&ndash;&gt;-->
  626. <!--&lt;!&ndash;<style lang="scss">&ndash;&gt;-->
  627. <!--&lt;!&ndash;</style>&ndash;&gt;-->