index.vue 22 KB

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