index.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  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. if (!uni.getStorageSync('token')) {
  383. uni.navigateTo({
  384. url: '/pages/login/index'
  385. })
  386. return
  387. }
  388. uni.navigateTo({
  389. url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&isTry=1`
  390. })
  391. },
  392. // 线上立即刮票成功,跳转到刮奖过程
  393. toProcess(id) {
  394. this.payShow = false
  395. uni.navigateTo({
  396. url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&orderId=${ id }&isTry=0`
  397. })
  398. },
  399. // 点击盲票,跳转盲票详情
  400. toTicketBox(item) {
  401. uni.navigateTo({
  402. url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
  403. })
  404. },
  405. // 点击奖品,跳转到奖品详情
  406. toPrizeGoods(item) {
  407. if (item.prizeType == "goods") {
  408. uni.navigateTo({
  409. url: `/packagePrize/goods/detail?id=${ item.refId }`
  410. })
  411. }
  412. //门店优惠券
  413. if (item.prizeType == "coupon") {
  414. // if (item.couponType == "1") {
  415. // uni.navigateTo({
  416. // url: `/packagePrize/goods/detail?id=426`
  417. // })
  418. // }
  419. // if (item.couponType == "2") {
  420. // uni.navigateTo({
  421. // url: `/packagePrize/goods/detail?id=425`
  422. // })
  423. // }
  424. uni.navigateTo({
  425. url: `/packagePrize/goods/detail?id=425`
  426. })
  427. }
  428. // 盲豆
  429. if (item.prizeType == "coin") {
  430. uni.navigateTo({
  431. url: `/packagePrize/goods/detail?id=424`
  432. })
  433. }
  434. },
  435. toActivity() {
  436. uni.switchTab({
  437. url: '/pages/activity/index'
  438. })
  439. },
  440. // 点击所有盲票
  441. toTicket() {
  442. uni.navigateTo({
  443. url: '/packageGoods/ticket/index'
  444. })
  445. },
  446. // 点击仓库
  447. toPrize() {
  448. if (!this.loginState) {
  449. uni.navigateTo({
  450. url: "/pages/login/index"
  451. })
  452. return
  453. }
  454. uni.navigateTo({
  455. url: '/packagePrize/prize/index'
  456. })
  457. },
  458. // 点击规则说明
  459. toRule() {
  460. uni.navigateTo({
  461. url: '/packageOther/rule/index'
  462. })
  463. }
  464. },
  465. onShareAppMessage(res) {
  466. return {
  467. title: '盲票,玩的就是有趣',
  468. path: '/pages/index/index'
  469. }
  470. }
  471. }
  472. </script>
  473. <style lang="scss" scoped>
  474. .status_bar {
  475. width: 100%;
  476. height: var(--status-bar-height);
  477. }
  478. /deep/ .u-tabbar__placeholder {
  479. display: none;
  480. }
  481. </style>
  482. <style lang="scss" scoped>
  483. .box {
  484. position: relative;
  485. width: 100%;
  486. height: calc(100vh - 50px);
  487. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
  488. background-size: 100vw calc(100vh - 50px);
  489. .index {
  490. position: absolute;
  491. width: 100%;
  492. }
  493. }
  494. // 中奖信息
  495. .barrage {
  496. position: relative;
  497. width: 518rpx;
  498. height: 70rpx;
  499. border-radius: 42rpx;
  500. margin-bottom: 16rpx;
  501. margin-left: 34rpx;
  502. &-bg {
  503. position: absolute;
  504. width: 518rpx;
  505. height: 70rpx;
  506. }
  507. &-swiper {
  508. position: absolute;
  509. z-index: 10;
  510. width: 100%;
  511. height: 100%;
  512. border-radius: 42rpx;
  513. overflow: hidden;
  514. &-item {
  515. width: 100%;
  516. height: 100%;
  517. &-content {
  518. display: flex;
  519. align-items: center;
  520. width: 510rpx;
  521. height: 70rpx;
  522. image {
  523. width: 58rpx;
  524. height: 58rpx;
  525. border-radius: 50%;
  526. margin-right: 14rpx;
  527. border: 1px solid #fff;
  528. margin-left: 8rpx;
  529. }
  530. .title {
  531. flex: 1;
  532. font-size: 26rpx;
  533. font-weight: 500;
  534. color: #fff;
  535. }
  536. }
  537. }
  538. }
  539. &-none {
  540. position: absolute;
  541. width: 518rpx;
  542. height: 70rpx;
  543. z-index: 20;
  544. }
  545. }
  546. // 查看规则
  547. .rule {
  548. display: flex;
  549. align-items: center;
  550. justify-content: flex-end;
  551. height: 34rpx;
  552. padding-right: 34rpx;
  553. margin-bottom: 24rpx;
  554. &-content {
  555. image {
  556. width: 34rpx;
  557. height: 34rpx;
  558. margin-right: 14rpx;
  559. }
  560. text {
  561. font-size: 40rpx;
  562. font-family: 'YouSheBiaoTiHei';
  563. font-weight: 400;
  564. color: #FFFFFF;
  565. }
  566. }
  567. }
  568. // 盲票
  569. .ticket {
  570. height: 36vh;
  571. &-swiper {
  572. height: 100%;
  573. &-item {
  574. position: relative;
  575. height: 100%;
  576. &-box {
  577. position: absolute;
  578. bottom: 0;
  579. width: 75vw;
  580. height: 75%;
  581. }
  582. &-prize {
  583. position: absolute;
  584. top: 0;
  585. width: 85vw;
  586. height: 75%;
  587. animation: movePrize 2s linear infinite;
  588. }
  589. }
  590. }
  591. }
  592. // 投诉建议
  593. .proposal {
  594. position: relative;
  595. height: 66rpx;
  596. margin-bottom: 30rpx;
  597. &-time {
  598. position: absolute;
  599. left: 30rpx;
  600. bottom: 0;
  601. flex-direction: column;
  602. align-items: flex-start;
  603. image {
  604. width: 140rpx;
  605. height: 78rpx;
  606. margin-bottom: 12rpx;
  607. animation: scaleTime 3s linear infinite;
  608. }
  609. .time {
  610. animation: moveTime 0.5s linear infinite;
  611. /deep/ .u-count-down__text {
  612. line-height: 30rpx;
  613. font-size: 30rpx;
  614. font-family: YouSheBiaoTiHei;
  615. font-weight: 400;
  616. color: #FFFFFF;
  617. }
  618. }
  619. }
  620. &-progress {
  621. position: absolute;
  622. bottom: 0;
  623. width: 140rpx;
  624. }
  625. &-tip {
  626. display: flex;
  627. align-items: center;
  628. position: absolute;
  629. right: 0;
  630. bottom: 0;
  631. width: 212rpx;
  632. height: 66rpx;
  633. image {
  634. position: absolute;
  635. right: 0;
  636. bottom: 0;
  637. width: 212rpx;
  638. height: 66rpx;
  639. }
  640. text {
  641. position: absolute;
  642. right: 16rpx;
  643. font-size: 40rpx;
  644. font-family: YouSheBiaoTiHei;
  645. font-weight: 400;
  646. color: #FFFFFF;
  647. }
  648. }
  649. }
  650. // 中奖概率
  651. .chance {
  652. justify-content: flex-start;
  653. height: 44rpx;
  654. margin: 0 34rpx 26rpx;
  655. background-color: rgba(000, 000, 000, .36);
  656. border-radius: 22rpx;
  657. color: #FFFFFF;
  658. font-family: YouSheBiaoTiHei;
  659. font-size: 14px;
  660. &-title {
  661. margin-left: 8rpx;
  662. }
  663. &-hitRate {
  664. flex: 1;
  665. justify-content: space-evenly;
  666. &-content {
  667. image {
  668. width: 56rpx;
  669. height: 50rpx;
  670. }
  671. }
  672. }
  673. }
  674. // 盲票名称轮播
  675. .ticket-title {
  676. height: 66rpx;
  677. padding: 0 34rpx;
  678. &-swiper {
  679. width: calc(100vw - 34px);
  680. height: 100%;
  681. &-item {
  682. height: 100%;
  683. background: rgba(255, 255, 255, .16);
  684. margin: 0 17rpx;
  685. color: #fff;
  686. font-size: 34rpx;
  687. }
  688. .action {
  689. background: #FFAE00;
  690. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  691. }
  692. }
  693. }
  694. // 刮开盲票
  695. .ticket-btn {
  696. justify-content: space-between;
  697. height: 20vh;
  698. padding: 0 30rpx;
  699. &-left {
  700. flex-direction: column;
  701. image {
  702. width: 142rpx;
  703. height: 142rpx;
  704. margin-bottom: 16rpx;
  705. }
  706. &__title {
  707. line-height: 30rpx;
  708. font-size: 30rpx;
  709. font-family: YouSheBiaoTiHei;
  710. font-weight: 400;
  711. color: #FFFFFF;
  712. }
  713. }
  714. &-center {
  715. position: relative;
  716. flex-direction: column;
  717. height: 100%;
  718. .image-wrap {
  719. position: absolute;
  720. width: 310rpx;
  721. height: 90%;
  722. border-radius: 50%;
  723. overflow: hidden;
  724. 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);
  725. .btn {
  726. width: 310rpx;
  727. height: 100%;
  728. }
  729. .shadow {
  730. position: absolute;
  731. width: 310rpx;
  732. height: 130%;
  733. left: 0;
  734. animation: shadowMove 1.5s linear infinite;
  735. }
  736. }
  737. &-wrap {
  738. width: 300rpx;
  739. position: absolute;
  740. animation: scaleBtn 1.5s linear infinite;
  741. &__title {
  742. width: 300rpx;
  743. text-align: center;
  744. font-size: 84rpx;
  745. font-family: YouSheBiaoTiHei;
  746. font-weight: 400;
  747. color: #FFFFFF;
  748. line-height: 72rpx;
  749. animation: shadowBtn 1.5s linear infinite;
  750. }
  751. }
  752. }
  753. &-right {
  754. flex-direction: column;
  755. image {
  756. width: 142rpx;
  757. height: 142rpx;
  758. margin-bottom: 16rpx;
  759. }
  760. &__title {
  761. line-height: 30rpx;
  762. font-size: 30rpx;
  763. font-family: YouSheBiaoTiHei;
  764. font-weight: 400;
  765. color: #FFFFFF;
  766. }
  767. }
  768. }
  769. // 盲票价格
  770. .ticket-price {
  771. height: 44rpx;
  772. &-checkbox {
  773. width: 44rpx;
  774. height: 44rpx;
  775. background-color: #fff;
  776. border-radius: 50%;
  777. overflow: hidden;
  778. margin-right: 20rpx;
  779. image {
  780. width: 44rpx;
  781. height: 44rpx;
  782. }
  783. }
  784. &-amt {
  785. height: 44rpx;
  786. font-family: YouSheBiaoTiHei;
  787. font-weight: 400;
  788. align-items: flex-end;
  789. color: #FFFFFF;
  790. margin-right: 20rpx;
  791. .num {
  792. font-size: 56rpx;
  793. line-height: 40rpx;
  794. }
  795. .txt {
  796. line-height: 36rpx;
  797. font-size: 40rpx;
  798. }
  799. }
  800. &-discount {
  801. height: 44rpx;
  802. align-items: flex-end;
  803. .num {
  804. line-height: 26rpx;
  805. font-size: 26rpx;
  806. text-decoration: line-through;
  807. font-style: italic;
  808. color: #FFFEFE;
  809. }
  810. }
  811. }
  812. // 奖品移动动画
  813. @keyframes movePrize {
  814. 0% {
  815. transform: translate(0, 10px)
  816. }
  817. 25% {
  818. transform: translate(0, 5px)
  819. }
  820. 50% {
  821. transform: translate(0, 0px)
  822. }
  823. 75% {
  824. transform: translate(0, 5px)
  825. }
  826. 100% {
  827. transform: translate(0, 10px)
  828. }
  829. }
  830. // 倒计时移动动画
  831. @keyframes moveTime {
  832. 0% {
  833. transform: translate(2px, 0)
  834. }
  835. 25% {
  836. transform: translate(0, 0)
  837. }
  838. 50% {
  839. transform: translate(1px, 0)
  840. }
  841. 75% {
  842. transform: translate(0, 0)
  843. }
  844. 100% {
  845. transform: translate(2px, 0)
  846. }
  847. }
  848. // 放大缩小动画
  849. @keyframes scaleTime {
  850. 0% {
  851. transform: scale(1.05)
  852. }
  853. 25% {
  854. transform: scale(1.02)
  855. }
  856. 50% {
  857. transform: scale(0.9)
  858. }
  859. 75% {
  860. transform: scale(1.02)
  861. }
  862. 100% {
  863. transform: scale(1.05)
  864. }
  865. }
  866. // 刮开刮票呼吸动画
  867. @keyframes scaleBtn {
  868. 0% {
  869. transform: scale(1.04)
  870. }
  871. 25% {
  872. transform: scale(1.02)
  873. }
  874. 50% {
  875. transform: scale(1)
  876. }
  877. 75% {
  878. transform: scale(1.02)
  879. }
  880. 100% {
  881. transform: scale(1.04)
  882. }
  883. }
  884. // 刮开刮票阴影动画
  885. @keyframes shadowBtn {
  886. 0% {
  887. text-shadow: 2px -2px 3px #fff;
  888. }
  889. 25% {
  890. text-shadow: none;
  891. }
  892. 50% {
  893. text-shadow: none;
  894. }
  895. 75% {
  896. text-shadow: none;
  897. }
  898. 100% {
  899. text-shadow: 2px -2px 3px #fff;
  900. }
  901. }
  902. // 刮开盲票光影移动动画
  903. @keyframes shadowMove {
  904. 0% {
  905. left: -100%;
  906. }
  907. 100% {
  908. left: 110%;
  909. }
  910. }
  911. </style>