info.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="shop-info-box box-border-box">
  3. <view class="box-card box-border-box p-24 bgc-f mb-20">
  4. <view class="fs-32 fw-500 mb-32">商家信息</view>
  5. <view class="mb-40 align-items-center">
  6. <image src="@/static/img/takeout/info-address.png" mode=""></image>
  7. <view class="fs-28 fw-400">{{shopInfoData.city_name}}{{shopInfoData.shop_name}}</view>
  8. </view>
  9. <view class="mb-40 align-items-center">
  10. <image src="@/static/img/takeout/info-class.png" mode=""></image>
  11. <view class="fs-28 fw-400">门店类目:{{shopInfoData.cate_name}}</view>
  12. </view>
  13. <view class="mb-40 align-items-center">
  14. <image src="@/static/img/takeout/info-time.png" mode=""></image>
  15. <view class="fs-28 fw-400">营业时间:{{timeData}}</view>
  16. </view>
  17. <view class="mb-40 align-items-center">
  18. <image src="@/static/img/takeout/info-phone.png" mode=""></image>
  19. <view class="fs-28 fw-400">联系电话:{{shopInfoData.shop_phone}} </view>
  20. </view>
  21. <view class="right-img-f align-items-center">
  22. <image src="@/static/img/takeout/info-zz.png" mode=""></image>
  23. <view class="fs-28 fw-400">查看营业资质 </view>
  24. <image @click="to()" class="right-img" src="@/static/img/toRight.png" mode=""></image>
  25. </view>
  26. </view>
  27. <view class="box-card box-border-box p-24 bgc-f mb-20">
  28. <view class="fs-32 fw-500 mb-32">商家公告</view>
  29. <view class="display-flex">
  30. <image class="flex-shrink0" src="@/static/img/takeout/info-gg.png" mode=""></image>
  31. <view class="fs-28 fw-400">{{shopInfoData.notice}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. shopInfo
  39. } from "@/api/shop.js"
  40. export default {
  41. props: {
  42. shopId: {}
  43. },
  44. data() {
  45. return {
  46. shopInfoData: {},
  47. timeData: '',
  48. array: ''
  49. }
  50. },
  51. onShow() {
  52. },
  53. mounted() {
  54. this.shopInfo()
  55. },
  56. methods: {
  57. to() {
  58. uni.navigateTo({
  59. url: '/pages-takeout/aptitude'
  60. })
  61. },
  62. shopInfo() {
  63. const operate_id = uni.getStorageSync('operate_id')
  64. shopInfo({
  65. shop_id: this.shopId,
  66. operate_id: operate_id
  67. }).then((res) => {
  68. if (res.code == 1) {
  69. this.shopInfoData = res.data
  70. res.data.business_hours.forEach((v, k) => {
  71. // let time =
  72. v.forEach((i, j) => {
  73. let time = ''
  74. if (j == 0 || j == 3) {
  75. time = i + '-'
  76. } else {
  77. time = i
  78. }
  79. this.array = this.array + time
  80. })
  81. if (res.data.business_hours.length === k + 1) {
  82. this.timeData = this.timeData + this.array
  83. } else {
  84. this.timeData = this.timeData + this.array + ','
  85. }
  86. this.array = ''
  87. })
  88. }
  89. })
  90. }
  91. },
  92. }
  93. </script>
  94. <style scoped lang="scss">
  95. .shop-info-box {
  96. height: 100%;
  97. overflow: scroll;
  98. background-color: #F5F4F9;
  99. padding: 16rpx 24rpx;
  100. .box-card {
  101. width: 100%;
  102. min-height: 10rpx;
  103. border-radius: 20rpx;
  104. image {
  105. width: 40rpx;
  106. height: 40rpx;
  107. margin-right: 16rpx;
  108. }
  109. .right-img-f {
  110. position: relative;
  111. .right-img {
  112. position: absolute;
  113. top: 10rpx;
  114. right: -10rpx;
  115. width: 32rpx;
  116. height: 32rpx;
  117. }
  118. }
  119. }
  120. }
  121. </style>