index.vue 23 KB

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