index.vue 22 KB

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