index.vue 23 KB

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