drawCard_last.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. <template style="background-color: red">
  2. <div
  3. style="
  4. height: 100vh;
  5. background: linear-gradient(216deg, #fe854c 0%, #ff9a5a 100%);
  6. box-sizing: border-box;
  7. overflow: scroll;
  8. "
  9. >
  10. <div
  11. class="first2"
  12. :style="{
  13. background: 'url(https://file.rongcyl.cn/festatic/bkm/first2/bg.png)',
  14. height: 'calc(100vh - 160rpx)',
  15. 'background-repeat': 'no-repeat',
  16. 'background-position': 'center center',
  17. 'background-size': '100% 100%',
  18. 'padding-top': safeAreaTop,
  19. 'box-sizing': 'border-box',
  20. overflow: 'scroll',
  21. 'padding-bottom': '160rpx',
  22. }"
  23. >
  24. <div class="text-white bold text-center mt-2">
  25. <uni-icons
  26. type="left"
  27. size="20"
  28. color="#fff"
  29. style="position: absolute; left: 0; margin-left: 10px"
  30. @click="back"
  31. ></uni-icons>
  32. FIRST赏详情
  33. </div>
  34. <div class="card relative">
  35. <div class="flex pt-3 px-3">
  36. <image :src="detail.prizeIcon" style="width: 168rpx; height: 169rpx; border-radius: 8px" mode="aspectFill" />
  37. <div class="flex-1 pl-2">
  38. <div class="" style="font-weight: 900">{{ detail.name }}</div>
  39. <div class="flex justify-between">
  40. <div>
  41. <span class="bold" style="color: #ff2c43; font-size: 24rpx">¥</span>
  42. <span class="bold" style="color: #ff2c43; font-size: 38rpx">
  43. {{ ('' + detail.price).split('.')[0] }}
  44. </span>
  45. <span class="bold" style="color: #ff2c43; font-size: 28rpx">
  46. .{{ ('' + detail.price).split('.')[1] }}
  47. </span>
  48. <span style="color: #4e504f; font-size: 14px">/张明信片</span>
  49. </div>
  50. <div class="pt-2">
  51. <img
  52. @click="$navigateTo('/pages/rule/rule', { type: 5 })"
  53. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/first2/rule.png"
  54. style="width: 134rpx; height: 48rpx"
  55. />
  56. </div>
  57. </div>
  58. <div class="flex justify-between" style="margin-top: 5px">
  59. <div>
  60. <img
  61. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/item.png"
  62. style="width: 40rpx; height: 40rpx; border-radius: 50%; display: inline-block; border: 1px solid #fff"
  63. />
  64. <img
  65. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/item.png"
  66. class="relative right-2"
  67. style="width: 40rpx; height: 40rpx; border-radius: 50%; display: inline-block; border: 1px solid #fff"
  68. />
  69. <img
  70. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/item.png"
  71. class="relative right-4"
  72. style="width: 40rpx; height: 40rpx; border-radius: 50%; display: inline-block; border: 1px solid #fff"
  73. />
  74. <img
  75. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/item.png"
  76. class="relative right-6"
  77. style="width: 40rpx; height: 40rpx; border-radius: 50%; display: inline-block; border: 1px solid #fff"
  78. />
  79. <img
  80. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/item.png"
  81. class="relative right-8"
  82. style="width: 40rpx; height: 40rpx; border-radius: 50%; display: inline-block; border: 1px solid #fff"
  83. />
  84. </div>
  85. <div class="flex items-center">
  86. <img
  87. src="https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/first2/hot.png"
  88. class="relative right-2"
  89. style="width: 32rpx; height: 32rpx; display: inline-block"
  90. />
  91. <span style="color: #fc5b20" class="fs11">{{ detail.hotNum }}</span>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <div
  97. class="absolute left-0 right-0 bottom-6 mx-auto"
  98. style="
  99. width: 670rpx;
  100. height: 128rpx;
  101. background: url(https://fudaanfang.oss-cn-hangzhou.aliyuncs.com/festatic/bkm/first2/notice_c.png) no-repeat
  102. center center;
  103. background-size: cover;
  104. "
  105. >
  106. <view
  107. class="absolute top-1 left-2"
  108. style="width: 106rpx; height: 28rpx; font-size: 12px; font-weight: 600; color: #ffff00"
  109. >
  110. {{ lockData.userId ? '锁箱中' : '' }}
  111. </view>
  112. <div class="text-white fs12 mt-5 px-2 pt-1 lockBox">
  113. <view class="text" v-if="!lockData.userId">本福袋连续购买10发,即开启保护机制</view>
  114. <view class="info" v-else>
  115. <image class="photo" :src="lockData.userAvtar" mode="aspectFill"></image>
  116. <view class="right">
  117. <view class="row">
  118. <view class="name">{{ lockData.userName }}</view>
  119. <view class="tip">目前已开启自动保护机制</view>
  120. </view>
  121. <view class="row">
  122. 保护倒计时:
  123. <span v-if="lockHour != '00'">
  124. <span class="time">{{ lockHour }}</span>
  125. :
  126. </span>
  127. <span>
  128. <span class="time">{{ lockMin }}</span>
  129. :
  130. </span>
  131. <span>
  132. <span class="time">{{ lockSecond }}</span>
  133. </span>
  134. </view>
  135. </view>
  136. </view>
  137. </div>
  138. </div>
  139. <div
  140. class="absolute left-0 right-0 bottom-1 mx-auto"
  141. style="
  142. width: 690rpx;
  143. height: 12px;
  144. background: #4f5150;
  145. box-shadow: inset 0px 4px 4px 0px rgba(0, 0, 0, 0.8);
  146. border-radius: 22px 22px 22px 22px;
  147. opacity: 1;
  148. "
  149. >
  150. <div
  151. class="absolute top-1 mx-auto"
  152. style="
  153. left: 10rpx;
  154. right: 10rpx;
  155. width: 670rpx;
  156. min-height: 890rpx;
  157. background: linear-gradient(180deg, #ccd3d9 0%, #ffffff 5%);
  158. border-radius: 0px 0px 0px 0px;
  159. opacity: 1;
  160. "
  161. >
  162. <div class="flex justify-around" style="margin: 10px 0">
  163. <img
  164. src="https://file.rongcyl.cn/festatic/bkm/first2/tab1.png"
  165. v-if="tabIndex !== 1"
  166. @click="tabIndex = 1"
  167. style="width: 126rpx; height: 32rpx"
  168. />
  169. <img
  170. v-if="tabIndex == 1"
  171. src="https://file.rongcyl.cn/festatic/bkm/first2/tab1a.png"
  172. @click="tabIndex = 1"
  173. style="width: 126rpx; height: 32rpx"
  174. />
  175. <img
  176. v-if="tabIndex !== 2"
  177. src="https://file.rongcyl.cn/festatic/bkm/first2/tab2.png"
  178. @click="tabIndex = 2"
  179. style="width: 126rpx; height: 32rpx"
  180. />
  181. <img
  182. v-if="tabIndex == 2"
  183. src="https://file.rongcyl.cn/festatic/bkm/first2/tab2a.png"
  184. @click="tabIndex = 2"
  185. style="width: 126rpx; height: 32rpx"
  186. />
  187. <img
  188. v-if="tabIndex != 3"
  189. src="https://file.rongcyl.cn/festatic/bkm/first2/tab3.png"
  190. @click="tabIndex = 3"
  191. style="width: 126rpx; height: 32rpx"
  192. />
  193. <img
  194. v-if="tabIndex == 3"
  195. src="https://file.rongcyl.cn/festatic/bkm/first2/tab3a.png"
  196. @click="tabIndex = 3"
  197. style="width: 126rpx; height: 32rpx"
  198. />
  199. </div>
  200. <div class="cardList list" style="padding: 10rpx 16rpx 20rpx 16rpx" v-if="tabIndex == 1">
  201. <div
  202. :class="['flex', 'items-center', 'justify-center', item.status == 0 ? 'c1' : 'c2']"
  203. v-for="(item, index) in cardList"
  204. @click="clickCard(item)"
  205. >
  206. <numImg v-if="item.status == 0" class="num" :value="item" :type="2" />
  207. <img
  208. v-if="item.status == 2"
  209. src="https://file.rongcyl.cn/festatic/bkm/first2/gift_a.png"
  210. style="width: 60rpx; height: 72rpx"
  211. />
  212. <img
  213. v-if="item.status == 1"
  214. src="https://file.rongcyl.cn/festatic/bkm/first2/lock.png"
  215. style="width: 60rpx; height: 60rpx"
  216. />
  217. <image
  218. v-if="item.check"
  219. class="checkBk"
  220. src="https://file.rongcyl.cn/festatic/bkm/imgv2/first/cardCheck.png"
  221. mode="widthFix"
  222. ></image>
  223. </div>
  224. </div>
  225. <div class="list pt-4" style="position: relative" v-if="tabIndex == 2">
  226. <div v-for="(item, index) in prizeList" :key="index">
  227. <div class="titleTip">概率:{{ item.probability }}%(此概率为当前赏级概率)</div>
  228. <Title :title="$selectDictLabel(rewardType, item.type).split('赏')[0]" />
  229. <div class="flex pl-3 pt-3 mb-3" style="background-color: #f6f0e9">
  230. <div
  231. v-for="(item2, index2) in item.prizeList"
  232. @click="showImg(item2)"
  233. :class="['mr-2', item2.leftNum == 0 ? 'grey' : '']"
  234. style="width: 168rpx; background-color: #f9f6f2; border-radius: 4px; margin-bottom: 10px"
  235. >
  236. <image
  237. :src="item2.icon"
  238. mode="aspectFill"
  239. style="width: 144rpx; height: 144rpx; border-radius: 5px; margin: auto"
  240. />
  241. <div class="fs13 pl-2 prizeName">{{ item2.name }}</div>
  242. <div style="color: #ea6636" class="pl-2">
  243. <span class="fs11">参考价</span>
  244. <span class="fs14 bold">{{ detail.price }}</span>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. </div>
  250. <div class="list winningRecord" style="padding: 20rpx 0" v-if="tabIndex == 3">
  251. <view class="winningRecordCard" v-for="(item, index) in winningRecordList" :key="index">
  252. <image class="photo" :src="item.userAvtar" mode="aspectFill"></image>
  253. <view style="flex: 1">
  254. <view class="row">
  255. <view class="left">
  256. <span class="name">{{ item.userName }}</span>
  257. </view>
  258. <view class="right text1" style="flex: initial">
  259. <span>{{ item.creatTime }}</span>
  260. </view>
  261. </view>
  262. <view class="row" style="margin-top: 10px">
  263. <view class="left">
  264. <image class="img" :src="item.prizeIcon" mode="aspectFill"></image>
  265. </view>
  266. <view class="right" style="font-size: 14px">
  267. <view class="name">{{ item.prizeName }}</view>
  268. <view class="row">
  269. <view class="type">{{ $selectDictLabel(rewardType, item.prizeType) }} × 1</view>
  270. <span style="font-size: 12px">No.{{ item.id }}</span>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. </div>
  277. <img
  278. src="https://file.rongcyl.cn/festatic/bkm/first2/dots.png"
  279. class="absolute mx-auto inline-block left-0 right-0"
  280. style="width: 612rpx; height: 24rpx; bottom: -12rpx"
  281. />
  282. </div>
  283. </div>
  284. </div>
  285. <div class="fixed right-2 bottom-20" style="height: 460rpx">
  286. <img
  287. src="https://file.rongcyl.cn/festatic/bkm/first2/fu.png"
  288. style="width: 88rpx; height: 88rpx; margin-bottom: 24rpx"
  289. />
  290. <img
  291. @click="toKnapsack"
  292. src="https://file.rongcyl.cn/festatic/bkm/first2/bag.png"
  293. style="width: 88rpx; height: 88rpx; margin-bottom: 24rpx"
  294. />
  295. <img
  296. @click="refresh"
  297. src="https://file.rongcyl.cn/festatic/bkm/first2/refresh.png"
  298. style="width: 88rpx; height: 88rpx; margin-bottom: 24rpx"
  299. />
  300. <button open-type="share" class="share_btn">
  301. <img
  302. src="https://file.rongcyl.cn/festatic/bkm/first2/share.png"
  303. style="width: 88rpx; height: 88rpx; margin-bottom: 24rpx"
  304. />
  305. </button>
  306. </div>
  307. <div class="buy items-center">
  308. <div class="pica ml-2" style="margin-top: -38rpx">
  309. <img src="https://file.rongcyl.cn/festatic/bkm/first2/pica.png" class="w-full h-full" />
  310. </div>
  311. <div class="flex-1 text-white fs12 ml12 relative bottom-3 pl-3">
  312. <span class="inline-block">已选{{ selectIndex.length }}个 合计:</span>
  313. <span class="inline-block" style="color: #ea6636">
  314. <span class="bold">¥</span>
  315. <span class="fs18 bold">{{ (selectIndex.length * detail.price).toFixed(2) }}</span>
  316. </span>
  317. </div>
  318. <img
  319. @click="submit"
  320. src="https://file.rongcyl.cn/festatic/bkm/first2/bug.png"
  321. class="b_btn relative bottom-3 right-2"
  322. />
  323. </div>
  324. </div>
  325. <paymentPopup ref="paymentPopup" @callBack="paymentSuccess" />
  326. <imgPopup ref="imgPopup" />
  327. </div>
  328. </template>
  329. <script>
  330. import imgPopup from '@/component/imgPopup.vue'
  331. import { rewardType } from '@/utils/commonConfig.js'
  332. import {
  333. prizePoolStatusApi,
  334. drawCardSubmitApi,
  335. raffleDetailApi,
  336. prizeListApi,
  337. prizeUserListApi,
  338. getLockInfoApi,
  339. } from '@/api/drawCard.js'
  340. import { cardType, formatSeconds } from '@/utils/utils.js'
  341. import numImg from '@/component/numImg.vue'
  342. import paymentPopup from '@/component/paymentPopup.vue'
  343. import Title from '@/component/title.vue'
  344. const { v4: uuidv4 } = require('uuid')
  345. export default {
  346. data() {
  347. return {
  348. rewardType: rewardType,
  349. safeAreaTop: '0px',
  350. tabIndex: 1,
  351. params: {
  352. raffleId: '',
  353. limit: 999,
  354. page: 1,
  355. },
  356. detail: {},
  357. cardList: [],
  358. selectIndex: [],
  359. prizeList: [],
  360. winningRecordList: [],
  361. userId: wx.getStorageSync('userId'),
  362. uuid: '',
  363. socketTimer: null,
  364. lockTimeCountdown: null,
  365. lockData: null,
  366. lockTime: '',
  367. }
  368. },
  369. components: {
  370. Title,
  371. imgPopup,
  372. paymentPopup,
  373. numImg,
  374. },
  375. computed: {
  376. // 锁箱小时
  377. lockHour() {
  378. let tiem = this.lockTime * 1000
  379. let timeText = formatSeconds(tiem)
  380. timeText = timeText.split(':')[0]
  381. return timeText
  382. },
  383. // 锁箱分钟
  384. lockMin() {
  385. let tiem = this.lockTime * 1000
  386. let timeText = formatSeconds(tiem)
  387. timeText = timeText.split(':')[1]
  388. return timeText
  389. },
  390. // 锁箱秒
  391. lockSecond() {
  392. let tiem = this.lockTime * 1000
  393. let timeText = formatSeconds(tiem)
  394. timeText = timeText.split(':')[2]
  395. return timeText
  396. },
  397. },
  398. onLoad(query) {
  399. console.log(query, 'query')
  400. if (query.id) {
  401. this.params.raffleId = query.id
  402. this.init()
  403. }
  404. this.paymentSuccess()
  405. },
  406. mounted() {
  407. this.getSafeAreaTop()
  408. },
  409. methods: {
  410. init() {
  411. // 获取卡牌商品列表
  412. this.getCardList()
  413. // 获取卡包详情
  414. this.getDetail()
  415. //获取奖池
  416. this.getPrizeList()
  417. // 中奖记录
  418. this.getPrizeUserList()
  419. // 初始化锁箱
  420. this.initLock()
  421. // 连接锁箱Socket
  422. this.connectSocket()
  423. },
  424. leave() {
  425. console.log('离开页面')
  426. // 离开页面
  427. // 关闭倒计时
  428. clearInterval(this.lockTimeCountdown)
  429. // 关闭心跳测试
  430. clearInterval(this.socketTimer)
  431. // 关闭对话连接
  432. wx.closeSocket()
  433. },
  434. initLock() {
  435. // 获取锁箱信息
  436. let _this = this
  437. let params = {
  438. raffleId: this.params.raffleId,
  439. }
  440. getLockInfoApi(params).then(res => {
  441. console.log(res, '锁箱')
  442. if (res.data.userId) {
  443. _this.lockData = res.data
  444. _this.lockTime = res.data.expireTime
  445. _this.initLockTimeCountdown()
  446. } else {
  447. _this.lockData = {}
  448. _this.lockTime = ''
  449. }
  450. })
  451. },
  452. initLockTimeCountdown() {
  453. let _this = this
  454. if (_this.lockTimeCountdown) {
  455. clearInterval(_this.lockTimeCountdown)
  456. _this.lockTimeCountdown = null
  457. }
  458. _this.lockTimeCountdown = setInterval(() => {
  459. console.log('22')
  460. _this.lockTime = _this.lockTime - 1
  461. if (_this.lockTime <= 0) {
  462. clearInterval(_this.lockTimeCountdown)
  463. _this.lockTimeCountdown = null
  464. _this.initLock()
  465. }
  466. }, 1000)
  467. },
  468. connectSocket() {
  469. let _this = this
  470. let uuid = uuidv4()
  471. let url = 'wss://mall.rongtongh.cn/websocket/raffleId' + this.params.raffleId + ':' + uuid
  472. function connect() {
  473. wx.connectSocket({
  474. url: url,
  475. })
  476. wx.onSocketOpen(function (res) {
  477. console.log(res, 'WebSocket连接已打开!')
  478. // wx.sendSocketMessage({
  479. // data: JSON.stringify(user),
  480. // })
  481. _this.socketTimer = setInterval(function () {
  482. console.log('发送消息')
  483. wx.sendSocketMessage({
  484. data: '12313',
  485. })
  486. }, 30 * 1000)
  487. })
  488. wx.onSocketMessage(function (res) {
  489. console.log(data, 'WebSocket接受信息')
  490. let data = JSON.parse(res.data)
  491. if (res.data.userId) {
  492. _this.lockData = data
  493. _this.lockTime = data.expireTime
  494. _this.initLockTimeCountdown()
  495. }
  496. })
  497. wx.onSocketClose(function (res) {
  498. console.log('WebSocket连接已关闭!')
  499. setTimeout(() => {
  500. console.log('re connect')
  501. // connect()
  502. }, 2000)
  503. })
  504. }
  505. connect()
  506. },
  507. toKnapsack() {
  508. // 跳转背包界面
  509. wx.navigateTo({
  510. url: '/pages/knapsack/knapsack',
  511. })
  512. },
  513. showImg(value) {
  514. this.$refs.imgPopup.show(value)
  515. },
  516. getPrizeUserList() {
  517. let params = {
  518. limit: 9999,
  519. page: 1,
  520. raffleId: this.params.raffleId,
  521. }
  522. prizeUserListApi(params).then(res => {
  523. this.winningRecordList = res.data
  524. })
  525. },
  526. getCardList() {
  527. prizePoolStatusApi(this.params).then(res => {
  528. console.log(res, '卡牌分页')
  529. for (var i = 0; i < res.data.list.length; i++) {
  530. res.data.list[i].check = false
  531. }
  532. this.cardList = res.data.list
  533. this.selectFormat()
  534. })
  535. },
  536. // 标记已经选中卡牌
  537. selectFormat() {
  538. for (var i = 0; i < this.cardList.length; i++) {
  539. if (this.selectIndex.includes(this.cardList[i].number)) {
  540. this.cardList[i].check = true
  541. }
  542. }
  543. },
  544. getDetail() {
  545. let params = {
  546. raffleId: this.params.raffleId,
  547. }
  548. raffleDetailApi(params).then(res => {
  549. console.log(res, '详情')
  550. this.detail = res.data
  551. })
  552. },
  553. getPrizeList() {
  554. let params = {
  555. raffleId: this.params.raffleId,
  556. }
  557. prizeListApi(params).then(res => {
  558. console.log(res, '奖池预览')
  559. let newArray = res.data
  560. for (var i = 0; i < res.data.length; i++) {
  561. if (res.data[i].type == 21) {
  562. newArray = []
  563. newArray.push(res.data[i])
  564. res.data.splice(i, 1)
  565. newArray.push(...res.data)
  566. break
  567. }
  568. }
  569. this.prizeList = newArray
  570. })
  571. },
  572. // 选中取消选中卡牌
  573. clickCard(item) {
  574. if (item.status == 0) {
  575. item.check = !item.check
  576. }
  577. // 如果是选中
  578. let index = this.selectIndex.indexOf(item.number)
  579. if (item.check && index == -1) {
  580. this.selectIndex.push(item.number)
  581. } else if (!item.check && index != -1) {
  582. this.selectIndex.splice(index, 1)
  583. }
  584. },
  585. // 支付成功后回调
  586. paymentSuccess() {
  587. let _this = this
  588. console.log('刷新抽卡界面')
  589. // 刷新界面
  590. _this.refresh()
  591. },
  592. getSafeAreaTop() {
  593. wx.getSystemInfo({
  594. success: res => {
  595. this.safeAreaTop = res.safeArea.top + 'px'
  596. },
  597. })
  598. },
  599. refresh() {
  600. wx.showLoading()
  601. setTimeout(function () {
  602. wx.hideLoading()
  603. }, 1000)
  604. this.init()
  605. this.selectIndex = []
  606. for (var i = 0; i < this.cardList.length; i++) {
  607. this.cardList[i].check = false
  608. }
  609. },
  610. submit() {
  611. if (this.selectIndex.length == 0) {
  612. wx.showToast({
  613. title: '请选则要购买的卡牌。',
  614. icon: 'none',
  615. })
  616. return
  617. }
  618. let params = {
  619. raffleId: this.params.raffleId,
  620. }
  621. this.$refs.paymentPopup.show(params, this.selectIndex, this.detail)
  622. },
  623. back() {
  624. wx.navigateBack({ delta: 1 })
  625. },
  626. },
  627. }
  628. </script>
  629. <style scoped lang="scss">
  630. .first2 {
  631. padding-top: v-bind(safeAreaBottom);
  632. color: v-bind(color);
  633. .card {
  634. width: 710rpx;
  635. margin: auto;
  636. background-color: #fff;
  637. border-radius: 10px;
  638. height: 400rpx;
  639. margin-top: 18px;
  640. }
  641. .c1 {
  642. background-image: url(https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk2.png);
  643. // width: 96rpx;
  644. height: 128rpx;
  645. background-repeat: no-repeat;
  646. background-position: center center;
  647. background-size: contain;
  648. margin-bottom: 14rpx;
  649. position: relative;
  650. .checkBk {
  651. position: absolute;
  652. width: 105%;
  653. }
  654. }
  655. .c2 {
  656. background-image: url(https://file.rongcyl.cn/festatic/bkm/imgv2/ka/kabk4.png);
  657. // width: 96rpx;
  658. height: 128rpx;
  659. background-repeat: no-repeat;
  660. background-position: center center;
  661. background-size: contain;
  662. margin-bottom: 14rpx;
  663. }
  664. .buy {
  665. position: fixed;
  666. left: 0;
  667. right: 0;
  668. bottom: 0;
  669. width: 750rpx;
  670. height: 160rpx;
  671. background: #000000;
  672. opacity: 1;
  673. display: flex;
  674. .pica {
  675. width: 88rpx;
  676. height: 88rpx;
  677. }
  678. .b_btn {
  679. width: 232rpx;
  680. height: 76rpx;
  681. }
  682. }
  683. }
  684. .cardList {
  685. display: grid;
  686. grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
  687. }
  688. .list {
  689. // height: calc(100% - 32rpx - 20px - 20px);
  690. // overflow: auto;
  691. }
  692. .prizeName {
  693. width: 100%;
  694. white-space: nowrap;
  695. text-overflow: ellipsis;
  696. }
  697. .titleTip {
  698. position: absolute;
  699. z-index: 2;
  700. height: 32px;
  701. line-height: 42px;
  702. padding-left: 25vw;
  703. font-size: 12px;
  704. color: #fff;
  705. }
  706. .winningRecord {
  707. .winningRecordCard {
  708. margin-top: 10px;
  709. border-radius: 8px;
  710. background: #f7f0e8;
  711. padding: 10px;
  712. display: flex;
  713. // box-shadow: 1px 1px 3px #b7b7b7;
  714. .photo {
  715. // flex: 1;
  716. margin-right: 8px;
  717. width: 10vw;
  718. height: 10vw;
  719. border-radius: 50%;
  720. }
  721. .row {
  722. display: flex;
  723. justify-content: space-between;
  724. align-items: center;
  725. .left {
  726. display: flex;
  727. align-items: center;
  728. .name {
  729. font-size: 14px;
  730. font-weight: 600;
  731. }
  732. .img {
  733. width: 15vw;
  734. height: 15vw;
  735. border-radius: 2px;
  736. margin-right: 5px;
  737. }
  738. }
  739. .right {
  740. flex: 1;
  741. .name {
  742. font-size: 14px;
  743. height: 10vw;
  744. overflow: hidden;
  745. text-overflow: ellipsis;
  746. display: -webkit-box;
  747. -webkit-box-orient: vertical;
  748. -webkit-line-clamp: 2;
  749. }
  750. }
  751. .type {
  752. padding: 0 2px;
  753. background: #fc5b20;
  754. color: #fff;
  755. font-size: 11px;
  756. border-radius: 2px;
  757. }
  758. .text1 {
  759. color: #666666;
  760. font-size: 12px;
  761. }
  762. }
  763. }
  764. }
  765. .share_btn {
  766. background-color: transparent;
  767. border-width: 0 !important;
  768. border-radius: 0;
  769. overflow: initial;
  770. text-align: start;
  771. padding: 0;
  772. box-shadow: none !important;
  773. -webkit-tap-highlight-color: transparent;
  774. &::after {
  775. border: none;
  776. }
  777. }
  778. .lockBox {
  779. display: flex;
  780. justify-content: center;
  781. align-items: center;
  782. .text {
  783. color: #fff;
  784. font-weight: 600;
  785. font-size: 14px;
  786. }
  787. .info {
  788. display: flex;
  789. width: 100%;
  790. justify-content: center;
  791. .photo {
  792. width: 9vw;
  793. height: 9vw;
  794. border-radius: 50%;
  795. }
  796. .right {
  797. margin-left: 10px;
  798. flex: 1;
  799. display: flex;
  800. flex-direction: column;
  801. align-items: center;
  802. justify-content: center;
  803. .row {
  804. width: 100%;
  805. color: #fff;
  806. font-size: 12px;
  807. margin-bottom: 2px;
  808. position: relative;
  809. display: flex;
  810. align-items: center;
  811. .time {
  812. padding: 2px;
  813. color: #565656;
  814. background: #ffff00;
  815. margin: 0 8px;
  816. border-radius: 5px;
  817. font-weight: 600;
  818. font-size: 12px;
  819. }
  820. .name {
  821. font-size: 13px;
  822. font-weight: 600;
  823. color: #fff;
  824. width: 40%;
  825. white-space: nowrap;
  826. text-overflow: ellipsis;
  827. overflow: hidden;
  828. }
  829. .tip {
  830. font-size: 11px;
  831. position: absolute;
  832. right: 0;
  833. font-weight: 500;
  834. color: #fff;
  835. }
  836. }
  837. }
  838. }
  839. }
  840. </style>