index.vue 26 KB

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