index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  1. <template>
  2. <div class="lottery-container">
  3. <van-swipe v-if="carousel.length" :autoplay="3000" class="lottery-swipe" vertical :show-indicators="false">
  4. <van-swipe-item v-for="item in carousel" :key="item.mealId">有{{item.count}}个用户 {{['', '抽奖', '购买'][item.type]}}{{item.title}}</van-swipe-item>
  5. </van-swipe>
  6. <img class="w51h26" src="~/assets/image/activity/lottery/rule.png" alt="" @click="showRule=true;makePoint('activity_购买协议')">
  7. <div class="roulette">
  8. <div class="arrow" @click="startRotation"></div>
  9. <img class="start-btn" src="~/assets/image/activity/lottery/start-btn.png" alt="" @click="startRotation">
  10. </div>
  11. <RoundTurntable ref="roundTurntable" :prize-data="prizeData" :rotate-circle="rotateCircle" :during-time="duringTime" :turntable-style-option="turntableStyleOption" class="turntable" @endRotation="endRotation">
  12. <template slot="item" slot-scope="scope">
  13. <div class="turntable-name"><span class="fs15">¥</span>{{ scope.item.level }}</div>
  14. <div class="turntable-img">
  15. <img src="~/assets/image/activity/lottery/yearCard.png" />
  16. </div>
  17. </template>
  18. </RoundTurntable>
  19. <div class="num">剩余机会{{num}}次</div>
  20. <van-popup v-model="showPay" closeable close-icon-position="top-right" round :close-on-click-overlay="false" @closed="closed">
  21. <div class="popup-view">
  22. <div class="txt1">恭喜你获得{{actualPrice}}年卡</div>
  23. <div :class="selMealId===mealId ? 'coupon-1 active' : 'coupon-1'" @click="selMealId=mealId">
  24. <img v-if="selMealId===mealId" class="coupon-select-icon" src="~/assets/image/activity/lottery/select-icon.png" alt="">
  25. <img v-else class="coupon-select-icon" src="~/assets/image/activity/lottery/unselect-icon.png" alt="">
  26. <div class="coupon-title"><span class="txt2">{{actualPrice}}</span><span>年卡会员</span></div>
  27. <div class="txt4">12个月 30H/月 不使用不计时</div>
  28. <img class="w253h73" src="~/assets/image/activity/lottery/coupon-1.png" alt="">
  29. </div>
  30. <div v-for="item in mealList" :key="item.id" :class="selMealId===item.id ? 'coupon-2 active' : 'coupon-2'" @click="selMealId=item.id;makePoint(item.day === 30 ? 'activity_38月卡' : 'activity_268年卡')">
  31. <img v-if="selMealId===item.id" class="coupon-select-icon" src="~/assets/image/activity/lottery/select-icon.png" alt="">
  32. <img v-else class="coupon-select-icon" src="~/assets/image/activity/lottery/unselect-icon.png" alt="">
  33. <div class="coupon-title"><span class="txt2">{{item.actualPrice}}</span><span>会员</span></div>
  34. <div class="txt4">{{item.day === 30 ? '月卡' : '年卡'}}</div>
  35. <img class="w111h73" src="~/assets/image/activity/lottery/coupon-2.png" alt="">
  36. </div>
  37. <div v-for="item in paySupportType" :key="item" class="fnbc" @click="payType = item;makePoint(item === 'aliPay' ? 'activity_支付宝' : 'activity_微信')">
  38. <div v-if="item === 'aliPay'" class="fnc">
  39. <van-icon class="icon-pay" :name="require('~/assets/image/activity/lottery/alipay.png')" />
  40. <span class="txt5">支付宝支付</span>
  41. </div>
  42. <div v-else class="fnc">
  43. <van-icon class="icon-pay" :name="require('~/assets/image/activity/lottery/wx.png')" />
  44. <span class="txt5">微信支付</span>
  45. </div>
  46. <van-icon :name="payType === item ? require('~/assets/image/activity/lottery/select-round-icon.png') : require('~/assets/image/activity/lottery/unselect-round-icon.png')" size="24" />
  47. </div>
  48. <img class="w304h62" src="~/assets/image/activity/lottery/pay-btn.png" alt="" @click="createOrder">
  49. <div class="txt6">开通前阅读并同意<a @click="showRule=true;makePoint('activity_购买协议')">购买协议</a></div>
  50. </div>
  51. </van-popup>
  52. <van-popup v-model="show" closeable close-icon-position="top-right" round @closed="makePoint('activity_关闭弹窗')">
  53. <div class="popup-view popup-view-leave">
  54. <div class="txt1">确定离开吗</div>
  55. <div class="txt6">离开后您将失去{{actualPrice}}年卡,24小时付款有效</div>
  56. <div class="coupon-1 active">
  57. <img class="coupon-select-icon" src="~/assets/image/activity/lottery/select-icon.png" alt="">
  58. <div class="coupon-title"><span class="txt2">{{actualPrice}}</span><span>会员</span><span class="txt3">({{title}})</span></div>
  59. <div class="txt4">年卡(已获得)</div>
  60. <img class="w253h73" src="~/assets/image/activity/lottery/coupon-1.png" alt="">
  61. </div>
  62. <div class="fnbc">
  63. <div class="btn-leave" @click="show=false;makePoint('activity_狠心离开')">狠心离开</div>
  64. <div class="btn-pay" @click="createOrder">立即购买</div>
  65. </div>
  66. </div>
  67. </van-popup>
  68. <van-popup v-model="showRule" style="background: transparent;padding-top: 14px;">
  69. <div class="popup-view-rule">
  70. <div class="popup-view-rule-box">
  71. <div class="popup-view-rule-title">购买协议</div>
  72. <div class="h330">
  73. <div class="txt7"> 参与活动前,请仔细阅读购买协议,特别是产品说明和注意事项。用户参与本活动即视为已充分阅读、理解本活动规则,并自愿受活动规则约束。</div>
  74. <div class="txt8 mt14 fw500">年卡特惠包 </div>
  75. <div class="txt9 mt5">每月自动续,时长不用愁</div>
  76. <div class="txt8 mt5 fw500">360H 每月30H</div>
  77. <div class="txt9 mt5">按实际使用计时,VIP机型可用,立即生效</div>
  78. <div class="txt9 mt14"><span class="txt7">有效时间:</span>按实际使用云手机的时间计时,不使用不计时;每月30H,当月时长不跨月;12个月,每月自动续</div>
  79. <div class="txt9"><span class="txt7">可用范围:</span>VIP机型</div>
  80. <div class="txt9"><span class="txt7">生效方式:</span>立即生效</div>
  81. <div class="txt9"><span class="txt7">订购次数:</span>不可重复订购</div>
  82. <div class="txt9"><span class="txt7">退订说明:</span>特惠产品,不支持退订</div>
  83. <div class="txt9 mt14">产品说明:</div>
  84. <div class="txt7">1、产品内容:本产品为臂云科技旗下双子星VIP机型新人特惠年包,包含每月360H的VIP机型云手机使用时长,连续12个月每月自动续30H时长;按实际使用云手机的时间计时,不使用不计时。2、生效时间:订购扣费后立即生效;</div>
  85. <div class="txt7">2、生效时间:订购扣费后立即生效;</div>
  86. <div class="txt7">3、注意事项:</div>
  87. <div class="txt7">(1)本产品合约期12个月,自生效当月起每月自动续30H时长;</div>
  88. <div class="txt7">(2)合约到期后需用户另外购买时长;</div>
  89. <div class="txt7">(3)合约到期后,年卡特惠包剩余时长自动失效;</div>
  90. <div class="txt7">(4)合约到期后,另外续费时长包所得的时长仍有效,云机可继续使用;</div>
  91. <div class="txt7">(5)年卡特惠包云手机与普通包月云手机计时逻辑不同,两种云手机时长不可叠加,若另外订购普通包月云手机将获得一台新云手机。</div>
  92. <div class="txt8 mt14">温馨提示:</div>
  93. <div class="txt7">1、请您理解:通过任何不正当手段参与活动,如借助非自然流量/外挂工具;利用技术漏洞,恶意退款,批量注册账号、买号等搅乱平台管理秩序的行为,臂云科技有权限制/取消用户的活动资格,不予发放/</div>
  94. <div class="txt8 mt5 fw500" style="color: #EC6250;">时长包使用规则</div>
  95. <div class="txt7 mt5">年卡特惠云手机,按需补充时长包</div>
  96. <div class="txt7">有效时间:<span class="txt10">时长用完前一直有效,支持跨月。</span></div>
  97. <div class="txt7">可用范围:<span class="txt10">可续时长的机型</span></div>
  98. <div class="txt7">生效方式:<span class="txt10">立即生效</span></div>
  99. <div class="txt7">退订说明:<span class="txt10">立即生效产品,不支持退订</span></div>
  100. <div class="txt7 mt14">
  101. 产品说明<br />1、生效方式:时长补充包订购后立即生效,直至时长用完则失效,用户可重复订购。
  102. 2、时长使用顺序:优先使用年卡特惠包时长,年卡特惠包时长耗尽,自动使用时长包时长。<br />3、年卡特惠包合约到期后,如时长补充包仍有时长,年卡特惠包所属云手机可继续使用至时长用尽。
  103. </div>
  104. </div>
  105. <img class="w304h62" src="~/assets/image/activity/lottery/buy-rule-icon.png" alt="" @click="showRule=false">
  106. </div>
  107. </div>
  108. </van-popup>
  109. </div>
  110. </template>
  111. <script>
  112. import { Toast } from 'vant'
  113. import RoundTurntable from './component/roundTurntable.vue'
  114. const RSA = require('../../../plugins/wx_rsa');
  115. const webUni = require('../../../plugins/uni');
  116. export default {
  117. name: 'Lottery',
  118. auth: false,
  119. components: {
  120. RoundTurntable
  121. },
  122. data() {
  123. return {
  124. showRule: false,
  125. show: false,
  126. showPay: false,
  127. // 转盘上的奖品数据
  128. prizeData: [
  129. {
  130. id: 1,
  131. level: 29.9
  132. },
  133. {
  134. id: 2,
  135. level: 58
  136. },
  137. {
  138. id: 3,
  139. level: 9.9
  140. },
  141. {
  142. id: 4,
  143. level: 39.9
  144. },
  145. {
  146. id: 5,
  147. level: 378
  148. },
  149. {
  150. id: 6,
  151. level: 15.9
  152. }
  153. ],
  154. // 转动的圈数
  155. rotateCircle: 6,
  156. // 转动需要持续的时间(s)
  157. duringTime: 4.5,
  158. // 转盘样式的选项
  159. turntableStyleOption: {
  160. // 背景色
  161. prizeBgColors: ['#FFF9F8', '#FFECC9', '#FFF9F8', '#FFECC9', '#FFF9F8', '#FFECC9'],
  162. // 转盘的外边框颜色
  163. borderColor: '#FFD790'
  164. },
  165. // 中奖的奖品的index
  166. prizeIndex: -1,
  167. // 用来锁定转盘,避免同时多次点击转动
  168. isLocking: false,
  169. // 剩余抽奖次数
  170. num: 2,
  171. token: '',
  172. activityId: '',
  173. actualPrice: 0,
  174. mealId: '',
  175. selMealId: '',
  176. paySupportType: [],
  177. title: '',
  178. payType: '',
  179. mealList: [],
  180. status: 0,
  181. carousel: [],
  182. phoneType: 'SVIP',
  183. client: 0
  184. }
  185. },
  186. async fetch() {
  187. if (this.$userAgent.isAndroid) {
  188. this.token = await window.native.getToken();
  189. } else {
  190. this.token = this.$route.query.token;
  191. }
  192. },
  193. head: {
  194. title: '年卡抽奖活动'
  195. },
  196. created() {
  197. if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
  198. this.client = 1
  199. } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
  200. this.client = 2
  201. } else if (this.$userAgent.isMiniProgram) {
  202. this.client = 5
  203. } else {
  204. this.client = 7
  205. }
  206. this.getLuckDrawActivity()
  207. this.getMealInfo()
  208. this.getCarouselList()
  209. },
  210. methods: {
  211. async getCarouselList() {
  212. const res = await this.$axios.$post('/activity/v1/member/carousel');
  213. this.carousel = res.data;
  214. },
  215. async getMealInfo() {
  216. const res = await this.$axios.$get('/pay/v2/meal/info?phoneType=' + this.phoneType);
  217. this.mealList = res.data.list.filter(item => item.day === 30 || item.day === 365)
  218. },
  219. async createOrder() {
  220. try {
  221. Toast.loading({
  222. duration: 0,
  223. forbidClick: true,
  224. });
  225. this.makePoint('activity_立即购买')
  226. let taocan = {
  227. buyType: 1,
  228. couponId: 0,
  229. id: this.selMealId,
  230. mealType: 0,
  231. phoneType: this.phoneType,
  232. quantity: 1,
  233. };
  234. taocan = this.sort_ASCII(taocan);
  235. const sign = this.jiaqian(JSON.stringify(taocan));
  236. const res = await this.$axios.$post('/pay/v1/order/create', taocan, { headers: { Authorization: this.token, sign } });
  237. if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
  238. window.native.startPay(this.payType === 'aliPay' ? 3 : 2, res.data.myOrderNum, 1);
  239. } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
  240. window.webkit.messageHandlers.startPay.postMessage({
  241. payType: this.payType === 'aliPay' ? 3 : 2,
  242. orderNum: res.data.myOrderNum,
  243. actualPrice: this.actualPrice
  244. });
  245. } else if (this.$userAgent.isMiniProgram) {
  246. if (this.payType === 'aliPay') {
  247. Toast({
  248. message: '微信小程序不支持支付宝支付',
  249. position: 'top',
  250. duration: 3000
  251. });
  252. return false
  253. }
  254. this.$wx.miniProgram.navigateTo({
  255. url: '/packageA/order/status/index?record=' + JSON.stringify({
  256. payActive: this.payType === 'wxPay' ? 1 : 0,
  257. myOrderNum: res.data.myOrderNum
  258. }),
  259. });
  260. } else {
  261. // 使用postMessage 方法可以发送消息到应用, 消息内容需要在data 对象中,否则webview无法接收到
  262. webUni.webView.postMessage({
  263. data: {
  264. payType: this.payType === 'aliPay' ? 3 : 2,
  265. orderNum: res.data.myOrderNum,
  266. buyType: 1,
  267. price: this.actualPrice
  268. }
  269. })
  270. }
  271. } catch (error) {
  272. Toast({
  273. message: error.message,
  274. position: 'top',
  275. duration: 3000
  276. });
  277. } finally {
  278. Toast.clear();
  279. }
  280. },
  281. sort_ASCII(obj) {
  282. const arr = [];
  283. let num = 0;
  284. for (const i in obj) {
  285. arr[num] = i;
  286. num++;
  287. }
  288. const sortArr = arr.sort();
  289. const sortObj = {};
  290. for (const i in sortArr) {
  291. sortObj[sortArr[i]] = obj[sortArr[i]];
  292. }
  293. return sortObj;
  294. },
  295. jiaqian(content) {
  296. const PrivateKey =
  297. '-----BEGIN PRIVATE KEY-----MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKCIK/zTSJCP4XhNsb7Mc5lALog+oAja/spMjg8U6rAmVzRtKv8qhw1HK0CRbW/XV66uM+kY7fhjaYbjbbzu2PMMfs2GVpG15jCWLug9fn2hvPT1wkXfooJX61yHK7+inxAXPi4vPNi263mSQGbhZTeqbU5p7nLeRGbdFyBQXVKpAgMBAAECgYAu/475RxZAlI8rPHvkY1EYteypoMQTs6HSslUI31PSXHc9dxSWfenqHkLwdWM30jDuiDvUa6MIDHrRrfXr0XWcQ0IJ93jT7ABkFCdxcKEOG1WE8f1kZ5JyPDJjeQiI9R4jJCukpGU0DdzO7ORvRb4oTFQ15quM+3+SjnK5TtfUsQJBAOLLk03D2s7t2R0GPLZq+WL/ebowbRSy4VHP/IQi4K1bJrll0HLznov60m9UML1ATlS2ub98fBRFXEAaAwJE2O0CQQC1NDEWhrAPU5o3xjjcxIUbbYskskbhjaiX/1Vz0UzS4XfYek4SL68WBWPGWTrSbgbvXtaXj0gmcChF5jxOHtUtAkA4mPsqxfy99UdgYeUW1P1lgkH7gAhIyRdH1nK6+wU83el9DPaHKVrgrfiEBeuf3wNtSqhyK/u/B0wtRxCHKW1FAkAXfwcGdryJoDuVE9z3s3vXDKNIRN2wDaBY5UD9XZxqk9XoeiN5dDltz5EafSOFecLocxG8YVXntg9i0PHs506ZAkEAge9AKaXisZ4jCNHRn1LR2R82RtHTLb2mN3Cc6sGo+SnAKczwRwVg9RgnmaLG4Z/7kJpq0ALgEBlkOmy+9joxAw==-----END PRIVATE KEY-----';
  298. const signature = new RSA.KJUR.crypto.Signature({
  299. alg: 'SHA256withRSA',
  300. });
  301. signature.init(PrivateKey);
  302. signature.updateString(content);
  303. const signData = signature.sign();
  304. // 将内容转成base64
  305. return RSA.hex2b64(signData);
  306. },
  307. async getLuckDrawActivity() {
  308. const res = await this.$axios.$post('/activity/v1/member/luckDrawActivity');
  309. this.activityId = res.data.activityId
  310. this.status = res.data.status
  311. this.num = res.data.count
  312. },
  313. // 开始抽奖
  314. async startRotation() {
  315. // 如果还不可以转动
  316. if (!this.canBeRotated()) {
  317. return false;
  318. }
  319. this.makePoint('activity_立即抽奖')
  320. // 开始转动
  321. // 先上锁
  322. this.isLocking = true;
  323. // 设置在哪里停下,应该与后台交互,这里随机抽取0~5
  324. const res = await this.$axios.$post('/activity/v1/member/luckDraw?activityId=' + this.activityId, {}, { headers: { Authorization: this.token } });
  325. if (res.status === 0) {
  326. const index = this.prizeData.findIndex(item => item.level === res.data.actualPrice)
  327. this.actualPrice = res.data.actualPrice
  328. if (this.actualPrice === 15.9) {
  329. this.makePoint('activity_15.9年卡')
  330. if (Number(localStorage.getItem('year-15-9')) !== 2)
  331. localStorage.setItem('year-15-9', 1)
  332. }
  333. if (this.actualPrice === 9.9) {
  334. if (Number(localStorage.getItem('year-9-9')) !== 2)
  335. this.makePoint('activity_9.9年卡')
  336. localStorage.setItem('year-9-9', 1)
  337. }
  338. this.mealId = res.data.mealId
  339. this.selMealId = res.data.mealId
  340. this.paySupportType = res.data.paySupportType
  341. this.payType = this.paySupportType[0]
  342. this.phoneType = res.data.phoneType
  343. this.title = res.data.title
  344. this.prizeIndex = index;
  345. } else {
  346. return
  347. }
  348. // 成功后次数减少一次
  349. if (this.num > 1) {
  350. this.num--;
  351. }
  352. // 告诉子组件,开始转动了
  353. this.$refs.roundTurntable.rotate(this.prizeIndex);
  354. },
  355. makePoint(positionButton) {
  356. const now = new Date()
  357. this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [{ client: this.client, eventCode: '27_抽奖流程', userName: this.$auth.user.userName, positionButton, operationTime: now.toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') }])
  358. },
  359. // 已经转动完转盘触发的函数
  360. endRotation() {
  361. // 提示中奖
  362. this.showPay = true
  363. // 解锁
  364. this.isLocking = false;
  365. },
  366. // 判断是否可以转动
  367. canBeRotated() {
  368. if (this.isLocking) {
  369. return false;
  370. }
  371. if (this.status === 0) {
  372. Toast({
  373. message: '当前活动已过期',
  374. position: 'top',
  375. duration: 3000
  376. });
  377. return false;
  378. }
  379. if (this.status === 2) {
  380. Toast({
  381. message: '当前活动未开启',
  382. position: 'top',
  383. duration: 3000
  384. });
  385. return false;
  386. }
  387. if (this.status === 3) {
  388. Toast({
  389. message: '当前活动已结束',
  390. position: 'top',
  391. duration: 3000
  392. });
  393. return false;
  394. }
  395. return true;
  396. },
  397. closed() {
  398. this.makePoint('activity_关闭抽奖', 'eventCode传27_抽奖流程')
  399. if (Number(localStorage.getItem('year-15-9')) !== 2) {
  400. this.show = true
  401. localStorage.setItem('year-15-9', 2)
  402. }
  403. if (Number(localStorage.getItem('year-9-9')) !== 2) {
  404. this.show = true
  405. localStorage.setItem('year-9-9', 2)
  406. }
  407. }
  408. }
  409. }
  410. </script>
  411. <style lang="scss" scoped>
  412. .fw500 {
  413. font-weight: 500;
  414. }
  415. .mt5 {
  416. margin-top: 5px;
  417. }
  418. .mt14 {
  419. margin-top: 14px;
  420. }
  421. .lottery-container {
  422. background-color: #bbe5f2;
  423. background-image: url('../../../assets/image/activity/lottery/bg.png');
  424. background-size: contain;
  425. min-height: 100vh;
  426. overflow: hidden;
  427. margin: 0 auto;
  428. }
  429. .lottery-swipe {
  430. width: 188px;
  431. height: 25px;
  432. background: rgba($color: #000000, $alpha: 0.24);
  433. border-radius: 0px 16px 16px 0px;
  434. position: absolute;
  435. top: 134px;
  436. left: 0;
  437. z-index: 1;
  438. }
  439. .lottery-swipe .van-swipe-item {
  440. color: #ffffff;
  441. font-size: 13px;
  442. line-height: 25px;
  443. text-align: center;
  444. }
  445. .w51h26 {
  446. width: 51px;
  447. height: 26px;
  448. position: absolute;
  449. top: 128px;
  450. right: 0;
  451. z-index: 2;
  452. }
  453. .roulette {
  454. width: 372px;
  455. height: 442px;
  456. background-image: url('../../../assets/image/activity/lottery/roulette.png');
  457. background-size: 100% 100%;
  458. margin: 127px auto 0;
  459. position: relative;
  460. }
  461. .arrow {
  462. width: 122px;
  463. height: 135px;
  464. position: absolute;
  465. top: 110px;
  466. left: 125px;
  467. background-image: url('../../../assets/image/activity/lottery/arrow.png');
  468. background-size: 100% 100%;
  469. z-index: 1;
  470. }
  471. .turntable {
  472. position: absolute;
  473. left: calc(50% - 144px);
  474. top: 163px;
  475. width: 288px;
  476. height: 288px;
  477. }
  478. .turntable-name {
  479. position: absolute;
  480. left: 10px;
  481. top: 20px;
  482. width: calc(100% - 20px);
  483. font-size: 20px;
  484. font-weight: 600;
  485. text-align: center;
  486. color: #b8320d;
  487. }
  488. .fs15 {
  489. font-size: 15px;
  490. }
  491. .turntable-img {
  492. position: relative;
  493. /*要居中就要50% - 宽度 / 2*/
  494. left: calc(50% - 40px / 2);
  495. top: 43px;
  496. width: 52px;
  497. height: 39px;
  498. img {
  499. display: inline-block;
  500. width: 52px;
  501. height: 39px;
  502. }
  503. }
  504. .start-btn {
  505. width: 276px;
  506. height: 55px;
  507. position: absolute;
  508. bottom: 16px;
  509. left: calc(50% - 138px);
  510. }
  511. .num {
  512. margin-top: 8px;
  513. text-align: center;
  514. font-size: 14px;
  515. color: #333333;
  516. line-height: 20px;
  517. }
  518. .popup-view {
  519. width: 324px;
  520. padding: 20px 10px;
  521. box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1);
  522. background: #ffffff;
  523. text-align: center;
  524. }
  525. .popup-view-rule {
  526. width: 324px;
  527. height: 452px;
  528. box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1);
  529. box-sizing: border-box;
  530. background: linear-gradient(
  531. 180deg,
  532. rgba(254, 178, 119, 1),
  533. rgba(255, 91, 46, 1)
  534. );
  535. position: relative;
  536. border-radius: 18px;
  537. padding: 6px;
  538. }
  539. .popup-view-rule-box {
  540. width: 312px;
  541. height: 440px;
  542. background: linear-gradient(181deg, #fffffe 0%, #f7f2e5 100%);
  543. border-radius: 18px;
  544. box-sizing: border-box;
  545. padding-top: 38px;
  546. }
  547. .popup-view-rule-title {
  548. width: 220px;
  549. height: 54px;
  550. background-image: url('../../../assets/image/activity/lottery/buy-rule-title.png');
  551. background-size: 100% 100%;
  552. position: absolute;
  553. top: -14px;
  554. left: 52px;
  555. font-size: 18px;
  556. font-weight: 600;
  557. color: #fffefc;
  558. line-height: 54px;
  559. text-align: center;
  560. }
  561. .h330 {
  562. height: 335px;
  563. overflow-y: auto;
  564. padding: 0 16px;
  565. }
  566. .txt1 {
  567. font-size: 18px;
  568. font-weight: 600;
  569. color: #333333;
  570. line-height: 25px;
  571. text-align: center;
  572. }
  573. .coupon-1 {
  574. width: 286px;
  575. height: 106px;
  576. box-sizing: border-box;
  577. margin: 11px auto 0;
  578. position: relative;
  579. border-radius: 13px;
  580. border: 2px solid;
  581. border-color: #e8e8e8;
  582. box-sizing: border-box;
  583. &::before,
  584. &::after {
  585. background-color: white;
  586. border-radius: 50%;
  587. content: '';
  588. width: 20px;
  589. height: 20px;
  590. position: absolute;
  591. top: 43px;
  592. z-index: 1;
  593. }
  594. &::before {
  595. border-right: 2px solid;
  596. border-color: #e8e8e8;
  597. left: -12px;
  598. border-radius: 0 10px 10px 0;
  599. }
  600. &::after {
  601. border-left: 2px solid;
  602. border-color: #e8e8e8;
  603. right: -12px;
  604. border-radius: 10px 0 0 10px;
  605. }
  606. }
  607. .coupon-1.active,
  608. .coupon-2.active {
  609. border-left: 2px solid;
  610. border-color: #d96a57 !important;
  611. &::before {
  612. border-right: 2px solid;
  613. border-color: #d96a57;
  614. }
  615. &::after {
  616. border-left: 2px solid;
  617. border-color: #d96a57;
  618. }
  619. }
  620. .coupon-title {
  621. color: #362113;
  622. font-size: 12px;
  623. text-align: center;
  624. z-index: 1;
  625. position: absolute;
  626. top: 23px;
  627. width: 100%;
  628. }
  629. .txt2 {
  630. font-weight: 600;
  631. font-size: 24px;
  632. }
  633. .txt3 {
  634. color: #db6857;
  635. }
  636. .txt4 {
  637. position: absolute;
  638. top: 68px;
  639. width: 100%;
  640. text-align: center;
  641. font-size: 14px;
  642. font-weight: 600;
  643. color: #ffffff;
  644. line-height: 20px;
  645. z-index: 1;
  646. }
  647. .coupon-select-icon {
  648. width: 34px;
  649. height: 20px;
  650. position: absolute;
  651. top: 0;
  652. right: 0;
  653. z-index: 2;
  654. }
  655. .w253h73 {
  656. width: 253px;
  657. height: 73px;
  658. position: absolute;
  659. top: 15px;
  660. left: 15px;
  661. }
  662. .coupon-2 {
  663. display: inline-block;
  664. width: 138px;
  665. height: 106px;
  666. box-sizing: border-box;
  667. margin: 11px 4px 0;
  668. position: relative;
  669. border-radius: 13px;
  670. box-sizing: border-box;
  671. border: 2px solid;
  672. border-color: #e8e8e8;
  673. &::before,
  674. &::after {
  675. background-color: white;
  676. border-radius: 50%;
  677. content: '';
  678. width: 20px;
  679. height: 20px;
  680. position: absolute;
  681. top: 43px;
  682. z-index: 1;
  683. }
  684. &::before {
  685. border-right: 2px solid;
  686. border-color: #e8e8e8;
  687. left: -12px;
  688. border-radius: 0 10px 10px 0;
  689. }
  690. &::after {
  691. border-left: 2px solid;
  692. border-color: #e8e8e8;
  693. right: -12px;
  694. border-radius: 10px 0 0 10px;
  695. }
  696. }
  697. .w111h73 {
  698. width: 111px;
  699. height: 73px;
  700. position: absolute;
  701. top: 15px;
  702. left: 12px;
  703. }
  704. .txt5 {
  705. font-size: 16px;
  706. color: #333333;
  707. margin-left: 7px;
  708. }
  709. .icon-pay {
  710. font-size: 26px;
  711. line-height: inherit;
  712. }
  713. .fnc {
  714. display: flex;
  715. align-items: center;
  716. }
  717. .fnbc {
  718. display: flex;
  719. justify-content: space-between;
  720. align-items: center;
  721. height: 50px;
  722. padding: 0 10px;
  723. }
  724. .w304h62 {
  725. width: 304px;
  726. height: 62px;
  727. margin: 0 auto;
  728. }
  729. .txt6 {
  730. color: #333333;
  731. font-size: 11px;
  732. line-height: 16px;
  733. a {
  734. color: #ff7656;
  735. text-decoration: underline;
  736. }
  737. }
  738. .popup-view-leave {
  739. background: linear-gradient(180deg, #ffffff 0%, #f7f1e3 100%);
  740. }
  741. .btn-leave {
  742. width: 140px;
  743. height: 48px;
  744. background: linear-gradient(180deg, #ffdb94 0%, #ff9539 100%);
  745. box-shadow: 0px 2px 7px 0px rgba(237, 76, 0, 0.17),
  746. inset 0px -5px 0px 0px #ff7700;
  747. border-radius: 24px;
  748. font-size: 18px;
  749. font-weight: 600;
  750. color: #ffffff;
  751. text-align: center;
  752. line-height: 43px;
  753. margin-top: 15px;
  754. }
  755. .btn-pay {
  756. width: 140px;
  757. height: 48px;
  758. background: linear-gradient(180deg, #ff9278 0%, #ff562f 100%);
  759. box-shadow: 0px 2px 7px 0px rgba(237, 76, 0, 0.17),
  760. inset 0px -5px 0px 0px #f62e00;
  761. border-radius: 24px;
  762. border-radius: 24px;
  763. font-size: 18px;
  764. font-weight: 600;
  765. color: #ffffff;
  766. text-align: center;
  767. line-height: 43px;
  768. margin-top: 15px;
  769. }
  770. .txt7 {
  771. font-size: 13px;
  772. line-height: 19px;
  773. color: #666666;
  774. text-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
  775. }
  776. .txt8 {
  777. font-size: 15px;
  778. font-weight: 500;
  779. line-height: 19px;
  780. color: #333333;
  781. text-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
  782. }
  783. .txt9 {
  784. font-size: 13px;
  785. color: #333333;
  786. line-height: 19px;
  787. text-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
  788. }
  789. .txt10 {
  790. font-size: 13px;
  791. line-height: 19px;
  792. color: #333;
  793. text-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
  794. }
  795. </style>