WaterfallsFlowItem.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class='list acea-row row-between-wrapper' :data-theme="theme">
  3. <view class='item' hover-class='none' @click="goDetail(item)">
  4. <view :class="isDynamics ? 'pictruesss' : 'pictrue'">
  5. <view v-show="item.stock===0" class="sellOut">已售罄</view>
  6. <easy-loadimage :image-src="!userFair ? item.image : item.cover" mode="widthFix"></easy-loadimage>
  7. <view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }" class="border-picture"></view>
  8. </view>
  9. <view class='texts'>
  10. <view class='names box-line2'>
  11. <text v-if="item.productTags && item.productTags.locationLeftTitle.length" class="font-bg-red mr10 bg-color merType">{{item.productTags.locationLeftTitle[0].tagName}}</text>
  12. {{!userFair ? item.name : item.content}}
  13. </view>
  14. <view class='money mt-10'>
  15. <svip-price :svipIconStyle="svipIconStyle" :productPrice="item" :svipPriceStyle="svipPriceStyle"></svip-price>
  16. <view v-if="item.productTags && item.productTags.locationUnderTitle.length">
  17. <text v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
  18. :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
  19. </view>
  20. <view class="sold mt-8" v-if="!userFair">已售 {{ item.sales }} {{item.unitName}}
  21. </view>
  22. </view>
  23. <view class="company mt-4" v-if="item.merName" @click.stop="goStore(item.merId)">
  24. <text class='name line1'>{{item.merName}}</text>
  25. <view class="flex">
  26. 进店
  27. <text class="iconfont icon-xiangyou"></text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. // +----------------------------------------------------------------------
  36. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  37. // +----------------------------------------------------------------------
  38. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  39. // +----------------------------------------------------------------------
  40. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  41. // +----------------------------------------------------------------------
  42. // | Author: CRMEB Team <admin@crmeb.com>
  43. // +----------------------------------------------------------------------
  44. import {
  45. goProductDetail
  46. } from '@/libs/order.js'
  47. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  48. import svipPrice from '@/components/svipPrice.vue';
  49. let app = getApp();
  50. export default {
  51. components: {
  52. easyLoadimage,
  53. svipPrice
  54. },
  55. props: {
  56. item: {
  57. type: Object,
  58. require: true
  59. },
  60. type: {
  61. type: Number,
  62. default: 0
  63. },
  64. isStore: {
  65. type: [String, Number],
  66. default: '1'
  67. },
  68. isLogin: {
  69. type: Boolean,
  70. require: false
  71. },
  72. isDynamics: {
  73. type: Boolean,
  74. default: false
  75. },
  76. userFair: {
  77. type: Boolean,
  78. default: false
  79. }
  80. },
  81. data() {
  82. return {
  83. theme: app.globalData.theme,
  84. //普通价格
  85. svipPriceStyle: {
  86. svipBox: {
  87. height: '26rpx',
  88. borderRadius: '60rpx 56rpx 56rpx 20rpx',
  89. },
  90. icon: {
  91. height: '26rpx',
  92. fontSize: '18rpx',
  93. borderRadius: '12rpx 0 12rpx 2rpx'
  94. },
  95. price: {
  96. fontSize: '38rpx'
  97. },
  98. svipPrice: {
  99. fontSize: '22rpx'
  100. }
  101. },
  102. //svip价格
  103. svipIconStyle: {
  104. svipBox: {
  105. height: '26rpx',
  106. borderRadius: '24rpx 40rpx 40rpx 0.4rpx',
  107. },
  108. price: {
  109. fontSize: '38rpx'
  110. },
  111. svipPrice: {
  112. fontSize: '18rpx'
  113. }
  114. }
  115. }
  116. },
  117. methods: {
  118. // 去详情页
  119. goDetail(item) {
  120. goProductDetail(item.id, 0, '', this.userFair ? JSON.stringify(item) : null);
  121. },
  122. goStore(id) {
  123. uni.navigateTo({
  124. url: `/pages/merchant/home/index?merId=${id}`
  125. })
  126. },
  127. authOpen() {
  128. this.$emit('authOpen');
  129. },
  130. followToggle(item) {
  131. this.$emit('followToggle', item);
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss" scoped>
  137. .tagSolid {
  138. margin-bottom: 4rpx;
  139. }
  140. .merType {
  141. @include main_bg_color(theme);
  142. }
  143. .list {
  144. .item {
  145. width: 100%;
  146. .pictrue {
  147. /deep/image,
  148. /deep/.easy-loadimage,
  149. uni-image {
  150. width: 100%;
  151. height: 100%;
  152. border-radius: 20rpx 20rpx 0 0;
  153. overflow: hidden;
  154. }
  155. }
  156. }
  157. .texts {
  158. padding: 16rpx;
  159. font-size: 30rpx;
  160. color: #222;
  161. background-color: #fff;
  162. border-radius: 0 0 16rpx 16rpx;
  163. .names {
  164. font-size: 28rpx;
  165. font-weight: 400;
  166. color: #333333;
  167. }
  168. .money {
  169. .num {
  170. font-size: 38rpx;
  171. font-weight: 900;
  172. @include price_color(theme);
  173. }
  174. .y-money {
  175. font-size: 26rpx;
  176. color: #888888;
  177. text-decoration: line-through;
  178. margin-left: 14rpx;
  179. }
  180. }
  181. }
  182. }
  183. .company {
  184. display: flex;
  185. align-items: center;
  186. font-size: 26rpx;
  187. .name {
  188. width: 210rpx;
  189. display: inline-block;
  190. color: #666 !important;
  191. height: auto !important;
  192. overflow: hidden;
  193. white-space: nowrap;
  194. text-overflow: ellipsis;
  195. margin-bottom: 0 !important;
  196. margin-right: 10rpx;
  197. }
  198. .flex {
  199. display: flex;
  200. align-items: center;
  201. color: #282828 !important;
  202. .iconfont {
  203. font-size: 16rpx;
  204. margin-top: 4rpx;
  205. }
  206. }
  207. }
  208. .sold {
  209. font-size: 22rpx;
  210. color: #666;
  211. margin-bottom: 4rpx;
  212. }
  213. .m-l-8 {
  214. margin-left: 8rpx;
  215. }
  216. .list .item .pictrue,
  217. .easy-loadimage,
  218. image,
  219. uni-image {
  220. position: relative;
  221. width: 100%;
  222. height: 330rpx;
  223. border-radius: 16rpx 16rpx 0 0;
  224. overflow: hidden;
  225. /deep/.easy-loadimage,
  226. uni-image,
  227. image {
  228. height: 330rpx;
  229. border-radius: 16rpx 16rpx 0 0;
  230. }
  231. margin: 0 !important;
  232. }
  233. .box-line2 {
  234. overflow: hidden;
  235. height: 80rpx;
  236. line-height: 40rpx;
  237. }
  238. .pictruesss {
  239. max-height: 580rpx;
  240. overflow-y: hidden;
  241. border-radius: 16rpx;
  242. position: relative;
  243. }
  244. </style>