WaterfallsFlowItem.vue 7.3 KB

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