WaterfallsFlowItem.vue 7.2 KB

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