index.vue 22 KB

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