index.vue 23 KB

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