WaterfallsFlowItem.vue 5.4 KB

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