index.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  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" v-show="filterActivityList.length" @click="toActivity">
  39. <image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
  40. <view class="time">
  41. <u-count-down :time="activityTime" 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 ActivityHelp from '@/components/activity-help/activity-help.vue'
  134. export default {
  135. components: {
  136. CustomTabBar,
  137. PayPopup,
  138. ActivityHelp
  139. },
  140. data() {
  141. return {
  142. loginState: false, // 登录状态
  143. ticketList: [], // 盲票列表
  144. prizeList: [], // 奖品列表
  145. prizeNewsListOne: [], // 弹幕列表
  146. prizeNewsListTwo: [], // 弹幕列表
  147. payShow: false, // 支付弹框显示
  148. payInfo: {}, // 支付详情
  149. currentIndex: 0, // 盲票选中下标
  150. activeAnimation: 'moveLeft 10s linear infinite normal', // 奖品动画
  151. statusHeight: 20,
  152. ticketIndex: 0, // 盲票选中下标
  153. ticketTitleIndex: 0, // 盲票标题选中下边
  154. list: [1,2,3,4,5],
  155. percentage: 0,
  156. checkStatus: true,
  157. inviteCode: '',//助力邀请码
  158. marketingId: '',//活动id
  159. activityShow: false,//助力邀请弹框
  160. filterActivityList: [],
  161. activityTime: null,
  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. this.getActivityList()
  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. getActivityList() {
  237. $http.post(`/api/v1/mp/user/marketing/list?pageNum=${ this.pageNum }&pageSize=20`, {
  238. triggerStatus: 0,
  239. }).then(res => {
  240. let data = res.rows
  241. this.filterActivityList = data.filter(item=> {
  242. return JSON.parse(item.status).value == 3
  243. })
  244. let activityInfo = this.filterActivityList.length ? this.filterActivityList[0] : {}
  245. let timestamp = parseInt(new Date().getTime())
  246. this.activityTime = activityInfo.endTime - timestamp
  247. })
  248. },
  249. // 获取盲票列表
  250. getList() {
  251. uni.showLoading({
  252. title: '加载中'
  253. });
  254. let data = {
  255. categoryId: '',
  256. tagId: '',
  257. type: 'online',
  258. noToken: true
  259. }
  260. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  261. res => {
  262. uni.hideLoading();
  263. if (res.code == 0) {
  264. res.rows.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
  265. '?imageView2/2/w/375')
  266. this.ticketList = res.rows
  267. this.getPrize(this.ticketList[0].boxId)
  268. }
  269. }).catch(() => {
  270. uni.hideLoading();
  271. })
  272. },
  273. // 获取弹幕列表
  274. getPrizeNews() {
  275. $http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
  276. const {
  277. listOne,
  278. listTwo
  279. } = res && res.data
  280. listOne.forEach(item => {
  281. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  282. '70/EJ305PQR2IBE45O9AFAI'
  283. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  284. .substring(0, 15) + '...' : item.prizeInfo
  285. })
  286. listTwo.forEach(item => {
  287. item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
  288. '70/EJ305PQR2IBE45O9AFAI'
  289. item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
  290. .substring(0, 15) + '...' : item.prizeInfo
  291. })
  292. this.prizeNewsListOne = listOne
  293. this.prizeNewsListTwo = listTwo
  294. })
  295. },
  296. // 获取当前盲票的奖品列表
  297. getPrize(id) {
  298. this.prizeList = []
  299. $http.post('/api/v1/mp/user/mall/ticket/detail', {
  300. boxId: id,
  301. noToken: true
  302. }).then(res => {
  303. uni.hideLoading();
  304. if (res.code == 0) {
  305. let prizeList = res.data.prizeList
  306. prizeList.forEach(item => {
  307. let picUrlArr = item.picUrl.split(',')
  308. item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
  309. })
  310. this.prizeList = prizeList
  311. // 根据奖品数量动态设置动画时间
  312. let time = Math.ceil(this.prizeList.length / 5 * 10)
  313. this.activeAnimation = `moveLeft ${ time }s linear infinite normal`,
  314. this.payInfo = this.ticketList[this.currentIndex]
  315. }
  316. }).catch(() => {
  317. uni.hideLoading();
  318. })
  319. },
  320. // 立即开刮
  321. payment() {
  322. this.payInfo = this.ticketList[this.currentIndex]
  323. let data = {
  324. userCouponIds: [],
  325. autoCoupon: 1,
  326. boxId: this.payInfo.boxId,
  327. orderNum: 1
  328. }
  329. $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
  330. if (res.code == 0) {
  331. let info = {
  332. ...res.data,
  333. ...this.payInfo,
  334. couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
  335. .data.couponList[0].title,
  336. couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
  337. .couponList[0].id
  338. }
  339. this.payInfo = info
  340. this.payShow = true
  341. }
  342. }).catch(() => {
  343. uni.$u.toast('开刮失败,请重试!');
  344. })
  345. },
  346. // 关闭支付弹框
  347. close() {
  348. this.payShow = false
  349. this.activityShow = false
  350. },
  351. // // 盲票选中改变
  352. // changeTicket({
  353. // detail
  354. // }) {
  355. // this.currentIndex = detail.current
  356. // this.getPrize(this.ticketList[this.currentIndex].boxId)
  357. // },
  358. changeList() {
  359. let data = {
  360. categoryId: '',
  361. tagId: '',
  362. type: 'online',
  363. noToken: true
  364. }
  365. $http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
  366. res => {
  367. const boxIdStr = this.ticketList.map(item => item.boxId).join()
  368. let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
  369. if (boxIdStr != boxIdStrNew) {
  370. this.currentIndex = 0
  371. this.getList()
  372. }
  373. })
  374. },
  375. // 盲票向左箭头
  376. ticketLeft() {
  377. if ((this.currentIndex >= 0) && (this.currentIndex < (this.ticketList.length - 1))) {
  378. this.currentIndex++
  379. } else if (this.currentIndex == (this.ticketList.length - 1)) {
  380. this.currentIndex = 0
  381. }
  382. this.changeList()
  383. },
  384. // 盲票向右箭头
  385. ticketRight() {
  386. if (this.currentIndex > 0) {
  387. this.currentIndex--
  388. } else if (this.currentIndex == 0) {
  389. this.currentIndex = this.ticketList.length - 1
  390. }
  391. this.changeList()
  392. },
  393. // 线上立即刮票成功,跳转到刮奖过程
  394. toProcess(id) {
  395. this.payShow = false
  396. uni.navigateTo({
  397. url: `/packageOperate/process/index?id=${ id }`
  398. })
  399. },
  400. // 点击盲票,跳转盲票详情
  401. toTicketBox() {
  402. let item = this.ticketList[this.currentIndex]
  403. uni.navigateTo({
  404. url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
  405. })
  406. },
  407. // 点击奖品,跳转到奖品详情
  408. toPrizeGoods(item) {
  409. if (item.prizeType == "goods") {
  410. uni.navigateTo({
  411. url: `/packagePrize/goods/detail?id=${ item.refId }`
  412. })
  413. }
  414. //门店优惠券
  415. if (item.prizeType == "coupon") {
  416. // if (item.couponType == "1") {
  417. // uni.navigateTo({
  418. // url: `/packagePrize/goods/detail?id=426`
  419. // })
  420. // }
  421. // if (item.couponType == "2") {
  422. // uni.navigateTo({
  423. // url: `/packagePrize/goods/detail?id=425`
  424. // })
  425. // }
  426. uni.navigateTo({
  427. url: `/packagePrize/goods/detail?id=425`
  428. })
  429. }
  430. // 盲豆
  431. if (item.prizeType == "coin") {
  432. uni.navigateTo({
  433. url: `/packagePrize/goods/detail?id=424`
  434. })
  435. }
  436. },
  437. toActivity() {
  438. uni.switchTab({
  439. url: '/pages/activity/index'
  440. })
  441. },
  442. // 点击所有盲票
  443. toTicket() {
  444. uni.navigateTo({
  445. url: '/packageGoods/ticket/index'
  446. })
  447. },
  448. // 点击奖品库
  449. toPrize() {
  450. if (!this.loginState) {
  451. uni.navigateTo({
  452. url: "/pages/login/index"
  453. })
  454. return
  455. }
  456. uni.navigateTo({
  457. url: '/packagePrize/prize/index'
  458. })
  459. },
  460. // 点击规则说明
  461. toRule() {
  462. uni.navigateTo({
  463. url: '/packageOther/rule/index'
  464. })
  465. }
  466. },
  467. onShareAppMessage(res) {
  468. return {
  469. title: '盲票,玩的就是有趣',
  470. path: '/pages/index/index'
  471. }
  472. }
  473. }
  474. </script>
  475. <style lang="scss" scoped>
  476. .status_bar {
  477. width: 100%;
  478. height: var(--status-bar-height);
  479. }
  480. /deep/ .u-tabbar__placeholder {
  481. display: none;
  482. }
  483. </style>
  484. <style lang="scss" scoped>
  485. .box {
  486. position: relative;
  487. width: 100%;
  488. height: calc(100vh - 50px);
  489. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
  490. background-size: 100vw calc(100vh - 50px);
  491. .index {
  492. position: absolute;
  493. width: 100%;
  494. }
  495. }
  496. // 中奖信息
  497. .barrage {
  498. width: 518rpx;
  499. height: 84rpx;
  500. background: linear-gradient(90deg, #FFD220, #FFF7A2);
  501. border-radius: 42rpx;
  502. margin-bottom: 16rpx;
  503. margin-left: 34rpx;
  504. &-swiper {
  505. width: 100%;
  506. height: 100%;
  507. border-radius: 42rpx;
  508. overflow: hidden;
  509. &-item {
  510. width: 100%;
  511. height: 100%;
  512. &-content {
  513. display: flex;
  514. align-items: center;
  515. width: 510rpx;
  516. height: 76rpx;
  517. image {
  518. width: 66rpx;
  519. height: 66rpx;
  520. border-radius: 50%;
  521. margin-right: 14rpx;
  522. }
  523. .title {
  524. flex: 1;
  525. font-size: 26rpx;
  526. font-family: PingFang SC;
  527. font-weight: 500;
  528. color: #333333;
  529. }
  530. }
  531. }
  532. }
  533. }
  534. // 查看规则
  535. .rule {
  536. display: flex;
  537. align-items: center;
  538. justify-content: flex-end;
  539. height: 34rpx;
  540. padding-right: 34rpx;
  541. margin-bottom: 24rpx;
  542. &-content {
  543. image {
  544. width: 34rpx;
  545. height: 34rpx;
  546. margin-right: 14rpx;
  547. }
  548. text {
  549. font-size: 40rpx;
  550. font-family: 'YouSheBiaoTiHei';
  551. font-weight: 400;
  552. color: #FFFFFF;
  553. }
  554. }
  555. }
  556. // 盲票
  557. .ticket {
  558. height: 36vh;
  559. &-swiper {
  560. height: 100%;
  561. &-item {
  562. position: relative;
  563. height: 100%;
  564. .box {
  565. position: absolute;
  566. bottom: 0;
  567. width: 75vw;
  568. height: 75%;
  569. }
  570. .prize {
  571. position: absolute;
  572. top: 0;
  573. width: 85vw;
  574. height: 75%;
  575. animation: movePrize 2s linear infinite;
  576. }
  577. }
  578. }
  579. }
  580. // 投诉建议
  581. .proposal {
  582. position: relative;
  583. height: 66rpx;
  584. margin-bottom: 30rpx;
  585. &-time {
  586. position: absolute;
  587. left: 30rpx;
  588. bottom: 0;
  589. flex-direction: column;
  590. align-items: flex-start;
  591. image {
  592. width: 140rpx;
  593. height: 78rpx;
  594. margin-bottom: 12rpx;
  595. animation: scaleTime 3s linear infinite;
  596. }
  597. .time {
  598. animation: moveTime 0.5s linear infinite;
  599. /deep/ .u-count-down__text {
  600. line-height: 30rpx;
  601. font-size: 30rpx;
  602. font-family: YouSheBiaoTiHei;
  603. font-weight: 400;
  604. color: #FFFFFF;
  605. }
  606. }
  607. }
  608. &-progress {
  609. position: absolute;
  610. bottom: 0;
  611. width: 140rpx;
  612. }
  613. &-tip {
  614. display: flex;
  615. align-items: center;
  616. position: absolute;
  617. right: 0;
  618. bottom: 0;
  619. width: 212rpx;
  620. height: 66rpx;
  621. image {
  622. position: absolute;
  623. right: 0;
  624. bottom: 0;
  625. width: 212rpx;
  626. height: 66rpx;
  627. }
  628. text {
  629. position: absolute;
  630. right: 16rpx;
  631. font-size: 40rpx;
  632. font-family: YouSheBiaoTiHei;
  633. font-weight: 400;
  634. color: #FFFFFF;
  635. }
  636. }
  637. }
  638. // 中奖概率
  639. .chance {
  640. height: 44rpx;
  641. margin: 0 34rpx 26rpx;
  642. background-color: rgba(000, 000, 000, .36);
  643. border-radius: 22rpx;
  644. color: #FFFFFF;
  645. font-family: YouSheBiaoTiHei;
  646. font-size: 14px;
  647. &-content {
  648. margin-right: 16rpx;
  649. image {
  650. width: 44rpx;
  651. height: 44rpx;
  652. }
  653. }
  654. &-content:last-child {
  655. margin: 0;
  656. }
  657. }
  658. // 盲票名称轮播
  659. .ticket-title {
  660. height: 66rpx;
  661. padding: 0 34rpx;
  662. &-swiper {
  663. width: calc(100vw - 34px);
  664. height: 100%;
  665. &-item {
  666. height: 100%;
  667. background: rgba(255, 255, 255, .16);
  668. margin: 0 17rpx;
  669. color: #fff;
  670. font-size: 34rpx;
  671. }
  672. .action {
  673. background: #FFAE00;
  674. box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
  675. }
  676. }
  677. }
  678. // 刮开盲票
  679. .ticket-btn {
  680. justify-content: space-between;
  681. height: 20vh;
  682. padding: 0 30rpx;
  683. &-left {
  684. flex-direction: column;
  685. image {
  686. width: 142rpx;
  687. height: 142rpx;
  688. margin-bottom: 16rpx;
  689. }
  690. &__title {
  691. line-height: 30rpx;
  692. font-size: 30rpx;
  693. font-family: YouSheBiaoTiHei;
  694. font-weight: 400;
  695. color: #FFFFFF;
  696. }
  697. }
  698. &-center {
  699. position: relative;
  700. flex-direction: column;
  701. height: 100%;
  702. .image-wrap {
  703. position: absolute;
  704. width: 310rpx;
  705. height: 90%;
  706. border-radius: 50%;
  707. overflow: hidden;
  708. 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);
  709. .btn {
  710. width: 310rpx;
  711. height: 100%;
  712. }
  713. .shadow {
  714. position: absolute;
  715. width: 310rpx;
  716. height: 130%;
  717. left: 0;
  718. animation: shadowMove 1.5s linear infinite;
  719. }
  720. }
  721. &-wrap {
  722. width: 300rpx;
  723. position: absolute;
  724. animation: scaleBtn 1.5s linear infinite;
  725. &__title {
  726. width: 300rpx;
  727. text-align: center;
  728. font-size: 84rpx;
  729. font-family: YouSheBiaoTiHei;
  730. font-weight: 400;
  731. color: #FFFFFF;
  732. line-height: 72rpx;
  733. animation: shadowBtn 1.5s linear infinite;
  734. }
  735. }
  736. }
  737. &-right {
  738. flex-direction: column;
  739. &__image {
  740. position: relative;
  741. width: 142rpx;
  742. height: 142rpx;
  743. margin-bottom: 16rpx;
  744. image:first-child {
  745. width: 142rpx;
  746. height: 142rpx;
  747. margin-bottom: 16rpx;
  748. }
  749. image:last-child {
  750. position: absolute;
  751. width: 60rpx;
  752. height: 60rpx;
  753. margin-bottom: 16rpx;
  754. }
  755. }
  756. &__title {
  757. line-height: 30rpx;
  758. font-size: 30rpx;
  759. font-family: YouSheBiaoTiHei;
  760. font-weight: 400;
  761. color: #FFFFFF;
  762. }
  763. }
  764. }
  765. // 盲票价格
  766. .ticket-price {
  767. height: 44rpx;
  768. &-checkbox {
  769. width: 44rpx;
  770. height: 44rpx;
  771. background-color: #fff;
  772. border-radius: 50%;
  773. overflow: hidden;
  774. margin-right: 20rpx;
  775. image {
  776. width: 44rpx;
  777. height: 44rpx;
  778. }
  779. }
  780. &-amt {
  781. height: 44rpx;
  782. font-family: YouSheBiaoTiHei;
  783. font-weight: 400;
  784. align-items: flex-end;
  785. color: #FFFFFF;
  786. margin-right: 20rpx;
  787. .num {
  788. font-size: 56rpx;
  789. line-height: 40rpx;
  790. }
  791. .txt {
  792. line-height: 36rpx;
  793. font-size: 40rpx;
  794. }
  795. }
  796. &-discount {
  797. height: 44rpx;
  798. align-items: flex-end;
  799. .num {
  800. line-height: 24rpx;
  801. font-size: 24rpx;
  802. text-decoration: line-through;
  803. }
  804. }
  805. }
  806. // 奖品移动动画
  807. @keyframes movePrize {
  808. 0% {
  809. transform: translate(0, 10px)
  810. }
  811. 25% {
  812. transform: translate(0, 5px)
  813. }
  814. 50% {
  815. transform: translate(0, 0px)
  816. }
  817. 75% {
  818. transform: translate(0, 5px)
  819. }
  820. 100% {
  821. transform: translate(0, 10px)
  822. }
  823. }
  824. // 倒计时移动动画
  825. @keyframes moveTime {
  826. 0% {
  827. transform: translate(2px, 0)
  828. }
  829. 25% {
  830. transform: translate(0, 0)
  831. }
  832. 50% {
  833. transform: translate(1px, 0)
  834. }
  835. 75% {
  836. transform: translate(0, 0)
  837. }
  838. 100% {
  839. transform: translate(2px, 0)
  840. }
  841. }
  842. // 放大缩小动画
  843. @keyframes scaleTime {
  844. 0% {
  845. transform: scale(1.05)
  846. }
  847. 25% {
  848. transform: scale(1.02)
  849. }
  850. 50% {
  851. transform: scale(0.9)
  852. }
  853. 75% {
  854. transform: scale(1.02)
  855. }
  856. 100% {
  857. transform: scale(1.05)
  858. }
  859. }
  860. // 刮开刮票呼吸动画
  861. @keyframes scaleBtn {
  862. 0% {
  863. transform: scale(1.04)
  864. }
  865. 25% {
  866. transform: scale(1.02)
  867. }
  868. 50% {
  869. transform: scale(1)
  870. }
  871. 75% {
  872. transform: scale(1.02)
  873. }
  874. 100% {
  875. transform: scale(1.04)
  876. }
  877. }
  878. // 刮开刮票阴影动画
  879. @keyframes shadowBtn {
  880. 0% {
  881. text-shadow: 2px -2px 3px #fff;
  882. }
  883. 25% {
  884. text-shadow: none;
  885. }
  886. 50% {
  887. text-shadow: none;
  888. }
  889. 75% {
  890. text-shadow: none;
  891. }
  892. 100% {
  893. text-shadow: 2px -2px 3px #fff;
  894. }
  895. }
  896. // 刮开盲票光影移动动画
  897. @keyframes shadowMove {
  898. 0% {
  899. left: -100%;
  900. }
  901. 100% {
  902. left: 110%;
  903. }
  904. }
  905. </style>