耀实惠小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.2 KiB

  1. <template>
  2. <view class="receiving-item flex align-start m-b-20" :class="{ 'receiving-item--active': location.id === list.id }" @click="handleClick(list)">
  3. <view class="m-r-20"><image class="receiving-item-image" :src="list.shopPic" mode="aspectFill"></image></view>
  4. <view class="flex-1 overflow-hidden">
  5. <view class="m-b-30 font-28 text-black font-weight-bold text-ellipsis">{{list.shopName}}取货点</view>
  6. <view class="m-b-20 font-24 text-grey u-line-2">地址{{list.address}}</view>
  7. <view class="flex align-start justify-between">
  8. <view class="flex align-center">
  9. <view class="m-r-10" @click="makePhone(list.phone)">
  10. <u-icon name="phone-fill" color="#01aeea" size="28"></u-icon>
  11. <text class="text-grey font-24">找店热线</text>
  12. </view>
  13. <view>
  14. <u-icon name="map" color="##707070" size="28" />
  15. <text class="text-grey font-24">距您{{list.distance>1?list.distance+'km':list.distance*100+'m'}}</text>
  16. </view>
  17. </view>
  18. <!-- <com-view class="receiving-item-btn flex align-center justify-center text-white font-24" >进店</com-view> -->
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import { IMG_URL } from '@/env.js'
  25. export default {
  26. props: {
  27. active: {
  28. type: Boolean,
  29. default: false
  30. },
  31. list: {
  32. type: Object,
  33. default: () => {}
  34. },
  35. type: {
  36. type: String,
  37. default: ''
  38. },
  39. },
  40. data() {
  41. return {
  42. IMG_URL
  43. };
  44. },
  45. computed: {
  46. location () {
  47. return this.$store.state?.location || {}
  48. }
  49. },
  50. methods: {
  51. makePhone(phoneNumber) {
  52. uni.makePhoneCall({ phoneNumber })
  53. },
  54. handleClick (item) {
  55. let params = {
  56. name: item.shopName,
  57. id: item.id,
  58. shippingAddress: item.address,
  59. addressDetail: '',
  60. phone: item.phone,
  61. type: 'shop'
  62. }
  63. this.$store.commit('set_location', params)
  64. uni.navigateBack({
  65. delta: 1
  66. })
  67. }
  68. }
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. .receiving-item {
  73. padding: 16rpx 16rpx;
  74. background: #f5f5f5;
  75. border-radius: 16rpx;
  76. box-shadow: 0 6rpx 12rpx 0 rgba(0,0,0,0.16);
  77. &--active {
  78. background: #e0ffff;
  79. }
  80. &-image {
  81. width: 230rpx;
  82. height: 230rpx;
  83. border-radius: 16rpx;
  84. }
  85. &-btn {
  86. width: 120rpx;
  87. height: 66rpx;
  88. background-color: $u-type-primary;
  89. border-radius: 12rpx;
  90. }
  91. }
  92. </style>