drawCard_fullSet.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. <template>
  2. <view class="container">
  3. <view class="head">
  4. <image class="img" :src="detail.prizeIcon" mode="aspectFill"></image>
  5. <view class="info">
  6. <view class="title row">
  7. {{ detail.name }}
  8. </view>
  9. <view class="row">
  10. <view class="price">
  11. ¥{{ detail.price }}
  12. <span class="text">/张明信片</span>
  13. </view>
  14. <image
  15. @click="$navigateTo('/pages/rule/rule', { type: 3 })"
  16. class="button"
  17. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/invite/button1.png'"
  18. mode="widthFix"
  19. ></image>
  20. </view>
  21. <view class="row">
  22. <!-- <view class="users">
  23. <image class="photo" :style="'left:' + index * 11 + 'px'" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/Frame1.png'"
  24. v-for="(item, index) in userList" mode="widthFix"></image>
  25. </view> -->
  26. <!-- <view class="hot">
  27. <image :src="'https://file.rongcyl.cn/festatic/bkm/imgv2' + /first/hot.png" mode="widthFix"></image>
  28. {{ detail.hotNum }}
  29. </view> -->
  30. </view>
  31. </view>
  32. </view>
  33. <view class="cardList">
  34. <image
  35. class="itemHead"
  36. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/headBk.png'"
  37. mode="widthFix"
  38. ></image>
  39. <view class="countdown textColor5">
  40. {{ countdown }}
  41. </view>
  42. <view class="title">
  43. <view class="left">
  44. <image
  45. class="text1"
  46. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/icon1.png'"
  47. mode="widthFix"
  48. ></image>
  49. <view class="row text2" style="font-size: 14px">已选择 {{ selectIndex.length }} 个</view>
  50. </view>
  51. <view class="right">
  52. <view class="text">
  53. 分享福袋有几率提高
  54. <span style="color: #63fff6">S赏</span>
  55. 概率
  56. </view>
  57. <!-- <image class="button" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button1.png'" mode="widthFix"></image> -->
  58. <button open-type="share" class="share_btn">
  59. <image
  60. class="button"
  61. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button1.png'"
  62. mode="widthFix"
  63. ></image>
  64. </button>
  65. </view>
  66. </view>
  67. <view class="list">
  68. <view :class="['item', item.check ? 'active' : '']" v-for="(item, index) in cardList" @click="clickCard(item)">
  69. <image
  70. v-if="item.check"
  71. class="kaBkActive"
  72. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk' + cardType(3, item) + 'Active.png'"
  73. mode="heightFix"
  74. ></image>
  75. <image
  76. class="kaBk"
  77. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk' + cardType(3, item) + '.png'"
  78. mode="widthFix"
  79. ></image>
  80. <numImg class="num" :value="item" :type="3" />
  81. </view>
  82. </view>
  83. <image
  84. class="buyButton"
  85. @click="submit"
  86. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button2.png'"
  87. mode="widthFix"
  88. ></image>
  89. </view>
  90. <view class="examples">
  91. <view class="example">
  92. <image
  93. class="exampleImg"
  94. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk' + cardType(3, { status: 0 }) + '.png'"
  95. mode="widthFix"
  96. ></image>
  97. <image class="tip" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/bkType1.png'" mode="widthFix"></image>
  98. </view>
  99. <view class="example">
  100. <image
  101. class="exampleImg"
  102. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk' + cardType(3, { status: 2 }) + '.png'"
  103. mode="widthFix"
  104. ></image>
  105. <image class="tip" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/bkType5.png'" mode="widthFix"></image>
  106. </view>
  107. <view class="example">
  108. <image
  109. class="exampleImg"
  110. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk' + cardType(3, { status: 1 }) + '.png'"
  111. mode="widthFix"
  112. ></image>
  113. <image class="tip" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/ka/bkType4.png'" mode="widthFix"></image>
  114. </view>
  115. </view>
  116. <view class="buttons">
  117. <image
  118. class="button1"
  119. @click="toKnapsack"
  120. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button3.png'"
  121. mode="heightFix"
  122. ></image>
  123. <!-- <image class="button1" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button4.png'" mode="heightFix"></image> -->
  124. <image
  125. class="button1"
  126. @click="$navigateTo('/pages/drawCard_fullSet/goods', { raffleId: params.raffleId })"
  127. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/button5.png'"
  128. mode="heightFix"
  129. ></image>
  130. </view>
  131. <view
  132. class="winningList"
  133. v-if="prizeUserList.length > 0"
  134. @click="$navigateTo('/pages/drawCard_fullSet/winningList', { raffleId: params.raffleId })"
  135. >
  136. <image
  137. class="winningListTitle"
  138. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/icon2.png'"
  139. mode="widthFix"
  140. ></image>
  141. <view class="list">
  142. <view class="item" v-for="(item, index) in prizeUserList.slice(0, 5)">
  143. <image class="photo" :src="item.userAvtar" mode="aspectFill"></image>
  144. <view class="name">
  145. {{ item.userName }}
  146. </view>
  147. </view>
  148. <view class="item" v-if="prizeUserList.length > 5">
  149. <image
  150. class="photo"
  151. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_fullSet/icon3.png'"
  152. mode="aspectFill"
  153. ></image>
  154. <view class="name" style="color: #6478fd">查看更多</view>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="prizes" style="display: none">
  159. <image class="title" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/first/title.png'" mode="widthFix"></image>
  160. <view class="prizesList" v-for="(item, index) in prizeList">
  161. <image class="bk" :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/first/bk2.png'" mode="scaleToFill"></image>
  162. <view class="prizesTitle">
  163. {{ $selectDictLabel(rewardType, item.type) }}
  164. </view>
  165. <view class="prizesImgOne" v-if="item.type == 22">
  166. <view class="image" v-for="(item2, index2) in item.prizeList">
  167. <image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
  168. </view>
  169. </view>
  170. <view class="prizesImg" v-else>
  171. <view class="image" v-for="(item2, index2) in item.prizeList">
  172. <image :class="item2.leftNum == 0 ? 'grey' : ''" :src="item2.icon" mode="aspectFill"></image>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. <image
  178. class="refresh"
  179. @click="refresh"
  180. :src="'https://file.rongcyl.cn/festatic/bkm/imgv2/first/refresh.png'"
  181. mode="widthFix"
  182. ></image>
  183. <paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
  184. </view>
  185. </template>
  186. <script>
  187. import { rewardType } from '@/utils/commonConfig.js'
  188. import { prizePoolStatusApi, raffleDetailApi, prizeListApi, prizeUserListApi } from '@/api/drawCard.js'
  189. import { cardType, formatSeconds } from '@/utils/utils.js'
  190. import numImg from '@/component/numImg.vue'
  191. import paymentPopup from '@/component/paymentPopup.vue'
  192. export default {
  193. components: {
  194. numImg,
  195. paymentPopup,
  196. },
  197. data() {
  198. return {
  199. countdown: '',
  200. countdownInfinity: null,
  201. cardType: cardType,
  202. rewardType: rewardType,
  203. params: {
  204. raffleId: '',
  205. limit: 20,
  206. page: 1,
  207. },
  208. detail: {},
  209. total: 0,
  210. userList: 8,
  211. cardList: [],
  212. selectIndex: [],
  213. prizeList: [],
  214. prizeUserList: [],
  215. }
  216. },
  217. onLoad(query) {
  218. console.log(query, 'query')
  219. if (query.id) {
  220. this.params.raffleId = query.id
  221. this.init()
  222. }
  223. this.paymentSuccess()
  224. },
  225. onHide() {
  226. if (!this.countdownInfinity) {
  227. clearInterval(this.countdownInfinity)
  228. }
  229. },
  230. methods: {
  231. init() {
  232. // 获取卡牌商品列表
  233. this.getCardList()
  234. // 获取卡包详情
  235. this.getDetail()
  236. //获取奖池
  237. this.getPrizeList()
  238. // 获取中奖记录
  239. this.getPrizeUserList()
  240. },
  241. toKnapsack() {
  242. // 跳转背包界面
  243. wx.navigateTo({
  244. url: '/pages/knapsack/knapsack',
  245. })
  246. },
  247. refresh() {
  248. wx.showLoading()
  249. setTimeout(function () {
  250. wx.hideLoading()
  251. }, 1000)
  252. this.init()
  253. this.selectIndex = []
  254. for (var i = 0; i < this.cardList.length; i++) {
  255. this.cardList[i].check = false
  256. }
  257. },
  258. getPrizeUserList() {
  259. let params = {
  260. limit: 999,
  261. page: 1,
  262. raffleId: this.params.raffleId,
  263. }
  264. prizeUserListApi(params).then(res => {
  265. console.log(res, '中奖记录')
  266. let userIds = []
  267. let list = []
  268. for (var i = 0; i < res.data.length; i++) {
  269. let item = res.data[i]
  270. if (userIds.indexOf(item.userId) == -1) {
  271. userIds.push(item.userId)
  272. console.log(userIds.indexOf(item.userId))
  273. let index = userIds.indexOf(item.userId)
  274. list[index] = {
  275. userId: item.userId,
  276. userAvtar: item.userAvtar,
  277. userName: item.userName,
  278. prizes: [],
  279. }
  280. list[index].prizes.push(item)
  281. } else {
  282. let index = userIds.indexOf(item.userId)
  283. list[index].prizes.push(item)
  284. }
  285. }
  286. this.userIds = userIds
  287. this.prizeUserList = list
  288. })
  289. },
  290. getPrizeList() {
  291. let params = {
  292. raffleId: this.params.raffleId,
  293. }
  294. prizeListApi(params).then(res => {
  295. console.log(res, '奖池预览')
  296. let newArray = res.data
  297. for (var i = 0; i < res.data.length; i++) {
  298. if (res.data[i].type == 21) {
  299. newArray = []
  300. newArray.push(res.data[i])
  301. res.data.splice(i, 1)
  302. newArray.push(...res.data)
  303. break
  304. }
  305. }
  306. this.prizeList = newArray
  307. })
  308. },
  309. toWinningRecord() {
  310. let params = {
  311. raffleId: this.params.raffleId,
  312. }
  313. this.$navigateTo('/pages/winningRecord/winningRecord', params)
  314. },
  315. getDetail() {
  316. let params = {
  317. raffleId: this.params.raffleId,
  318. }
  319. raffleDetailApi(params).then(res => {
  320. console.log(res, '详情')
  321. this.detail = res.data
  322. this.endTime = new Date(this.detail.endTime).getTime()
  323. // this.endTime = new Date('2023-11-10 14:48:00').getTime()
  324. // 初始化倒计时
  325. this.initCountdown()
  326. if (this.countdown != '已结束') {
  327. this.countdownInfinity = setInterval(() => {
  328. if (this.countdown == '已结束') {
  329. clearInterval(this.countdownInfinity)
  330. this.countdownInfinity = null
  331. return
  332. }
  333. this.initCountdown()
  334. }, 1000)
  335. }
  336. })
  337. },
  338. initCountdown() {
  339. let nowTime = new Date().getTime()
  340. let endTime = this.endTime
  341. let countdownText = ''
  342. let countdown = endTime - nowTime
  343. if (countdown <= 0) {
  344. countdownText = '已结束'
  345. } else {
  346. countdownText = formatSeconds(countdown)
  347. }
  348. // console.log(countdownText, 'countdownText')
  349. this.countdown = countdownText
  350. },
  351. submit() {
  352. if (this.selectIndex.length == 0) {
  353. wx.showToast({
  354. title: '请选则要购买的卡牌。',
  355. icon: 'none',
  356. })
  357. return
  358. }
  359. let params = {
  360. raffleId: this.params.raffleId,
  361. }
  362. this.$refs.paymentPopup.show(params, number, this.detail)
  363. },
  364. // 支付成功后回调
  365. paymentSuccess() {
  366. let _this = this
  367. console.log('刷新抽卡界面')
  368. // 刷新界面
  369. _this.refresh()
  370. },
  371. // 选中取消选中卡牌
  372. clickCard(item) {
  373. if (item.status == 0) {
  374. item.check = !item.check
  375. }
  376. // 如果是选中
  377. let index = this.selectIndex.indexOf(item.number)
  378. if (item.check && index == -1) {
  379. this.selectIndex.push(item.number)
  380. } else if (!item.check && index != -1) {
  381. this.selectIndex.splice(index, 1)
  382. }
  383. },
  384. // 标记已经选中卡牌
  385. selectFormat() {
  386. for (var i = 0; i < this.cardList.length; i++) {
  387. if (this.selectIndex.includes(this.cardList[i].number)) {
  388. this.cardList[i].check = true
  389. }
  390. }
  391. },
  392. getCardList() {
  393. prizePoolStatusApi(this.params).then(res => {
  394. console.log(res, '卡牌分页')
  395. for (var i = 0; i < res.data.list.length; i++) {
  396. res.data.list[i].check = false
  397. }
  398. this.cardList = res.data.list
  399. this.selectFormat()
  400. this.total = res.data.total
  401. })
  402. },
  403. left() {
  404. console.log('上一页')
  405. if (this.params.page > 1) {
  406. this.params.page = this.params.page - 1
  407. }
  408. this.getCardList()
  409. },
  410. right() {
  411. console.log('下一页')
  412. let pages = Math.ceil(this.total / this.params.limit)
  413. if (this.params.page < pages) {
  414. this.params.page = this.params.page + 1
  415. }
  416. this.getCardList()
  417. },
  418. },
  419. }
  420. </script>
  421. <style scoped lang="scss">
  422. .share_btn {
  423. background-color: transparent;
  424. border-width: 0 !important;
  425. border-radius: 0;
  426. overflow: initial;
  427. text-align: start;
  428. padding: 0;
  429. box-shadow: none !important;
  430. -webkit-tap-highlight-color: transparent;
  431. &::after {
  432. border: none;
  433. }
  434. }
  435. .container {
  436. background: #9ec8f9;
  437. padding-top: 15px;
  438. overflow: auto;
  439. .refresh {
  440. position: fixed;
  441. display: none;
  442. right: 4px;
  443. top: 75%;
  444. width: 40px;
  445. z-index: 5;
  446. }
  447. .head {
  448. background: #fff;
  449. border: 10px;
  450. padding: 15px;
  451. border-radius: 10px 10px 0 0;
  452. display: flex;
  453. justify-content: space-between;
  454. margin-bottom: 20px;
  455. .img {
  456. width: 106px;
  457. height: 106px;
  458. border-radius: 5px;
  459. overflow: hidden;
  460. margin-right: 10px;
  461. }
  462. .info {
  463. display: flex;
  464. flex-direction: column;
  465. justify-content: start;
  466. flex: 1;
  467. .row {
  468. margin: 5px 0;
  469. display: flex;
  470. justify-content: space-between;
  471. color: #999999;
  472. .button {
  473. width: 67px;
  474. }
  475. .hot {
  476. display: flex;
  477. font-size: 12px;
  478. color: #999999;
  479. image {
  480. width: 16px;
  481. }
  482. }
  483. .users {
  484. position: relative;
  485. .photo {
  486. position: absolute;
  487. width: 20px;
  488. height: 20px;
  489. border-radius: 50%;
  490. }
  491. }
  492. }
  493. .title {
  494. font-weight: 600;
  495. color: #000;
  496. }
  497. .price {
  498. font-size: 16px;
  499. font-weight: 600;
  500. color: #ff2c43;
  501. .text {
  502. font-size: 14px;
  503. color: #999999;
  504. font-weight: 500;
  505. }
  506. }
  507. }
  508. }
  509. .cardList {
  510. margin: 10px 10px 0 10px;
  511. border-radius: 12px;
  512. position: relative;
  513. background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
  514. // overflow: scroll;
  515. padding-bottom: 1px;
  516. .countdown {
  517. position: absolute;
  518. top: 1px;
  519. padding-left: 70px;
  520. font-size: 15px;
  521. }
  522. .itemHead {
  523. position: relative;
  524. left: -10px;
  525. top: -10px;
  526. width: calc(100% + 10px);
  527. }
  528. .title {
  529. display: flex;
  530. justify-content: space-between;
  531. color: #fff;
  532. padding: 0 15px 6px 15px;
  533. .left {
  534. .text1 {
  535. width: 6.5rem;
  536. // font-size: 24px;
  537. // font-weight: 600;
  538. // text-shadow: 1px 1px 0px #0A57BA;
  539. // font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
  540. }
  541. .text2 {
  542. font-family:
  543. Alimama FangYuanTi VF-Medium-Round,
  544. Alimama FangYuanTi VF-Medium;
  545. }
  546. }
  547. .right {
  548. display: flex;
  549. .text {
  550. width: 100px;
  551. font-size: 12px;
  552. text-align: right;
  553. }
  554. .button {
  555. width: 72px;
  556. height: 30px;
  557. }
  558. }
  559. }
  560. .bk {
  561. width: 100%;
  562. }
  563. .list {
  564. background: #fff;
  565. padding: 15px;
  566. border-radius: 12px;
  567. // width: calc(100% - 80px);
  568. // height: calc(100% - 70px);
  569. // position: absolute;
  570. // top: 0;
  571. display: grid;
  572. grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  573. grid-template-rows: 1fr 1fr 1fr;
  574. grid-gap: 15px;
  575. .item {
  576. display: inline-flex;
  577. justify-content: center;
  578. align-items: center;
  579. position: relative;
  580. .kaBkActive {
  581. height: 142%;
  582. width: 100%;
  583. position: absolute;
  584. z-index: 1;
  585. }
  586. .kaBk {
  587. width: 100%;
  588. border-radius: 4px;
  589. z-index: 2;
  590. }
  591. .num {
  592. position: absolute;
  593. width: 100%;
  594. height: 100%;
  595. top: 0;
  596. z-index: 2;
  597. }
  598. }
  599. }
  600. .buyButton {
  601. width: 40%;
  602. margin: 10px auto;
  603. }
  604. }
  605. .winningList {
  606. margin: 20px 10px;
  607. padding: 15px;
  608. background: linear-gradient(180deg, #31b7fd 10%, #6478fd 90%);
  609. border-radius: 12px;
  610. .winningListTitle {
  611. width: 92px;
  612. margin-bottom: 12px;
  613. }
  614. .list {
  615. position: relative;
  616. padding: 12px 7px 12px 12px;
  617. border-radius: 12px;
  618. background: #fff;
  619. display: flex;
  620. .item {
  621. width: calc(100% / 6 - 5px);
  622. // margin: 0 auto;
  623. position: relative;
  624. display: inline-flex;
  625. flex-direction: column;
  626. justify-content: center;
  627. align-items: center;
  628. margin-right: 5px;
  629. .photo {
  630. width: 40px;
  631. height: 40px;
  632. border-radius: 50%;
  633. background: #b6b6b6;
  634. }
  635. .name {
  636. margin-top: 5px;
  637. display: inline-block;
  638. font-size: 11px;
  639. max-width: 100%;
  640. overflow: hidden;
  641. white-space: nowrap;
  642. text-overflow: ellipsis;
  643. }
  644. }
  645. }
  646. }
  647. .buttons {
  648. display: flex;
  649. justify-content: center;
  650. align-items: flex-start;
  651. padding: 0 10px;
  652. .button1 {
  653. height: 40px;
  654. }
  655. }
  656. .prizes {
  657. .title {
  658. width: 103px;
  659. margin: 0 auto;
  660. }
  661. .prizesList {
  662. margin: 20px;
  663. position: relative;
  664. overflow: hidden;
  665. // z-index: 5;
  666. .bk {
  667. width: 100%;
  668. height: 100%;
  669. position: absolute;
  670. top: 0;
  671. }
  672. .prizesTitle {
  673. position: relative;
  674. height: 30px;
  675. line-height: 30px;
  676. width: 100%;
  677. margin-left: 1px;
  678. margin-top: 15px;
  679. padding-left: 15px;
  680. color: #fff;
  681. font-weight: 800;
  682. background: linear-gradient(90deg, rgba(89, 166, 255, 0.8) 0%, rgba(158, 200, 249, 0) 100%);
  683. }
  684. .prizesImg {
  685. position: relative;
  686. display: grid;
  687. grid-template-columns: 1fr 1fr;
  688. margin: 15px;
  689. white-space: wrap;
  690. text-align: center;
  691. // overflow: auto;
  692. .image {
  693. text-align: center;
  694. image {
  695. display: inline-block;
  696. width: 36vw;
  697. height: 36vw;
  698. border-radius: 10px;
  699. margin: 0 5px;
  700. }
  701. }
  702. }
  703. .prizesImgOne {
  704. position: relative;
  705. display: flex;
  706. justify-content: center;
  707. margin: 15px;
  708. .image {
  709. text-align: center;
  710. image {
  711. display: inline-block;
  712. width: 45vw;
  713. height: 45vw;
  714. border-radius: 10px;
  715. margin: 0 5px;
  716. }
  717. }
  718. }
  719. }
  720. }
  721. }
  722. .examples {
  723. width: 100%;
  724. margin-bottom: 20px;
  725. padding: 0 10px;
  726. display: flex;
  727. .example {
  728. width: 14vw;
  729. margin-right: 10px;
  730. display: flex;
  731. justify-content: center;
  732. flex-wrap: wrap;
  733. position: relative;
  734. .exampleImg {
  735. width: 13vw;
  736. }
  737. .tip {
  738. width: 100%;
  739. position: absolute;
  740. bottom: 0;
  741. transform: translateY(50%);
  742. }
  743. }
  744. }
  745. </style>