index.vue 21 KB

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