group-pay.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view class="flex-common-css iPhone-bottom box-border-box">
  3. <Nav title='提交订单' bgckgroundBox='transparent'></Nav>
  4. <scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
  5. <view class="p-24 box-border-box bgc-f b-rad-20 mb-20">
  6. <view class="align-items-flex-start">
  7. <image :src="goods_info.cover_img" mode="aspectFit" class="goods-img mr-12"></image>
  8. <view class="">
  9. <view class="fs-32 w-150">
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </scroll-view>
  15. <view class="but-box align-items-center flex-justify-space bgc-f p-24 box-border-box">
  16. <view class="">
  17. <view class="fs-34 fw-600 fc-41ABF5">
  18. <span class="fs-24 fc-41ABF5 fw-400 mr-12">合计</span><span class="fs-20 fw-600 fc-41ABF5">¥</span>{{goods_info.price}}
  19. </view>
  20. <view class="fc-9">
  21. <span class="mr-12">共{{fromData.number}}件</span>已优惠¥{{Number(goods_info.line_price) - Number(goods_info.price)}}
  22. </view>
  23. </view>
  24. <view class="but bgc-41ABF5 fc-f b-rad-200 text-align-center fs-34">
  25. 提交订单
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import {
  32. groupInfo
  33. } from '@/api/group.js'
  34. export default {
  35. components: {},
  36. data() {
  37. return {
  38. fromData: {
  39. id: 0,
  40. shop_id: 0,
  41. number: 1
  42. },
  43. goods_info: {}
  44. };
  45. },
  46. onLoad(data) {
  47. console.log(data);
  48. if(data) {
  49. this.fromData.id = data.goods_id
  50. this.fromData.shop_id = data.shop_id
  51. this.groupInfo()
  52. }
  53. },
  54. mounted() {},
  55. methods: {
  56. scrolltolower() {
  57. console.log('触底');
  58. },
  59. groupInfo() {
  60. groupInfo({id: this.fromData.id,shop_id: this.fromData.shop_id}).then((res) => {
  61. if(res.code === 1) {
  62. this.goods_info = res.data
  63. }
  64. })
  65. },
  66. },
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .goods-img{
  71. width: 80rpx;
  72. height: 80rpx;
  73. border-radius: 20rpx;
  74. }
  75. .but{
  76. width: 40%;
  77. height: 80rpx;
  78. line-height: 80rpx;
  79. }
  80. </style>