index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. <template>
  2. <view>
  3. <view class="box">
  4. <view class="index" :style="{ top: statusHeight + 'px' }">
  5. <view class="barrage">
  6. <!-- 中奖信息轮播 -->
  7. <swiper class="barrage-swiper" :interval="2000" :autoplay="true" :vertical="true" :circular="true">
  8. <swiper-item v-for="(item, index) in prizeNewsListOne" :key="index">
  9. <view class="barrage-swiper-item flex">
  10. <view class="barrage-swiper-item-content flex">
  11. <image :src="item.avatar" mode="" />
  12. <view class="title ells-one">{{ item.nickName }} {{ item.type == 1 ? '刮出了' : '兑换了' }} {{ item.prizeInfo }}</view>
  13. </view>
  14. </view>
  15. </swiper-item>
  16. </swiper>
  17. </view>
  18. <!-- 查看规则 -->
  19. <view class="rule">
  20. <view class="rule-content flex" @click="toRule">
  21. <image src="../../static/index/index_tip.png" mode=""></image>
  22. <text>查看规则</text>
  23. </view>
  24. </view>
  25. <!-- 盲票轮播 -->
  26. <view class="ticket">
  27. <swiper class="ticket-swiper" :current="ticketIndex" :autoplay="false" :circular="true" @change="changeTicket">
  28. <swiper-item v-for="(item, index) in list" :key="index">
  29. <view class="ticket-swiper-item flex">
  30. <image class="box" src="../../static/index/index_ticket.png" mode="scaleToFill"></image>
  31. <image class="prize" src="../../static/index/index_prize.png" mode="scaleToFill"></image>
  32. </view>
  33. </swiper-item>
  34. </swiper>
  35. </view>
  36. <!-- 投诉建议 -->
  37. <view class="proposal flex">
  38. <view class="proposal-time flex">
  39. <image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
  40. <view class="time">
  41. <u-count-down :time="30 * 60 * 60 * 1000" format="HH:mm:ss:SSS" autoStart millisecond></u-count-down>
  42. </view>
  43. </view>
  44. <view class="proposal-progress">
  45. <u-line-progress :percentage="percentage" height="3" :showText="false" inactiveColor="rgba(255, 255, 255, .36)" activeColor="#fff" />
  46. </view>
  47. <view class="proposal-tip" @click="contactService">
  48. <image src="../../static/index/index_tip_bg.png" mode=""></image>
  49. <text>投诉建议</text>
  50. </view>
  51. </view>
  52. <!-- 中奖概率 -->
  53. <view class="chance flex">
  54. <view class="chance-title">中奖概率:</view>
  55. <view class="chance-content flex">
  56. <image src="../../static/index/index_chance_1.png" mode="scaleToFill"></image>
  57. <text>0.1%</text>
  58. </view>
  59. <view class="chance-content flex">
  60. <image src="../../static/index/index_chance_2.png" mode="scaleToFill"></image>
  61. <text>10.0%</text>
  62. </view>
  63. <view class="chance-content flex">
  64. <image src="../../static/index/index_chance_3.png" mode="scaleToFill"></image>
  65. <text>10.0%</text>
  66. </view>
  67. <view class="chance-content flex">
  68. <image src="../../static/index/index_chance_4.png" mode="scaleToFill"></image>
  69. <text>10.0%</text>
  70. </view>
  71. </view>
  72. <!-- 盲票名称轮播 -->
  73. <view class="ticket-title" flex>
  74. <swiper class="ticket-title-swiper flex" :current="ticketTitleIndex" previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true" @change="changeTicketTitle">
  75. <swiper-item v-for="(item, index) in list" :key="index">
  76. <view class="ticket-title-swiper-item flex" :class="{ 'action': ticketTitleIndex == index }">
  77. <text>爆款必抽</text>
  78. </view>
  79. </swiper-item>
  80. </swiper>
  81. </view>
  82. <!-- 刮开盲票 -->
  83. <view class="ticket-btn flex">
  84. <view class="ticket-btn-left flex">
  85. <image src="../../static/index/index_btn_left.png" mode="scaleToFill"></image>
  86. <view class="ticket-btn-left__title">试玩</view>
  87. </view>
  88. <view class="ticket-btn-center flex">
  89. <image src="../../static/index/index_btn.png" mode="scaleToFill"></image>
  90. <view class="ticket-btn-center-wrap flex">
  91. <view class="ticket-btn-center-wrap__title">刮开<br />盲票</view>
  92. </view>
  93. </view>
  94. <view class="ticket-btn-right flex" @click="toTicket">
  95. <view class="ticket-btn-right__image flex">
  96. <image src="../../static/index/index_btn_right_cir.png" mode="scaleToFill"></image>
  97. <image src="../../static/index/index_btn_cir_center.png" mode="scaleToFill"></image>
  98. </view>
  99. <view class="ticket-btn-right__title">更多盲票</view>
  100. </view>
  101. </view>
  102. <!-- 盲票价格 -->
  103. <view class="ticket-price flex">
  104. <view class="ticket-price-checkbox flex">
  105. <image src="../../static/index/index_price_checkout.png" mode="scaleToFill"></image>
  106. </view>
  107. <view class="ticket-price-amt flex">
  108. <view class="num">49.00</view>
  109. <view class="txt">元/个</view>
  110. </view>
  111. <view class="ticket-price-discount flex">
  112. <view class="num">原价¥68.00元</view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <!-- tabbar组件 -->
  118. <custom-tab-bar :activeValue="'index'" />
  119. <!-- 支付弹框组件 -->
  120. <pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="toProcess" v-if="payShow" />
  121. </view>
  122. </template>
  123. <script>
  124. import env from '../../config/env.js'
  125. import $http from '@/utils/request.js'
  126. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  127. import PayPopup from '../../components/pay-popup/pay-popup.vue'
  128. import PrizeBarrage from '@/components/prize-barrage/prize-barrage.vue'
  129. export default {
  130. components: {
  131. CustomTabBar,
  132. PayPopup,
  133. PrizeBarrage
  134. },
  135. data() {
  136. return {
  137. loginState: false, // 登录状态
  138. ticketList: [], // 盲票列表
  139. prizeList: [], // 奖品列表
  140. prizeNewsListOne: [], // 弹幕列表
  141. prizeNewsListTwo: [], // 弹幕列表
  142. payShow: false, // 支付弹框显示
  143. payInfo: {}, // 支付详情
  144. currentIndex: 0, // 盲票选中下标
  145. activeAnimation: 'moveLeft 10s linear infinite normal', // 奖品动画
  146. statusHeight: 20,
  147. ticketIndex: 0, // 盲票选中下标
  148. ticketTitleIndex: 0, // 盲票标题选中下边
  149. list: [1,2,3,4,5],
  150. percentage: 0,
  151. checkStatus: true,
  152. };
  153. },
  154. onLoad(opthios) {
  155. /**
  156. * 票赢天下小程序分享盲票跳转接受的参数
  157. * shareUid: 用户ID
  158. * shareType: 分享类型
  159. * */
  160. if (opthios.scene) {
  161. let sceneStr = decodeURIComponent(opthios.scene)
  162. this.sceneArr = sceneStr.split('&')
  163. uni.setStorageSync('shareUid', this.sceneArr[0])
  164. uni.setStorageSync('shareType', this.sceneArr[1])
  165. }
  166. // #ifdef MP-WEIXIN
  167. const res = uni.getMenuButtonBoundingClientRect()
  168. this.statusHeight = res.top //胶囊距离顶部
  169. // #endif
  170. let num = Math.round(100 / this.list.length)
  171. this.percentage = num
  172. this.getList()
  173. },
  174. onShow(opthios) {
  175. this.loginState = uni.getStorageSync('token') ? true : false
  176. this.getPrizeNews()
  177. },
  178. methods: {
  179. // 切换盲票
  180. changeTicket({ detail }) {
  181. console.log(detail);
  182. this.ticketIndex = detail.current
  183. this.ticketTitleIndex = detail.current
  184. this.setNum(detail.current)
  185. },
  186. // 切换盲票名称
  187. changeTicketTitle({ detail }) {
  188. console.log(detail);
  189. this.ticketIndex = detail.current
  190. this.ticketTitleIndex = detail.current
  191. this.setNum(detail.current)
  192. },
  193. setNum(index) {
  194. let num = Math.round(100 / this.list.length)
  195. if (index == 0) {
  196. this.percentage = uni.$u.range(0, 100, num)
  197. } else if (index == this.list.length - 1) {
  198. this.percentage = uni.$u.range(0, 100, 100)
  199. } else {
  200. this.percentage = uni.$u.range(0, 100, num * (index + 1))
  201. }
  202. },
  203. // 投诉建议
  204. contactService() {
  205. // #ifdef MP-WEIXIN
  206. wx.openCustomerServiceChat({
  207. extInfo: {
  208. url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
  209. },
  210. corpId: 'ww02da63d80c66284b',
  211. })
  212. // #endif
  213. },
  214. // 获取盲票列表
  215. getList() {
  216. uni.showLoading({
  217. title: '加载中'
  218. });
  219. let data = {
  220. categoryId: '',
  221. tagId: '',
  222. type: 'online',
  223. noToken: true
  224. }
  225. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  226. res => {
  227. uni.hideLoading();
  228. if (res.code == 0) {
  229. res.rows.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
  230. '?imageView2/2/w/375')
  231. this.ticketList = res.rows
  232. this.getPrize(this.ticketList[0].boxId)
  233. }
  234. }).catch(() => {
  235. uni.hideLoading();
  236. })
  237. },
  238. // 获取弹幕列表
  239. getPrizeNews() {
  240. $http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
  241. const {
  242. listOne,
  243. listTwo
  244. } = res && res.data
  245. listOne.forEach(item => {
  246. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  247. '70/EJ305PQR2IBE45O9AFAI'
  248. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  249. .substring(0, 15) + '...' : item.prizeInfo
  250. })
  251. listTwo.forEach(item => {
  252. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  253. '70/EJ305PQR2IBE45O9AFAI'
  254. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  255. .substring(0, 15) + '...' : item.prizeInfo
  256. })
  257. this.prizeNewsListOne = listOne
  258. this.prizeNewsListTwo = listTwo
  259. })
  260. },
  261. // 获取当前盲票的奖品列表
  262. getPrize(id) {
  263. this.prizeList = []
  264. $http.post('/api/v1/mp/user/mall/ticket/detail', {
  265. boxId: id,
  266. noToken: true
  267. }).then(res => {
  268. uni.hideLoading();
  269. if (res.code == 0) {
  270. let prizeList = res.data.prizeList
  271. prizeList.forEach(item => {
  272. let picUrlArr = item.picUrl.split(',')
  273. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  274. })
  275. this.prizeList = prizeList
  276. // 根据奖品数量动态设置动画时间
  277. let time = Math.ceil(this.prizeList.length / 5 * 10)
  278. this.activeAnimation = `moveLeft ${ time }s linear infinite normal`,
  279. this.payInfo = this.ticketList[this.currentIndex]
  280. }
  281. }).catch(() => {
  282. uni.hideLoading();
  283. })
  284. },
  285. // 立即开刮
  286. payment() {
  287. this.payInfo = this.ticketList[this.currentIndex]
  288. let data = {
  289. userCouponIds: [],
  290. autoCoupon: 1,
  291. boxId: this.payInfo.boxId,
  292. orderNum: 1
  293. }
  294. $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
  295. if (res.code == 0) {
  296. let info = {
  297. ...res.data,
  298. ...this.payInfo,
  299. couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
  300. .data.couponList[0].title,
  301. couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
  302. .couponList[0].id
  303. }
  304. this.payInfo = info
  305. this.payShow = true
  306. }
  307. }).catch(() => {
  308. uni.$u.toast('开刮失败,请重试!');
  309. })
  310. },
  311. // 关闭支付弹框
  312. close() {
  313. this.payShow = false
  314. },
  315. // // 盲票选中改变
  316. // changeTicket({
  317. // detail
  318. // }) {
  319. // this.currentIndex = detail.current
  320. // this.getPrize(this.ticketList[this.currentIndex].boxId)
  321. // },
  322. changeList() {
  323. let data = {
  324. categoryId: '',
  325. tagId: '',
  326. type: 'online',
  327. noToken: true
  328. }
  329. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  330. res => {
  331. const boxIdStr = this.ticketList.map(item => item.boxId).join()
  332. let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
  333. if (boxIdStr != boxIdStrNew) {
  334. this.currentIndex = 0
  335. this.getList()
  336. }
  337. })
  338. },
  339. // 盲票向左箭头
  340. ticketLeft() {
  341. if ((this.currentIndex >= 0) && (this.currentIndex < (this.ticketList.length - 1))) {
  342. this.currentIndex++
  343. } else if (this.currentIndex == (this.ticketList.length - 1)) {
  344. this.currentIndex = 0
  345. }
  346. this.changeList()
  347. },
  348. // 盲票向右箭头
  349. ticketRight() {
  350. if (this.currentIndex > 0) {
  351. this.currentIndex--
  352. } else if (this.currentIndex == 0) {
  353. this.currentIndex = this.ticketList.length - 1
  354. }
  355. this.changeList()
  356. },
  357. // 线上立即刮票成功,跳转到刮奖过程
  358. toProcess(id) {
  359. this.payShow = false
  360. uni.navigateTo({
  361. url: `/packageOperate/process/index?id=${ id }`
  362. })
  363. },
  364. // 点击盲票,跳转盲票详情
  365. toTicketBox() {
  366. let item = this.ticketList[this.currentIndex]
  367. uni.navigateTo({
  368. url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
  369. })
  370. },
  371. // 点击奖品,跳转到奖品详情
  372. toPrizeGoods(item) {
  373. if (item.prizeType == "goods") {
  374. uni.navigateTo({
  375. url: `/packagePrize/goods/detail?id=${ item.refId }`
  376. })
  377. }
  378. //门店优惠券
  379. if (item.prizeType == "coupon") {
  380. // if (item.couponType == "1") {
  381. // uni.navigateTo({
  382. // url: `/packagePrize/goods/detail?id=426`
  383. // })
  384. // }
  385. // if (item.couponType == "2") {
  386. // uni.navigateTo({
  387. // url: `/packagePrize/goods/detail?id=425`
  388. // })
  389. // }
  390. uni.navigateTo({
  391. url: `/packagePrize/goods/detail?id=425`
  392. })
  393. }
  394. // 盲豆
  395. if (item.prizeType == "coin") {
  396. uni.navigateTo({
  397. url: `/packagePrize/goods/detail?id=424`
  398. })
  399. }
  400. },
  401. // 点击所有盲票
  402. toTicket() {
  403. uni.navigateTo({
  404. url: '/packageGoods/ticket/index'
  405. })
  406. },
  407. // 点击奖品库
  408. toPrize() {
  409. if (!this.loginState) {
  410. uni.navigateTo({
  411. url: "/pages/login/index"
  412. })
  413. return
  414. }
  415. uni.navigateTo({
  416. url: '/packagePrize/prize/index'
  417. })
  418. },
  419. // 点击规则说明
  420. toRule() {
  421. uni.navigateTo({
  422. url: '/packageOther/rule/index'
  423. })
  424. }
  425. },
  426. onShareAppMessage(res) {
  427. return {
  428. title: '盲票,玩的就是有趣',
  429. path: '/pages/index/index'
  430. }
  431. }
  432. }
  433. </script>
  434. <style lang="scss" scoped>
  435. .status_bar {
  436. width: 100%;
  437. height: var(--status-bar-height);
  438. }
  439. /deep/ .u-tabbar__placeholder {
  440. display: none;
  441. }
  442. </style>
  443. <style lang="scss" scoped>
  444. .box {
  445. position: relative;
  446. width: 100%;
  447. height: calc(100vh - 50px);
  448. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
  449. background-size: 100vw calc(100vh - 50px);
  450. .index {
  451. position: absolute;
  452. width: 100%;
  453. }
  454. }
  455. // 中奖信息
  456. .barrage {
  457. width: 518rpx;
  458. height: 84rpx;
  459. background: linear-gradient(90deg, #FFD220, #FFF7A2);
  460. border-radius: 42rpx;
  461. margin-bottom: 16rpx;
  462. margin-left: 34rpx;
  463. &-swiper {
  464. width: 100%;
  465. height: 100%;
  466. border-radius: 42rpx;
  467. overflow: hidden;
  468. &-item {
  469. width: 100%;
  470. height: 100%;
  471. &-content {
  472. display: flex;
  473. align-items: center;
  474. width: 510rpx;
  475. height: 76rpx;
  476. image {
  477. width: 66rpx;
  478. height: 66rpx;
  479. border-radius: 50%;
  480. margin-right: 14rpx;
  481. }
  482. .title {
  483. flex: 1;
  484. font-size: 26rpx;
  485. font-family: PingFang SC;
  486. font-weight: 500;
  487. color: #333333;
  488. }
  489. }
  490. }
  491. }
  492. }
  493. // 查看规则
  494. .rule {
  495. display: flex;
  496. align-items: center;
  497. justify-content: flex-end;
  498. height: 34rpx;
  499. padding-right: 34rpx;
  500. margin-bottom: 24rpx;
  501. &-content {
  502. image {
  503. width: 34rpx;
  504. height: 34rpx;
  505. margin-right: 14rpx;
  506. }
  507. text {
  508. font-size: 40rpx;
  509. font-family: 'YouSheBiaoTiHei';
  510. font-weight: 400;
  511. color: #FFFFFF;
  512. }
  513. }
  514. }
  515. // 盲票
  516. .ticket {
  517. height: 36vh;
  518. &-swiper {
  519. height: 100%;
  520. &-item {
  521. position: relative;
  522. height: 100%;
  523. .box {
  524. position: absolute;
  525. bottom: 0;
  526. width: 75vw;
  527. height: 75%;
  528. }
  529. .prize {
  530. position: absolute;
  531. top: 0;
  532. width: 85vw;
  533. height: 75%;
  534. animation: movePrize 2s linear infinite;
  535. }
  536. }
  537. }
  538. }
  539. // 投诉建议
  540. .proposal {
  541. position: relative;
  542. height: 66rpx;
  543. margin-bottom: 30rpx;
  544. &-time {
  545. position: absolute;
  546. left: 30rpx;
  547. bottom: 0;
  548. flex-direction: column;
  549. align-items: flex-start;
  550. image {
  551. width: 140rpx;
  552. height: 78rpx;
  553. margin-bottom: 12rpx;
  554. animation: scaleTime 3s linear infinite;
  555. }
  556. .time {
  557. animation: moveTime 0.5s linear infinite;
  558. /deep/ .u-count-down__text {
  559. line-height: 30rpx;
  560. font-size: 30rpx;
  561. font-family: YouSheBiaoTiHei;
  562. font-weight: 400;
  563. color: #FFFFFF;
  564. }
  565. }
  566. }
  567. &-progress {
  568. position: absolute;
  569. bottom: 0;
  570. width: 140rpx;
  571. }
  572. &-tip {
  573. display: flex;
  574. align-items: center;
  575. position: absolute;
  576. right: 0;
  577. bottom: 0;
  578. width: 212rpx;
  579. height: 66rpx;
  580. image {
  581. position: absolute;
  582. right: 0;
  583. bottom: 0;
  584. width: 212rpx;
  585. height: 66rpx;
  586. }
  587. text {
  588. position: absolute;
  589. right: 16rpx;
  590. font-size: 40rpx;
  591. font-family: YouSheBiaoTiHei;
  592. font-weight: 400;
  593. color: #FFFFFF;
  594. }
  595. }
  596. }
  597. // 中奖概率
  598. .chance {
  599. height: 44rpx;
  600. margin: 0 34rpx 26rpx;
  601. background-color: rgba(000, 000, 000, .36);
  602. border-radius: 22rpx;
  603. color: #FFFFFF;
  604. font-family: YouSheBiaoTiHei;
  605. font-size: 14px;
  606. &-content {
  607. margin-right: 16rpx;
  608. image {
  609. width: 44rpx;
  610. height: 44rpx;
  611. }
  612. }
  613. &-content:last-child {
  614. margin: 0;
  615. }
  616. }
  617. // 盲票名称轮播
  618. .ticket-title {
  619. height: 66rpx;
  620. padding: 0 34rpx;
  621. &-swiper {
  622. width: calc(100vw - 34px);
  623. height: 100%;
  624. &-item {
  625. height: 100%;
  626. background: rgba(255, 255, 255, .16);
  627. margin: 0 17rpx;
  628. color: #fff;
  629. font-size: 34rpx;
  630. }
  631. .action {
  632. background: #FFAE00;
  633. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  634. }
  635. }
  636. }
  637. // 刮开盲票
  638. .ticket-btn {
  639. justify-content: space-between;
  640. height: 20vh;
  641. padding: 0 30rpx;
  642. &-left {
  643. flex-direction: column;
  644. image {
  645. width: 142rpx;
  646. height: 142rpx;
  647. margin-bottom: 16rpx;
  648. }
  649. &__title {
  650. line-height: 30rpx;
  651. font-size: 30rpx;
  652. font-family: YouSheBiaoTiHei;
  653. font-weight: 400;
  654. color: #FFFFFF;
  655. }
  656. }
  657. &-center {
  658. position: relative;
  659. flex-direction: column;
  660. height: 100%;
  661. image {
  662. width: 360rpx;
  663. height: 100%;
  664. }
  665. &-wrap {
  666. position: absolute;
  667. animation: scaleBtn 1.5s linear infinite;
  668. &__title {
  669. font-size: 84rpx;
  670. font-family: YouSheBiaoTiHei;
  671. font-weight: 400;
  672. color: #FFFFFF;
  673. line-height: 72rpx;
  674. animation: shadowBtn 1.5s linear infinite;
  675. }
  676. }
  677. }
  678. &-right {
  679. flex-direction: column;
  680. &__image {
  681. position: relative;
  682. width: 142rpx;
  683. height: 142rpx;
  684. margin-bottom: 16rpx;
  685. image:first-child {
  686. width: 142rpx;
  687. height: 142rpx;
  688. margin-bottom: 16rpx;
  689. }
  690. image:last-child {
  691. position: absolute;
  692. width: 60rpx;
  693. height: 60rpx;
  694. margin-bottom: 16rpx;
  695. }
  696. }
  697. &__title {
  698. line-height: 30rpx;
  699. font-size: 30rpx;
  700. font-family: YouSheBiaoTiHei;
  701. font-weight: 400;
  702. color: #FFFFFF;
  703. }
  704. }
  705. }
  706. // 盲票价格
  707. .ticket-price {
  708. height: 44rpx;
  709. &-checkbox {
  710. width: 44rpx;
  711. height: 44rpx;
  712. background-color: #fff;
  713. border-radius: 50%;
  714. overflow: hidden;
  715. margin-right: 20rpx;
  716. image {
  717. width: 44rpx;
  718. height: 44rpx;
  719. }
  720. }
  721. &-amt {
  722. height: 44rpx;
  723. font-family: YouSheBiaoTiHei;
  724. font-weight: 400;
  725. align-items: flex-end;
  726. color: #FFFFFF;
  727. margin-right: 20rpx;
  728. .num {
  729. font-size: 56rpx;
  730. line-height: 40rpx;
  731. }
  732. .txt {
  733. line-height: 36rpx;
  734. font-size: 40rpx;
  735. }
  736. }
  737. &-discount {
  738. height: 44rpx;
  739. align-items: flex-end;
  740. .num {
  741. line-height: 24rpx;
  742. font-size: 24rpx;
  743. text-decoration: line-through;
  744. }
  745. }
  746. }
  747. // 奖品移动动画
  748. @keyframes movePrize {
  749. 0% {
  750. transform: translate(0, 10px)
  751. }
  752. 25% {
  753. transform: translate(0, 5px)
  754. }
  755. 50% {
  756. transform: translate(0, 0px)
  757. }
  758. 75% {
  759. transform: translate(0, 5px)
  760. }
  761. 100% {
  762. transform: translate(0, 10px)
  763. }
  764. }
  765. // 倒计时移动动画
  766. @keyframes moveTime {
  767. 0% {
  768. transform: translate(2px, 0)
  769. }
  770. 25% {
  771. transform: translate(0, 0)
  772. }
  773. 50% {
  774. transform: translate(1px, 0)
  775. }
  776. 75% {
  777. transform: translate(0, 0)
  778. }
  779. 100% {
  780. transform: translate(2px, 0)
  781. }
  782. }
  783. // 放大缩小动画
  784. @keyframes scaleTime {
  785. 0% {
  786. transform: scale(1.05)
  787. }
  788. 25% {
  789. transform: scale(1.02)
  790. }
  791. 50% {
  792. transform: scale(0.9)
  793. }
  794. 75% {
  795. transform: scale(1.02)
  796. }
  797. 100% {
  798. transform: scale(1.05)
  799. }
  800. }
  801. // 刮开刮票呼吸动画
  802. @keyframes scaleBtn {
  803. 0% {
  804. transform: scale(1.04)
  805. }
  806. 25% {
  807. transform: scale(1.02)
  808. }
  809. 50% {
  810. transform: scale(1)
  811. }
  812. 75% {
  813. transform: scale(1.02)
  814. }
  815. 100% {
  816. transform: scale(1.04)
  817. }
  818. }
  819. // 刮开刮票阴影动画
  820. @keyframes shadowBtn {
  821. 0% {
  822. text-shadow: 2px -2px 3px #fff;
  823. }
  824. 25% {
  825. text-shadow: none;
  826. }
  827. 50% {
  828. text-shadow: none;
  829. }
  830. 75% {
  831. text-shadow: none;
  832. }
  833. 100% {
  834. text-shadow: 2px -2px 3px #fff;
  835. }
  836. }
  837. </style>