index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <template>
  2. <view>
  3. <!-- #ifdef MP-ALIPAY -->
  4. <!-- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票开启" v-if="rollingShow"
  5. leftIconSize="0"></u-navbar> -->
  6. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="抽奖中" v-if="rollingShow"
  7. leftIconSize="0"></u-navbar>
  8. <!-- #endif -->
  9. <!-- #ifdef MP-WEIXIN -->
  10. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="抽奖中" v-if="rollingShow">
  11. </u-navbar>
  12. <!-- #endif -->
  13. <!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
  14. <view v-if="pagesNum > 1">
  15. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="抽奖中" />
  16. </view>
  17. <view v-else>
  18. <u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="抽奖中">
  19. <view class="nav-left flex" slot="left" @click="$toIndex()">
  20. <u-icon name="arrow-left" size="20" color="#333"></u-icon>
  21. </view>
  22. </u-navbar>
  23. </view>
  24. <!-- #endif -->
  25. <view class="rolling" v-if="rollingShow">
  26. <!-- 奖品滚动 -->
  27. <view class="rolling-prize">
  28. <view ref="rolling" class="rolling-prize-list" :animation="animationData">
  29. <view class="rolling-prize-list-item flex" v-for="(item, index) in list" :key="index">
  30. <view class="rolling-prize-list-item__items flex">
  31. <view class="content flex" v-for="(items, indexs) in item" :key="indexs">
  32. <image :src="items.picUrl" mode="aspectFit"></image>
  33. <view class="content-title ells-one"
  34. v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
  35. <view class="content-title ells-one" v-else>盲豆</view>
  36. <view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">
  37. ¥{{ $numberFormat(items.value) }}</view>
  38. <view class="content-price" v-else>{{ items.value }}个</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="rolling-prize-list" :animation="animationData">
  44. <view class="rolling-prize-list-item flex" v-for="(item, index) in list" :key="index">
  45. <view class="rolling-prize-list-item__items flex">
  46. <view class="content flex" v-for="(items, indexs) in item" :key="indexs">
  47. <image :src="items.picUrl" mode="aspectFit"></image>
  48. <view class="content-title ells-one"
  49. v-if="items.prizeType && items.prizeType.value != 'coin'">{{ items.title }}</view>
  50. <view class="content-title ells-one" v-else>盲豆</view>
  51. <view class="content-price" v-if="items.prizeType && items.prizeType.value != 'coin'">
  52. ¥{{ $numberFormat(items.value) }}</view>
  53. <view class="content-price" v-else>{{ items.value }}个</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 按钮 -->
  60. <view class="rolling-btn flex">
  61. <view class="rolling-btn-content flex" :class="{ 'btn-stop': btnIng }" @click="stop" v-show="btnShow">
  62. <image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/paybutton.png" mode="scaleToFill"></image>
  63. <view class="rolling-btn-content-title">停止滚动</view>
  64. </view>
  65. </view>
  66. <!-- 倒计时 -->
  67. <view class="rolling-time flex">
  68. <view class="num">{{ num }}</view>
  69. </view>
  70. </view>
  71. <!-- 奖品显示 -->
  72. <view class="prize" v-else>
  73. <!-- #ifndef MP-ALIPAY -->
  74. <view class="prize-navLeft flex" :style="{ top: statusHeight + 'px' }" @click="back">
  75. <u-icon size="19" color="#fff" name="arrow-left"></u-icon>
  76. </view>
  77. <!-- #endif -->
  78. <view class="prize-title flex">
  79. <image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/cash_prize.png" mode="scaleToFill"></image>
  80. </view>
  81. <view class="prize-box flex">
  82. <view class="prize-box-popup flex">
  83. <view class="prize-box-popup__image flex">
  84. <image :src="prizeInfo.picUrl" mode="aspectFit"></image>
  85. </view>
  86. <image class="prize-box-popup__rotate" src="../static/rolling_bg1.png" mode="scaleToFill"
  87. v-if="rotateShow" />
  88. <image class="prize-box-popup__circular" src="../static/rolling_bg2.png" mode="scaleToFill"
  89. v-if="circularShow" />
  90. </view>
  91. </view>
  92. <view class="prize-info flex">
  93. <view class="prize-info-content">
  94. <view class="prize-info-content-price"
  95. v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">
  96. <text>¥</text>{{ $numberFormat(prizeInfo.value) }}</view>
  97. <view class="prize-info-content-price" v-else>{{ prizeInfo.value }}个</view>
  98. <!-- #ifdef MP-ALIPAY -->
  99. <view class="prize-info-content-titletwo"
  100. v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
  101. <view class="prize-info-content-titletwo" v-else>盲豆</view>
  102. <!-- #endif -->
  103. <!-- #ifndef MP-ALIPAY -->
  104. <view class="prize-info-content-title ells-one"
  105. v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">{{ prizeInfo.title }}</view>
  106. <view class="prize-info-content-title" v-else>盲豆</view>
  107. <!-- #endif -->
  108. <view class="prize-info-content-btn flex">
  109. <view class="prize-info-content-btn-content flex" v-if="isTry == 0">
  110. <image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
  111. <view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)"
  112. v-if="prizeInfo.prizeType && prizeInfo.prizeType.value != 'coin'">去查看我的奖品</view>
  113. <view class="prize-info-content-btn-content-txt" @click="toPrize(prizeInfo.prizeType)"
  114. v-else>去商城兑换商品</view>
  115. </view>
  116. <view class="prize-info-content-btn-content flex" v-else @click="back">
  117. <image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
  118. <view class="prize-info-content-btn-content-txt">来把真的</view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="prize-tip flex" v-if="isTry == 0" @click="back">
  124. <view class="txt">返回首页</view>
  125. </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import env from '../../config/env.js'
  131. import $http from '@/utils/request.js'
  132. export default {
  133. data() {
  134. return {
  135. animationData: {}, // 动画信息
  136. num: 8, // 动画倒计时
  137. num2: 0, // 动画持续时间
  138. time: null, // 定时器
  139. stopTime: null, //自动停止
  140. list: [],
  141. prizeInfo: {},
  142. btnIng: false,
  143. rollingShow: true,
  144. statusHeight: 30,
  145. btnShow: false,
  146. boxId: null,
  147. isTry: null,
  148. orderId: '',
  149. ticketId: '',
  150. rotateShow: true,
  151. circularShow: true,
  152. pagesNum: '',
  153. }
  154. },
  155. onShow() {
  156. this.pagesNum = getCurrentPages().length
  157. },
  158. onLoad(options) {
  159. if (options) {
  160. this.boxId = options.boxId
  161. this.isTry = Number(options.isTry)
  162. this.orderId = options.orderId
  163. this.ticketId = options.ticketId
  164. this.getList()
  165. }
  166. // 创建动画实例
  167. this.animation = uni.createAnimation()
  168. // #ifdef MP-WEIXIN
  169. const res = uni.getMenuButtonBoundingClientRect()
  170. this.statusHeight = res.top //胶囊距离顶部
  171. // #endif
  172. },
  173. onUnload() {
  174. // 移除动画
  175. this.animationData = {}
  176. },
  177. methods: {
  178. getList() {
  179. let _this = this
  180. let data = {
  181. boxId: _this.boxId,
  182. isTry: _this.isTry,
  183. orderId: _this.orderId,
  184. ticketId: _this.ticketId
  185. }
  186. let num = 0
  187. let time = setInterval(() => {
  188. num++
  189. uni.showLoading({
  190. title: '加载中'
  191. });
  192. $http.post('/api/v1/mp/user/ticket/autoCashPrize', data).then(res => {
  193. if (res.code == 0) {
  194. clearInterval(time)
  195. _this.list = res.data.ticketAwardsPrizeList
  196. _this.list.forEach(item => {
  197. item.forEach(ele => {
  198. ele.picUrl = env.filePublic + ele.picUrl.split(',')[
  199. 0] + '?imageView2/2/w/170'
  200. ele.prizeType = JSON.parse(ele.prizeType)
  201. })
  202. })
  203. _this.prizeInfo = {
  204. ...res.data,
  205. picUrl: env.filePublic + res.data.picUrl.split(',')[0] +
  206. '?imageView2/2/w/340',
  207. prizeType: JSON.parse(res.data.prizeType)
  208. }
  209. setTimeout(() => {
  210. uni.hideLoading();
  211. _this.btnShow = true
  212. _this.running()
  213. }, 500)
  214. } else if (res.code == 401) {
  215. uni.hideLoading();
  216. clearInterval(time)
  217. uni.navigateBack({
  218. delta: 2
  219. })
  220. } else if (res.code == 500) {
  221. uni.hideLoading();
  222. clearInterval(time)
  223. uni.navigateBack({
  224. delta: 1
  225. })
  226. }
  227. if (num == 10) {
  228. uni.hideLoading();
  229. clearInterval(time)
  230. }
  231. }).catch(() => {
  232. uni.hideLoading();
  233. clearInterval(time)
  234. uni.navigateBack({
  235. delta: 1
  236. })
  237. })
  238. }, 1000)
  239. },
  240. // 动画开始
  241. running() {
  242. // #ifdef H5
  243. // 获取滚动奖品列表长度
  244. this.data = this.$refs.rolling.$el.clientWidth
  245. // 调用 step() 来表示一组动画完成
  246. this.animation.translateX(-this.data).step({
  247. duration: 8000,
  248. timingFunction: 'linear'
  249. })
  250. // export方法导出动画数据
  251. this.animationData = this.animation.export()
  252. // 倒计时
  253. this.time = setInterval(() => {
  254. // 开奖倒计时、页面显示
  255. this.num--
  256. // 记录动画执行时间,停止动画计算移动距离时使用
  257. this.num2++
  258. if (this.num == 0) {
  259. clearInterval(this.time)
  260. }
  261. }, 1000)
  262. // 不手动停止动画,自动停止
  263. this.stopTime = setTimeout(() => {
  264. this.stop()
  265. }, 8000);
  266. // #endif
  267. // #ifdef MP-ALIPAY
  268. my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
  269. this.data = info[0].width
  270. // 调用 step() 来表示一组动画完成
  271. this.animation.translateX(-this.data).step({
  272. duration: 8000,
  273. timingFunction: 'linear'
  274. })
  275. // export方法导出动画数据
  276. this.animationData = this.animation.export()
  277. // 倒计时
  278. this.time = setInterval(() => {
  279. // 开奖倒计时、页面显示
  280. this.num--
  281. // 记录动画执行时间,停止动画计算移动距离时使用
  282. this.num2++
  283. if (this.num == 0) {
  284. clearInterval(this.time)
  285. }
  286. }, 1000)
  287. })
  288. // 不手动停止动画,自动停止
  289. this.stopTime = setTimeout(() => {
  290. this.num = 0
  291. this.stop()
  292. }, 8000);
  293. // #endif
  294. // #ifdef MP-WEIXIN
  295. // 元素详细信息
  296. uni.createSelectorQuery().in(this).select(".rolling-prize-list").boundingClientRect(info => {
  297. this.data = info.width
  298. // 调用 step() 来表示一组动画完成
  299. this.animation.translateX(-this.data).step({
  300. duration: 8000,
  301. timingFunction: 'linear'
  302. })
  303. // export方法导出动画数据
  304. this.animationData = this.animation.export()
  305. // 倒计时
  306. this.time = setInterval(() => {
  307. // 开奖倒计时、页面显示
  308. this.num--
  309. // 记录动画执行时间,停止动画计算移动距离时使用
  310. this.num2++
  311. if (this.num == 0) {
  312. clearInterval(this.time)
  313. }
  314. }, 1000)
  315. }).exec();
  316. // 不手动停止动画,自动停止
  317. this.stopTime = setTimeout(() => {
  318. this.num = 0
  319. this.stop()
  320. }, 8000);
  321. // #endif
  322. },
  323. // 停止动画
  324. stop() {
  325. if (this.btnIng) return
  326. this.btnIng = true
  327. // 获取屏幕距离,用于计算停止动画移动距离计算
  328. // #ifndef MP-ALIPAY
  329. let screenWidth = null
  330. uni.getSystemInfo({
  331. success: function(res) {
  332. screenWidth = res.screenWidth;
  333. }
  334. });
  335. // #endif
  336. /**
  337. * 0秒:下标4
  338. * 1秒:下标6
  339. * 2秒:下标8
  340. * 3秒:下标10
  341. * 4秒:下标12
  342. * 5秒:下标14
  343. * 6秒:下标16
  344. * 7秒:下标2
  345. * 8秒:下标2
  346. * */
  347. clearInterval(this.time)
  348. clearTimeout(this.stopTime)
  349. this.animationData = {}
  350. // #ifdef MP-ALIPAY
  351. this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  352. // #endif
  353. // #ifndef MP-ALIPAY
  354. if (this.num2 == 0) {
  355. this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  356. } else if (this.num2 == 1) {
  357. this.list[5][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  358. } else if (this.num2 == 2) {
  359. this.list[7][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  360. } else if (this.num2 == 3) {
  361. this.list[9][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  362. } else if (this.num2 == 4) {
  363. this.list[11][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  364. } else if (this.num2 == 5) {
  365. this.list[13][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  366. } else if (this.num2 == 6) {
  367. this.list[15][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  368. } else if (this.num2 == 7) {
  369. this.list[1][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  370. } else if (this.num2 == 8) {
  371. // #ifdef MP-WEIXIN
  372. this.list[1][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  373. // #endif
  374. // #ifdef H5
  375. this.list[3][1] = JSON.parse(JSON.stringify(this.prizeInfo))
  376. // #endif
  377. }
  378. // #endif
  379. // #ifdef H5
  380. /**
  381. * 根据动画时间移动到指定位置
  382. * this.data / 8 :动画平均移动距离
  383. * this.num2 : 动画执行时间
  384. * screenWidth * 3 :移动3个屏幕距离
  385. */
  386. this.animation.translateX(-(this.data / 8 * this.num2 + screenWidth * 3)).step({
  387. duration: 4000,
  388. timingFunction: 'ease'
  389. })
  390. this.animationData = this.animation.export()
  391. setTimeout(() => {
  392. this.rollingShow = false
  393. }, 4500)
  394. setTimeout(() => {
  395. this.circularShow = false
  396. }, 5100)
  397. setTimeout(() => {
  398. this.rotateShow = false
  399. }, 7500)
  400. // #endif
  401. // #ifdef MP-ALIPAY
  402. let _this = this
  403. uni.getSystemInfo({
  404. success: (res) => {
  405. let windowWidth = res.windowWidth;
  406. my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(
  407. info => {
  408. _this.data = info[0].width //动画移动距离
  409. _this.animation.translateX(-(_this.data + windowWidth * 3)).step({
  410. duration: 4000,
  411. timingFunction: 'ease'
  412. })
  413. _this.animationData = _this.animation.export()
  414. })
  415. setTimeout(() => {
  416. _this.rollingShow = false
  417. }, 4500)
  418. setTimeout(() => {
  419. _this.circularShow = false
  420. }, 5100)
  421. setTimeout(() => {
  422. _this.rotateShow = false
  423. }, 7500)
  424. }
  425. });
  426. // #endif
  427. // #ifdef MP-WEIXIN
  428. uni.createSelectorQuery().in(this).select(".rolling-prize-list").boundingClientRect(info => {
  429. this.data = info.width
  430. this.animation.translateX(-(this.data / 8 * this.num2 + screenWidth * 3)).step({
  431. duration: 4000,
  432. timingFunction: 'ease'
  433. })
  434. this.animationData = this.animation.export()
  435. }).exec();
  436. setTimeout(() => {
  437. this.rollingShow = false
  438. }, 4500)
  439. setTimeout(() => {
  440. this.circularShow = false
  441. }, 5100)
  442. setTimeout(() => {
  443. this.rotateShow = false
  444. }, 7500)
  445. // #endif
  446. },
  447. back() {
  448. uni.switchTab({
  449. url:'/pages/index/index'
  450. })
  451. },
  452. toPrize(data) {
  453. if (data.value == 'goods') {
  454. uni.redirectTo({
  455. url: '/packagePrize/prize/index'
  456. })
  457. }
  458. if (data.value == 'coupon') {
  459. uni.redirectTo({
  460. url: '/packagePrize/prize/index?coupon=1'
  461. })
  462. }
  463. if (data.value == 'coupon_pkg') {
  464. uni.redirectTo({
  465. url: '/packagePrize/prize/index?coupon=1'
  466. })
  467. }
  468. if (data.value == 'coin') {
  469. uni.switchTab({
  470. url: '/pages/core/index'
  471. })
  472. }
  473. },
  474. },
  475. }
  476. </script>
  477. <style lang="scss" scoped>
  478. .rolling {
  479. width: 100%;
  480. height: calc(100vh - 44px);
  481. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/prize_bkg1.png) center center no-repeat;
  482. background-size: 100vw calc(100vh - 44px);
  483. overflow: hidden;
  484. // 奖品滚动
  485. &-prize {
  486. display: flex;
  487. margin-top: 28vh;
  488. height: 28vh;
  489. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/prize_bkg2.png) center center no-repeat;
  490. background-size: 100vw 28vh;
  491. margin-bottom: 82rpx;
  492. &-list {
  493. display: flex;
  494. margin-top: 76rpx;
  495. height: calc(100% - 76rpx);
  496. &-item {
  497. width: 100vw;
  498. height: 100%;
  499. &__items {
  500. align-items: flex-start;
  501. justify-content: space-evenly;
  502. width: 100vw;
  503. height: 100%;
  504. .content {
  505. flex-direction: column;
  506. width: 30%;
  507. height: 85%;
  508. image {
  509. width: 100%;
  510. height: 60%;
  511. margin-bottom: 16rpx;
  512. }
  513. &-title {
  514. width: 100%;
  515. line-height: 34rpx;
  516. font-size: 26rpx;
  517. text-align: center;
  518. margin-bottom: 20rpx;
  519. }
  520. &-price {
  521. width: 100%;
  522. line-height: 26rpx;
  523. font-size: 26rpx;
  524. text-align: center;
  525. }
  526. }
  527. // .content:nth-child(2) {
  528. // justify-content: flex-start;
  529. // color: #333;
  530. // image {
  531. // width: 100%;
  532. // height: 60%;
  533. // }
  534. // .content-title {
  535. // font-weight: bold;
  536. // }
  537. // .content-price {
  538. // font-weight: bold;
  539. // }
  540. // }
  541. }
  542. }
  543. }
  544. }
  545. // 按钮
  546. &-btn {
  547. height: 160rpx;
  548. margin-bottom: 36rpx;
  549. &-content {
  550. position: relative;
  551. height: 100%;
  552. image {
  553. width: 486rpx;
  554. height: 100%;
  555. }
  556. &-title {
  557. position: absolute;
  558. top: 30rpx;
  559. font-size: 72rpx;
  560. font-family: YouSheBiaoTiHei;
  561. font-weight: 400;
  562. color: #FFFFFF;
  563. line-height: 72rpx;
  564. opacity: 0.99;
  565. }
  566. }
  567. .btn-stop {
  568. animation: scaleBtn 0.2s linear;
  569. }
  570. // 放大缩小动画
  571. @keyframes scaleBtn {
  572. from {
  573. transform: scale(0.9);
  574. }
  575. to {
  576. transform: scale(1);
  577. }
  578. }
  579. }
  580. // 倒计时
  581. &-time {
  582. .num {
  583. font-size: 110rpx;
  584. font-family: YouSheBiaoTiHei;
  585. font-weight: 400;
  586. color: #FFFFFF;
  587. line-height: 110rpx;
  588. }
  589. }
  590. }
  591. // 奖品显示
  592. .prize {
  593. position: relative;
  594. width: 100%;
  595. height: 100vh;
  596. background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/lucky_background.png) center center no-repeat;
  597. background-size: 100vw 100vh;
  598. overflow: hidden;
  599. &-navLeft {
  600. position: absolute;
  601. left: 34rpx;
  602. width: 66rpx;
  603. height: 66rpx;
  604. background-color: rgba(255, 255, 255, .36);
  605. border-radius: 50%;
  606. }
  607. &-title {
  608. padding-top: 15vh;
  609. margin-bottom: 120rpx;
  610. image {
  611. width: 484rpx;
  612. height: 108rpx;
  613. }
  614. }
  615. &-box {
  616. margin-bottom: 34rpx;
  617. &-popup {
  618. position: relative;
  619. flex-direction: column;
  620. width: 75vw;
  621. height: 38vh;
  622. background-color: #FFFFFF;
  623. border-radius: 22rpx;
  624. &__image {
  625. position: relative;
  626. z-index: 10;
  627. width: 65%;
  628. height: 65%;
  629. image {
  630. width: 100%;
  631. height: 100%;
  632. }
  633. }
  634. &__rotate {
  635. position: absolute;
  636. width: 100%;
  637. height: 100%;
  638. z-index: 5;
  639. animation: rotateBg 3s linear;
  640. }
  641. &__circular {
  642. position: absolute;
  643. width: 600rpx;
  644. height: 600rpx;
  645. z-index: 5;
  646. animation: scaleBg 0.7s linear;
  647. }
  648. // 旋转动画
  649. @keyframes rotateBg {
  650. from {
  651. transform: rotate(0);
  652. }
  653. to {
  654. transform: rotate(360deg);
  655. }
  656. }
  657. // 放大动画
  658. @keyframes scaleBg {
  659. from {
  660. transform: scale(0.8);
  661. }
  662. to {
  663. transform: scale(1.8);
  664. }
  665. }
  666. }
  667. }
  668. &-info {
  669. margin-bottom: 40rpx;
  670. &-content {
  671. width: 70vw;
  672. &-price {
  673. text-align: center;
  674. font-size: 40rpx;
  675. line-height: 40rpx;
  676. font-family: PingFang SC;
  677. font-weight: bold;
  678. color: #FFFFFF;
  679. margin-bottom: 20rpx;
  680. text {
  681. font-size: 28rpx;
  682. }
  683. }
  684. &-title {
  685. height: 36rpx;
  686. overflow: hidden;
  687. text-align: center;
  688. font-size: 36rpx;
  689. line-height: 36rpx;
  690. color: #FFFFFF;
  691. margin-bottom: 50rpx;
  692. }
  693. &-titletwo {
  694. height: 36rpx;
  695. text-align: center;
  696. font-size: 36rpx;
  697. line-height: 36rpx;
  698. color: #FFFFFF;
  699. margin-bottom: 50rpx;
  700. white-space: nowrap;
  701. overflow: hidden;
  702. text-overflow: ellipsis;
  703. }
  704. &-btn {
  705. &-content {
  706. position: relative;
  707. width: 70vw;
  708. image {
  709. width: 70vw;
  710. height: 112rpx;
  711. }
  712. &-txt {
  713. position: absolute;
  714. top: 0;
  715. height: 112rpx;
  716. line-height: 112rpx;
  717. font-size: 30rpx;
  718. text-align: center;
  719. color: #FFFFFF;
  720. }
  721. }
  722. }
  723. }
  724. }
  725. &-tip {
  726. .txt {
  727. width: 332rpx;
  728. height: 66rpx;
  729. line-height: 66rpx;
  730. text-align: center;
  731. background: rgba(255, 211, 157, .3);
  732. border-radius: 34rpx;
  733. font-size: 34rpx;
  734. font-weight: 500;
  735. color: #FB930D;
  736. }
  737. }
  738. }
  739. </style>