index.vue 22 KB

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