Lottery.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881
  1. <template>
  2. <view class="pages">
  3. <navbar ref="navbarRef" :config="config" :backColor="backColor"></navbar>
  4. <view class="page-content" :style="{backgroundImage: 'url('+activityInfo.imageUrl+')'}">
  5. <!-- <view class="Lottery-title">
  6. {{activityInfo.activityName}}
  7. </view> -->
  8. <view class="winning-c">
  9. <view class="winning-user" v-if="WinningUserList && WinningUserList.length > 0">
  10. <!-- 第一次进入,有数据, ,到最后一页替换数据之后在请求下一次数据,无数据时做30s轮询查询 -->
  11. <swiper class="winning-list" :disable-touch="true" circular="true" vertical="true" autoplay
  12. interval="3000" duration="1000" @change="WinningCurrent">
  13. <swiper-item class="winning-item-box" v-for="item in WinningUserList">
  14. <view class="winning-item zw-one-row">
  15. *恭喜用户:{{item.userName}}, 获得{{item.prizeName}}
  16. </view>
  17. <!-- <text>恭喜用户</text>
  18. <text>{{item.userName}}</text>
  19. <text>获得{{current}}</text>
  20. <text>{{item.prizeName}}</text> -->
  21. </swiper-item>
  22. </swiper>
  23. </view>
  24. </view>
  25. <!-- strDirection="vertical" -->
  26. <view class="pedestal-bg">
  27. <template v-if="prizeList.length">
  28. <almost-lottery :lotteryBg="lotteryBg" :actionBg="pointerBg" :strFontColors="['#542f10']"
  29. :strFontSize="28" :strMarginOutside="40" :imgMarginStr="40" :colors="colors"
  30. :canvasMarginOutside="100" :lottery-size="673" pointerPosition="middle" :ring-count="8"
  31. :duration="5" :imgDrawed="false" :canvasCached="false" :prize-list="prizeList"
  32. :prize-index="prizeIndex" @draw-before="handleDrawBefore" @reset-index="prizeIndex = -1"
  33. @draw-start="handleDrawStart" @draw-end="handleDrawEnd" @finish="handleDrawFinish" />
  34. </template>
  35. <!-- <image src="@/static/Lottery/pedestal.png" mode=""></image> -->
  36. <view class="share-btn" @click.stop="onShare()">
  37. 分享
  38. </view>
  39. </view>
  40. <view class="Lottery-info">
  41. <view class="Lottery-info-item zw-one-row">
  42. 次数:{{freeResidueNum}}
  43. </view>
  44. <view class="Lottery-info-item zw-one-row" v-if="activityInfo.pointExchangeLottery">
  45. 积分:{{integral}}
  46. </view>
  47. <!-- <view class="Lottery-info-item zw-one-row" @click="onWinningList()">
  48. 中奖记录
  49. </view> -->
  50. </view>
  51. <view class="winning-record">
  52. <text @click.stop="onWinningList()" class="record-text">中奖记录 <text class="iconfont_yige">&#xe65f;</text>
  53. </text>
  54. </view>
  55. <view class="activity-rule-box">
  56. <view class="activity-rule-top" />
  57. <view class="activity-rule">
  58. <view class="rule-title">
  59. 活动规则
  60. </view>
  61. <view class="rule-list" v-html="activityInfo.ruleExplain" />
  62. </view>
  63. <view class="activity-rule-boot" />
  64. </view>
  65. </view>
  66. <!-- 商品 -->
  67. <view class="goods-boxs">
  68. <view class="goods-box" v-if="goodsList && goodsList.length > 0">
  69. <view class="goods-module-title">
  70. 推荐商品
  71. </view>
  72. <view class="goods-item" v-for="item in goodsList"
  73. @click="goProductDetails('/pages/product/goods/goods?id=' + item.goodsId)">
  74. <!-- <image :src="item.cover" mode="aspectFill"></image> -->
  75. <view class="goods-img lazy-img">
  76. <u-image class="service-img" :src="item.goodsCover" mode="aspectFit" :lazy-load="true" />
  77. </view>
  78. <view class="goods-info">
  79. <view class="goods-title">{{item.goodsTitle}}</view>
  80. <view class="goods-price">
  81. <rich-text :nodes="$mUtil.priceBigSmall(item.goodsSalePrice)"></rich-text>
  82. <text class="line-price">¥ {{ item.goodsMarketPrice }}</text>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <EmptyDate v-else-if="status !== 'loading' && status" />
  88. </view>
  89. <!-- <loadMore
  90. posterUrl: {
  91. type: String,
  92. default: null
  93. },
  94. codeUrl: {
  95. type: String,
  96. default: null
  97. },v-if="goodsList.length > 0 || status === 'loading'" :status="status"></loadMore> -->
  98. <Winning ref="WinningRef" :activityJoinRecordId="activityJoinRecordId" />
  99. <sharePoster ref="sharePosterRef" :posterUrl="activityInfo.posterUrl" :codeUrl="codeurl"
  100. @onShareSuccess="onShareSuccess" />
  101. <!-- <template v-if="activityInfo.posterUrl">
  102. <share ref="shareRef" :posterUrl="activityInfo.posterUrl" :activityId="activityId" />
  103. </template> -->
  104. <!-- <jifenhint ref="jifenhintRef" :singleExchangePoints="activityInfo.singleExchangePoints"/> -->
  105. </view>
  106. </template>
  107. <script>
  108. import AlmostLottery from '@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue';
  109. // https://github.com/ialmost/almost-components_uniapp/blob/dev/Lottery/almost-lottery_sample/pages/index/index.vue
  110. // https://ext.dcloud.net.cn/plugin?id=1030
  111. import Winning from "./popup/Winning.vue"
  112. import CONFIG from "@/config/global.config.js"
  113. // import jifenhint from "./popup/jifenhint.vue"
  114. import {
  115. setPrizeLevel
  116. } from "./common.js"
  117. import {
  118. myUserInfo
  119. } from "@/api/government.js"
  120. import {
  121. getActivity,
  122. getActivityPrize,
  123. getActivityLottery,
  124. getActivityUserInfo,
  125. getWinningRecords,
  126. setActivityViewVolume,
  127. getActivityGoods,
  128. setShareRecord
  129. // getActivityUvRecord,
  130. // getActivityViewVolume_pv,
  131. // getActivityViewVolume_uv
  132. } from "@/api/Lottery.js"
  133. const app = getApp();
  134. export default {
  135. components: {
  136. AlmostLottery,
  137. Winning,
  138. // share,
  139. // jifenhint
  140. },
  141. data() {
  142. return {
  143. codeurl: null,
  144. location: null,
  145. config: {
  146. back: true,
  147. title: '转盘抽奖',
  148. color: 'white',
  149. backgroundColor: [0, '#fff'],
  150. statusBarFontColor: 'transparent',
  151. barPlaceholder: false
  152. },
  153. backColor: '',
  154. activityId: null, // 活动ID
  155. activityInfo: {},
  156. // 转盘
  157. lotteryBg: require("@/static/Lottery/circle.png"),
  158. pedestalBg: require("@/static/Lottery/pedestal.png"),
  159. pointerBg: require("@/static/Lottery/pointer.png"),
  160. colors: ["#F0DDAE", "#F6F0E7"],
  161. // 以下是奖品配置数据
  162. // 奖品数据
  163. prizeList: [],
  164. // 中奖下标
  165. prizeIndex: -1,
  166. prizeThanks: -1,
  167. activityJoinRecordId: null,
  168. // 抽奖次数
  169. freeResidueNum: 0,
  170. integral: 0,
  171. // 中奖用户
  172. current: 0,
  173. WinningUserList: [],
  174. cacheWinningUser: [],
  175. clearWinningTime: null,
  176. // ----商品----
  177. status: '',
  178. params: {
  179. page: 1,
  180. limit: 6
  181. },
  182. goodsList: [],
  183. Volume_Timeout: null
  184. };
  185. },
  186. onPageScroll(e) {
  187. // config: {
  188. // back: true,
  189. // title: '关注',
  190. // color: 'black',
  191. // backgroundColor: [1, '#fff'],
  192. // statusBarFontColor: 'black'
  193. // },
  194. if (e.scrollTop >= 50 && this.config.color === 'white') {
  195. this.config.color = 'black'
  196. this.config.backgroundColor = [1, '#fff']
  197. this.config.statusBarFontColor = 'black'
  198. this.backColor = '#999';
  199. this.$refs.navbarRef.init();
  200. } else if (e.scrollTop < 50 && this.config.color === 'black') {
  201. this.config.color = 'white'
  202. this.config.backgroundColor = [0, '#fff']
  203. this.config.statusBarFontColor = 'transparent';
  204. this.backColor = '';
  205. console.log('this.config = ', this.config)
  206. this.$refs.navbarRef.init();
  207. }
  208. },
  209. onLoad(opt) {
  210. this.location = app.globalData.location || null;
  211. this.activityId = opt.activityId || null
  212. this.codeurl = `${CONFIG.hostUrl}?URLType=BigTurnplate&activityId=${this.activityId}`
  213. // /api/activity/info/{activityId}
  214. this.Volume_Timeout = setTimeout(() => {
  215. if (this.Volume_Timeout) {
  216. this.setActivityViewVolume_();
  217. clearTimeout(this.Volume_Timeout);
  218. this.Volume_Timeout = null;
  219. }
  220. }, 3000)
  221. this.getActivityInfo()
  222. this.guessLike()
  223. },
  224. // onReachBottom() {
  225. // if (this.status == 'more') {
  226. // this.params.page++;
  227. // this.guessLike();
  228. // }
  229. // },
  230. onUnload() {
  231. clearTimeout(this.Volume_Timeout);
  232. this.Volume_Timeout = null;
  233. },
  234. methods: {
  235. // PV,PU记录
  236. setActivityViewVolume_() {
  237. setActivityViewVolume({
  238. activityId: this.activityId
  239. }).then(res => {})
  240. },
  241. onShare() {
  242. myUserInfo().then(res => {
  243. const data = res.data || null;
  244. if (!data) {
  245. uni.showToast({
  246. title: '请先登录',
  247. icon: 'none'
  248. })
  249. setTimeout(() => {
  250. uni.redirectTo({
  251. url: '/pages/login/index'
  252. })
  253. }, 1000)
  254. } else if (!this.activityInfo.posterUrl) {
  255. uni.showToast({
  256. title: '暂未配置分享内容',
  257. icon: 'none'
  258. });
  259. return
  260. } else {
  261. // this.$refs.shareRef.open()
  262. this.$refs.sharePosterRef.open();
  263. }
  264. })
  265. },
  266. // 获取活动详情
  267. getActivityInfo() {
  268. getActivity(this.activityId).then(res => {
  269. this.activityInfo = res.data || {};
  270. let list = this.activityInfo.prizes || []
  271. // prizeId 奖品对应 ID Number
  272. // prizeName 奖品名称 String
  273. // prizeStock 奖品库存 Number
  274. // prizeWeight 奖品权重 Number
  275. // prizeImage 奖品图片地址,网络图片仅支持http和https协议 String
  276. // let list = res.data || [];
  277. list.map((el, index) => {
  278. el.prizeId = el.activityPrizeId;
  279. el.prizeName = el.prizeName;
  280. el.prizeImage = el.imageUrl + '?x-oss-process=style/game_w_50';
  281. el.prizeChinese = setPrizeLevel(el.prizeGrade);
  282. // if (el.prizeGrade === 20) {
  283. // // 记录谢谢惠顾的下标,网络失败之后弹窗
  284. // this.prizeThanks = index
  285. // }
  286. return el
  287. });
  288. this.prizeList = list;
  289. // this.getActivityPrizeList();
  290. this.getActivityUserInfo_();
  291. this.getWinningRecords_();
  292. })
  293. },
  294. // 最新中奖记录
  295. getWinningRecords_(_cache = false) {
  296. try {
  297. clearTimeout(this.clearWinningTime)
  298. } catch (e) {};
  299. this.clearWinningTime = null;
  300. getWinningRecords(this.activityId).then(res => {
  301. const data = res.data
  302. if (data && data.length > 0) {
  303. if (_cache) {
  304. this.cacheWinningUser = data;
  305. } else {
  306. this.WinningUserList = data;
  307. };
  308. } else {
  309. this.clearWinningTime = setTimeout(() => {
  310. this.getWinningRecords_()
  311. }, 30000)
  312. }
  313. })
  314. },
  315. // 获取活动的用户信息
  316. getActivityUserInfo_() {
  317. getActivityUserInfo(this.activityId).then(res => {
  318. const val = res.data || {};
  319. this.freeResidueNum = val?.freeResidueNum || 0;
  320. this.integral = val?.integral || 0;
  321. })
  322. },
  323. // 获取奖品信息
  324. getActivityPrizeList() {
  325. getActivityPrize(this.activityId).then(res => {
  326. // prizeId 奖品对应 ID Number
  327. // prizeName 奖品名称 String
  328. // prizeStock 奖品库存 Number
  329. // prizeWeight 奖品权重 Number
  330. // prizeImage 奖品图片地址,网络图片仅支持http和https协议 String
  331. let list = res.data || [];
  332. list.map((el, index) => {
  333. // prizes
  334. el.prizeId = el.activityPrizeId;
  335. el.prizeName = el.prizeName;
  336. el.prizeImage = el.imageUrl + '?x-oss-process=style/game_w_50';
  337. console.log('el.prizeImage = ', el.prizeImage)
  338. el.prizeChinese = setPrizeLevel(el.prizeGrade);
  339. // if (el.prizeGrade === 20) {
  340. // // 记录谢谢惠顾的下标,网络失败之后弹窗
  341. // this.prizeThanks = index
  342. // }
  343. return el
  344. });
  345. this.prizeList = list;
  346. })
  347. },
  348. WinningCurrent(event) {
  349. const index = event.detail.current + 1;
  350. if (index >= this.WinningUserList.length) {
  351. if (this.cacheWinningUser.length > 0) {
  352. this.WinningUserList = this.cacheWinningUser;
  353. this.cacheWinningUser = [];
  354. }
  355. this.getWinningRecords_(true)
  356. }
  357. },
  358. // 本次抽奖开始之前
  359. async handleDrawBefore(callback) {
  360. // 这里需要处理你抽奖之前的逻辑
  361. // 请查看示例项目中的代码
  362. // 必须调用 callback 并传递一个布尔值,布尔值为 true 时,转盘才会开始旋转
  363. let flag = false
  364. try {
  365. if (this.activityInfo.areaLimit) {
  366. // 抽奖限制地区 - 检查是否定位
  367. if (!this.location || !this.location.city) {
  368. flag = false;
  369. uni.showModal({
  370. title: '提示',
  371. content: '当前抽奖需要定位信息,是否获取定位',
  372. confirmText: '获取定位信息',
  373. success: res => {
  374. if (res.confirm) {
  375. uni.showLoading({
  376. title: '获取中'
  377. })
  378. uni.getLocation({
  379. type: 'gcj02',
  380. geocode: true,
  381. cacheTimeout: 30 * 60,
  382. success: Location => {
  383. const address = Location.address;
  384. // 缓存全局的定位信息
  385. app.globalData.location = address;
  386. this.location = address;
  387. if (!address.city) {
  388. uni.showToast({
  389. title: '获取定位失败',
  390. icon: 'none'
  391. })
  392. } else {
  393. uni.showToast({
  394. title: '获取定位成功,请开始抽奖',
  395. icon: 'none'
  396. })
  397. }
  398. },
  399. fail: LocationErr => {
  400. uni.showToast({
  401. title: '获取定位失败',
  402. icon: 'none'
  403. })
  404. },
  405. complete: () => {
  406. uni.hideLoading()
  407. // console.log('145')
  408. }
  409. })
  410. } else if (res.cancel) {
  411. console.log('用户点击取消');
  412. }
  413. }
  414. });
  415. throw new Error('')
  416. };
  417. };
  418. if (this.freeResidueNum > 0) {
  419. flag = true
  420. } else if (this.activityInfo.pointExchangeLottery) {
  421. flag = false
  422. // 当允许积分抽奖的时候
  423. // if (this.integral >= this.activityInfo.singleExchangePoints) {
  424. // const Modal = await uni.showModal({
  425. // content: `是否消耗${this.activityInfo.singleExchangePoints}抽一次奖`,
  426. // });
  427. // flag = Modal[1].confirm || false;
  428. // } else {
  429. // uni.showToast({
  430. // title: '当前积分不够抽一次',
  431. // icon: 'none'
  432. // })
  433. // }
  434. const Modal = await uni.showModal({
  435. content: `是否消耗${this.activityInfo.singleExchangePoints}抽一次奖`,
  436. });
  437. flag = Modal[1].confirm || false;
  438. } else {
  439. flag = false
  440. uni.showToast({
  441. title: '当前抽奖次数已用完',
  442. icon: 'none'
  443. })
  444. };
  445. } catch (e) {
  446. //TODO handle the exception
  447. }
  448. callback(flag)
  449. },
  450. // 本次抽奖开始
  451. handleDrawStart() {
  452. // if (this.activityInfo.areaLimit) {
  453. // }
  454. console.log('this.activityInfo.areaLimit = ' , this.activityInfo.areaLimit)
  455. const c_y = this.location?.city || undefined
  456. // console.log('本次抽奖开始')
  457. // 这里需要处理你的抽奖逻辑,并得出中奖物品的 prizeIndex
  458. // 请查看示例项目中的代码
  459. this.activityJoinRecordId = null;
  460. getActivityLottery({
  461. activityId: this.activityId,
  462. cityName: c_y
  463. }).then(res => {
  464. const val = res.data;
  465. try {
  466. this.prizeList.forEach((el, index) => {
  467. if (el.activityPrizeId === val.prizeId) {
  468. // console.log('抽奖成功 = ', index)
  469. this.prizeIndex = index;
  470. this.activityJoinRecordId = val.activityJoinRecordId;
  471. throw new Error('')
  472. }
  473. })
  474. } catch (e) {
  475. //TODO handle the exception
  476. }
  477. })
  478. },
  479. // 本次抽奖结束
  480. handleDrawEnd() {
  481. // console.log('handleDrawEnd =旋转结束,执行拿到结果后到逻辑')
  482. this.getActivityUserInfo_();
  483. // 完成抽奖后,这里处理你拿到结果后的逻辑
  484. const prizeVal = this.prizeList[this.prizeIndex];
  485. this.$refs.WinningRef.onWinning(prizeVal)
  486. },
  487. // 抽奖转盘绘制完成
  488. handleDrawFinish(res) {
  489. // 抽奖转盘准备就绪后,这里处理你的逻辑
  490. // 请查看示例项目中的代码
  491. // console.log('抽奖转盘绘制完成')
  492. },
  493. // 查看自己得中奖信息
  494. onWinningList() {
  495. uni.navigateTo({
  496. url: '/pages/game/winning-list'
  497. })
  498. },
  499. // --------商品---------------
  500. /**猜你喜欢 */
  501. guessLike() {
  502. this.status = 'loading';
  503. getActivityGoods({
  504. page: this.params.page,
  505. limit: this.params.limit,
  506. activityId: this.activityId
  507. }).then(res => {
  508. this.goodsList = res.rows
  509. // if (res && res.code == 200) {
  510. // this.goodsList = this.params.page == 1 ? res.rows : this.goodsList.concat(res.rows);
  511. // if (res.total <= res.page.currPage) {
  512. // this.status = "noMore";
  513. // } else {
  514. // this.status = "more";
  515. // }
  516. // // console.log(this.goodsList)
  517. // }
  518. }).catch(err => {
  519. // this.status = "noMore";
  520. })
  521. // this.$http.get(`/goods/smart`, {
  522. // page: this.params.page,
  523. // limit: this.params.limit,
  524. // }).then((res) => {
  525. // if (res && res.code == 200) {
  526. // this.goodsList = this.params.page == 1 ? res.page.list : this.goodsList.concat(res.page
  527. // .list);
  528. // if (res.page.totalPage <= res.page.currPage) {
  529. // this.status = "noMore";
  530. // } else {
  531. // this.status = "more";
  532. // }
  533. // // console.log(this.goodsList)
  534. // }
  535. // }).catch(err => {
  536. // this.status = "noMore";
  537. // })
  538. },
  539. goProductDetails(path) {
  540. uni.navigateTo({
  541. url: path
  542. })
  543. },
  544. //分享成功
  545. onShareSuccess(type) {
  546. // this.$emit('onShareSuccess', "WeChat")download
  547. let shareMode = null;
  548. switch (type) {
  549. case 'download':
  550. shareMode = 0;
  551. break;
  552. case 'WeChat':
  553. shareMode = 1;
  554. break;
  555. }
  556. setShareRecord({
  557. activityId: _this.activityId,
  558. shareMode: shareMode
  559. }).then(res => {
  560. console.log("success:1 图片已成功保存到相册");
  561. })
  562. }
  563. },
  564. watch: {
  565. // cacheWinningUser: {
  566. // handler(newV, oldA) {
  567. // if(newV)
  568. // },
  569. // immediate: true
  570. // }
  571. }
  572. }
  573. </script>
  574. <style lang="scss" scoped>
  575. $padd_: 28rpx;
  576. .pages {
  577. width: 750rpx;
  578. overflow: hidden;
  579. background-color: #C90700;
  580. }
  581. .page-content {
  582. width: 100%;
  583. // height: 1432rpx;
  584. padding-top: 353rpx;
  585. // min-height: 100vh;
  586. background-size: 100% 1432rpx;
  587. background-repeat: no-repeat;
  588. }
  589. .winning-c {
  590. width: 100%;
  591. height: 163rpx;
  592. padding: 40rpx 0;
  593. }
  594. .Lottery-title {
  595. width: 100%;
  596. font-size: 40rpx;
  597. color: #fff;
  598. font-weight: 600;
  599. text-align: center;
  600. padding: 80rpx;
  601. }
  602. .winning-user {
  603. width: 100%;
  604. height: 83rpx;
  605. // padding: 0 20rpx 60rpx;
  606. box-sizing: border-box;
  607. background: linear-gradient(90deg, rgba(222, 28, 64, 0.00) 11%, #b10424 48%, rgba(222, 28, 64, 0.00) 89%);
  608. .winning-list {
  609. // width: 100%;
  610. height: 83rpx;
  611. padding: 0 80rpx;
  612. // background-color: red;
  613. border-radius: 40rpx;
  614. .winning-item-box {
  615. width: 100%;
  616. display: flex;
  617. align-items: center;
  618. font-size: 26rpx;
  619. font-family: PingFang SC, PingFang SC-Light;
  620. font-weight: 300;
  621. color: #ffffff;
  622. .winning-item {
  623. width: 100%;
  624. text-align: center;
  625. }
  626. }
  627. }
  628. }
  629. .pedestal-bg {
  630. position: relative;
  631. width: 100%;
  632. // height: 673rpx; + 217
  633. height: 875rpx;
  634. background: url("@/static/Lottery/pedestal.png") no-repeat center bottom;
  635. background-size: 429rpx 217rpx;
  636. .share-btn {
  637. position: absolute;
  638. right: 30rpx;
  639. bottom: 20rpx;
  640. width: 120rpx;
  641. height: 120rpx;
  642. background: linear-gradient(180deg, #c90700, #981a15);
  643. // border: 1rpx solid rgba(255, 255, 255, 0.12);
  644. border-radius: 60rpx;
  645. box-shadow: 0px -1rpx 34rpx 0px rgba(255, 199, 199, 0.16) inset;
  646. text-align: center;
  647. line-height: 119rpx;
  648. font-size: 36rpx;
  649. font-family: PingFang SC, PingFang SC-Bold;
  650. font-weight: 700;
  651. color: #ffffff;
  652. }
  653. }
  654. .Lottery-info {
  655. display: flex;
  656. justify-content: space-between;
  657. align-items: center;
  658. padding: 13rpx $padd_ 14rpx;
  659. .Lottery-info-item {
  660. width: calc(50% - 10rpx);
  661. flex-shrink: 0;
  662. height: 64rpx;
  663. line-height: 64rpx;
  664. text-align: center;
  665. padding: 0 20rpx;
  666. background: url("@/static/Lottery/bg_2.png") no-repeat center center;
  667. background-size: 100% 100%;
  668. font-size: 28rpx;
  669. // font-family: .PingFang SC, .PingFang SC-Light;
  670. // font-weight: 300;
  671. color: #542f10;
  672. }
  673. }
  674. // <view class="winning-record">
  675. // <text class="record-text">中奖记录</text>
  676. // </view>
  677. .winning-record {
  678. padding: 20rpx $padd_;
  679. text-align: right;
  680. font-weight: 600;
  681. font-size: 28rpx;
  682. font-weight: 500;
  683. color: #fff;
  684. .iconfont_yige {
  685. font-size: 26rpx;
  686. color: #fff;
  687. }
  688. }
  689. .activity-rule-box {
  690. padding: 0 $padd_;
  691. }
  692. .activity-rule-top {
  693. width: 100%;
  694. height: 40rpx;
  695. background: url("@/static/Lottery/bg_1.png") no-repeat top center;
  696. background-size: 100% 398rpx;
  697. }
  698. .activity-rule-boot {
  699. width: 100%;
  700. height: 40rpx;
  701. background: url("@/static/Lottery/bg_1.png") no-repeat bottom center;
  702. background-size: 100% 398rpx;
  703. }
  704. .activity-rule {
  705. padding: 0 40rpx;
  706. background: url("@/static/Lottery/bg_1.png") no-repeat center center;
  707. background-size: 100% 10000%;
  708. .rule-title {
  709. // font-size: 32rpx;
  710. font-weight: 600;
  711. font-size: 28rpx;
  712. // font-family: .PingFang SC, .PingFang SC-Medium;
  713. font-weight: 500;
  714. color: #1a1a1a;
  715. }
  716. .rule-list {
  717. // padding-top: 18rpx;
  718. // font-size: 24rpx;
  719. // font-weight: 300;
  720. // color: #666666;
  721. /deep/ img,
  722. /deep/ video {
  723. max-width: 100%;
  724. }
  725. }
  726. }
  727. .goods-boxs {
  728. padding: 90rpx $padd_ 0;
  729. }
  730. .goods-box {
  731. background: #fff4ea;
  732. padding: 92rpx 20rpx 10rpx;
  733. display: flex;
  734. flex-wrap: wrap;
  735. width: 100%;
  736. margin-top: $zw-gap;
  737. border: 6rpx solid #e72726;
  738. border-radius: 10rpx;
  739. display: flex;
  740. justify-content: space-between;
  741. align-items: stretch;
  742. position: relative;
  743. .goods-module-title {
  744. position: absolute;
  745. left: 50%;
  746. top: -40rpx;
  747. transform: translateX(-50%);
  748. width: 337rpx;
  749. height: 114rpx;
  750. text-align: center;
  751. line-height: 80rpx;
  752. background: url('@/static/Lottery/goods.png') no-repeat center center;
  753. background-size: 100% 100%;
  754. font-size: 28rpx;
  755. // font-family: PingFang SC, PingFang SC-Bold;
  756. font-weight: 700;
  757. color: #ffffff;
  758. }
  759. .goods-item {
  760. width: 316rpx;
  761. height: 482rpx;
  762. // margin-right: 18rpx;
  763. margin-bottom: 38rpx;
  764. background: #ffffff;
  765. border-radius: 18rpx;
  766. overflow: hidden;
  767. box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.1);
  768. // &:nth-child(2n) {
  769. // margin-right: 0;
  770. // }
  771. .goods-img {
  772. width: 316rpx;
  773. height: 316rpx;
  774. border-radius: 18rpx 18rpx 0 0;
  775. vertical-align: middle;
  776. }
  777. .goods-info {
  778. padding: 0 20rpx 20rpx;
  779. padding-top: 14rpx;
  780. height: calc(100% - 316rpx);
  781. display: flex;
  782. flex-direction: column;
  783. justify-content: space-between;
  784. .goods-title {
  785. // height: 90rpx;
  786. margin-bottom: 10rpx;
  787. overflow: hidden;
  788. text-overflow: ellipsis;
  789. display: -webkit-box;
  790. -webkit-box-orient: vertical;
  791. -webkit-line-clamp: 2;
  792. }
  793. .goods-price {
  794. display: flex;
  795. align-items: baseline;
  796. color: #FF6600;
  797. font-size: 36rpx;
  798. .line-price {
  799. font-size: 22rpx;
  800. color: #999999;
  801. margin-left: 16rpx;
  802. text-decoration: line-through;
  803. }
  804. }
  805. }
  806. }
  807. }
  808. </style>