index.vue 22 KB

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