index.vue 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004
  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 list" :key="index">
  29. <view class="ticket-swiper-item flex">
  30. <image class="box" src="../../static/index/index_ticket.png" mode="scaleToFill"></image>
  31. <image class="prize" src="../../static/index/index_prize.png" mode="scaleToFill"></image>
  32. </view>
  33. </swiper-item>
  34. </swiper>
  35. </view>
  36. <!-- 投诉建议 -->
  37. <view class="proposal flex">
  38. <view class="proposal-time flex">
  39. <image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
  40. <view class="time">
  41. <u-count-down :time="30 * 60 * 60 * 1000" 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-content flex">
  56. <image src="../../static/index/index_chance_1.png" mode="scaleToFill"></image>
  57. <text>0.1%</text>
  58. </view>
  59. <view class="chance-content flex">
  60. <image src="../../static/index/index_chance_2.png" mode="scaleToFill"></image>
  61. <text>10.0%</text>
  62. </view>
  63. <view class="chance-content flex">
  64. <image src="../../static/index/index_chance_3.png" mode="scaleToFill"></image>
  65. <text>10.0%</text>
  66. </view>
  67. <view class="chance-content flex">
  68. <image src="../../static/index/index_chance_4.png" mode="scaleToFill"></image>
  69. <text>10.0%</text>
  70. </view>
  71. </view>
  72. <!-- 盲票名称轮播 -->
  73. <view class="ticket-title" flex>
  74. <swiper class="ticket-title-swiper flex" :current="ticketTitleIndex" previous-margin="110px" next-margin="110px" :autoplay="false" :circular="true" @change="changeTicketTitle">
  75. <swiper-item v-for="(item, index) in list" :key="index">
  76. <view class="ticket-title-swiper-item flex" :class="{ 'action': ticketTitleIndex == index }">
  77. <text>爆款必抽</text>
  78. </view>
  79. </swiper-item>
  80. </swiper>
  81. </view>
  82. <!-- 刮开盲票 -->
  83. <view class="ticket-btn flex">
  84. <view class="ticket-btn-left flex">
  85. <image src="../../static/index/index_btn_left.png" mode="scaleToFill"></image>
  86. <view class="ticket-btn-left__title">试玩</view>
  87. </view>
  88. <view class="ticket-btn-center flex">
  89. <view class="image-wrap flex">
  90. <image class="btn" src="../../static/index/index_btn.png" mode="scaleToFill"></image>
  91. <image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill"></image>
  92. </view>
  93. <view class="ticket-btn-center-wrap flex">
  94. <view class="ticket-btn-center-wrap__title">刮开<br />盲票</view>
  95. </view>
  96. </view>
  97. <view class="ticket-btn-right flex" @click="toTicket">
  98. <view class="ticket-btn-right__image flex">
  99. <image src="../../static/index/index_btn_right_cir.png" mode="scaleToFill"></image>
  100. <image src="../../static/index/index_btn_cir_center.png" mode="scaleToFill"></image>
  101. </view>
  102. <view class="ticket-btn-right__title">更多盲票</view>
  103. </view>
  104. </view>
  105. <!-- 盲票价格 -->
  106. <view class="ticket-price flex">
  107. <view class="ticket-price-checkbox flex">
  108. <image src="../../static/index/index_price_checkout.png" mode="scaleToFill"></image>
  109. </view>
  110. <view class="ticket-price-amt flex">
  111. <view class="num">49.00</view>
  112. <view class="txt">元/个</view>
  113. </view>
  114. <view class="ticket-price-discount flex">
  115. <view class="num">原价¥68.00元</view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- tabbar组件 -->
  121. <custom-tab-bar :activeValue="'index'" />
  122. <!-- 支付弹框组件 -->
  123. <pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="toProcess" v-if="payShow" />
  124. <!-- 助力邀请弹框组件 -->
  125. <activity-help :activity-show="activityShow" :inviteCode="inviteCode" :marketingId="marketingId" @close="close" @success="toActivity" v-if="activityShow" />
  126. </view>
  127. </template>
  128. <script>
  129. import env from '../../config/env.js'
  130. import $http from '@/utils/request.js'
  131. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  132. import PayPopup from '../../components/pay-popup/pay-popup.vue'
  133. import PrizeBarrage from '@/components/prize-barrage/prize-barrage.vue'
  134. import ActivityHelp from '@/components/activity-help/activity-help.vue'
  135. export default {
  136. components: {
  137. CustomTabBar,
  138. PayPopup,
  139. PrizeBarrage,
  140. ActivityHelp
  141. },
  142. data() {
  143. return {
  144. loginState: false, // 登录状态
  145. ticketList: [], // 盲票列表
  146. prizeList: [], // 奖品列表
  147. prizeNewsListOne: [], // 弹幕列表
  148. prizeNewsListTwo: [], // 弹幕列表
  149. payShow: false, // 支付弹框显示
  150. payInfo: {}, // 支付详情
  151. currentIndex: 0, // 盲票选中下标
  152. activeAnimation: 'moveLeft 10s linear infinite normal', // 奖品动画
  153. statusHeight: 20,
  154. ticketIndex: 0, // 盲票选中下标
  155. ticketTitleIndex: 0, // 盲票标题选中下边
  156. list: [1,2,3,4,5],
  157. percentage: 0,
  158. checkStatus: true,
  159. inviteCode: '',//助力邀请码
  160. marketingId: '',//活动id
  161. activityShow: false,//助力邀请弹框
  162. };
  163. },
  164. onLoad(opthios) {
  165. console.log(13233433,JSON.stringify(opthios));
  166. /**
  167. * 免费活动邀请助力分享跳转接收参数
  168. * inviteCode: 邀请码
  169. * marketingId: 活动id
  170. * */
  171. if (opthios.inviteCode && opthios.marketingId) {
  172. this.inviteCode = opthios.inviteCode
  173. this.marketingId = opthios.marketingId
  174. this.activityShow = true
  175. }
  176. /**
  177. * 票赢天下小程序分享盲票跳转接受的参数
  178. * shareUid: 用户ID
  179. * shareType: 分享类型
  180. * */
  181. if (opthios.scene) {
  182. let sceneStr = decodeURIComponent(opthios.scene)
  183. this.sceneArr = sceneStr.split('&')
  184. uni.setStorageSync('shareUid', this.sceneArr[0])
  185. uni.setStorageSync('shareType', this.sceneArr[1])
  186. }
  187. // #ifdef MP-WEIXIN
  188. const res = uni.getMenuButtonBoundingClientRect()
  189. this.statusHeight = res.top //胶囊距离顶部
  190. // #endif
  191. let num = Math.round(100 / this.list.length)
  192. this.percentage = num
  193. this.getList()
  194. },
  195. onShow(opthios) {
  196. this.loginState = uni.getStorageSync('token') ? true : false
  197. this.getPrizeNews()
  198. },
  199. methods: {
  200. // 切换盲票
  201. changeTicket({ detail }) {
  202. console.log(detail);
  203. this.ticketIndex = detail.current
  204. this.ticketTitleIndex = detail.current
  205. this.setNum(detail.current)
  206. },
  207. // 切换盲票名称
  208. changeTicketTitle({ detail }) {
  209. console.log(detail);
  210. this.ticketIndex = detail.current
  211. this.ticketTitleIndex = detail.current
  212. this.setNum(detail.current)
  213. },
  214. setNum(index) {
  215. let num = Math.round(100 / this.list.length)
  216. if (index == 0) {
  217. this.percentage = uni.$u.range(0, 100, num)
  218. } else if (index == this.list.length - 1) {
  219. this.percentage = uni.$u.range(0, 100, 100)
  220. } else {
  221. this.percentage = uni.$u.range(0, 100, num * (index + 1))
  222. }
  223. },
  224. // 投诉建议
  225. contactService() {
  226. // #ifdef MP-WEIXIN
  227. wx.openCustomerServiceChat({
  228. extInfo: {
  229. url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
  230. },
  231. corpId: 'ww02da63d80c66284b',
  232. })
  233. // #endif
  234. },
  235. // 获取盲票列表
  236. getList() {
  237. uni.showLoading({
  238. title: '加载中'
  239. });
  240. let data = {
  241. categoryId: '',
  242. tagId: '',
  243. type: 'online',
  244. noToken: true
  245. }
  246. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  247. res => {
  248. uni.hideLoading();
  249. if (res.code == 0) {
  250. res.rows.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
  251. '?imageView2/2/w/375')
  252. this.ticketList = res.rows
  253. this.getPrize(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. getPrize(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. let prizeList = res.data.prizeList
  292. prizeList.forEach(item => {
  293. let picUrlArr = item.picUrl.split(',')
  294. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  295. })
  296. this.prizeList = prizeList
  297. // 根据奖品数量动态设置动画时间
  298. let time = Math.ceil(this.prizeList.length / 5 * 10)
  299. this.activeAnimation = `moveLeft ${ time }s linear infinite normal`,
  300. this.payInfo = this.ticketList[this.currentIndex]
  301. }
  302. }).catch(() => {
  303. uni.hideLoading();
  304. })
  305. },
  306. // 立即开刮
  307. payment() {
  308. this.payInfo = this.ticketList[this.currentIndex]
  309. let data = {
  310. userCouponIds: [],
  311. autoCoupon: 1,
  312. boxId: this.payInfo.boxId,
  313. orderNum: 1
  314. }
  315. $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
  316. if (res.code == 0) {
  317. let info = {
  318. ...res.data,
  319. ...this.payInfo,
  320. couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
  321. .data.couponList[0].title,
  322. couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
  323. .couponList[0].id
  324. }
  325. this.payInfo = info
  326. this.payShow = true
  327. }
  328. }).catch(() => {
  329. uni.$u.toast('开刮失败,请重试!');
  330. })
  331. },
  332. // 关闭支付弹框
  333. close() {
  334. this.payShow = false
  335. this.activityShow = false
  336. },
  337. // // 盲票选中改变
  338. // changeTicket({
  339. // detail
  340. // }) {
  341. // this.currentIndex = detail.current
  342. // this.getPrize(this.ticketList[this.currentIndex].boxId)
  343. // },
  344. changeList() {
  345. let data = {
  346. categoryId: '',
  347. tagId: '',
  348. type: 'online',
  349. noToken: true
  350. }
  351. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  352. res => {
  353. const boxIdStr = this.ticketList.map(item => item.boxId).join()
  354. let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
  355. if (boxIdStr != boxIdStrNew) {
  356. this.currentIndex = 0
  357. this.getList()
  358. }
  359. })
  360. },
  361. // 盲票向左箭头
  362. ticketLeft() {
  363. if ((this.currentIndex >= 0) && (this.currentIndex < (this.ticketList.length - 1))) {
  364. this.currentIndex++
  365. } else if (this.currentIndex == (this.ticketList.length - 1)) {
  366. this.currentIndex = 0
  367. }
  368. this.changeList()
  369. },
  370. // 盲票向右箭头
  371. ticketRight() {
  372. if (this.currentIndex > 0) {
  373. this.currentIndex--
  374. } else if (this.currentIndex == 0) {
  375. this.currentIndex = this.ticketList.length - 1
  376. }
  377. this.changeList()
  378. },
  379. // 线上立即刮票成功,跳转到刮奖过程
  380. toProcess(id) {
  381. this.payShow = false
  382. uni.navigateTo({
  383. url: `/packageOperate/process/index?id=${ id }`
  384. })
  385. },
  386. // 点击盲票,跳转盲票详情
  387. toTicketBox() {
  388. let item = this.ticketList[this.currentIndex]
  389. uni.navigateTo({
  390. url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
  391. })
  392. },
  393. // 点击奖品,跳转到奖品详情
  394. toPrizeGoods(item) {
  395. if (item.prizeType == "goods") {
  396. uni.navigateTo({
  397. url: `/packagePrize/goods/detail?id=${ item.refId }`
  398. })
  399. }
  400. //门店优惠券
  401. if (item.prizeType == "coupon") {
  402. // if (item.couponType == "1") {
  403. // uni.navigateTo({
  404. // url: `/packagePrize/goods/detail?id=426`
  405. // })
  406. // }
  407. // if (item.couponType == "2") {
  408. // uni.navigateTo({
  409. // url: `/packagePrize/goods/detail?id=425`
  410. // })
  411. // }
  412. uni.navigateTo({
  413. url: `/packagePrize/goods/detail?id=425`
  414. })
  415. }
  416. // 盲豆
  417. if (item.prizeType == "coin") {
  418. uni.navigateTo({
  419. url: `/packagePrize/goods/detail?id=424`
  420. })
  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. height: 44rpx;
  622. margin: 0 34rpx 26rpx;
  623. background-color: rgba(000, 000, 000, .36);
  624. border-radius: 22rpx;
  625. color: #FFFFFF;
  626. font-family: YouSheBiaoTiHei;
  627. font-size: 14px;
  628. &-content {
  629. margin-right: 16rpx;
  630. image {
  631. width: 44rpx;
  632. height: 44rpx;
  633. }
  634. }
  635. &-content:last-child {
  636. margin: 0;
  637. }
  638. }
  639. // 盲票名称轮播
  640. .ticket-title {
  641. height: 66rpx;
  642. padding: 0 34rpx;
  643. &-swiper {
  644. width: calc(100vw - 34px);
  645. height: 100%;
  646. &-item {
  647. height: 100%;
  648. background: rgba(255, 255, 255, .16);
  649. margin: 0 17rpx;
  650. color: #fff;
  651. font-size: 34rpx;
  652. }
  653. .action {
  654. background: #FFAE00;
  655. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  656. }
  657. }
  658. }
  659. // 刮开盲票
  660. .ticket-btn {
  661. justify-content: space-between;
  662. height: 20vh;
  663. padding: 0 30rpx;
  664. &-left {
  665. flex-direction: column;
  666. image {
  667. width: 142rpx;
  668. height: 142rpx;
  669. margin-bottom: 16rpx;
  670. }
  671. &__title {
  672. line-height: 30rpx;
  673. font-size: 30rpx;
  674. font-family: YouSheBiaoTiHei;
  675. font-weight: 400;
  676. color: #FFFFFF;
  677. }
  678. }
  679. &-center {
  680. position: relative;
  681. flex-direction: column;
  682. height: 100%;
  683. .image-wrap {
  684. position: absolute;
  685. width: 310rpx;
  686. height: 90%;
  687. border-radius: 50%;
  688. overflow: hidden;
  689. .btn {
  690. width: 310rpx;
  691. height: 100%;
  692. }
  693. .shadow {
  694. position: absolute;
  695. width: 310rpx;
  696. height: 130%;
  697. left: 0;
  698. animation: shadowMove 1.5s linear infinite;
  699. }
  700. }
  701. &-wrap {
  702. width: 300rpx;
  703. position: absolute;
  704. animation: scaleBtn 1.5s linear infinite;
  705. &__title {
  706. width: 300rpx;
  707. text-align: center;
  708. font-size: 84rpx;
  709. font-family: YouSheBiaoTiHei;
  710. font-weight: 400;
  711. color: #FFFFFF;
  712. line-height: 72rpx;
  713. animation: shadowBtn 1.5s linear infinite;
  714. }
  715. }
  716. }
  717. &-right {
  718. flex-direction: column;
  719. &__image {
  720. position: relative;
  721. width: 142rpx;
  722. height: 142rpx;
  723. margin-bottom: 16rpx;
  724. image:first-child {
  725. width: 142rpx;
  726. height: 142rpx;
  727. margin-bottom: 16rpx;
  728. }
  729. image:last-child {
  730. position: absolute;
  731. width: 60rpx;
  732. height: 60rpx;
  733. margin-bottom: 16rpx;
  734. }
  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: 24rpx;
  781. font-size: 24rpx;
  782. text-decoration: line-through;
  783. }
  784. }
  785. }
  786. // 奖品移动动画
  787. @keyframes movePrize {
  788. 0% {
  789. transform: translate(0, 10px)
  790. }
  791. 25% {
  792. transform: translate(0, 5px)
  793. }
  794. 50% {
  795. transform: translate(0, 0px)
  796. }
  797. 75% {
  798. transform: translate(0, 5px)
  799. }
  800. 100% {
  801. transform: translate(0, 10px)
  802. }
  803. }
  804. // 倒计时移动动画
  805. @keyframes moveTime {
  806. 0% {
  807. transform: translate(2px, 0)
  808. }
  809. 25% {
  810. transform: translate(0, 0)
  811. }
  812. 50% {
  813. transform: translate(1px, 0)
  814. }
  815. 75% {
  816. transform: translate(0, 0)
  817. }
  818. 100% {
  819. transform: translate(2px, 0)
  820. }
  821. }
  822. // 放大缩小动画
  823. @keyframes scaleTime {
  824. 0% {
  825. transform: scale(1.05)
  826. }
  827. 25% {
  828. transform: scale(1.02)
  829. }
  830. 50% {
  831. transform: scale(0.9)
  832. }
  833. 75% {
  834. transform: scale(1.02)
  835. }
  836. 100% {
  837. transform: scale(1.05)
  838. }
  839. }
  840. // 刮开刮票呼吸动画
  841. @keyframes scaleBtn {
  842. 0% {
  843. transform: scale(1.04)
  844. }
  845. 25% {
  846. transform: scale(1.02)
  847. }
  848. 50% {
  849. transform: scale(1)
  850. }
  851. 75% {
  852. transform: scale(1.02)
  853. }
  854. 100% {
  855. transform: scale(1.04)
  856. }
  857. }
  858. // 刮开刮票阴影动画
  859. @keyframes shadowBtn {
  860. 0% {
  861. text-shadow: 2px -2px 3px #fff;
  862. }
  863. 25% {
  864. text-shadow: none;
  865. }
  866. 50% {
  867. text-shadow: none;
  868. }
  869. 75% {
  870. text-shadow: none;
  871. }
  872. 100% {
  873. text-shadow: 2px -2px 3px #fff;
  874. }
  875. }
  876. // 刮开盲票光影移动动画
  877. @keyframes shadowMove {
  878. 0% {
  879. left: -100%;
  880. }
  881. 100% {
  882. left: 110%;
  883. }
  884. }
  885. </style>