index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. <template>
  2. <view class="sign">
  3. <image src="../../static/sign_back.png" class="back" mode="widthFix"></image>
  4. <view class="signCenter">
  5. <!-- 个人信息模块 -->
  6. <view class="signTop">
  7. <view class="left">
  8. <!-- <image :src="avatarUrl || '../../static/avatar.jpg'" class="avatar" mode="widthFix"></image> -->
  9. <view class="avatarView">
  10. <open-data type="userAvatarUrl" class="avatar"></open-data>
  11. </view>
  12. <view class="userInfo">
  13. <view class="account">{{signData.mpName}}</view>
  14. <view class="ID">ID:{{signData.userId}}</view>
  15. </view>
  16. </view>
  17. <navigator :url="'../checkInRecord/checkInRecord?openId=' + openId + '&mpAppId=' + mpData.mpAppId + '&mpOpenId=' + mpData.mpOpenId" class="right">
  18. <image src="../../static/signRecord.png" mode="widthFix"></image>
  19. <text>签到记录</text>
  20. </navigator>
  21. </view>
  22. <view class="signBottom">
  23. <!-- 签到展示模块 -->
  24. <view class="exhibitionContent" v-if="signData.signInDayVoList.length > 0">
  25. <view class="ts">已连续签到{{signData.sustainDayCount}}天,有{{signData.canSupplement}}次补签机会</view>
  26. <view class="signinExhibition">
  27. <view v-for="(item, index) in signData.signInDayVoList" :key="index" :class="item.signIn ? 'select' : item.canSupplement ? 'repairSign' : ''">
  28. <template v-if="index < 6">
  29. <view class="repair" v-if="item.canSupplement">看视频补签</view>
  30. <text class="day">{{item.dayDescribe}}</text>
  31. <image src="../../static/goldSelect.png" class="goldCoins" mode="heightFix" v-if="item.signIn"></image>
  32. <image src="../../static/clickVideo.png" class="goldCoins" mode="heightFix" @click="repairSign(item)" v-else-if="item.canSupplement"></image>
  33. <image src="../../static/gold.png" class="goldCoins" mode="heightFix" v-else></image>
  34. <text class="reward">{{item.bookCoin}}书币</text>
  35. <image src="../../static/signSub.png" class="signSub" mode="widthFix" v-if="item.signIn"></image>
  36. </template>
  37. <template v-else>
  38. <view class="left">
  39. <text class="day">{{item.dayDescribe}}</text>
  40. <text class="reward">{{item.bookCoin}}书币</text>
  41. </view>
  42. <view class="right">
  43. <image src="../../static/giftBag.png" mode="heightFix" v-if="!item.signIn"></image>
  44. <image src="../../static/giftBagSelect.png" mode="heightFix" v-else></image>
  45. </view>
  46. <image src="../../static/signSub.png" class="signSub" mode="widthFix" v-if="item.signIn"></image>
  47. </template>
  48. </view>
  49. </view>
  50. <navigator url="../officialAccount/officialAccount" class="gignBt" v-if="!signData.mpName">签到领书币</navigator>
  51. <view class="gignBt" @click="signIn" v-else-if="!isSignIn">签到领书币</view>
  52. <!-- <view class="already" v-else>今日已签</view> -->
  53. <view class="gignBt" v-else @click="moreGold">更多书币</view>
  54. </view>
  55. <!-- 签到提醒模块 -->
  56. <view class="signRemind">
  57. <text>签到提醒</text>
  58. <view class="remindSwitch">
  59. <view :class="signRemind ? 'open' : 'close'" @click="signRemindHandle(true)">
  60. <view class="select"></view>
  61. <text>开启</text>
  62. </view>
  63. <view :class="!signRemind ? 'open' : 'close'" @click="signRemindHandle(false)">
  64. <view class="select"></view>
  65. <text>关闭</text>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 活动规则模块 -->
  70. <view class="activityRules">
  71. <view class="top" @click="activityRulesHandle">
  72. <text>活动规则</text>
  73. <image :src="!activityRules ? '../../static/unfold.png' : '../../static/retract.png'" mode="widthFix"></image>
  74. </view>
  75. <view class="bottom" v-if="activityRules">
  76. <view>
  77. 1.用户进入每日送书币小程序后,每日首次打开小程序,点击签到按钮即可完成一次签到。
  78. </view>
  79. <view>
  80. 2.签到获得的书币奖励,在领取日后天效。连续签到所得书币奖励在周期内稍有变化,非均等分布。连续7日完成签到的用户在第7日可获得更多的奖励。
  81. </view>
  82. <view>
  83. 3.用户每个周期(7天),拥有2次补签机会(连续签到2天拥有1次补签机会),可通过观看小视频获得,连续未签到2天,签到重新开始。
  84. </view>
  85. <view>
  86. 4.连续签到:自首日完成签到开始累计,连续7天签到为一个周期。签到中断,则重新开始计算。
  87. </view>
  88. <view>
  89. 5.每日同一注册用户仅可参与一次。
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="popup" v-if="popupShow">
  96. <view class="popupContent">
  97. <view class="content">
  98. <image src="../../static/popupBack.png"></image>
  99. <view class="textCon">
  100. <text class="ts">签到成功!</text> </br>
  101. <text class="reward">恭喜您获得{{signInDay.bookCoin}}书币</text> </br>
  102. <image src="../../static/doubleBt.png" class="doubleBt" mode="widthFix" @click="lookVideo"></image> </br>
  103. <text class="bt" @click="signInHandle(false)">不了,单倍领取</text>
  104. </view>
  105. </view>
  106. <image src="../../static/close.png" class="close" mode="widthFix" @click="closeHandle"></image>
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <script>
  112. import { config, getHome, getOpenId, signInAjax, getTemplateIDs, setMessage, switchUpdate } from '@/api/api.js'
  113. export default {
  114. data() {
  115. return {
  116. signRemind: false, // 是否开启签到提醒
  117. activityRules: false, // 是否展开活动规则
  118. popupShow: false, // 弹窗控制
  119. signData: {
  120. sustainDayCount: 0,
  121. canSupplement: 0,
  122. userId: null,
  123. mpName: null,
  124. signInDayVoList: [
  125. {
  126. signIn: false,
  127. canSupplement: false,
  128. dayDescribe: '第一天',
  129. bookCoin: 10,
  130. isSignIn: true
  131. },
  132. {
  133. signIn: false,
  134. canSupplement: false,
  135. dayDescribe: '第二天',
  136. bookCoin: 20,
  137. isSignIn: false
  138. },
  139. {
  140. signIn: false,
  141. canSupplement: false,
  142. dayDescribe: '第三天',
  143. bookCoin: 30,
  144. isSignIn: false
  145. },
  146. {
  147. signIn: false,
  148. canSupplement: false,
  149. dayDescribe: '第四天',
  150. bookCoin: 40,
  151. isSignIn: false
  152. },
  153. {
  154. signIn: false,
  155. canSupplement: false,
  156. dayDescribe: '第五天',
  157. bookCoin: 50,
  158. isSignIn: false
  159. },
  160. {
  161. signIn: false,
  162. canSupplement: false,
  163. dayDescribe: '第六天',
  164. bookCoin: 60,
  165. isSignIn: false
  166. },
  167. {
  168. signIn: false,
  169. canSupplement: false,
  170. dayDescribe: '第七天',
  171. bookCoin: 70,
  172. isSignIn: false
  173. },
  174. ]
  175. }, // 签到相关信息
  176. openId: '',
  177. mpData: {}, // 公众号相关
  178. isSignIn: true, // 是否已经签到
  179. userId: undefined, // 用户ID
  180. signIdTemID: [], // 签到提醒模板ID
  181. isMainSwitch: true, // 是否关闭了通知按钮
  182. isAlwaysCancel: false, // 是否点击了总是允许取消
  183. signInDay: {}, // 今天签到信息
  184. }
  185. },
  186. watch: {
  187. 'signData.signInDayVoList':{
  188. handler(val, oldVal){
  189. if (val.length > 0) {
  190. let signInDay = val.find(item => item.canSign)
  191. if (signInDay) {
  192. this.isSignIn = signInDay.signIn
  193. }
  194. }
  195. },
  196. deep: true
  197. }
  198. },
  199. onLoad(options) {
  200. this.mpData = options
  201. uni.login({
  202. success: async res => {
  203. if (res.code) {
  204. let openIDInfo = await getOpenId({appId: config.appid, code: res.code})
  205. this.openId = openIDInfo.data
  206. this.getList()
  207. }
  208. }
  209. })
  210. },
  211. onShareAppMessage() {},
  212. methods: {
  213. // 更多书币
  214. moreGold() {
  215. let path = 'pages/index/index'
  216. if(Object.keys(this.mpData).length > 0) {
  217. path = path + this.getSerialize(this.mpData)
  218. }
  219. uni.navigateToMiniProgram({
  220. appId: 'wx021e792baf529aff',
  221. path,
  222. success(res) {
  223. // 打开成功
  224. }
  225. })
  226. },
  227. // 对象序列化成 a=1&b=2
  228. getSerialize(value) {
  229. if(Object.prototype.toString.call(value) === "[object Object]") {
  230. let path = ""
  231. for (const key in value) {
  232. if (Object.prototype.hasOwnProperty.call(value, key)) {
  233. const element = value[key];
  234. if (path === "") {
  235. path = `?${key}=${element}`
  236. }else {
  237. path = path + `&${key}=${element}`
  238. }
  239. }
  240. }
  241. return path
  242. } else {
  243. return ""
  244. }
  245. },
  246. // 判断模板消息是否点击了总是允许
  247. getSetting() {
  248. return new Promise((resolve, reject) => {
  249. uni.getSetting({
  250. withSubscriptions: true,
  251. success: resSetting => {
  252. console.log('订阅消息---->', resSetting)
  253. let { subscriptionsSetting } = resSetting
  254. if (subscriptionsSetting) {
  255. let { mainSwitch, itemSettings, ...data } = subscriptionsSetting
  256. if (data && Object.keys(data).length > 0) {
  257. if (mainSwitch) {
  258. for (const key in data) {
  259. if (Object.prototype.hasOwnProperty.call(data, key)) {
  260. const element = data[key];
  261. if (element === 'accept') {
  262. resolve(200) // 总是允许开启
  263. } else {
  264. resolve(400) // 总是允许取消
  265. }
  266. }
  267. }
  268. } else {
  269. resolve(401) // 后台关闭开关
  270. }
  271. } else {
  272. resolve(402) // 没有点总是允许
  273. }
  274. } else {
  275. resolve(402) // 没有点总是允许
  276. }
  277. }
  278. })
  279. })
  280. },
  281. handleMessage(remindSwitch, allowSwitch = 0) { // 设置签到消息接口
  282. let { mpName, ...mp } = this.mpData
  283. setMessage({appId: config.appid, openId: this.openId, allowSwitch, remindSwitch, ...mp}).then(res => {
  284. this.getList()
  285. })
  286. },
  287. // 获取模板签到ID
  288. getTemplate() {
  289. getTemplateIDs({appId: config.appid, type: 1}).then(res => {
  290. this.signIdTemID = [res.data]
  291. })
  292. },
  293. // 获取首页数据
  294. async getList(signTime) {
  295. let data = {appId: config.appid, userSource: 1, openId: this.openId, ...this.mpData, ...(signTime ? {signTime} : {})}
  296. let res = await getHome(data)
  297. if (res.data) {
  298. this.mpData = {
  299. mpAppId: res.data.mpAppId,
  300. mpName: res.data.mpName,
  301. mpOpenId: res.data.mpOpenId
  302. }
  303. this.signData = res.data
  304. this.signRemind = res.data.loginRemindSwitch === 0 ? false : true
  305. this.getTemplate()
  306. }
  307. },
  308. /** 补签*/
  309. repairSign(data) {
  310. let { dayTime, dayNum } = data
  311. signInAjax({watchVideo: false, supplement: true, appId: config.appid, openId: this.openId, dayNum, dayTime, ...this.mpData}).then(res => {
  312. this.getList(res.data)
  313. uni.showToast({
  314. title: '补签成功',
  315. icon: 'success'
  316. })
  317. })
  318. },
  319. getTimer() { // 获取年月日时分秒
  320. let timestamp = Date.parse(new Date())
  321. let date = new Date(timestamp)
  322. let Y = date.getFullYear()
  323. let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
  324. let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
  325. return `${Y}${M}${D}`
  326. },
  327. /** 签到提醒按钮 */
  328. signRemindHandle(state) {
  329. if (!this.signData.mpName) {
  330. uni.navigateTo({
  331. url: '../officialAccount/officialAccount'
  332. })
  333. return
  334. }
  335. if(state) { // 点击开启
  336. if (this.signIdTemID.length > 0) {
  337. uni.requestSubscribeMessage({
  338. tmplIds: this.signIdTemID,
  339. success: async res => {
  340. let { errMsg, ...massageData } = res
  341. console.log('------>', res)
  342. let msg = await this.getSetting()
  343. console.log('----2222---->', msg)
  344. if(msg === 400) {
  345. uni.showToast({
  346. title: '签到消息微信关闭,如要开启通知,请到通知管理开启',
  347. icon: 'none',
  348. duration: 2000
  349. })
  350. return
  351. } else if(msg === 401) {
  352. uni.showToast({
  353. title: '通知管理按钮关闭,如要开启通知,请到通知管理开启',
  354. icon: 'none',
  355. duration: 2000
  356. })
  357. } else {
  358. for (const key in massageData) {
  359. if (Object.prototype.hasOwnProperty.call(massageData, key)) {
  360. const element = massageData[key];
  361. if (element === 'accept') { // 允许
  362. console.log('msg--->', msg)
  363. this.handleMessage(1, msg === 200 ? 1 : 0)
  364. } else if (element === 'reject') { // 取消
  365. }
  366. }
  367. }
  368. }
  369. }
  370. })
  371. } else {
  372. uni.showToast({
  373. title: '模板ID为空',
  374. icon: 'none'
  375. })
  376. }
  377. } else { // 点击关闭
  378. this.handleMessage(0, 0)
  379. }
  380. },
  381. /** 活动规则展开和收起 */
  382. activityRulesHandle() {
  383. this.activityRules = !this.activityRules
  384. },
  385. /** 签到 */
  386. signIn() {
  387. if(!this.signData.mpName) {
  388. uni.showToast({
  389. title: '请先关注公众号',
  390. icon: 'none'
  391. })
  392. return
  393. }
  394. this.signInDay = this.signData.signInDayVoList.find(item => item.canSign)
  395. this.popupShow = true
  396. },
  397. /** 关闭弹窗 */
  398. closeHandle() {
  399. this.popupShow = false
  400. this.signInHandle(false)
  401. },
  402. /** 签到 */
  403. signInHandle(watchVideo) {
  404. let signInDay = this.signData.signInDayVoList.find(item => item.canSign)
  405. console.log(signInDay)
  406. if (signInDay) {
  407. let { dayTime, dayNum, signIn } = signInDay
  408. if (!signIn) {
  409. signInAjax({watchVideo, supplement: false, appId: config.appid, openId: this.openId, dayNum, dayTime, ...this.mpData}).then(res => {
  410. this.getList()
  411. this.popupShow = false
  412. })
  413. } else {
  414. uni.showToast({
  415. title: '今日已签!',
  416. icon: 'error'
  417. })
  418. }
  419. } else {
  420. uni.showToast({
  421. title: '数据获取失败!',
  422. icon: 'error'
  423. })
  424. }
  425. },
  426. /** 看视频签到 */
  427. lookVideo() {
  428. this.signInHandle(true)
  429. },
  430. }
  431. }
  432. </script>
  433. <style lang="scss">
  434. page{
  435. background-color: #FC6E53;
  436. }
  437. .sign {
  438. position: relative;
  439. &>.back {
  440. width: 100%;
  441. margin-top: 104rpx;
  442. }
  443. .signCenter {
  444. position: absolute;
  445. top: 0;
  446. padding: 40rpx 0;
  447. margin-bottom: 20rpx;
  448. font-family: PingFangSC-Medium, PingFang SC;
  449. }
  450. .signTop {
  451. padding: 0 28rpx;
  452. height: 104rpx;
  453. display: flex;
  454. justify-content: space-between;
  455. align-items: center;
  456. .left{
  457. display: flex;
  458. justify-content: flex-start;
  459. align-items: center;
  460. .avatarView{
  461. width: 104rpx;
  462. height: 104rpx;
  463. overflow: hidden;
  464. border-radius: 10px;
  465. .avatar {
  466. width: 104rpx;
  467. height: 104rpx;
  468. background: #D8D8D8;
  469. }
  470. }
  471. .userInfo{
  472. margin-left: 28rpx;
  473. &>view{
  474. font-size: 28rpx;
  475. font-weight: 400;
  476. color: #FFFFFF;
  477. &.ID{
  478. margin-top: 4rpx;
  479. }
  480. }
  481. }
  482. }
  483. .right{
  484. width: 212rpx;
  485. height: 68rpx;
  486. background-color: #FFFFFF;
  487. border-radius: 40rpx;
  488. display: flex;
  489. justify-content: center;
  490. align-items: center;
  491. &>image {
  492. width: 28rpx;
  493. height: 32rpx;
  494. }
  495. &>text {
  496. font-size: 28rpx;
  497. font-weight: 400;
  498. color: #FD9C01;
  499. margin-left: 18rpx;
  500. }
  501. }
  502. }
  503. .signBottom{
  504. margin: 0 14rpx;
  505. margin-top: 216rpx;
  506. width: 722rpx;
  507. }
  508. .exhibitionContent{
  509. padding: 26rpx 26rpx 40rpx;
  510. box-sizing: border-box;
  511. background-color: #FFFFFF;
  512. border-radius: 22rpx;
  513. box-shadow: 0px 4rpx 8rpx 0rpx rgba(230, 230, 230, 0.5);
  514. &>.ts {
  515. font-size: 28rpx;
  516. font-weight: 400;
  517. color: #666666;
  518. }
  519. &>.signinExhibition {
  520. margin-top: 18rpx;
  521. display: flex;
  522. justify-content: space-between;
  523. flex-wrap: wrap;
  524. &>view{
  525. width: 152rpx;
  526. height: 168rpx;
  527. background: #FFF7EF;
  528. box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(254, 173, 165, 0.26);
  529. border-radius: 16rpx;
  530. border: 2rpx solid #FFB35C;
  531. margin-bottom: 20rpx;
  532. padding: 12rpx;
  533. box-sizing: border-box;
  534. display: flex;
  535. flex-direction: column;
  536. justify-content: flex-start;
  537. align-items: center;
  538. position: relative;
  539. .day{
  540. font-size: 24rpx;
  541. font-weight: 500;
  542. color: #FF9011;
  543. }
  544. &>.goldCoins {
  545. height: 68rpx;
  546. margin: 5rpx 0;
  547. }
  548. .reward{
  549. font-size: 24rpx;
  550. font-weight: 500;
  551. color: #FE604F;
  552. }
  553. &:last-child{
  554. width: 322rpx;
  555. display: flex;
  556. justify-content: space-between;
  557. flex-direction: row;
  558. &>.left {
  559. display: flex;
  560. flex-direction: column;
  561. align-items: flex-start;
  562. margin-left: 35rpx;
  563. height: 100%;
  564. flex: 1;
  565. .reward{
  566. margin-top: 28rpx;
  567. font-size: 32rpx;
  568. font-weight: 500;
  569. }
  570. }
  571. &>.right {
  572. width: 115rpx;
  573. height: 100%;
  574. display: flex;
  575. justify-content: center;
  576. align-items: center;
  577. &>image{
  578. width: 108rpx;
  579. height: 128rpx;
  580. }
  581. }
  582. }
  583. // 已签到
  584. &.select {
  585. overflow: hidden;
  586. border: 2rpx solid #D2D2D2;
  587. background: #F2F2F2;
  588. .day, .reward{
  589. color: #999999;
  590. }
  591. }
  592. .signSub {
  593. position: absolute;
  594. bottom: 0;
  595. right: 0;
  596. width: 72rpx;
  597. }
  598. // 看视频补签
  599. &.repairSign {
  600. position: relative;
  601. .repair {
  602. position: absolute;
  603. width: calc(100% + 2rpx);
  604. left: -1rpx;
  605. top: -1rpx;
  606. text-align: center;
  607. line-height: 46rpx;
  608. height: 46rpx;
  609. background: #FE604F;
  610. font-size: 24rpx;
  611. font-weight: 500;
  612. color: #FFFFFF;
  613. border-radius: 16rpx 16rpx 0 0;
  614. }
  615. }
  616. }
  617. }
  618. &>.gignBt {
  619. width: 456rpx;
  620. height: 80rpx;
  621. line-height: 80rpx;
  622. text-align: center;
  623. // background-color: #D8D8D8;
  624. background: linear-gradient(180deg, #FDC606 0%, #FF8D12 100%);
  625. box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(241, 139, 11, 0.61);
  626. margin: 40rpx auto 0;
  627. font-size: 32rpx;
  628. font-weight: 500;
  629. color: #FFFFFF;
  630. border-radius: 40rpx;
  631. }
  632. &>.already{
  633. margin: 40rpx auto 0;
  634. width: 456rpx;
  635. height: 80rpx;
  636. background: #D8D8D8;
  637. border-radius: 40rpx;
  638. font-size: 32rpx;
  639. font-weight: 500;
  640. color: #FFFFFF;
  641. line-height: 80rpx;
  642. text-align: center;
  643. }
  644. }
  645. .signRemind {
  646. margin-top: 40rpx;
  647. height: 92rpx;
  648. background: rgba(255, 255, 255, 0.15);
  649. border-radius: 20rpx;
  650. line-height: 92rpx;
  651. color: #FFFFFF;
  652. font-size: 32rpx;
  653. padding: 0 28rpx;
  654. box-sizing: border-box;
  655. display: flex;
  656. font-weight: 400;
  657. justify-content: space-between;
  658. .remindSwitch{
  659. display: flex;
  660. justify-content: flex-start;
  661. align-items: center;
  662. &>view {
  663. display: flex;
  664. justify-content: flex-start;
  665. align-items: center;
  666. &>text {
  667. font-weight: 400;
  668. font-size: 32rpx;
  669. margin-left: 12rpx;
  670. }
  671. &.open > .select {
  672. width: 24rpx;
  673. height: 24rpx;
  674. background: #FFFFFF;
  675. border-radius: 24rpx;
  676. }
  677. &.close > .select {
  678. width: 24rpx;
  679. height: 24rpx;
  680. border: 2rpx solid #FFFFFF;
  681. box-sizing: border-box;
  682. border-radius: 24rpx;
  683. }
  684. &:first-child {
  685. margin-right: 38rpx;
  686. }
  687. }
  688. }
  689. }
  690. .activityRules {
  691. margin-top: 40rpx;
  692. background: rgba(255, 255, 255, 0.15);
  693. border-radius: 20rpx;
  694. color: #FFFFFF;
  695. font-size: 32rpx;
  696. font-weight: 400;
  697. &>.top {
  698. height: 92rpx;
  699. padding: 0 28rpx;
  700. box-sizing: border-box;
  701. display: flex;
  702. justify-content: space-between;
  703. align-items: center;
  704. &>image {
  705. width: 40rpx;
  706. }
  707. }
  708. &>.bottom {
  709. padding: 0 28rpx 30rpx;
  710. box-sizing: border-box;
  711. &> view {
  712. margin-bottom: 12rpx;
  713. font-size: 28rpx;
  714. font-weight: 400;
  715. color: #FFFFFF;
  716. line-height: 46rpx;
  717. }
  718. }
  719. }
  720. .popup {
  721. position: fixed;
  722. width: 100%;
  723. height: 100vh;
  724. background: rgba(0, 0, 0, 0.6);
  725. top: 0;
  726. left: 0;
  727. right: 0;
  728. bottom: 0;
  729. .popupContent {
  730. width: 632rpx;
  731. position: absolute;
  732. top: 50%;
  733. left: 50%;
  734. transform: translate(-50%, -50%);
  735. text-align: center;
  736. &>.content {
  737. position: relative;
  738. &>image {
  739. width: 100%;
  740. height: 652rpx;
  741. }
  742. &>.textCon {
  743. position: absolute;
  744. width: 100%;
  745. top: 0;
  746. left: 0;
  747. right: 0;
  748. bottom: 0;
  749. padding-top: 192rpx;
  750. .ts {
  751. font-size: 60rpx;
  752. font-weight: 500;
  753. color: #F5631D;
  754. }
  755. .reward {
  756. height: 60rpx;
  757. background: #FFD9A2;
  758. border-radius: 31rpx;
  759. font-size: 32rpx;
  760. font-weight: 400;
  761. display: inline-block;
  762. padding: 0 32rpx;
  763. color: #F5631E;
  764. line-height: 60rpx;
  765. margin-top: 20rpx;
  766. }
  767. .doubleBt {
  768. width: 424rpx;
  769. height: 84rpx;
  770. margin-top: 114rpx;
  771. }
  772. .bt {
  773. margin-top: 14rpx;
  774. font-size: 32rpx;
  775. font-weight: 400;
  776. color: #FCE8CD;
  777. }
  778. }
  779. }
  780. &>.close {
  781. width: 54rpx;
  782. height: 54rpx;
  783. margin-top: 76rpx;
  784. }
  785. }
  786. }
  787. }
  788. </style>