index.vue 23 KB

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