WaterfallsFlowItem.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <view v-if="type == 0" class="wf-item-page wf-page0" :style="viewColor">
  3. <view class='pictrue'>
  4. <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
  5. <view v-if="item.stock == 0" class="sell_out">已售罄</view>
  6. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  7. </view>
  8. <view class="text">
  9. <view class='name line2'>{{item.store_name}}</view>
  10. <view class="acea-row row-middle">
  11. <view class='money'>¥<text class='num'>{{item.price}}</text></view>
  12. </view>
  13. <view v-if="item.show_svip_info && item.show_svip_info.show_svip_price && item.svip_price" class="acea-row row-middle svip">
  14. <text class='vip-money'>¥{{item.svip_price}}</text>
  15. <view class="vipImg">
  16. <image :src="`${domain}/static/images/svip.png`"></image>
  17. </view>
  18. </view>
  19. <view class="item_tags">
  20. <text v-if="item.product_type == 0 && item.merchant.type_name" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
  21. <text v-else-if="item.product_type == 0 && item.merchant.is_trader" class="font-bg-red b-color">自营</text>
  22. <text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
  23. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  24. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view v-else-if="type == 1" class="wf-page1" :style="viewColor">
  29. <view class='pictrue'>
  30. <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
  31. <view v-if="item.stock == 0" class="sell_out">已售罄</view>
  32. <view v-if="item.border_pic" :style="{ backgroundImage: `url(${item.border_pic})` }" class="border-picture"></view>
  33. </view>
  34. <view class='text'>
  35. <view class='name line2'>{{item.store_name}}</view>
  36. <view class='money'>
  37. ¥<text class='num'>{{item.price}}</text>
  38. </view>
  39. <view v-if="item.show_svip_info&&item.show_svip_info.show_svip && item.show_svip_info.show_svip_price" class="acea-row row-middle svip">
  40. <text class='vip-money'>¥{{item.svip_price}}</text>
  41. <view class="vipImg">
  42. <image :src="`${domain}/static/images/svip.png`"></image>
  43. </view>
  44. </view>
  45. <view class="item_tags acea-row">
  46. <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
  47. <text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red b-color">自营</text>
  48. <text v-if="item.product_type != 0" :class="'font_bg-red type'+item.product_type">{{item.product_type == 1 ? "秒杀" : item.product_type == 2 ? "预售" : item.product_type == 3 ? "助力" : item.product_type == 4 ? "拼团" : ""}}</text>
  49. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  50. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  51. </view>
  52. <view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
  53. <view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
  54. <text class="line1">{{item.merchant.mer_name}}</text>
  55. <view class="flex" v-if="isStore != '1'">
  56. 进店
  57. <text class="iconfont icon-xiangyou"></text>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 返佣 -->
  62. <block v-if="item.max_extension>0 && (item.product_type == 0 || item.product_type == 2)">
  63. <view class="foot-bar">
  64. <text class="iconfont icon-fenxiang"></text>
  65. 最高赚 ¥{{item.max_extension}}
  66. </view>
  67. </block>
  68. </view>
  69. </template>
  70. <script>
  71. // +----------------------------------------------------------------------
  72. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  73. // +----------------------------------------------------------------------
  74. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  75. // +----------------------------------------------------------------------
  76. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  77. // +----------------------------------------------------------------------
  78. // | Author: CRMEB Team <admin@crmeb.com>
  79. // +----------------------------------------------------------------------
  80. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
  81. import {mapGetters} from "vuex";
  82. import { HTTP_REQUEST_URL } from '@/config/app';
  83. export default {
  84. components:{easyLoadimage},
  85. computed: mapGetters(['viewColor']),
  86. props: {
  87. item: {
  88. type: Object,
  89. require: true
  90. },
  91. type: {
  92. type: Number,
  93. default: 0
  94. },
  95. isStore: {
  96. type: [String, Number],
  97. default: '1'
  98. },
  99. isLogin: {
  100. type: Boolean,
  101. require: false
  102. }
  103. },
  104. data(){
  105. return {
  106. domain: HTTP_REQUEST_URL,
  107. }
  108. },
  109. methods: {
  110. goShop(id) {
  111. this.$emit('goShop', id);
  112. },
  113. authOpen(){
  114. this.$emit('authOpen');
  115. },
  116. followToggle(item){
  117. this.$emit('followToggle', item);
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .wf-item-page {
  124. background: #fff;
  125. overflow: hidden;
  126. border-radius: 16rpx;
  127. padding-bottom: 20rpx;
  128. }
  129. .wf-page0 .coupon{
  130. background:rgba(255,248,247,1);
  131. border:1px solid rgba(233,51,35,1);
  132. border-radius:4rpx;
  133. font-size:20rpx;
  134. margin-left: 18rpx;
  135. padding: 1rpx 4rpx;
  136. }
  137. .wf-page0 .pictrue{
  138. width: 100%!important;
  139. height: 345rpx;
  140. position: relative;
  141. /deep/image,/deep/.easy-loadimage,uni-image{
  142. height: 345rpx;
  143. border-radius: 16rpx 16rpx 0 0;
  144. }
  145. .border-picture {
  146. position: absolute;
  147. top: 0;
  148. left: 0;
  149. width: 100%;
  150. height: 100%;
  151. border-radius: 16rpx 16rpx 0 0;
  152. background: center/cover no-repeat;
  153. }
  154. }
  155. .loadfail-img{
  156. width: 100%;
  157. height: 360rpx;
  158. }
  159. .svip{
  160. margin: 5rpx 0 15rpx;
  161. }
  162. .vip-money {
  163. color: #282828;
  164. font-size: 22rpx;
  165. margin-left: 6rpx;
  166. font-weight: bold;
  167. }
  168. .vipImg {
  169. width: 65rpx;
  170. height: 28rpx;
  171. margin-left: 4rpx;
  172. image {
  173. width: 100%;
  174. height: 100%;
  175. display: block;
  176. }
  177. }
  178. .wf-page0 .name {
  179. color: #282828;
  180. margin: 20rpx 0 10rpx 0;
  181. font-size: 13px;
  182. overflow:hidden;
  183. text-overflow: ellipsis;
  184. display: -webkit-box;
  185. -webkit-line-clamp: 2;
  186. -webkit-box-orient: vertical;
  187. text-align: left;
  188. }
  189. .wf-page0 .text{
  190. padding: 0 20rpx;
  191. }
  192. .wf-page0 .money {
  193. font-size: 20rpx;
  194. font-weight: bold;
  195. color: var(--view-priceColor);
  196. }
  197. .b-color {
  198. background-color: var(--view-theme);
  199. border: 1px solid var(--view-theme);
  200. }
  201. .wf-page0 .money .num {
  202. font-size: 34rpx;
  203. }
  204. .wf-page1 .wf-item{
  205. .name{
  206. font-size: 13px;
  207. overflow:hidden;
  208. text-overflow: ellipsis;
  209. display: -webkit-box;
  210. -webkit-line-clamp: 2;
  211. -webkit-box-orient: vertical;
  212. text-align: left;
  213. }
  214. }
  215. .wf-page1 .pictrue {
  216. position: relative;
  217. height: 345rpx;
  218. width: 100%!important;
  219. /deep/image,/deep/.easy-loadimage,uni-image{
  220. height: 345rpx;
  221. border-radius: 20rpx 20rpx 0 0;
  222. }
  223. .border-picture {
  224. position: absolute;
  225. top: 0;
  226. left: 0;
  227. width: 100%;
  228. height: 100%;
  229. border-radius: 20rpx 20rpx 0 0;
  230. background: center/cover no-repeat;
  231. }
  232. }
  233. .sell_out {
  234. display: flex;
  235. width: 150rpx;
  236. height: 150rpx;
  237. align-items: center;
  238. justify-content: center;
  239. border-radius: 100%;
  240. background: rgba(0,0,0,.6);
  241. color: #fff;
  242. font-size: 30rpx;
  243. position: absolute;
  244. top: 50%;
  245. left: 50%;
  246. margin: -75rpx 0 0 -75rpx;
  247. &::before{
  248. content: "";
  249. display: block;
  250. width: 140rpx;
  251. height: 140rpx;
  252. border-radius: 100%;
  253. border: 1px dashed #fff;
  254. position: absolute;
  255. top: 5rpx;
  256. left: 5rpx;
  257. }
  258. }
  259. .loading-img{
  260. height: 345rpx;
  261. max-height: 360rpx;
  262. }
  263. .wf-page1 .text {
  264. padding: 20rpx 17rpx 26rpx 17rpx;
  265. font-size: 30rpx;
  266. color: #222;
  267. }
  268. .wf-page1 .text .money {
  269. display: flex;
  270. align-items: center;
  271. font-size: 26rpx;
  272. font-weight: bold;
  273. margin-top: 8rpx;
  274. color: var(--view-priceColor);
  275. }
  276. .wf-page1 .text .money .num {
  277. font-size: 34rpx;
  278. }
  279. .item_tags{
  280. margin-top: 8rpx;
  281. display: flex;
  282. }
  283. .item_tags .tags_item {
  284. display: flex;
  285. font-size: 20rpx;
  286. text-align: center;
  287. border-radius: 5rpx;
  288. padding: 0 4rpx;
  289. height: 28rpx;
  290. align-items: center;
  291. justify-content: center;
  292. margin-right: 8rpx;
  293. }
  294. .item_tags .tags_item.ticket{
  295. color: var(--view-theme);
  296. border: 1px solid var(--view-theme);
  297. }
  298. .item_tags .tags_item.delivery{
  299. color: #FF9000;
  300. border: 1px solid #FF9000;
  301. }
  302. .wf-page1 .text .money .ticket-big {
  303. display: flex;
  304. align-items: center;
  305. justify-content: center;
  306. max-width: 163rpx;
  307. padding: 0 6rpx;
  308. height: 28rpx;
  309. margin-left: 10rpx;
  310. background-image: url(~static/images/yh.png);
  311. background-size: 100% 100%;
  312. font-size: 20rpx;
  313. font-weight: normal;
  314. }
  315. .wf-page1 .text .score {
  316. margin-top: 10rpx;
  317. color: #737373;
  318. font-size: 20rpx;
  319. }
  320. .wf-page1 .text .company {
  321. display: flex;
  322. align-items: center;
  323. color: #737373;
  324. font-size: 20rpx;
  325. margin-top: 10rpx;
  326. .line1{
  327. max-width: 200rpx;
  328. }
  329. .flex {
  330. display: flex;
  331. align-items: center;
  332. margin-left: 10rpx;
  333. color: #282828;
  334. .iconfont {
  335. font-size: 16rpx;
  336. margin-top: 4rpx;
  337. }
  338. }
  339. }
  340. .foot-bar {
  341. width: 100%;
  342. height: 52rpx;
  343. display: flex;
  344. align-items: center;
  345. justify-content: center;
  346. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  347. border-radius: 0px 0px 16rpx 16rpx;
  348. color: #fff;
  349. font-size: 24rpx;
  350. .icon-fenxiang {
  351. font-size: 24rpx;
  352. margin-right: 10rpx;
  353. }
  354. }
  355. </style>