Lottery.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  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">W
  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="true" :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. // console.log('本次抽奖开始')
  453. // 这里需要处理你的抽奖逻辑,并得出中奖物品的 prizeIndex
  454. // 请查看示例项目中的代码
  455. this.activityJoinRecordId = null;
  456. getActivityLottery({
  457. activityId: this.activityId,
  458. cityName: this.location.city || undefined
  459. }).then(res => {
  460. const val = res.data;
  461. try {
  462. this.prizeList.forEach((el, index) => {
  463. if (el.activityPrizeId === val.prizeId) {
  464. // console.log('抽奖成功 = ', index)
  465. this.prizeIndex = index;
  466. this.activityJoinRecordId = val.activityJoinRecordId;
  467. throw new Error('')
  468. }
  469. })
  470. } catch (e) {
  471. //TODO handle the exception
  472. }
  473. })
  474. },
  475. // 本次抽奖结束
  476. handleDrawEnd() {
  477. // console.log('handleDrawEnd =旋转结束,执行拿到结果后到逻辑')
  478. this.getActivityUserInfo_();
  479. // 完成抽奖后,这里处理你拿到结果后的逻辑
  480. const prizeVal = this.prizeList[this.prizeIndex];
  481. this.$refs.WinningRef.onWinning(prizeVal)
  482. },
  483. // 抽奖转盘绘制完成
  484. handleDrawFinish(res) {
  485. // 抽奖转盘准备就绪后,这里处理你的逻辑
  486. // 请查看示例项目中的代码
  487. // console.log('抽奖转盘绘制完成')
  488. },
  489. // 查看自己得中奖信息
  490. onWinningList() {
  491. uni.navigateTo({
  492. url: '/pages/game/winning-list'
  493. })
  494. },
  495. // --------商品---------------
  496. /**猜你喜欢 */
  497. guessLike() {
  498. this.status = 'loading';
  499. getActivityGoods({
  500. page: this.params.page,
  501. limit: this.params.limit,
  502. activityId: this.activityId
  503. }).then(res => {
  504. this.goodsList = res.rows
  505. // if (res && res.code == 200) {
  506. // this.goodsList = this.params.page == 1 ? res.rows : this.goodsList.concat(res.rows);
  507. // if (res.total <= res.page.currPage) {
  508. // this.status = "noMore";
  509. // } else {
  510. // this.status = "more";
  511. // }
  512. // // console.log(this.goodsList)
  513. // }
  514. }).catch(err => {
  515. // this.status = "noMore";
  516. })
  517. // this.$http.get(`/goods/smart`, {
  518. // page: this.params.page,
  519. // limit: this.params.limit,
  520. // }).then((res) => {
  521. // if (res && res.code == 200) {
  522. // this.goodsList = this.params.page == 1 ? res.page.list : this.goodsList.concat(res.page
  523. // .list);
  524. // if (res.page.totalPage <= res.page.currPage) {
  525. // this.status = "noMore";
  526. // } else {
  527. // this.status = "more";
  528. // }
  529. // // console.log(this.goodsList)
  530. // }
  531. // }).catch(err => {
  532. // this.status = "noMore";
  533. // })
  534. },
  535. goProductDetails(path) {
  536. uni.navigateTo({
  537. url: path
  538. })
  539. },
  540. //分享成功
  541. onShareSuccess(type) {
  542. // this.$emit('onShareSuccess', "WeChat")download
  543. let shareMode = null;
  544. switch (type) {
  545. case 'download':
  546. shareMode = 0;
  547. break;
  548. case 'WeChat':
  549. shareMode = 1;
  550. break;
  551. }
  552. setShareRecord({
  553. activityId: _this.activityId,
  554. shareMode: shareMode
  555. }).then(res => {
  556. console.log("success:1 图片已成功保存到相册");
  557. })
  558. }
  559. },
  560. watch: {
  561. // cacheWinningUser: {
  562. // handler(newV, oldA) {
  563. // if(newV)
  564. // },
  565. // immediate: true
  566. // }
  567. }
  568. }
  569. </script>
  570. <style lang="scss" scoped>
  571. $padd_: 28rpx;
  572. .pages {
  573. width: 750rpx;
  574. overflow: hidden;
  575. background-color: #C90700;
  576. }
  577. .page-content {
  578. width: 100%;
  579. // height: 1432rpx;
  580. padding-top: 353rpx;
  581. // min-height: 100vh;
  582. background-size: 100% 1432rpx;
  583. background-repeat: no-repeat;
  584. }
  585. .winning-c {
  586. width: 100%;
  587. height: 163rpx;
  588. padding: 40rpx 0;
  589. }
  590. .Lottery-title {
  591. width: 100%;
  592. font-size: 40rpx;
  593. color: #fff;
  594. font-weight: 600;
  595. text-align: center;
  596. padding: 80rpx;
  597. }
  598. .winning-user {
  599. width: 100%;
  600. height: 83rpx;
  601. // padding: 0 20rpx 60rpx;
  602. box-sizing: border-box;
  603. background: linear-gradient(90deg, rgba(222, 28, 64, 0.00) 11%, #b10424 48%, rgba(222, 28, 64, 0.00) 89%);
  604. .winning-list {
  605. // width: 100%;
  606. height: 83rpx;
  607. padding: 0 80rpx;
  608. // background-color: red;
  609. border-radius: 40rpx;
  610. .winning-item-box {
  611. width: 100%;
  612. display: flex;
  613. align-items: center;
  614. font-size: 26rpx;
  615. font-family: PingFang SC, PingFang SC-Light;
  616. font-weight: 300;
  617. color: #ffffff;
  618. .winning-item {
  619. width: 100%;
  620. text-align: center;
  621. }
  622. }
  623. }
  624. }
  625. .pedestal-bg {
  626. position: relative;
  627. width: 100%;
  628. // height: 673rpx; + 217
  629. height: 875rpx;
  630. background: url("@/static/Lottery/pedestal.png") no-repeat center bottom;
  631. background-size: 429rpx 217rpx;
  632. .share-btn {
  633. position: absolute;
  634. right: 30rpx;
  635. bottom: 20rpx;
  636. width: 120rpx;
  637. height: 120rpx;
  638. background: linear-gradient(180deg, #c90700, #981a15);
  639. // border: 1rpx solid rgba(255, 255, 255, 0.12);
  640. border-radius: 60rpx;
  641. box-shadow: 0px -1rpx 34rpx 0px rgba(255, 199, 199, 0.16) inset;
  642. text-align: center;
  643. line-height: 119rpx;
  644. font-size: 36rpx;
  645. font-family: PingFang SC, PingFang SC-Bold;
  646. font-weight: 700;
  647. color: #ffffff;
  648. }
  649. }
  650. .Lottery-info {
  651. display: flex;
  652. justify-content: space-between;
  653. align-items: center;
  654. padding: 13rpx $padd_ 14rpx;
  655. .Lottery-info-item {
  656. width: calc(50% - 10rpx);
  657. flex-shrink: 0;
  658. height: 64rpx;
  659. line-height: 64rpx;
  660. text-align: center;
  661. padding: 0 20rpx;
  662. background: url("@/static/Lottery/bg_2.png") no-repeat center center;
  663. background-size: 100% 100%;
  664. font-size: 28rpx;
  665. // font-family: .PingFang SC, .PingFang SC-Light;
  666. // font-weight: 300;
  667. color: #542f10;
  668. }
  669. }
  670. // <view class="winning-record">
  671. // <text class="record-text">中奖记录</text>
  672. // </view>
  673. .winning-record {
  674. padding: 20rpx $padd_;
  675. text-align: right;
  676. font-weight: 600;
  677. font-size: 28rpx;
  678. font-weight: 500;
  679. color: #fff;
  680. .iconfont_yige {
  681. font-size: 26rpx;
  682. color: #fff;
  683. }
  684. }
  685. .activity-rule-box {
  686. padding: 0 $padd_;
  687. }
  688. .activity-rule-top {
  689. width: 100%;
  690. height: 40rpx;
  691. background: url("@/static/Lottery/bg_1.png") no-repeat top center;
  692. background-size: 100% 398rpx;
  693. }
  694. .activity-rule-boot {
  695. width: 100%;
  696. height: 40rpx;
  697. background: url("@/static/Lottery/bg_1.png") no-repeat bottom center;
  698. background-size: 100% 398rpx;
  699. }
  700. .activity-rule {
  701. padding: 0 40rpx;
  702. background: url("@/static/Lottery/bg_1.png") no-repeat center center;
  703. background-size: 100% 10000%;
  704. .rule-title {
  705. // font-size: 32rpx;
  706. font-weight: 600;
  707. font-size: 28rpx;
  708. // font-family: .PingFang SC, .PingFang SC-Medium;
  709. font-weight: 500;
  710. color: #1a1a1a;
  711. }
  712. .rule-list {
  713. // padding-top: 18rpx;
  714. // font-size: 24rpx;
  715. // font-weight: 300;
  716. // color: #666666;
  717. /deep/ img,
  718. /deep/ video {
  719. max-width: 100%;
  720. }
  721. }
  722. }
  723. .goods-boxs {
  724. padding: 90rpx $padd_ 0;
  725. }
  726. .goods-box {
  727. background: #fff4ea;
  728. padding: 92rpx 20rpx 10rpx;
  729. display: flex;
  730. flex-wrap: wrap;
  731. width: 100%;
  732. margin-top: $zw-gap;
  733. border: 6rpx solid #e72726;
  734. border-radius: 10rpx;
  735. display: flex;
  736. justify-content: space-between;
  737. align-items: stretch;
  738. position: relative;
  739. .goods-module-title {
  740. position: absolute;
  741. left: 50%;
  742. top: -40rpx;
  743. transform: translateX(-50%);
  744. width: 337rpx;
  745. height: 114rpx;
  746. text-align: center;
  747. line-height: 80rpx;
  748. background: url('@/static/Lottery/goods.png') no-repeat center center;
  749. background-size: 100% 100%;
  750. font-size: 28rpx;
  751. // font-family: PingFang SC, PingFang SC-Bold;
  752. font-weight: 700;
  753. color: #ffffff;
  754. }
  755. .goods-item {
  756. width: 316rpx;
  757. height: 482rpx;
  758. // margin-right: 18rpx;
  759. margin-bottom: 38rpx;
  760. background: #ffffff;
  761. border-radius: 18rpx;
  762. overflow: hidden;
  763. box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.1);
  764. // &:nth-child(2n) {
  765. // margin-right: 0;
  766. // }
  767. .goods-img {
  768. width: 316rpx;
  769. height: 316rpx;
  770. border-radius: 18rpx 18rpx 0 0;
  771. vertical-align: middle;
  772. }
  773. .goods-info {
  774. padding: 0 20rpx 20rpx;
  775. padding-top: 14rpx;
  776. height: calc(100% - 316rpx);
  777. display: flex;
  778. flex-direction: column;
  779. justify-content: space-between;
  780. .goods-title {
  781. // height: 90rpx;
  782. margin-bottom: 10rpx;
  783. overflow: hidden;
  784. text-overflow: ellipsis;
  785. display: -webkit-box;
  786. -webkit-box-orient: vertical;
  787. -webkit-line-clamp: 2;
  788. }
  789. .goods-price {
  790. display: flex;
  791. align-items: baseline;
  792. color: #FF6600;
  793. font-size: 36rpx;
  794. .line-price {
  795. font-size: 22rpx;
  796. color: #999999;
  797. margin-left: 16rpx;
  798. text-decoration: line-through;
  799. }
  800. }
  801. }
  802. }
  803. }
  804. </style>