hua-active-plate.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. <template>
  2. <view>
  3. <view class="active-plate d-flex justify-content-between">
  4. <view class="live bg-white radius10">
  5. <view class="top d-flex align-items-center">
  6. <view class="title titColor">新品直播</view>
  7. <view class="sub">采一手新品</view>
  8. </view>
  9. <view class="live-box" @click="toVideo">
  10. <image src="https://shop.xianghuaqi.net.cn/images/live.png"></image>
  11. <view class="tips d-flex justify-content-between align-items-center">
  12. <image src="../../static/home/liveicon.png" mode=""></image>
  13. <text>享限时折扣</text>
  14. </view>
  15. <view class="title">直播看新品</view>
  16. </view>
  17. <view class="d-flex justify-content-between">
  18. <view class="goods" v-for="(item, index) in liveGoods" :key="index">
  19. <image :src="item.image" mode=""></image>
  20. <!-- <view class="name">
  21. {{item.name}}
  22. </view> -->
  23. </view>
  24. </view>
  25. </view>
  26. <view class="right-wrap d-flex align-content-between flex-wrap">
  27. <view class="hot-goods bg-white radius10">
  28. <view class="top d-flex justify-content-between align-items-center">
  29. <view class="title titColor">爆品火拼</view>
  30. <view class="count-down d-flex align-items-center">
  31. <image src="../../static/home/down.png" mode=""></image>
  32. <view class="num"><u-count-down :time="countDown" format="HH:mm:ss"></u-count-down></view>
  33. </view>
  34. </view>
  35. <view class="goods d-flex align-items-center justify-content-between">
  36. <view class="item" v-for="(item, index) in hotGoods" :key="index">
  37. <image :src="item.image" mode=""></image>
  38. <!-- <view class="price">
  39. ¥{{item.price}}优惠价
  40. </view> -->
  41. </view>
  42. </view>
  43. </view>
  44. <view class="fruits bg-white radius10">
  45. <view class="top d-flex align-items-center">
  46. <view class="title titColor">水果生鲜</view>
  47. <view class="sub">采一手新品</view>
  48. </view>
  49. <view class="goods d-flex align-items-center justify-content-between">
  50. <view class="item" v-for="(item, index) in hotFruits" :key="index">
  51. <image :src="item.image" mode=""></image>
  52. <!-- <view class="price">
  53. ¥{{item.price}}优惠价
  54. </view> -->
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. name: 'hua-active-plate',
  65. props: {
  66. liveGoods: {},
  67. hotGoods: {},
  68. hotFruits: {},
  69. countDown: {}
  70. },
  71. data() {
  72. return {};
  73. },
  74. methods: {
  75. toVideo() {
  76. console.log('跳转视频');
  77. }
  78. }
  79. };
  80. </script>
  81. <style lang="scss">
  82. .active-plate {
  83. margin: 32upx auto;
  84. .live {
  85. width: 334rpx;
  86. padding: 14rpx 16rpx 30rpx;
  87. box-sizing: border-box;
  88. .top {
  89. height: 44rpx;
  90. .title {
  91. font-weight: 700;
  92. }
  93. .sub {
  94. font-size: 24rpx;
  95. color: #616161;
  96. margin-left: 10rpx;
  97. }
  98. }
  99. .live-box {
  100. width: 100%;
  101. height: 208upx;
  102. position: relative;
  103. margin: 10upx auto 20upx;
  104. image {
  105. width: 100%;
  106. height: 100%;
  107. }
  108. .tips {
  109. position: absolute;
  110. bottom: 60upx;
  111. left: 14upx;
  112. padding: 0 10upx;
  113. height: 34upx;
  114. background: linear-gradient(142deg, #f16d60 0%, #f8352b 100%);
  115. border-radius: 4upx;
  116. image {
  117. width: 22upx;
  118. height: 16upx;
  119. margin-right: 4upx;
  120. }
  121. text {
  122. color: #fff;
  123. font-size: 20upx;
  124. }
  125. }
  126. .title {
  127. position: absolute;
  128. bottom: 20upx;
  129. left: 14upx;
  130. color: #fff;
  131. font-size: 24upx;
  132. }
  133. }
  134. .goods {
  135. position: relative;
  136. width: 146upx;
  137. height: 126upx;
  138. image {
  139. position: relative;
  140. width: 100%;
  141. height: 100%;
  142. }
  143. .name {
  144. position: absolute;
  145. color: #f8352b;
  146. font-size: 20upx;
  147. padding: 2upx 4upx;
  148. bottom: 0;
  149. left: 50%;
  150. transform: translateX(-50%);
  151. box-sizing: border-box;
  152. background-color: #ffe4e3;
  153. border-radius: 16upx;
  154. text-align: center;
  155. font-weight: 500;
  156. }
  157. }
  158. }
  159. .right-wrap {
  160. width: 334upx;
  161. .hot-goods {
  162. width: 100%;
  163. padding: 14upx 16upx 20upx;
  164. box-sizing: border-box;
  165. .top {
  166. .title {
  167. font-weight: 700;
  168. }
  169. .count-down {
  170. background-color: #ffd7de;
  171. image {
  172. width: 46upx;
  173. height: 36upx;
  174. }
  175. .num {
  176. font-size: 24upx !important;
  177. color: #f8352b;
  178. padding: 0 8upx;
  179. border-radius: 8upx;
  180. /deep/ .u-count-down {
  181. &__text {
  182. color: #f8352b !important;
  183. font-size: 24upx !important;
  184. line-height: unset !important;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. .goods {
  191. margin-top: 10upx;
  192. .item {
  193. width: 126upx;
  194. height: 126upx;
  195. position: relative;
  196. image {
  197. width: 100%;
  198. height: 100%;
  199. }
  200. .price {
  201. position: absolute;
  202. bottom: 0;
  203. left: 50%;
  204. transform: translateX(-50%);
  205. font-size: 20upx;
  206. color: #f8352b;
  207. background-color: #ffe4e3;
  208. border-radius: 16upx;
  209. white-space: nowrap;
  210. }
  211. }
  212. }
  213. }
  214. .fruits {
  215. width: 100%;
  216. padding: 14upx 16upx 20upx;
  217. box-sizing: border-box;
  218. .title {
  219. font-weight: 700;
  220. }
  221. .sub {
  222. font-size: 28upx;
  223. margin-left: 10upx;
  224. color: #616161;
  225. }
  226. .goods {
  227. margin-top: 10upx;
  228. .item {
  229. width: 126upx;
  230. height: 126upx;
  231. position: relative;
  232. image {
  233. width: 100%;
  234. height: 100%;
  235. }
  236. .price {
  237. position: absolute;
  238. bottom: 0;
  239. left: 50%;
  240. transform: translateX(-50%);
  241. font-size: 20upx;
  242. color: #f8352b;
  243. background-color: #ffe4e3;
  244. border-radius: 16upx;
  245. white-space: nowrap;
  246. }
  247. }
  248. }
  249. }
  250. }
  251. }
  252. </style>
  253. <template>
  254. <view>
  255. <view class="active-plate d-flex justify-content-between">
  256. <view class="live bg-white radius10">
  257. <view class="top d-flex align-items-center">
  258. <view class="title titColor">新品直播</view>
  259. <view class="sub">采一手新品</view>
  260. </view>
  261. <view class="live-box">
  262. <image src="https://shop.xianghuaqi.net.cn/images/live.png"></image>
  263. <view class="tips d-flex justify-content-between align-items-center">
  264. <image src="../../static/home/liveicon.png" mode=""></image>
  265. <text>享限时折扣</text>
  266. </view>
  267. <view class="title">直播看新品</view>
  268. </view>
  269. <view class="d-flex justify-content-between">
  270. <view class="goods" v-for="(item, index) in liveGoods" :key="index">
  271. <image :src="item.image" mode=""></image>
  272. <!-- <view class="name">
  273. {{item.name}}
  274. </view> -->
  275. </view>
  276. </view>
  277. </view>
  278. <view class="right-wrap d-flex align-content-between flex-wrap">
  279. <view class="hot-goods bg-white radius10">
  280. <view class="top d-flex justify-content-between align-items-center">
  281. <view class="title titColor">限时抢购</view>
  282. <view class="count-down d-flex align-items-center">
  283. <image src="../../static/home/down.png" mode=""></image>
  284. <view class="num"><u-count-down :timestamp="countDown" format="HH:mm:ss" color="#F8352B" separatorColor="#f8352b"></u-count-down></view>
  285. </view>
  286. </view>
  287. <view class="goods d-flex align-items-center justify-content-between">
  288. <view class="item" v-for="(item, index) in hotGoods" :key="index">
  289. <image :src="item.image" mode=""></image>
  290. <!-- <view class="price">
  291. ¥{{item.price}}优惠价
  292. </view> -->
  293. </view>
  294. </view>
  295. </view>
  296. <view class="fruits bg-white radius10">
  297. <view class="top d-flex align-items-center">
  298. <view class="title titColor">火热拼团</view>
  299. <view class="sub">采一手新品</view>
  300. </view>
  301. <view class="goods d-flex align-items-center justify-content-between">
  302. <view class="item" v-for="(item, index) in hotFruits" :key="index">
  303. <image :src="item.image" mode=""></image>
  304. <!-- <view class="price">
  305. ¥{{item.price}}优惠价
  306. </view> -->
  307. </view>
  308. </view>
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. </template>
  314. <script>
  315. export default {
  316. name: 'hua-active-plate',
  317. props: {
  318. liveGoods: {},
  319. hotGoods: {},
  320. hotFruits: {}
  321. },
  322. data() {
  323. return {
  324. countDown: 86400
  325. };
  326. }
  327. };
  328. </script>
  329. <style lang="scss">
  330. .active-plate {
  331. margin: 32upx auto;
  332. .live {
  333. width: 334upx;
  334. padding: 14upx 16upx 30upx;
  335. box-sizing: border-box;
  336. .top {
  337. height: 44upx;
  338. .title {
  339. font-weight: 700;
  340. }
  341. .sub {
  342. font-size: 28upx;
  343. color: #616161;
  344. margin-left: 10upx;
  345. }
  346. }
  347. .live-box {
  348. width: 100%;
  349. height: 208upx;
  350. position: relative;
  351. margin: 10upx auto 20upx;
  352. image {
  353. width: 100%;
  354. height: 100%;
  355. }
  356. .tips {
  357. position: absolute;
  358. bottom: 60upx;
  359. left: 14upx;
  360. padding: 0 10upx;
  361. height: 34upx;
  362. background: linear-gradient(142deg, #f16d60 0%, #f8352b 100%);
  363. border-radius: 4upx;
  364. image {
  365. width: 22upx;
  366. height: 16upx;
  367. margin-right: 4upx;
  368. }
  369. text {
  370. color: #fff;
  371. font-size: 20upx;
  372. }
  373. }
  374. .title {
  375. position: absolute;
  376. bottom: 20upx;
  377. left: 14upx;
  378. color: #fff;
  379. font-size: 24upx;
  380. }
  381. }
  382. .goods {
  383. position: relative;
  384. width: 146upx;
  385. height: 126upx;
  386. image {
  387. position: relative;
  388. width: 100%;
  389. height: 100%;
  390. }
  391. .name {
  392. position: absolute;
  393. color: #f8352b;
  394. font-size: 20upx;
  395. padding: 2upx 4upx;
  396. bottom: 0;
  397. left: 50%;
  398. transform: translateX(-50%);
  399. box-sizing: border-box;
  400. background-color: #ffe4e3;
  401. border-radius: 16upx;
  402. text-align: center;
  403. font-weight: 500;
  404. }
  405. }
  406. }
  407. .right-wrap {
  408. width: 334upx;
  409. .hot-goods {
  410. width: 100%;
  411. padding: 14upx 16upx 20upx;
  412. box-sizing: border-box;
  413. .top {
  414. .title {
  415. font-weight: 700;
  416. }
  417. .count-down {
  418. background-color: #ffd7de;
  419. image {
  420. width: 46upx;
  421. height: 36upx;
  422. }
  423. .num {
  424. font-size: 24upx !important;
  425. color: #f8352b;
  426. padding: 0 8upx;
  427. border-radius: 8upx;
  428. /deep/ .u-count-down {
  429. &__text {
  430. color: #f8352b !important;
  431. font-size: 24upx !important;
  432. line-height: unset !important;
  433. }
  434. }
  435. }
  436. }
  437. }
  438. .goods {
  439. margin-top: 10upx;
  440. .item {
  441. width: 126upx;
  442. height: 126upx;
  443. position: relative;
  444. image {
  445. width: 100%;
  446. height: 100%;
  447. }
  448. .price {
  449. position: absolute;
  450. bottom: 0;
  451. left: 50%;
  452. transform: translateX(-50%);
  453. font-size: 20upx;
  454. color: #f8352b;
  455. background-color: #ffe4e3;
  456. border-radius: 16upx;
  457. white-space: nowrap;
  458. }
  459. }
  460. }
  461. }
  462. .fruits {
  463. width: 100%;
  464. padding: 14upx 16upx 20upx;
  465. box-sizing: border-box;
  466. .title {
  467. font-weight: 700;
  468. }
  469. .sub {
  470. font-size: 28upx;
  471. margin-left: 10upx;
  472. color: #616161;
  473. }
  474. .goods {
  475. margin-top: 10upx;
  476. .item {
  477. width: 126upx;
  478. height: 126upx;
  479. position: relative;
  480. image {
  481. width: 100%;
  482. height: 100%;
  483. }
  484. .price {
  485. position: absolute;
  486. bottom: 0;
  487. left: 50%;
  488. transform: translateX(-50%);
  489. font-size: 20upx;
  490. color: #f8352b;
  491. background-color: #ffe4e3;
  492. border-radius: 16upx;
  493. white-space: nowrap;
  494. }
  495. }
  496. }
  497. }
  498. }
  499. }
  500. </style>