BrandShop.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view
  3. v-if="brandInfo" class="brand-shop-container"
  4. @click="go(`/another-tf/another-user/shop/shop-detail?shopId=${brandInfo.shopId}`)"
  5. >
  6. <view class="brand-logo-container">
  7. <tui-lazyload-img
  8. :src="common.seamingImgUrl(brandInfo.shopLogo) || 'https://zhult-com.oss-cn-beijing.aliyuncs.com/commodity/4cf6ad189ac84546a55f5dcb73c88e87.jpg'"
  9. ></tui-lazyload-img>
  10. </view>
  11. <view class="brand-info">
  12. <view class="brand-title-wrapper">
  13. <image v-if="showLogo" class="icon" src="../../../static/images/new-community/home/tag.png"></image>
  14. <view class="name">{{ brandInfo.shopName || brandInfo.chargePersonName }}</view>
  15. </view>
  16. <view v-if="bottomType === 'detail'" class="brand-detail">
  17. <!-- <view class="detail-msg">{{ brandInfo.elegantDemeanour || '--' }}</view> -->
  18. <view class="rate-wrapper">
  19. <view>
  20. <tui-rate :size="12" active="#EF530E" :current="brandInfo.score || 5"></tui-rate>
  21. <text class="rate-count">{{ brandInfo.score || 5 }}</text>
  22. </view>
  23. <!-- <text class="receive-order">接单率:{{ brandInfo.acceptanceRate * 100 }}%</text> -->
  24. <text v-if="brandInfo.monthlySales" class="receive-order">月售{{ brandInfo.monthlySales }}</text>
  25. </view>
  26. </view>
  27. <view v-if="bottomType === 'brief'" class="brand-brief">
  28. <view v-if="brandInfo.shopBrief" class="brief-line brief-top">
  29. {{ brandInfo.shopBrief }}
  30. </view>
  31. <view v-if="brandInfo.authenType || brandInfo.checkState || brandInfo.authenticationState" class="brief-line brief-bottom">
  32. <text v-if="brandInfo.authenType" class="item">
  33. <template v-if="brandInfo.authenType === 1">个人</template>
  34. <template v-else-if="brandInfo.authenType === 2">个体工商户</template>
  35. <template v-else-if="brandInfo.authenType === 3">企业</template>
  36. <template v-else-if="brandInfo.authenType === 4">其它组织</template>
  37. <template v-else>特殊角色</template>
  38. </text>
  39. <text v-if="brandInfo.checkState" class="item">
  40. 已入驻
  41. </text>
  42. <text v-if="brandInfo.authenticationState" class="item">
  43. 已签约
  44. </text>
  45. </view>
  46. </view>
  47. <view style="display: flex;flex-wrap: wrap;padding: 4upx 0;">
  48. <view
  49. style="width: fit-content;margin-top: 8upx;margin-right: 8upx;padding: 2upx 6upx;border: 1upx solid rgba(226, 71, 71, 0.5);border-radius: 12upx;font-size: 24upx;color: #E24747;"
  50. >
  51. 补贴代金券{{ brandInfo.voucherReturn ? brandInfo.voucherReturn : 0 }}%
  52. </view>
  53. <view
  54. v-if="brandInfo.isVoucher"
  55. style="width: fit-content;margin-top: 8upx;padding: 2upx 6upx;border: 1upx solid rgba(226, 71, 71, 0.5);border-radius: 12upx;font-size: 24upx;color: #E24747;"
  56. >
  57. 支持代金券
  58. </view>
  59. </view>
  60. <view v-if="bottomType === 'detail'" class="brand-detail">
  61. <view class="other-info">
  62. <view v-if="brandInfo.distance" class="item">
  63. <image class="icon" src="../../../static/images/new-business/home/location.png"></image>
  64. <text>{{ brandInfo.distance || 0 }}km</text>
  65. </view>
  66. <view class="item">
  67. <image style="width: 44upx" class="icon" src="../../../static/images/new-business/home/views.png"></image>
  68. <text style="color: #888889">{{ brandInfo.fansNumber || 0 }}</text>
  69. </view>
  70. </view>
  71. </view>
  72. <view v-if="showPrice" style="margin-top: 16upx;">
  73. <text style="color: #E02208;">
  74. <text style="font-size: 28upx;">¥</text>
  75. <text style="font-size: 38upx;font-weight: bold;">99.99</text>
  76. </text>
  77. <text style="color: #979797;">
  78. <text style="font-size: 26upx;">起</text>
  79. <text style="margin-left: 10upx;font-size: 24upx;text-decoration: line-through;">¥199.44</text>
  80. </text>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. name: 'BrandShop',
  88. props: {
  89. brandInfo: {
  90. type: Object,
  91. required: true
  92. },
  93. showLogo: {
  94. type: Boolean,
  95. default: true
  96. },
  97. bottomType: {
  98. type: String,
  99. default: 'detail'
  100. },
  101. showPrice: {
  102. type: Boolean,
  103. default: false
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="less" scoped>
  109. /deep/ .tui-lazyload__box {
  110. position: relative;
  111. width: 100% !important;
  112. height: auto !important;
  113. border-radius: 20upx !important;
  114. overflow: hidden;
  115. z-index: 10;
  116. }
  117. .brand-shop-container {
  118. background-color: #fff;
  119. border-radius: 20upx;
  120. margin-bottom: 20upx;
  121. .brand-logo-container {
  122. position: relative;
  123. &::after {
  124. content: '';
  125. display: block;
  126. position: absolute;
  127. bottom: -20upx;
  128. left: 50%;
  129. transform: translateX(-50%);
  130. height: 251upx;
  131. background: url('../../../static/images/new-business/home/diu.png') no-repeat;
  132. background-size: cover;
  133. z-index: -1;
  134. }
  135. }
  136. .brand-info {
  137. width: 100%;
  138. padding: 16upx 14upx 18upx;
  139. box-sizing: border-box;
  140. .brand-title-wrapper {
  141. display: flex;
  142. align-items: center;
  143. .icon {
  144. width: 32upx;
  145. height: 32upx;
  146. }
  147. .name {
  148. flex: 1;
  149. width: 0;
  150. margin-left: 10upx;
  151. font-size: 28upx;
  152. color: #222229;
  153. white-space: nowrap;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. }
  157. }
  158. .brand-detail {
  159. .rate-wrapper {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. font-size: 24upx;
  164. color: #EF530E;
  165. margin: 12upx 0 0;
  166. .receive-order {
  167. font-size: 24upx;
  168. color: #888889;
  169. margin-left: 16upx;
  170. white-space: nowrap;
  171. }
  172. }
  173. .detail-msg {
  174. font-size: 24upx;
  175. color: #9E9E9E;
  176. overflow: hidden;
  177. white-space: nowrap;
  178. text-overflow: ellipsis;
  179. }
  180. .other-info {
  181. display: flex;
  182. align-items: center;
  183. justify-content: space-between;
  184. margin: 12upx 0;
  185. .item {
  186. display: flex;
  187. align-items: center;
  188. color: #EF530E;
  189. font-size: 24upx;
  190. .icon {
  191. width: 24upx;
  192. height: 24upx;
  193. flex-shrink: 0;
  194. margin-right: 4upx;
  195. }
  196. }
  197. }
  198. }
  199. .brand-brief {
  200. .brief-line {
  201. padding-top: 18upx;
  202. overflow: hidden;
  203. white-space: nowrap;
  204. text-overflow: ellipsis;
  205. }
  206. .brief-top {
  207. font-size: 24upx;
  208. color: #9E9E9E;
  209. }
  210. .brief-bottom {
  211. overflow: hidden;
  212. white-space: nowrap;
  213. text-overflow: ellipsis;
  214. .item {
  215. color: #9E9E9E;
  216. margin-right: 10upx;
  217. padding: 4upx 18upx;
  218. font-size: 24upx;
  219. background-color: #f7f7f7;
  220. }
  221. }
  222. }
  223. }
  224. }
  225. </style>