index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997
  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 ticketList" :key="index" @click="toTicketBox(item)">
  29. <view class="ticket-swiper-item flex">
  30. <image class="ticket-swiper-item-box" :src="item.picUrl[2]" mode="scaleToFill"></image>
  31. <image class="ticket-swiper-item-prize" :src="item.picUrl[1]" mode="scaleToFill"></image>
  32. </view>
  33. </swiper-item>
  34. </swiper>
  35. </view>
  36. <!-- 投诉建议 -->
  37. <view class="proposal flex">
  38. <view class="proposal-time flex" v-show="filterActivityList.length" @click="toActivity">
  39. <image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
  40. <view class="time">
  41. <u-count-down :time="activityTime" 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-hitRate flex">
  56. <view class="chance-hitRate-content flex" v-for="(item, index) in ticketInfo.ticketAwardsLabelList" :key="index">
  57. <image :src="item.picUrl" mode="scaleToFill"></image>
  58. <text>{{ item.hitRate }}%</text>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 盲票名称轮播 -->
  63. <view class="ticket-title" flex>
  64. <swiper class="ticket-title-swiper flex" :current="ticketTitleIndex" previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true" @change="changeTicketTitle">
  65. <swiper-item v-for="(item, index) in ticketList" :key="index">
  66. <view class="ticket-title-swiper-item flex" :class="{ 'action': ticketTitleIndex == index }">
  67. <text>{{ item.title }}</text>
  68. </view>
  69. </swiper-item>
  70. </swiper>
  71. </view>
  72. <!-- 刮开盲票 -->
  73. <view class="ticket-btn flex">
  74. <view class="ticket-btn-left flex" @click="toRollingGame">
  75. <image src="../../static/index/index_btn_left.png" mode="scaleToFill"></image>
  76. <view class="ticket-btn-left__title">试玩</view>
  77. </view>
  78. <view class="ticket-btn-center flex" @click="payment">
  79. <view class="image-wrap flex">
  80. <image class="btn" src="../../static/index/index_btn.png" mode="scaleToFill"></image>
  81. <image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill"></image>
  82. </view>
  83. <view class="ticket-btn-center-wrap flex">
  84. <view class="ticket-btn-center-wrap__title">刮开<br />盲票</view>
  85. </view>
  86. </view>
  87. <view class="ticket-btn-right flex" @click="toTicket">
  88. <image src="../../static/index/index_btn_right.png" mode="scaleToFill"></image>
  89. <view class="ticket-btn-right__title">更多盲票</view>
  90. </view>
  91. </view>
  92. <!-- 盲票价格 -->
  93. <view class="ticket-price flex">
  94. <!-- <view class="ticket-price-checkbox flex">
  95. <image src="../../static/index/index_price_checkout.png" mode="scaleToFill"></image>
  96. </view> -->
  97. <view class="ticket-price-amt flex">
  98. <view class="num">{{ $numberFormat(ticketInfo.salePrice) }}</view>
  99. <view class="txt">元/个</view>
  100. </view>
  101. <view class="ticket-price-discount flex" v-if="ticketInfo.originPrice != 0">
  102. <view class="num">原价¥{{ $numberFormat(ticketInfo.originPrice) }}</view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <!-- tabbar组件 -->
  108. <custom-tab-bar :activeValue="'index'" />
  109. <!-- 支付弹框组件 -->
  110. <pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="toProcess" v-if="payShow" />
  111. <!-- 助力邀请弹框组件 -->
  112. <activity-help :activity-show="activityShow" :inviteCode="inviteCode" :marketingId="marketingId" @close="close" @success="toActivity" v-if="activityShow" />
  113. </view>
  114. </template>
  115. <script>
  116. import env from '../../config/env.js'
  117. import $http from '@/utils/request.js'
  118. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  119. import PayPopup from '../../components/pay-popup/pay-popup.vue'
  120. import ActivityHelp from '@/components/activity-help/activity-help.vue'
  121. export default {
  122. components: {
  123. CustomTabBar,
  124. PayPopup,
  125. ActivityHelp
  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. inviteCode: '',//助力邀请码
  144. marketingId: '',//活动id
  145. activityShow: false,//助力邀请弹框
  146. filterActivityList: [],
  147. activityTime: null,
  148. ticketInfo: {}
  149. };
  150. },
  151. onLoad(opthios) {
  152. /**
  153. * 免费活动邀请助力分享跳转接收参数
  154. * inviteCode: 邀请码
  155. * marketingId: 活动id
  156. * */
  157. if (opthios.inviteCode && opthios.marketingId) {
  158. this.inviteCode = opthios.inviteCode
  159. this.marketingId = opthios.marketingId
  160. this.activityShow = true
  161. }
  162. /**
  163. * 票赢天下小程序分享盲票跳转接受的参数
  164. * shareUid: 用户ID
  165. * shareType: 分享类型
  166. * */
  167. if (opthios.scene) {
  168. let sceneStr = decodeURIComponent(opthios.scene)
  169. this.sceneArr = sceneStr.split('&')
  170. uni.setStorageSync('shareUid', this.sceneArr[0])
  171. uni.setStorageSync('shareType', this.sceneArr[1])
  172. }
  173. // #ifdef MP-WEIXIN
  174. const res = uni.getMenuButtonBoundingClientRect()
  175. this.statusHeight = res.top //胶囊距离顶部
  176. // #endif
  177. let num = Math.round(100 / this.list.length)
  178. this.percentage = num
  179. this.getList()
  180. },
  181. onShow(opthios) {
  182. this.loginState = uni.getStorageSync('token') ? true : false
  183. this.getPrizeNews()
  184. this.getActivityList()
  185. },
  186. methods: {
  187. // 切换盲票
  188. changeTicket({ detail }) {
  189. this.ticketIndex = detail.current
  190. this.ticketTitleIndex = detail.current
  191. this.getTicketDetail(this.ticketList[detail.current].boxId)
  192. this.setNum(detail.current)
  193. },
  194. // 切换盲票名称
  195. changeTicketTitle({ detail }) {
  196. this.ticketIndex = detail.current
  197. this.ticketTitleIndex = detail.current
  198. this.getTicketDetail(this.ticketList[detail.current].boxId)
  199. this.setNum(detail.current)
  200. },
  201. setNum(index) {
  202. let num = Math.round(100 / this.list.length)
  203. if (index == 0) {
  204. this.percentage = uni.$u.range(0, 100, num)
  205. } else if (index == this.list.length - 1) {
  206. this.percentage = uni.$u.range(0, 100, 100)
  207. } else {
  208. this.percentage = uni.$u.range(0, 100, num * (index + 1))
  209. }
  210. },
  211. // 投诉建议
  212. contactService() {
  213. // #ifdef MP-WEIXIN
  214. wx.openCustomerServiceChat({
  215. extInfo: {
  216. url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
  217. },
  218. corpId: 'ww02da63d80c66284b',
  219. })
  220. // #endif
  221. },
  222. // 活动
  223. getActivityList() {
  224. $http.post(`/api/v1/mp/user/marketing/list?pageNum=${ this.pageNum }&pageSize=20`, {
  225. triggerStatus: 0,
  226. }).then(res => {
  227. let data = res.rows
  228. this.filterActivityList = data.filter(item=> {
  229. return JSON.parse(item.status).value == 3
  230. })
  231. let activityInfo = this.filterActivityList.length ? this.filterActivityList[0] : {}
  232. let timestamp = parseInt(new Date().getTime())
  233. this.activityTime = activityInfo.endTime - timestamp
  234. })
  235. },
  236. // 获取盲票列表
  237. getList() {
  238. uni.showLoading({
  239. title: '加载中'
  240. });
  241. let data = {
  242. categoryId: '',
  243. tagId: '',
  244. type: 'online',
  245. noToken: true
  246. }
  247. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  248. res => {
  249. uni.hideLoading();
  250. if (res.code == 0) {
  251. res.rows.forEach(item => item.picUrl = item.picUrl.split(',').map(item => env.filePublic + item + '?imageView2/2/w/750'))
  252. this.ticketList = res.rows
  253. this.getTicketDetail(this.ticketList[0].boxId)
  254. }
  255. }).catch(() => {
  256. uni.hideLoading();
  257. })
  258. },
  259. // 获取弹幕列表
  260. getPrizeNews() {
  261. $http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
  262. const {
  263. listOne,
  264. listTwo
  265. } = res && res.data
  266. listOne.forEach(item => {
  267. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  268. '70/EJ305PQR2IBE45O9AFAI'
  269. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  270. .substring(0, 15) + '...' : item.prizeInfo
  271. })
  272. listTwo.forEach(item => {
  273. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  274. '70/EJ305PQR2IBE45O9AFAI'
  275. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  276. .substring(0, 15) + '...' : item.prizeInfo
  277. })
  278. this.prizeNewsListOne = listOne
  279. this.prizeNewsListTwo = listTwo
  280. })
  281. },
  282. // 获取当前盲票的详情
  283. getTicketDetail(id) {
  284. this.prizeList = []
  285. $http.post('/api/v1/mp/user/mall/ticket/detail', {
  286. boxId: id,
  287. noToken: true
  288. }).then(res => {
  289. uni.hideLoading();
  290. if (res.code == 0) {
  291. this.ticketInfo = {
  292. ...res.data,
  293. ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
  294. return { ...item, picUrl: env.filePublic + item.picUrl }
  295. })
  296. }
  297. this.payInfo = this.ticketList[this.ticketIndex]
  298. }
  299. }).catch(() => {
  300. uni.hideLoading();
  301. })
  302. },
  303. // 立即开刮
  304. payment() {
  305. this.payInfo = this.ticketList[this.ticketIndex]
  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. picUrl: this.payInfo.picUrl[0],
  318. couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
  319. .data.couponList[0].title,
  320. couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
  321. .couponList[0].id
  322. }
  323. this.payInfo = info
  324. this.payShow = true
  325. }
  326. }).catch(() => {
  327. uni.$u.toast('开刮失败,请重试!');
  328. })
  329. },
  330. // 关闭支付弹框
  331. close() {
  332. this.payShow = false
  333. this.activityShow = false
  334. },
  335. changeList() {
  336. let data = {
  337. categoryId: '',
  338. tagId: '',
  339. type: 'online',
  340. noToken: true
  341. }
  342. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  343. res => {
  344. const boxIdStr = this.ticketList.map(item => item.boxId).join()
  345. let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
  346. if (boxIdStr != boxIdStrNew) {
  347. this.currentIndex = 0
  348. this.getList()
  349. }
  350. })
  351. },
  352. // 盲票向左箭头
  353. ticketLeft() {
  354. if ((this.currentIndex >= 0) && (this.currentIndex < (this.ticketList.length - 1))) {
  355. this.currentIndex++
  356. } else if (this.currentIndex == (this.ticketList.length - 1)) {
  357. this.currentIndex = 0
  358. }
  359. this.changeList()
  360. },
  361. // 盲票向右箭头
  362. ticketRight() {
  363. if (this.currentIndex > 0) {
  364. this.currentIndex--
  365. } else if (this.currentIndex == 0) {
  366. this.currentIndex = this.ticketList.length - 1
  367. }
  368. this.changeList()
  369. },
  370. toRollingGame() {
  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. width: 518rpx;
  480. height: 84rpx;
  481. background: linear-gradient(90deg, #FFD220, #FFF7A2);
  482. border-radius: 42rpx;
  483. margin-bottom: 16rpx;
  484. margin-left: 34rpx;
  485. &-swiper {
  486. width: 100%;
  487. height: 100%;
  488. border-radius: 42rpx;
  489. overflow: hidden;
  490. &-item {
  491. width: 100%;
  492. height: 100%;
  493. &-content {
  494. display: flex;
  495. align-items: center;
  496. width: 510rpx;
  497. height: 76rpx;
  498. image {
  499. width: 66rpx;
  500. height: 66rpx;
  501. border-radius: 50%;
  502. margin-right: 14rpx;
  503. }
  504. .title {
  505. flex: 1;
  506. font-size: 26rpx;
  507. font-family: PingFang SC;
  508. font-weight: 500;
  509. color: #333333;
  510. }
  511. }
  512. }
  513. }
  514. }
  515. // 查看规则
  516. .rule {
  517. display: flex;
  518. align-items: center;
  519. justify-content: flex-end;
  520. height: 34rpx;
  521. padding-right: 34rpx;
  522. margin-bottom: 24rpx;
  523. &-content {
  524. image {
  525. width: 34rpx;
  526. height: 34rpx;
  527. margin-right: 14rpx;
  528. }
  529. text {
  530. font-size: 40rpx;
  531. font-family: 'YouSheBiaoTiHei';
  532. font-weight: 400;
  533. color: #FFFFFF;
  534. }
  535. }
  536. }
  537. // 盲票
  538. .ticket {
  539. height: 36vh;
  540. &-swiper {
  541. height: 100%;
  542. &-item {
  543. position: relative;
  544. height: 100%;
  545. &-box {
  546. position: absolute;
  547. bottom: 0;
  548. width: 75vw;
  549. height: 75%;
  550. }
  551. &-prize {
  552. position: absolute;
  553. top: 0;
  554. width: 85vw;
  555. height: 75%;
  556. animation: movePrize 2s linear infinite;
  557. }
  558. }
  559. }
  560. }
  561. // 投诉建议
  562. .proposal {
  563. position: relative;
  564. height: 66rpx;
  565. margin-bottom: 30rpx;
  566. &-time {
  567. position: absolute;
  568. left: 30rpx;
  569. bottom: 0;
  570. flex-direction: column;
  571. align-items: flex-start;
  572. image {
  573. width: 140rpx;
  574. height: 78rpx;
  575. margin-bottom: 12rpx;
  576. animation: scaleTime 3s linear infinite;
  577. }
  578. .time {
  579. animation: moveTime 0.5s linear infinite;
  580. /deep/ .u-count-down__text {
  581. line-height: 30rpx;
  582. font-size: 30rpx;
  583. font-family: YouSheBiaoTiHei;
  584. font-weight: 400;
  585. color: #FFFFFF;
  586. }
  587. }
  588. }
  589. &-progress {
  590. position: absolute;
  591. bottom: 0;
  592. width: 140rpx;
  593. }
  594. &-tip {
  595. display: flex;
  596. align-items: center;
  597. position: absolute;
  598. right: 0;
  599. bottom: 0;
  600. width: 212rpx;
  601. height: 66rpx;
  602. image {
  603. position: absolute;
  604. right: 0;
  605. bottom: 0;
  606. width: 212rpx;
  607. height: 66rpx;
  608. }
  609. text {
  610. position: absolute;
  611. right: 16rpx;
  612. font-size: 40rpx;
  613. font-family: YouSheBiaoTiHei;
  614. font-weight: 400;
  615. color: #FFFFFF;
  616. }
  617. }
  618. }
  619. // 中奖概率
  620. .chance {
  621. justify-content: flex-start;
  622. height: 44rpx;
  623. margin: 0 34rpx 26rpx;
  624. background-color: rgba(000, 000, 000, .36);
  625. border-radius: 22rpx;
  626. color: #FFFFFF;
  627. font-family: YouSheBiaoTiHei;
  628. font-size: 14px;
  629. &-title {
  630. margin-left: 8rpx;
  631. }
  632. &-hitRate {
  633. flex: 1;
  634. justify-content: space-evenly;
  635. &-content {
  636. image {
  637. width: 56rpx;
  638. height: 50rpx;
  639. }
  640. }
  641. }
  642. }
  643. // 盲票名称轮播
  644. .ticket-title {
  645. height: 66rpx;
  646. padding: 0 34rpx;
  647. &-swiper {
  648. width: calc(100vw - 34px);
  649. height: 100%;
  650. &-item {
  651. height: 100%;
  652. background: rgba(255, 255, 255, .16);
  653. margin: 0 17rpx;
  654. color: #fff;
  655. font-size: 34rpx;
  656. }
  657. .action {
  658. background: #FFAE00;
  659. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  660. }
  661. }
  662. }
  663. // 刮开盲票
  664. .ticket-btn {
  665. justify-content: space-between;
  666. height: 20vh;
  667. padding: 0 30rpx;
  668. &-left {
  669. flex-direction: column;
  670. image {
  671. width: 142rpx;
  672. height: 142rpx;
  673. margin-bottom: 16rpx;
  674. }
  675. &__title {
  676. line-height: 30rpx;
  677. font-size: 30rpx;
  678. font-family: YouSheBiaoTiHei;
  679. font-weight: 400;
  680. color: #FFFFFF;
  681. }
  682. }
  683. &-center {
  684. position: relative;
  685. flex-direction: column;
  686. height: 100%;
  687. .image-wrap {
  688. position: absolute;
  689. width: 310rpx;
  690. height: 90%;
  691. border-radius: 50%;
  692. overflow: hidden;
  693. 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);
  694. .btn {
  695. width: 310rpx;
  696. height: 100%;
  697. }
  698. .shadow {
  699. position: absolute;
  700. width: 310rpx;
  701. height: 130%;
  702. left: 0;
  703. animation: shadowMove 1.5s linear infinite;
  704. }
  705. }
  706. &-wrap {
  707. width: 300rpx;
  708. position: absolute;
  709. animation: scaleBtn 1.5s linear infinite;
  710. &__title {
  711. width: 300rpx;
  712. text-align: center;
  713. font-size: 84rpx;
  714. font-family: YouSheBiaoTiHei;
  715. font-weight: 400;
  716. color: #FFFFFF;
  717. line-height: 72rpx;
  718. animation: shadowBtn 1.5s linear infinite;
  719. }
  720. }
  721. }
  722. &-right {
  723. flex-direction: column;
  724. image {
  725. width: 142rpx;
  726. height: 142rpx;
  727. margin-bottom: 16rpx;
  728. }
  729. &__title {
  730. line-height: 30rpx;
  731. font-size: 30rpx;
  732. font-family: YouSheBiaoTiHei;
  733. font-weight: 400;
  734. color: #FFFFFF;
  735. }
  736. }
  737. }
  738. // 盲票价格
  739. .ticket-price {
  740. height: 44rpx;
  741. &-checkbox {
  742. width: 44rpx;
  743. height: 44rpx;
  744. background-color: #fff;
  745. border-radius: 50%;
  746. overflow: hidden;
  747. margin-right: 20rpx;
  748. image {
  749. width: 44rpx;
  750. height: 44rpx;
  751. }
  752. }
  753. &-amt {
  754. height: 44rpx;
  755. font-family: YouSheBiaoTiHei;
  756. font-weight: 400;
  757. align-items: flex-end;
  758. color: #FFFFFF;
  759. margin-right: 20rpx;
  760. .num {
  761. font-size: 56rpx;
  762. line-height: 40rpx;
  763. }
  764. .txt {
  765. line-height: 36rpx;
  766. font-size: 40rpx;
  767. }
  768. }
  769. &-discount {
  770. height: 44rpx;
  771. align-items: flex-end;
  772. .num {
  773. line-height: 24rpx;
  774. font-size: 24rpx;
  775. text-decoration: line-through;
  776. }
  777. }
  778. }
  779. // 奖品移动动画
  780. @keyframes movePrize {
  781. 0% {
  782. transform: translate(0, 10px)
  783. }
  784. 25% {
  785. transform: translate(0, 5px)
  786. }
  787. 50% {
  788. transform: translate(0, 0px)
  789. }
  790. 75% {
  791. transform: translate(0, 5px)
  792. }
  793. 100% {
  794. transform: translate(0, 10px)
  795. }
  796. }
  797. // 倒计时移动动画
  798. @keyframes moveTime {
  799. 0% {
  800. transform: translate(2px, 0)
  801. }
  802. 25% {
  803. transform: translate(0, 0)
  804. }
  805. 50% {
  806. transform: translate(1px, 0)
  807. }
  808. 75% {
  809. transform: translate(0, 0)
  810. }
  811. 100% {
  812. transform: translate(2px, 0)
  813. }
  814. }
  815. // 放大缩小动画
  816. @keyframes scaleTime {
  817. 0% {
  818. transform: scale(1.05)
  819. }
  820. 25% {
  821. transform: scale(1.02)
  822. }
  823. 50% {
  824. transform: scale(0.9)
  825. }
  826. 75% {
  827. transform: scale(1.02)
  828. }
  829. 100% {
  830. transform: scale(1.05)
  831. }
  832. }
  833. // 刮开刮票呼吸动画
  834. @keyframes scaleBtn {
  835. 0% {
  836. transform: scale(1.04)
  837. }
  838. 25% {
  839. transform: scale(1.02)
  840. }
  841. 50% {
  842. transform: scale(1)
  843. }
  844. 75% {
  845. transform: scale(1.02)
  846. }
  847. 100% {
  848. transform: scale(1.04)
  849. }
  850. }
  851. // 刮开刮票阴影动画
  852. @keyframes shadowBtn {
  853. 0% {
  854. text-shadow: 2px -2px 3px #fff;
  855. }
  856. 25% {
  857. text-shadow: none;
  858. }
  859. 50% {
  860. text-shadow: none;
  861. }
  862. 75% {
  863. text-shadow: none;
  864. }
  865. 100% {
  866. text-shadow: 2px -2px 3px #fff;
  867. }
  868. }
  869. // 刮开盲票光影移动动画
  870. @keyframes shadowMove {
  871. 0% {
  872. left: -100%;
  873. }
  874. 100% {
  875. left: 110%;
  876. }
  877. }
  878. </style>