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. /**
  166. * 免费活动邀请助力分享跳转接收参数
  167. * inviteCode: 邀请码
  168. * marketingId: 活动id
  169. * */
  170. if (opthios.inviteCode && opthios.marketingId) {
  171. this.inviteCode = opthios.inviteCode
  172. this.marketingId = opthios.marketingId
  173. this.activityShow = true
  174. }
  175. /**
  176. * 票赢天下小程序分享盲票跳转接受的参数
  177. * shareUid: 用户ID
  178. * shareType: 分享类型
  179. * */
  180. if (opthios.scene) {
  181. let sceneStr = decodeURIComponent(opthios.scene)
  182. this.sceneArr = sceneStr.split('&')
  183. uni.setStorageSync('shareUid', this.sceneArr[0])
  184. uni.setStorageSync('shareType', this.sceneArr[1])
  185. }
  186. // #ifdef MP-WEIXIN
  187. const res = uni.getMenuButtonBoundingClientRect()
  188. this.statusHeight = res.top //胶囊距离顶部
  189. // #endif
  190. let num = Math.round(100 / this.list.length)
  191. this.percentage = num
  192. this.getList()
  193. },
  194. onShow(opthios) {
  195. this.loginState = uni.getStorageSync('token') ? true : false
  196. this.getPrizeNews()
  197. },
  198. methods: {
  199. // 切换盲票
  200. changeTicket({ detail }) {
  201. console.log(detail);
  202. this.ticketIndex = detail.current
  203. this.ticketTitleIndex = detail.current
  204. this.setNum(detail.current)
  205. },
  206. // 切换盲票名称
  207. changeTicketTitle({ detail }) {
  208. console.log(detail);
  209. this.ticketIndex = detail.current
  210. this.ticketTitleIndex = detail.current
  211. this.setNum(detail.current)
  212. },
  213. setNum(index) {
  214. let num = Math.round(100 / this.list.length)
  215. if (index == 0) {
  216. this.percentage = uni.$u.range(0, 100, num)
  217. } else if (index == this.list.length - 1) {
  218. this.percentage = uni.$u.range(0, 100, 100)
  219. } else {
  220. this.percentage = uni.$u.range(0, 100, num * (index + 1))
  221. }
  222. },
  223. // 投诉建议
  224. contactService() {
  225. // #ifdef MP-WEIXIN
  226. wx.openCustomerServiceChat({
  227. extInfo: {
  228. url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
  229. },
  230. corpId: 'ww02da63d80c66284b',
  231. })
  232. // #endif
  233. },
  234. // 获取盲票列表
  235. getList() {
  236. uni.showLoading({
  237. title: '加载中'
  238. });
  239. let data = {
  240. categoryId: '',
  241. tagId: '',
  242. type: 'online',
  243. noToken: true
  244. }
  245. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  246. res => {
  247. uni.hideLoading();
  248. if (res.code == 0) {
  249. res.rows.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
  250. '?imageView2/2/w/375')
  251. this.ticketList = res.rows
  252. this.getPrize(this.ticketList[0].boxId)
  253. }
  254. }).catch(() => {
  255. uni.hideLoading();
  256. })
  257. },
  258. // 获取弹幕列表
  259. getPrizeNews() {
  260. $http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
  261. const {
  262. listOne,
  263. listTwo
  264. } = res && res.data
  265. listOne.forEach(item => {
  266. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  267. '70/EJ305PQR2IBE45O9AFAI'
  268. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  269. .substring(0, 15) + '...' : item.prizeInfo
  270. })
  271. listTwo.forEach(item => {
  272. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  273. '70/EJ305PQR2IBE45O9AFAI'
  274. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  275. .substring(0, 15) + '...' : item.prizeInfo
  276. })
  277. this.prizeNewsListOne = listOne
  278. this.prizeNewsListTwo = listTwo
  279. })
  280. },
  281. // 获取当前盲票的奖品列表
  282. getPrize(id) {
  283. this.prizeList = []
  284. $http.post('/api/v1/mp/user/mall/ticket/detail', {
  285. boxId: id,
  286. noToken: true
  287. }).then(res => {
  288. uni.hideLoading();
  289. if (res.code == 0) {
  290. let prizeList = res.data.prizeList
  291. prizeList.forEach(item => {
  292. let picUrlArr = item.picUrl.split(',')
  293. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  294. })
  295. this.prizeList = prizeList
  296. // 根据奖品数量动态设置动画时间
  297. let time = Math.ceil(this.prizeList.length / 5 * 10)
  298. this.activeAnimation = `moveLeft ${ time }s linear infinite normal`,
  299. this.payInfo = this.ticketList[this.currentIndex]
  300. }
  301. }).catch(() => {
  302. uni.hideLoading();
  303. })
  304. },
  305. // 立即开刮
  306. payment() {
  307. this.payInfo = this.ticketList[this.currentIndex]
  308. let data = {
  309. userCouponIds: [],
  310. autoCoupon: 1,
  311. boxId: this.payInfo.boxId,
  312. orderNum: 1
  313. }
  314. $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
  315. if (res.code == 0) {
  316. let info = {
  317. ...res.data,
  318. ...this.payInfo,
  319. couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
  320. .data.couponList[0].title,
  321. couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
  322. .couponList[0].id
  323. }
  324. this.payInfo = info
  325. this.payShow = true
  326. }
  327. }).catch(() => {
  328. uni.$u.toast('开刮失败,请重试!');
  329. })
  330. },
  331. // 关闭支付弹框
  332. close() {
  333. this.payShow = false
  334. this.activityShow = false
  335. },
  336. // // 盲票选中改变
  337. // changeTicket({
  338. // detail
  339. // }) {
  340. // this.currentIndex = detail.current
  341. // this.getPrize(this.ticketList[this.currentIndex].boxId)
  342. // },
  343. changeList() {
  344. let data = {
  345. categoryId: '',
  346. tagId: '',
  347. type: 'online',
  348. noToken: true
  349. }
  350. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  351. res => {
  352. const boxIdStr = this.ticketList.map(item => item.boxId).join()
  353. let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
  354. if (boxIdStr != boxIdStrNew) {
  355. this.currentIndex = 0
  356. this.getList()
  357. }
  358. })
  359. },
  360. // 盲票向左箭头
  361. ticketLeft() {
  362. if ((this.currentIndex >= 0) && (this.currentIndex < (this.ticketList.length - 1))) {
  363. this.currentIndex++
  364. } else if (this.currentIndex == (this.ticketList.length - 1)) {
  365. this.currentIndex = 0
  366. }
  367. this.changeList()
  368. },
  369. // 盲票向右箭头
  370. ticketRight() {
  371. if (this.currentIndex > 0) {
  372. this.currentIndex--
  373. } else if (this.currentIndex == 0) {
  374. this.currentIndex = this.ticketList.length - 1
  375. }
  376. this.changeList()
  377. },
  378. // 线上立即刮票成功,跳转到刮奖过程
  379. toProcess(id) {
  380. this.payShow = false
  381. uni.navigateTo({
  382. url: `/packageOperate/process/index?id=${ id }`
  383. })
  384. },
  385. // 点击盲票,跳转盲票详情
  386. toTicketBox() {
  387. let item = this.ticketList[this.currentIndex]
  388. uni.navigateTo({
  389. url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
  390. })
  391. },
  392. // 点击奖品,跳转到奖品详情
  393. toPrizeGoods(item) {
  394. if (item.prizeType == "goods") {
  395. uni.navigateTo({
  396. url: `/packagePrize/goods/detail?id=${ item.refId }`
  397. })
  398. }
  399. //门店优惠券
  400. if (item.prizeType == "coupon") {
  401. // if (item.couponType == "1") {
  402. // uni.navigateTo({
  403. // url: `/packagePrize/goods/detail?id=426`
  404. // })
  405. // }
  406. // if (item.couponType == "2") {
  407. // uni.navigateTo({
  408. // url: `/packagePrize/goods/detail?id=425`
  409. // })
  410. // }
  411. uni.navigateTo({
  412. url: `/packagePrize/goods/detail?id=425`
  413. })
  414. }
  415. // 盲豆
  416. if (item.prizeType == "coin") {
  417. uni.navigateTo({
  418. url: `/packagePrize/goods/detail?id=424`
  419. })
  420. }
  421. },
  422. // 点击所有盲票
  423. toTicket() {
  424. uni.navigateTo({
  425. url: '/packageGoods/ticket/index'
  426. })
  427. },
  428. // 点击奖品库
  429. toPrize() {
  430. if (!this.loginState) {
  431. uni.navigateTo({
  432. url: "/pages/login/index"
  433. })
  434. return
  435. }
  436. uni.navigateTo({
  437. url: '/packagePrize/prize/index'
  438. })
  439. },
  440. // 点击规则说明
  441. toRule() {
  442. uni.navigateTo({
  443. url: '/packageOther/rule/index'
  444. })
  445. }
  446. },
  447. onShareAppMessage(res) {
  448. return {
  449. title: '盲票,玩的就是有趣',
  450. path: '/pages/index/index'
  451. }
  452. }
  453. }
  454. </script>
  455. <style lang="scss" scoped>
  456. .status_bar {
  457. width: 100%;
  458. height: var(--status-bar-height);
  459. }
  460. /deep/ .u-tabbar__placeholder {
  461. display: none;
  462. }
  463. </style>
  464. <style lang="scss" scoped>
  465. .box {
  466. position: relative;
  467. width: 100%;
  468. height: calc(100vh - 50px);
  469. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
  470. background-size: 100vw calc(100vh - 50px);
  471. .index {
  472. position: absolute;
  473. width: 100%;
  474. }
  475. }
  476. // 中奖信息
  477. .barrage {
  478. width: 518rpx;
  479. height: 84rpx;
  480. background: linear-gradient(90deg, #FFD220, #FFF7A2);
  481. border-radius: 42rpx;
  482. margin-bottom: 16rpx;
  483. margin-left: 34rpx;
  484. &-swiper {
  485. width: 100%;
  486. height: 100%;
  487. border-radius: 42rpx;
  488. overflow: hidden;
  489. &-item {
  490. width: 100%;
  491. height: 100%;
  492. &-content {
  493. display: flex;
  494. align-items: center;
  495. width: 510rpx;
  496. height: 76rpx;
  497. image {
  498. width: 66rpx;
  499. height: 66rpx;
  500. border-radius: 50%;
  501. margin-right: 14rpx;
  502. }
  503. .title {
  504. flex: 1;
  505. font-size: 26rpx;
  506. font-family: PingFang SC;
  507. font-weight: 500;
  508. color: #333333;
  509. }
  510. }
  511. }
  512. }
  513. }
  514. // 查看规则
  515. .rule {
  516. display: flex;
  517. align-items: center;
  518. justify-content: flex-end;
  519. height: 34rpx;
  520. padding-right: 34rpx;
  521. margin-bottom: 24rpx;
  522. &-content {
  523. image {
  524. width: 34rpx;
  525. height: 34rpx;
  526. margin-right: 14rpx;
  527. }
  528. text {
  529. font-size: 40rpx;
  530. font-family: 'YouSheBiaoTiHei';
  531. font-weight: 400;
  532. color: #FFFFFF;
  533. }
  534. }
  535. }
  536. // 盲票
  537. .ticket {
  538. height: 36vh;
  539. &-swiper {
  540. height: 100%;
  541. &-item {
  542. position: relative;
  543. height: 100%;
  544. .box {
  545. position: absolute;
  546. bottom: 0;
  547. width: 75vw;
  548. height: 75%;
  549. }
  550. .prize {
  551. position: absolute;
  552. top: 0;
  553. width: 85vw;
  554. height: 75%;
  555. animation: movePrize 2s linear infinite;
  556. }
  557. }
  558. }
  559. }
  560. // 投诉建议
  561. .proposal {
  562. position: relative;
  563. height: 66rpx;
  564. margin-bottom: 30rpx;
  565. &-time {
  566. position: absolute;
  567. left: 30rpx;
  568. bottom: 0;
  569. flex-direction: column;
  570. align-items: flex-start;
  571. image {
  572. width: 140rpx;
  573. height: 78rpx;
  574. margin-bottom: 12rpx;
  575. animation: scaleTime 3s linear infinite;
  576. }
  577. .time {
  578. animation: moveTime 0.5s linear infinite;
  579. /deep/ .u-count-down__text {
  580. line-height: 30rpx;
  581. font-size: 30rpx;
  582. font-family: YouSheBiaoTiHei;
  583. font-weight: 400;
  584. color: #FFFFFF;
  585. }
  586. }
  587. }
  588. &-progress {
  589. position: absolute;
  590. bottom: 0;
  591. width: 140rpx;
  592. }
  593. &-tip {
  594. display: flex;
  595. align-items: center;
  596. position: absolute;
  597. right: 0;
  598. bottom: 0;
  599. width: 212rpx;
  600. height: 66rpx;
  601. image {
  602. position: absolute;
  603. right: 0;
  604. bottom: 0;
  605. width: 212rpx;
  606. height: 66rpx;
  607. }
  608. text {
  609. position: absolute;
  610. right: 16rpx;
  611. font-size: 40rpx;
  612. font-family: YouSheBiaoTiHei;
  613. font-weight: 400;
  614. color: #FFFFFF;
  615. }
  616. }
  617. }
  618. // 中奖概率
  619. .chance {
  620. height: 44rpx;
  621. margin: 0 34rpx 26rpx;
  622. background-color: rgba(000, 000, 000, .36);
  623. border-radius: 22rpx;
  624. color: #FFFFFF;
  625. font-family: YouSheBiaoTiHei;
  626. font-size: 14px;
  627. &-content {
  628. margin-right: 16rpx;
  629. image {
  630. width: 44rpx;
  631. height: 44rpx;
  632. }
  633. }
  634. &-content:last-child {
  635. margin: 0;
  636. }
  637. }
  638. // 盲票名称轮播
  639. .ticket-title {
  640. height: 66rpx;
  641. padding: 0 34rpx;
  642. &-swiper {
  643. width: calc(100vw - 34px);
  644. height: 100%;
  645. &-item {
  646. height: 100%;
  647. background: rgba(255, 255, 255, .16);
  648. margin: 0 17rpx;
  649. color: #fff;
  650. font-size: 34rpx;
  651. }
  652. .action {
  653. background: #FFAE00;
  654. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  655. }
  656. }
  657. }
  658. // 刮开盲票
  659. .ticket-btn {
  660. justify-content: space-between;
  661. height: 20vh;
  662. padding: 0 30rpx;
  663. &-left {
  664. flex-direction: column;
  665. image {
  666. width: 142rpx;
  667. height: 142rpx;
  668. margin-bottom: 16rpx;
  669. }
  670. &__title {
  671. line-height: 30rpx;
  672. font-size: 30rpx;
  673. font-family: YouSheBiaoTiHei;
  674. font-weight: 400;
  675. color: #FFFFFF;
  676. }
  677. }
  678. &-center {
  679. position: relative;
  680. flex-direction: column;
  681. height: 100%;
  682. .image-wrap {
  683. position: absolute;
  684. width: 310rpx;
  685. height: 90%;
  686. border-radius: 50%;
  687. overflow: hidden;
  688. 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);
  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>