WaterfallsFlowItem.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view v-if="type == 0" class="wf-item-page wf-page0" :style="viewColor">
  3. <view class='pictrue'>
  4. <!-- <image :src='item.image'></image> -->
  5. <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
  6. <text class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '1'">秒杀</text>
  7. <text class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '2'">砍价</text>
  8. <text class="pictrue_log_big pictrue_log_class" v-if="item.activity && item.activity.type === '3'">拼团</text>
  9. </view>
  10. <view class="text">
  11. <view class='name'>
  12. <view class="name_text line2">
  13. <text>{{item.store_name}}</text>
  14. </view>
  15. </view>
  16. <view class="acea-row row-middle">
  17. <view class='money'>¥<text class='num'>{{item.price}}</text></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. <!-- <image :src='item.image'></image> -->
  31. <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage>
  32. </view>
  33. <view class='text'>
  34. <view class='name'>
  35. <view class="text_name line2">
  36. <text>{{item.store_name}}</text>
  37. </view>
  38. </view>
  39. <view class='money'>
  40. ¥<text class='num'>{{item.price}}</text>
  41. </view>
  42. <view class="item_tags acea-row">
  43. <text v-if="item.merchant.type_name && item.product_type == 0" class="font-bg-red b-color">{{item.merchant.type_name}}</text>
  44. <text v-else-if="item.merchant.is_trader && item.product_type == 0" class="font-bg-red b-color">自营</text>
  45. <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>
  46. <text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
  47. <text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
  48. </view>
  49. <view class="score">{{item.rate}}评分 {{item.reply_count}}条评论</view>
  50. <view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
  51. <text class="line1">{{item.merchant.mer_name}}</text>
  52. <view class="flex" v-if="isStore != '1'">
  53. 进店
  54. <text class="iconfont icon-xiangyou"></text>
  55. </view>
  56. </view>
  57. </view>
  58. <!-- 返佣 -->
  59. <block v-if="item.max_extension && (item.product_type == 0 || item.product_type == 2)">
  60. <view class="foot-bar">
  61. <text class="iconfont icon-fenxiang"></text>
  62. 最高赚 ¥{{item.max_extension}}
  63. </view>
  64. </block>
  65. </view>
  66. </template>
  67. <script>
  68. import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue'
  69. import {mapGetters} from "vuex";
  70. export default {
  71. components:{easyLoadimage},
  72. computed: mapGetters(['viewColor']),
  73. props: {
  74. item: {
  75. type: Object,
  76. require: true
  77. },
  78. type: {
  79. type: Number,
  80. default: 0
  81. },
  82. isStore: {
  83. type: [String, Number],
  84. default: '1'
  85. },
  86. isLogin: {
  87. type: Boolean,
  88. require: false
  89. }
  90. },
  91. data(){
  92. return {
  93. }
  94. },
  95. methods: {
  96. goShop(id) {
  97. this.$emit('goShop', id);
  98. },
  99. authOpen(){
  100. this.$emit('authOpen');
  101. },
  102. followToggle(item){
  103. this.$emit('followToggle', item);
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .wf-item-page {
  110. background: #fff;
  111. overflow: hidden;
  112. border-radius: 5px;
  113. padding-bottom: 20rpx;
  114. }
  115. .wf-page0 .coupon{
  116. background:rgba(255,248,247,1);
  117. border:1px solid rgba(233,51,35,1);
  118. border-radius:4rpx;
  119. font-size:20rpx;
  120. margin-left: 18rpx;
  121. padding: 1rpx 4rpx;
  122. }
  123. .wf-page0 .pictrue{
  124. width: 100%!important;
  125. height: 345rpx;
  126. position: relative;
  127. /deep/image,/deep/.easy-loadimage,uni-image{
  128. height: 345rpx;
  129. border-radius: 16rpx 16rpx 0 0;
  130. }
  131. }
  132. .loadfail-img{
  133. width: 100%;
  134. height: 360rpx;
  135. }
  136. .wf-page0 .name {
  137. font-size: 26rpx;
  138. color: #282828;
  139. margin: 20rpx 0 10rpx 0;
  140. display: flex;
  141. align-items: center;
  142. }
  143. .wf-page0 .text{
  144. padding: 0 20rpx;
  145. }
  146. .wf-page0 .money {
  147. font-size: 20rpx;
  148. font-weight: bold;
  149. color: var(--view-priceColor);
  150. }
  151. .b-color {
  152. background-color: var(--view-theme);
  153. border: 1rpx solid var(--view-theme);
  154. }
  155. .wf-page0 .money .num {
  156. font-size: 34rpx;
  157. }
  158. .wf-page1 .wf-item{
  159. .name{
  160. display: flex;
  161. align-items: center;
  162. font-size: 26rpx;
  163. }
  164. }
  165. .wf-page1 .pictrue {
  166. position: relative;
  167. height: 345rpx;
  168. width: 100%!important;
  169. /deep/image,/deep/.easy-loadimage,uni-image{
  170. height: 345rpx;
  171. border-radius: 20rpx 20rpx 0 0;
  172. }
  173. }
  174. .loading-img{
  175. height: 345rpx;
  176. max-height: 360rpx;
  177. }
  178. .wf-page1 .text {
  179. padding: 20rpx 17rpx 26rpx 17rpx;
  180. font-size: 30rpx;
  181. color: #222;
  182. }
  183. .wf-page1 .text .money {
  184. display: flex;
  185. align-items: center;
  186. font-size: 26rpx;
  187. font-weight: bold;
  188. margin-top: 8rpx;
  189. color: var(--view-priceColor);
  190. }
  191. .wf-page1 .text .money .num {
  192. font-size: 34rpx;
  193. }
  194. .item_tags{
  195. margin-top: 8rpx;
  196. }
  197. .item_tags .tags_item {
  198. display: inline-block;
  199. font-size: 20rpx;
  200. text-align: center;
  201. border-radius: 5rpx;
  202. padding: 0 4rpx;
  203. line-height: 28rpx;
  204. margin-right: 8rpx;
  205. }
  206. .item_tags .tags_item.ticket{
  207. color: var(--view-theme);
  208. border: 1rpx solid var(--view-theme);
  209. }
  210. .item_tags .tags_item.delivery{
  211. color: #FF9000;
  212. border: 1rpx solid #FF9000;
  213. }
  214. .wf-page1 .text .money .ticket-big {
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. max-width: 163rpx;
  219. padding: 0 6rpx;
  220. height: 28rpx;
  221. margin-left: 10rpx;
  222. background-image: url(~static/images/yh.png);
  223. background-size: 100% 100%;
  224. font-size: 20rpx;
  225. font-weight: normal;
  226. }
  227. .wf-page1 .text .score {
  228. margin-top: 10rpx;
  229. color: #737373;
  230. font-size: 20rpx;
  231. }
  232. .wf-page1 .text .company {
  233. display: flex;
  234. align-items: center;
  235. color: #737373;
  236. font-size: 20rpx;
  237. margin-top: 10rpx;
  238. .line1{
  239. max-width: 200rpx;
  240. }
  241. .flex {
  242. display: flex;
  243. align-items: center;
  244. margin-left: 10rpx;
  245. color: #282828;
  246. .iconfont {
  247. font-size: 16rpx;
  248. margin-top: 4rpx;
  249. }
  250. }
  251. }
  252. .foot-bar {
  253. width: 100%;
  254. height: 52rpx;
  255. display: flex;
  256. align-items: center;
  257. justify-content: center;
  258. background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  259. border-radius: 0px 0px 16rpx 16rpx;
  260. color: #fff;
  261. font-size: 24rpx;
  262. .icon-fenxiang {
  263. font-size: 24rpx;
  264. margin-right: 10rpx;
  265. }
  266. }
  267. </style>