index.vue 22 KB

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