shopDetail.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <u-navbar title="店铺详情" @leftClick="leftClick" height="44px" bgColor="rgb(255,255,255,0)" :placeholder="true">
  5. </u-navbar>
  6. </view>
  7. <view class="box">
  8. <view class="box_top hflex acenter">
  9. <image :src="shop.headimg" mode="aspectFill" class="avatar"></image>
  10. <view class="top_name">{{shop.name}}</view>
  11. </view>
  12. <view class="addr hflex acenter jbetween">
  13. <view class="addr_text text_hide">{{shop.address}}</view>
  14. <image src="/static/images/shop/map_icon.png" class="addr_icon"></image>
  15. </view>
  16. <view class="text_style1">商家简介</view>
  17. <view class="text_style2">{{shop.intro}}</view>
  18. </view>
  19. <view class="box1">
  20. <view class="text_style1">图片及视频</view>
  21. <view class="hflex acenter fwrap">
  22. <block v-for="(item,index) in shop.imgs_videos" :key="index">
  23. <image :src="item" mode="aspectFill" class="box1_img"></image>
  24. </block>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import $api from '@/static/js/api.js'
  31. var that = ''
  32. export default {
  33. data() {
  34. return {
  35. shop: {
  36. },
  37. admin_id: '',
  38. }
  39. },
  40. onLoad(options) {
  41. that = this
  42. that.admin_id = options.admin_id
  43. that.getData()
  44. },
  45. methods: {
  46. // 返回
  47. leftClick() {
  48. console.log('返回');
  49. $api.jump(-1)
  50. },
  51. getData() {
  52. $api.req({
  53. url: '/data/api.Goods/user_info',
  54. method: 'POST',
  55. data: {
  56. admin_id: that.admin_id
  57. }
  58. }, function(res) {
  59. if(res.code == 1) {
  60. that.shop = res.data
  61. }
  62. })
  63. }
  64. },
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .content {
  69. background: #F4F4F4;
  70. position: relative;
  71. .top {
  72. background: url('https://ship.shipcc.cn/common/nav_bg.png') no-repeat;
  73. background-size: 100%;
  74. box-sizing: border-box;
  75. padding: 30rpx;
  76. height: 248rpx;
  77. .u-nav-slot {
  78. position: absolute;
  79. top: 8rpx;
  80. left: 134rpx;
  81. }
  82. }
  83. .box {
  84. // position: absolute;
  85. // left: 0;
  86. // top: 240rpx;
  87. width: 100%;
  88. background: #FFFFFF;
  89. box-sizing: border-box;
  90. padding: 30rpx;
  91. border-radius: 40rpx 40rpx 0 0;
  92. .box_top {
  93. position: relative;
  94. .avatar {
  95. position: absolute;
  96. left: 0;
  97. top: -52rpx;
  98. width: 148rpx;
  99. height: 148rpx;
  100. border-radius: 50%;
  101. border: 4rpx solid #FFFFFF;
  102. }
  103. .top_name {
  104. font-size: 40rpx;
  105. font-weight: 500;
  106. color: #222222;
  107. line-height: 56rpx;
  108. padding: 20rpx 0 0 200rpx;
  109. }
  110. }
  111. .addr {
  112. padding: 44rpx 0 28rpx;
  113. box-sizing: border-box;
  114. border-bottom: 1rpx solid #F4F4F4;
  115. width: 100%;
  116. .addr_text {
  117. width: 650rpx;
  118. font-size: 26rpx;
  119. font-weight: 400;
  120. color: #222222;
  121. line-height: 36rpx ;
  122. }
  123. .addr_icon {
  124. width: 36rpx;
  125. height: 36rpx;
  126. }
  127. }
  128. }
  129. .text_style1 {
  130. font-size: 32rpx;
  131. font-weight: 500;
  132. color: #222222;
  133. padding: 24rpx 0 20rpx;
  134. }
  135. .text_style2 {
  136. font-size: 26rpx;
  137. font-weight: 400;
  138. color: #222222;
  139. line-height: 36rpx;
  140. }
  141. .box1 {
  142. margin: 20rpx 0;
  143. width: 100%;
  144. box-sizing: border-box;
  145. padding: 24rpx 30rpx;
  146. background: #FFFFFF;
  147. .box1_img {
  148. width: 220rpx;
  149. height: 220rpx;
  150. border-radius: 20rpx;
  151. margin: 0 16rpx 20rpx 0;
  152. }
  153. .box1_img:nth-child(3n+3) {
  154. margin: 0 0 20rpx;
  155. }
  156. }
  157. }
  158. </style>