WaterfallsFlowItem.vue 7.4 KB

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