index.vue 22 KB

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