WaterfallsFlowItem.vue 7.0 KB

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