index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332
  1. <template>
  2. <view class="home">
  3. <view class="pop" v-if="showPrivacy">
  4. <view class="pop_con">
  5. <view class="title">用户隐私保护提示</view>
  6. <view class="desc">
  7. <view class="desc_con">感谢您使用本程序,您使用本程序前应当阅井同意</view>
  8. <view class="file" @click="openPrivacyContract">《大卫博士争霸赛小程序隐私保护指引》</view>
  9. <view class="desc_con">
  10. 当您点击同意并开始时用产品服务时,即表示你已理解并同息该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法进入程序。</view>
  11. </view>
  12. <view class="btn_box">
  13. <navigator open-type="exit" target="miniProgram" class="exit_btn" id="disagree-btn">不同意退出
  14. </navigator>
  15. <button id="agree-btn" @agreeprivacyauthorization="handleAgreePrivacyAuthorization"
  16. open-type="agreePrivacyAuthorization">同意并继续</button>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="index">
  21. <custom-warn v-if="showWarn"></custom-warn>
  22. <custom-toast ref='toast'></custom-toast>
  23. <view class="header-bg"></view>
  24. <view v-if="showphonelabel" class="showphonelabel" @click="goshowphone"></view>
  25. <view class="title" v-if="userServerInfo.season">大卫博士学位争霸赛第{{ userServerInfo.season}}季</view>
  26. <view class="user_info_new">
  27. <view class="userinfo">
  28. <view class="top">
  29. <image class="user-pic"
  30. :src="userServerInfo.avatar? userServerInfo.avatar : '../../static/icon/user.jpg'"
  31. mode="scaleToFill"></image>
  32. <image v-if="userServerInfo.score >= 300" class="hat" src="../../static/icon/hat.png"
  33. mode="scaleToFill"></image>
  34. <view class="user-info" @tap="changeName">
  35. <view class="name-grade-level">
  36. <view class="name">
  37. {{ userServerInfo.name? userServerInfo.name : '更换昵称头像' }}
  38. </view>
  39. <view class="grade">
  40. {{ userServerInfo.grade === undefined ? '未验证' : userServerInfo.grade }}
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="user-status" v-if="userStatus"
  46. :class="(userStatus === '报名截止' || userStatus === '暂未开赛') ? 'end' : ''" @tap="tapUserStatus">
  47. {{userStatus}}
  48. </view>
  49. </view>
  50. <view class="biye_tip" v-if="userServerInfo.signuped && userServerInfo.status === 1">
  51. <template v-if="userServerInfo.status === 1">
  52. <view>
  53. 你已连续参赛{{ userServerInfo.enrol_count }}季,你真棒!继续努力,加油!
  54. </view>
  55. </template>
  56. </view>
  57. </view>
  58. <view v-if="timer" class="index_countdown">
  59. <text style="font-size: 30rpx;">距{{ timerStatus ? '结束' : '开始' }}仅剩:</text>
  60. <text class="spec bg1">{{ countDown[0] || '00' }}</text>
  61. <text class="small">天</text>
  62. <text class="spec bg2">{{ countDown[1] || '00' }}</text>
  63. <text class="small">时</text>
  64. <text class="spec bg3">{{ countDown[2] || '00' }}</text>
  65. <text class="small">分</text>
  66. <view class="spec bg4 animate_second" v-if="countDown[3] || countDown[3] === 0">
  67. <swiper :indicator-dots="false" :autoplay="false" :interval="10000" :duration="300" :circular="true"
  68. :vertical="true" :current="countA.findIndex(i => +i === Number(countDown[3]))"
  69. :disable-touch="true" class="animate_item">
  70. <swiper-item v-for="n of countA" :key="n">
  71. <view class="swiper-item">{{ n }}</view>
  72. </swiper-item>
  73. </swiper>
  74. <swiper :indicator-dots="false" :autoplay="true" :interval="1000" :duration="300" :circular="true"
  75. :vertical="true" :disable-touch="true"
  76. :current="countB.findIndex(i => +i === Number(countDown[4]))" class="animate_item"
  77. @change="changeCountTime">
  78. <swiper-item v-for="n in countB" :key="n">
  79. <view class="swiper-item">{{ n }}</view>
  80. </swiper-item>
  81. </swiper>
  82. </view>
  83. <text class="small">秒</text>
  84. </view>
  85. <view v-if="messageList.length > 0" class="swiper_parant">
  86. <view class="message_icon_box">
  87. <image src="../../static/new/message2.jpg" mode="" class="message_icon"></image>
  88. <text>恭喜</text>
  89. </view>
  90. <swiper class="swiper swiper_message" :indicator-dots="false" :autoplay="true" :circular="true"
  91. @animationfinish="changeMessageSwiper" interval="1500">
  92. <swiper-item v-for="(item, i) in messageList" :key="i">
  93. <view class="swiper-item uni-bg-red">{{ item.data }}</view>
  94. </swiper-item>
  95. </swiper>
  96. </view>
  97. <view class="entrance">
  98. <!-- <view class="nav_container"> -->
  99. <view class="index-item item_bg2" @tap="toupload">
  100. <text class="name">课程表</text>
  101. <image src="https://api.jiuweiyun.cn/public/uploads/weapp/icon/index_bg2.png" class="coverImg cv2">
  102. </view>
  103. <!-- </view> -->
  104. </view>
  105. <!-- <view class="" @click="toduihuan">
  106. 礼品兑换
  107. </view> -->
  108. <button v-if="showGetUserInfoButton" class="getUserInfo" type="default" @click="getuserinfo"></button>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. import customWarn from '../../components/custom-warn.vue'
  114. import {
  115. toast_sure,
  116. index_message,
  117. api_onLaunch,
  118. GetSetingTime
  119. } from '../../api.js'
  120. import {
  121. setInterval,
  122. clearInterval
  123. } from 'timers'
  124. import PrivacyPopup from "../../components/privacyPopup.vue";
  125. export default {
  126. onShareAppMessage() { //分享
  127. uni.showLoading({
  128. title: '加载中',
  129. mask: true
  130. }) //显示loading
  131. return { //如果点击右上角分享按钮,则分享页面为小程序主页
  132. title: '大卫博士学位争霸赛',
  133. path: '/pages/index/index'
  134. }
  135. },
  136. onPullDownRefresh() {
  137. if (this.showPrivacy) {
  138. return
  139. }
  140. this.routing = false
  141. if (this.showGetUserInfoButton == false) {
  142. this.$store.dispatch('newLogin').then(() => {
  143. this.init()
  144. })
  145. }
  146. },
  147. components: {
  148. customWarn,
  149. PrivacyPopup
  150. },
  151. data() {
  152. return {
  153. timer: null,
  154. now: null,
  155. messageList: [],
  156. timerStatus: null,
  157. countA: [5, 4, 3, 2, 1, 0],
  158. countB: [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],
  159. code: '',
  160. showPrivacy: false, //是否展示隐私弹窗
  161. }
  162. },
  163. computed: {
  164. showphonelabel() {
  165. // console.log('index里的按钮',this.$store.state.showphoneBtn)
  166. return this.$store.state.showphoneBtn
  167. },
  168. showWarn() {
  169. return this.$store.state.showWarn
  170. },
  171. userWeixinInfo() { //用户微信信息
  172. return this.$store.state.userWeixinInfo
  173. },
  174. userServerInfo() { //用户服务器信息
  175. return this.$store.state.userServerInfo
  176. },
  177. showGetUserInfoButton() { //是否显示获取用户信息的透明按钮
  178. // console.log('授权按钮',this.$store.state.showGetUserInfoButton)
  179. return this.$store.state.showGetUserInfoButton
  180. },
  181. userStatus() { //根据赛季阶段和用户类型,显示不同可操作项
  182. if (this.$verified()) { //如果用户已经登录,进行下一步判断
  183. if (this.userServerInfo.status) { //如果赛季已经开赛
  184. if (this.userServerInfo.status === 1) { //如果赛季正处于报名阶段
  185. if (this.userServerInfo.signuped) { //如果用户已报名
  186. return '已报名'
  187. } else { //如果用户未报名,那么可能是 type 1 用户真没报名 2 批发商 3 客服
  188. // if (this.userServerInfo.type === 1) {
  189. // return '报名参赛'
  190. // } else if (this.userServerInfo.type === 2) {
  191. // return '报名参赛'
  192. // } else if (this.userServerInfo.type === 3) {
  193. // return ''
  194. // }
  195. return '报名参赛'
  196. }
  197. } else if (this.userServerInfo.status === 2 || this.userServerInfo.status === 3 || this.userServerInfo.status === 4 || this.userServerInfo.status === 5) { //如果赛季正处于比赛或兑奖阶段
  198. if (this.userServerInfo.signuped) { //如果用户已报名
  199. return '已报名'
  200. } else { //如果用户未报名,那么可能是 1 用户真没报名 2 批发商 3 客服
  201. return ''
  202. }
  203. }
  204. } else { //如果赛季暂未开赛
  205. return '暂未开赛'
  206. }
  207. } else { //如果用户未登录
  208. return '绑定账号'
  209. }
  210. },
  211. countDown() {
  212. let time = this.timerStatus ? this.userServerInfo.end_time : this.userServerInfo.start_time
  213. const sec = Math.floor((time - this.now) / 1000)
  214. let day = Math.floor(sec / 86400)
  215. let hour = Math.floor((sec % 86400) / 3600)
  216. let minite = Math.floor((sec - 86400 * day - hour * 3600) / 60)
  217. let second = Math.floor(sec - 86400 * day - hour * 3600 - minite * 60)
  218. day = day >= 10 ? day : `0${day}`
  219. hour = hour >= 10 ? hour : `0${hour}`
  220. minite = minite >= 10 ? minite : `0${minite}`
  221. second = String(second)
  222. let arr = [day, hour, minite, second >= 10 ? second[0] : 0, second >= 10 ? second[1] : second]
  223. return arr
  224. }
  225. },
  226. created() { //加载完成后开启监听全局 MESSAGE 事件
  227. uni.$on('MESSAGE', (m, d, p) => { //m 要提示的文字信息 d 文字信息出现的时常 p 文字信息出现的位置
  228. this.$refs.toast.hover(m, d, p)
  229. })
  230. uni.$on('HIDEMESSAGE', () => { // 隐藏 文字提示
  231. this.$refs.toast.hide()
  232. })
  233. // console.log('初始化',this.showphonelabel)
  234. },
  235. onShow() { //每次展示首页时都初始化一次,达到实时更新数据的功能
  236. // 判断是否授权了隐私协议
  237. if (uni.getPrivacySetting) {
  238. uni.getPrivacySetting({
  239. success: res => {
  240. //console.log("是否需要授权:", res.needAuthorization, "隐私协议的名称为:", res.privacyContractName)
  241. if (res.needAuthorization) {
  242. //显示隐私协议弹窗
  243. this.showPrivacy = true
  244. } else {
  245. //隐藏隐私协议弹窗并获取用户信息
  246. this.showPrivacy = false
  247. let that = this
  248. // console.log(1111111,uni.getStorageSync('play'))
  249. // if ('none'.indexOf(that.networkType) == -1) { //有网络连接时才进行下一步
  250. this.GetSetingTimeInfo()
  251. this.$store.dispatch('newLogin').then(() => {
  252. this.routing = false
  253. this.init()
  254. })
  255. if (uni.fromUpload) {
  256. uni.fromUpload = false
  257. if (uni.toRank) {
  258. uni.toRank = false
  259. uni.navigateTo({
  260. url: '../ranking/ranking'
  261. })
  262. }
  263. }
  264. // } else {
  265. // uni.showToast({
  266. // title: '似乎已经断开网络连接',
  267. // icon: 'none'
  268. // })
  269. // }
  270. }
  271. },
  272. fail: () => {},
  273. complete: () => {},
  274. })
  275. }
  276. },
  277. methods: {
  278. toduihuan() {
  279. uni.navigateTo({
  280. url: '/pages/exchange/exchange'
  281. })
  282. },
  283. //修改昵称头像
  284. changeName() {
  285. if (this.$verified()) { //用户是否已登录
  286. if (this.routing) {
  287. return
  288. }
  289. this.routing = true
  290. uni.navigateTo({
  291. url: '../information/information?from=' + 1
  292. })
  293. }
  294. },
  295. //打开隐私协议
  296. openPrivacyContract() {
  297. wx.openPrivacyContract({
  298. success: res => {
  299. console.log('openPrivacyContract success')
  300. },
  301. fail: res => {
  302. console.error('openPrivacyContract fail', res)
  303. }
  304. })
  305. },
  306. //同意并继续按钮
  307. handleAgreePrivacyAuthorization() {
  308. this.showPrivacy = false
  309. let that = this;
  310. this.GetSetingTimeInfo()
  311. this.$store.dispatch('newLogin').then(() => {
  312. this.routing = false
  313. this.init()
  314. })
  315. if (uni.fromUpload) {
  316. uni.fromUpload = false
  317. if (uni.toRank) {
  318. uni.toRank = false
  319. uni.navigateTo({
  320. url: '../ranking/ranking'
  321. })
  322. }
  323. }
  324. },
  325. goshowphone() {
  326. uni.showModal({
  327. title: '提示',
  328. showCancel: false,
  329. content: '请使用代理商系统的账号密码登录',
  330. success: function(res) {
  331. if (res.confirm) {
  332. uni.navigateTo({
  333. url: '../boundPhone/boundPhone'
  334. })
  335. }
  336. }
  337. });
  338. },
  339. // 系统升级
  340. GetSetingTimeInfo() {
  341. let that = this
  342. this.$ajax.get(`${GetSetingTime}`).then(([, {
  343. data: res
  344. }]) => {
  345. if (res.code == 200) {
  346. if (res.data.status == 1) {
  347. var start_time = res.data.start_time
  348. var end_time = res.data.end_time
  349. var tmp = (Date.parse(new Date()).toString()).substr(0, 10)
  350. if (tmp >= start_time && tmp <= end_time) {
  351. uni.redirectTo({
  352. url: './upgrade?end_time=' + end_time
  353. })
  354. }
  355. }
  356. this.routing = false
  357. } else {
  358. this.routing = false
  359. uni.showModal({
  360. content: res.message,
  361. showCancel: false
  362. })
  363. }
  364. }).catch(() => {
  365. this.routing = false
  366. })
  367. },
  368. changeCountTime() {
  369. this.now = Date.now()
  370. },
  371. init() {
  372. let _this = this
  373. _this.now = Date.now()
  374. if (_this.userServerInfo.start_time && _this.userServerInfo.end_time) {
  375. let {
  376. start_time,
  377. end_time
  378. } = _this.userServerInfo
  379. if (_this.now > start_time - 5 * 24 * 3600 * 1000 && _this.now < start_time) {
  380. _this.timerStatus = false
  381. _this.timer = true
  382. // _this.timer = setInterval(() => {
  383. // _this.now = Date.now()
  384. // }, 1000 * 60)
  385. } else if (_this.now > start_time && _this.now < end_time) {
  386. _this.timerStatus = true
  387. _this.timer = true
  388. // _this.timer = setInterval(() => {
  389. // _this.now = Date.now()
  390. // }, 1000 * 1)
  391. // 活动期间 获取滚动卖货消息
  392. _this.index_message()
  393. } else {
  394. if (this.timer) {
  395. // clearInterval(_this.timer)
  396. _this.timer = null;
  397. }
  398. }
  399. } else {
  400. if (this.timer) {
  401. // clearInterval(_this.timer)
  402. _this.timer = null;
  403. }
  404. }
  405. uni.stopPullDownRefresh()
  406. },
  407. changeMessageSwiper({
  408. detail
  409. }) {
  410. let current = detail.current;
  411. if (current >= this.messageList.length) {
  412. this.index_message();
  413. }
  414. },
  415. // 获取滚动消息
  416. index_message() {
  417. this.$ajax.get(`${index_message}`).then(([, {
  418. data: res
  419. }]) => {
  420. if (res.code === 200) {
  421. this.messageList = res.data.list
  422. }
  423. })
  424. },
  425. getuserinfo() { //获取用户信息
  426. this.$store.commit('HIDEGETUSERINFOBUTTON') //隐藏透明按钮
  427. let _this = this
  428. this.$store.dispatch('getUserInfo').then(() => {
  429. _this.init()
  430. })
  431. },
  432. tapUserStatus() { //点击用户状态
  433. if (this.userStatus === '报名参赛') {
  434. if (this.routing) {
  435. return
  436. }
  437. this.routing = true
  438. uni.navigateTo({
  439. url: '../signup/signup'
  440. })
  441. } else if (this.userStatus === '暂未开赛') {
  442. this.$refs.toast.hover('暂未开赛,非常感谢您的关注。')
  443. }
  444. },
  445. // 课程表
  446. toupload() {
  447. let now = Date.now()
  448. let {
  449. end_time,
  450. start_time
  451. } = this.userServerInfo
  452. let week
  453. if (now > end_time) {
  454. week = 3
  455. } else if (now < start_time) {
  456. week = 0
  457. } else {
  458. week = Math.ceil((now - start_time) / (7 * 24 * 60 * 60 * 1000))
  459. }
  460. uni.navigateTo({
  461. url: '../course/list?week=' + week
  462. })
  463. }
  464. }
  465. }
  466. </script>
  467. <style lang="scss" scoped>
  468. .new_pop {
  469. width: 648rpx;
  470. height: 368rpx;
  471. background: #FFFFFF;
  472. border-radius: 24rpx;
  473. margin: 0 auto;
  474. text-align: center;
  475. padding-top: 60rpx;
  476. .new_title {
  477. font-size: 38rpx;
  478. font-weight: bold;
  479. color: #000;
  480. }
  481. .new_content {
  482. font-size: 34rpx;
  483. color: #333;
  484. margin: 24rpx 0 40rpx 0;
  485. }
  486. .new_btns {
  487. display: flex;
  488. justify-content: space-around;
  489. align-items: center;
  490. view {
  491. width: 260rpx;
  492. height: 88rpx;
  493. line-height: 88rpx;
  494. background: #F5F5F5;
  495. border-radius: 44rpx;
  496. color: #333;
  497. font-size: 32rpx;
  498. font-weight: bold;
  499. }
  500. view:last-child {
  501. background: linear-gradient(93deg, #F30000 0%, #FE4815 100%);
  502. color: #fff;
  503. }
  504. }
  505. }
  506. .home {
  507. width: 100vw;
  508. height: 100vh;
  509. position: relative;
  510. .pop {
  511. width: 100%;
  512. height: 100%;
  513. position: fixed;
  514. top: 0;
  515. bottom: 0;
  516. z-index: 999;
  517. background-color: rgba(0, 0, 0, 0.3);
  518. .pop_con {
  519. width: 100%;
  520. height: 40vh;
  521. background: #fff;
  522. border-top-left-radius: 26rpx;
  523. border-top-top-radius: 26rpx;
  524. position: fixed;
  525. left: 0;
  526. bottom: 0;
  527. padding: 0 30rpx;
  528. box-sizing: border-box;
  529. z-index: 9999;
  530. .title {
  531. font-size: 36rpx;
  532. font-weight: bold;
  533. margin: 24rpx 0;
  534. }
  535. .desc {
  536. font-size: 30rpx;
  537. color: 999;
  538. .file {
  539. color: #FB231F;
  540. margin: 24rpx 0;
  541. font-size: 32rpx;
  542. }
  543. }
  544. .btn_box {
  545. margin-top: 40rpx;
  546. display: flex;
  547. justify-content: space-around;
  548. align-items: center;
  549. .exit_btn {
  550. display: flex;
  551. justify-content: center;
  552. align-items: center;
  553. width: 300rpx;
  554. height: 88rpx;
  555. background: #E9E9E9;
  556. border-radius: 44rpx;
  557. font-size: 32rpx;
  558. color: #333;
  559. }
  560. button {
  561. display: flex;
  562. justify-content: center;
  563. align-items: center;
  564. width: 300rpx;
  565. height: 88rpx;
  566. background: #FB231F;
  567. border-radius: 44rpx;
  568. font-size: 32rpx;
  569. color: #fff;
  570. background: linear-gradient(93deg, #F30000 0%, #FE4815 100%);
  571. }
  572. }
  573. }
  574. }
  575. }
  576. .privacy-popup {
  577. position: absolute;
  578. top: 0;
  579. left: 0;
  580. }
  581. .challenge-num {
  582. display: flex;
  583. flex-direction: column;
  584. align-items: center;
  585. .challenage-num-top {
  586. width: 626rpx;
  587. height: 612rpx;
  588. background: url(http://picture.liuliwa.top/new_challenge_toast/7.png) center no-repeat;
  589. background-size: 100%;
  590. margin: 0 auto 94rpx auto;
  591. position: relative;
  592. .challenage-num-body {
  593. width: 570rpx;
  594. height: 385rpx;
  595. position: absolute;
  596. bottom: 28rpx;
  597. left: 28rpx;
  598. border-radius: 24rpx;
  599. padding: 84rpx 30rpx 44rpx 30rpx;
  600. display: flex;
  601. justify-content: space-between;
  602. flex-direction: column;
  603. .challenge-num-item {
  604. display: flex;
  605. align-items: center;
  606. justify-content: space-between;
  607. .label {
  608. color: #5D330D;
  609. font-size: 32rpx;
  610. margin-right: 10rpx;
  611. }
  612. .spec {
  613. color: #DD372D;
  614. font-size: 48rpx;
  615. }
  616. }
  617. }
  618. }
  619. .challenge-num-btn {
  620. width: 502rpx;
  621. height: 96rpx;
  622. border-radius: 96rpx;
  623. background: linear-gradient(180deg, #FEEB71 0%, #F89018 100%);
  624. color: #984100;
  625. font-size: 32rpx;
  626. font-weight: bold;
  627. line-height: 96rpx;
  628. text-align: center;
  629. }
  630. }
  631. .challenge-invite {
  632. display: flex;
  633. flex-direction: column;
  634. align-items: center;
  635. .challenge-user {
  636. width: 426rpx;
  637. height: 334rpx;
  638. margin: 0 auto 48rpx auto;
  639. background: url(http://picture.liuliwa.top/new_challenge_toast/5.png) center no-repeat;
  640. background-size: 100%;
  641. position: relative;
  642. .user-avatar {
  643. width: 168rpx;
  644. height: 168rpx;
  645. border-radius: 50%;
  646. position: absolute;
  647. bottom: 8rpx;
  648. left: 50%;
  649. transform: translateX(-50%);
  650. background-position: center;
  651. background-repeat: no-repeat;
  652. background-size: 100%;
  653. background-color: #007AFF;
  654. }
  655. }
  656. .challenge-title {
  657. width: 456rpx;
  658. color: #FFF1AD;
  659. font-size: 32rpx;
  660. line-height: 50rpx;
  661. margin-bottom: 86rpx;
  662. font-weight: bold;
  663. }
  664. .challenage-btn {
  665. width: 502rpx;
  666. height: 96rpx;
  667. border-radius: 96rpx;
  668. background: linear-gradient(180deg, #FEEB71 0%, #F89018 100%);
  669. color: #984100;
  670. font-size: 32rpx;
  671. font-weight: bold;
  672. line-height: 96rpx;
  673. text-align: center;
  674. }
  675. }
  676. .index {
  677. width: 100%;
  678. height: 100vh;
  679. position: relative;
  680. box-sizing: border-box;
  681. padding: 161rpx 30rpx 0;
  682. display: flex;
  683. flex-direction: column;
  684. .index_countdown {
  685. width: 100%;
  686. height: 140rpx;
  687. background-image: linear-gradient(#4CBA59, #6BE57D);
  688. color: #FFFFFF;
  689. border-radius: 6rpx;
  690. margin-top: 10rpx;
  691. line-height: 60rpx;
  692. text-align: center;
  693. letter-spacing: 4rpx;
  694. display: flex;
  695. align-items: center;
  696. justify-content: center;
  697. font-size: 36rpx;
  698. .bg1 {
  699. background-color: #FD715D;
  700. }
  701. .bg2 {
  702. background-color: #3397DB;
  703. }
  704. .bg3 {
  705. background-color: #F39B11;
  706. }
  707. .bg4 {
  708. // background-color: #B933FF;
  709. }
  710. .animate_second {
  711. display: flex !important;
  712. justify-content: space-between;
  713. align-items: center;
  714. .animate_item {
  715. flex: 1;
  716. height: 70rpx;
  717. &:nth-of-type(1) {
  718. background-color: #e3abff;
  719. }
  720. &:nth-last-of-type(1) {
  721. background-color: #B933FF;
  722. }
  723. text-align: center;
  724. }
  725. }
  726. .spec {
  727. display: block;
  728. text-align: center;
  729. line-height: 70rpx;
  730. color: #FFFFFF;
  731. width: 70rpx;
  732. height: 70rpx;
  733. border-radius: 10rpx;
  734. overflow: hidden;
  735. }
  736. .small {
  737. font-size: 24rpx;
  738. margin: 0 8rpx;
  739. margin-top: 40rpx;
  740. }
  741. }
  742. .xuefen_toast {
  743. width: 600rpx;
  744. height: 760rpx;
  745. .text {
  746. position: absolute;
  747. width: 430rpx;
  748. bottom: 217rpx;
  749. left: 50%;
  750. margin-left: -215rpx;
  751. display: flex;
  752. justify-content: flex-start;
  753. flex-wrap: wrap;
  754. font-size: 28rpx;
  755. color: #333333;
  756. view {
  757. width: calc(50% - 10rpx);
  758. margin-bottom: 20rpx;
  759. display: flex;
  760. justify-content: space-between;
  761. align-items: center;
  762. &:nth-last-child(1),
  763. &:nth-last-child(2) {
  764. margin-bottom: 0;
  765. }
  766. &:nth-child(2n) {
  767. text-align: right;
  768. margin-left: 20rpx;
  769. }
  770. }
  771. }
  772. }
  773. .yingzhan_toast {
  774. width: 574rpx;
  775. height: 596rpx;
  776. .text {
  777. left: 0;
  778. width: 100%;
  779. color: #F76454;
  780. font-size: 36rpx;
  781. position: absolute;
  782. text-align: center;
  783. top: 120rpx;
  784. }
  785. }
  786. .xiazhu_toast {
  787. width: 563rpx;
  788. height: 653rpx;
  789. .text {
  790. color: #712722;
  791. font-size: 28rpx;
  792. width: 402rpx;
  793. position: absolute;
  794. bottom: 188rpx;
  795. left: 50%;
  796. margin-left: -201rpx;
  797. text {
  798. display: block;
  799. margin-bottom: 20rpx;
  800. text-align: center;
  801. &:nth-last-child(1) {
  802. margin-bottom: 0;
  803. }
  804. }
  805. }
  806. }
  807. .tiaozhan_toast {
  808. width: 520rpx;
  809. height: 755rpx;
  810. .text {
  811. color: #712722;
  812. font-size: 28rpx;
  813. width: 390rpx;
  814. position: absolute;
  815. bottom: 160rpx;
  816. left: 50%;
  817. margin-left: -195rpx;
  818. line-height: 48rpx;
  819. text-align: center;
  820. }
  821. }
  822. .xuewei_toast {
  823. width: 712rpx;
  824. height: 750rpx;
  825. .text {
  826. font-size: 62rpx;
  827. color: #FFFFFF;
  828. position: absolute;
  829. width: 488rpx;
  830. text-align: center;
  831. height: 104rpx;
  832. line-height: 104rpx;
  833. left: 50%;
  834. margin-left: -244rpx;
  835. bottom: 138rpx;
  836. }
  837. }
  838. .xueba_toast {
  839. width: 662rpx;
  840. height: 685rpx;
  841. .text {
  842. width: 416rpx;
  843. text-align: center;
  844. height: 112rpx;
  845. line-height: 112rpx;
  846. color: #FFFFFF;
  847. font-size: 58rpx;
  848. position: absolute;
  849. left: 50%;
  850. margin-left: -208rpx;
  851. bottom: 226rpx;
  852. }
  853. }
  854. .getUserInfo {
  855. position: fixed;
  856. top: 0;
  857. left: 0;
  858. right: 0;
  859. bottom: 0;
  860. z-index: 9999;
  861. background: rgba(1, 1, 1, 0);
  862. }
  863. .showphonelabel {
  864. position: fixed;
  865. top: 0;
  866. left: 0;
  867. right: 0;
  868. bottom: 0;
  869. z-index: 9999;
  870. background: rgba(1, 1, 1, 0);
  871. }
  872. .header-bg {
  873. position: absolute;
  874. z-index: -1;
  875. top: 0;
  876. left: 0;
  877. width: 100%;
  878. height: 286rpx;
  879. background: linear-gradient(-2deg, rgba(255, 68, 54, 1) 0%, rgba(254, 132, 72, 1) 100%);
  880. border-bottom-right-radius: 350rpx 30rpx;
  881. border-bottom-left-radius: 350rpx 30rpx;
  882. }
  883. .title {
  884. position: absolute;
  885. top: 70rpx;
  886. left: 30rpx;
  887. @include text(34rpx);
  888. color: #FFFFFF;
  889. }
  890. .user_info_new {
  891. background: linear-gradient(#FFCF82, #FF9C00);
  892. border-radius: 10rpx;
  893. .biye_tip {
  894. height: 64rpx;
  895. background: rgba(0, 0, 0, .4);
  896. color: #FFFFFF;
  897. font-size: 28rpx;
  898. padding: 0 22rpx;
  899. box-sizing: border-box;
  900. width: 100%;
  901. line-height: 64rpx;
  902. border-bottom-left-radius: 10rpx;
  903. border-bottom-right-radius: 10rpx;
  904. }
  905. }
  906. .userinfo {
  907. position: relative;
  908. width: 100%;
  909. height: 225rpx;
  910. box-shadow: 0rpx 1rpx 3rpx 0rpx rgba(0, 0, 0, 0.2);
  911. border-radius: 10px;
  912. box-sizing: border-box;
  913. padding: 22rpx;
  914. .top {
  915. height: 98rpx;
  916. display: flex;
  917. align-items: center;
  918. position: relative;
  919. .user-pic {
  920. height: 100%;
  921. width: 98rpx;
  922. background-color: #B2B2B2;
  923. border-radius: 50%;
  924. overflow: hidden;
  925. }
  926. .hat {
  927. position: absolute;
  928. top: -40rpx;
  929. left: 0px;
  930. width: 80rpx;
  931. height: 69.873rpx;
  932. }
  933. .user-info {
  934. flex: 1;
  935. display: flex;
  936. flex-direction: column;
  937. justify-content: space-between;
  938. height: 100%;
  939. margin-left: 16rpx;
  940. overflow: hidden;
  941. .progress {
  942. font-size: 26rpx;
  943. color: #FFFFFF;
  944. }
  945. .name-grade-level {
  946. height: 100%;
  947. width: 100%;
  948. display: flex;
  949. align-items: center;
  950. .name {
  951. font-size: 32rpx;
  952. color: #FFFFFF;
  953. max-width: 38%;
  954. overflow: hidden;
  955. white-space: nowrap;
  956. text-overflow: ellipsis;
  957. }
  958. .grade {
  959. font-size: 26rpx;
  960. color: rgba(255, 255, 255, 1);
  961. margin-left: 16rpx;
  962. vertical-align: baseline;
  963. }
  964. .level {
  965. margin-left: 18rpx;
  966. height: 30rpx;
  967. border-radius: 15rpx;
  968. font-size: 26rpx;
  969. background: #FFFFFF;
  970. color: rgba(250, 99, 66, 1);
  971. text {
  972. float: right;
  973. line-height: 35rpx;
  974. margin: 0 12rpx;
  975. }
  976. image {
  977. width: 30rpx;
  978. height: 30rpx;
  979. float: left;
  980. }
  981. }
  982. }
  983. }
  984. }
  985. .user-status {
  986. position: absolute;
  987. width: 170rpx;
  988. height: 60rpx;
  989. top: 111rpx;
  990. right: 0;
  991. line-height: 62rpx;
  992. background: #FFFFFF;
  993. text-align: center;
  994. border-radius: 30rpx 0 0 30rpx;
  995. font-size: 32rpx;
  996. color: rgba(250, 99, 66, 1);
  997. &.end {
  998. background: #999999;
  999. color: #FFFFFF;
  1000. }
  1001. }
  1002. .countdown {
  1003. position: absolute;
  1004. right: 12rpx;
  1005. top: 171rpx;
  1006. display: flex;
  1007. color: #FFFFFF;
  1008. }
  1009. .score,
  1010. .rank {
  1011. position: absolute;
  1012. left: 32rpx;
  1013. bottom: 35rpx;
  1014. font-size: 32rpx;
  1015. color: rgba(255, 255, 255, 1);
  1016. &.rank {
  1017. left: 294rpx;
  1018. }
  1019. }
  1020. }
  1021. .entrance {
  1022. flex: 1;
  1023. z-index: 1;
  1024. margin: 10rpx 0;
  1025. position: relative;
  1026. display: flex;
  1027. justify-content: flex-start;
  1028. flex-wrap: wrap;
  1029. .nav_container {
  1030. display: flex;
  1031. justify-content: flex-start;
  1032. flex-wrap: wrap;
  1033. }
  1034. .item_bg1 {
  1035. // background-image: url(../../static/new/index_bg1.png);
  1036. background-image: linear-gradient(#79a9fd, #929ef2);
  1037. }
  1038. .item_bg2 {
  1039. // background-image: url(../../static/new/index_bg2.png);
  1040. background-image: linear-gradient(#ff634c, #ff9587);
  1041. }
  1042. .item_bg3 {
  1043. // background-image: url(../../static/new/index_bg3.png);
  1044. background-image: linear-gradient(#fdad29, #ffcf4b);
  1045. }
  1046. .item_bg4 {
  1047. // background-image: url(../../static/new/index_bg4.png);
  1048. background-image: linear-gradient(#d486f9, #b063f8);
  1049. }
  1050. .index-item {
  1051. width: 100%;
  1052. position: relative;
  1053. min-height: 285rpx;
  1054. overflow: hidden;
  1055. border-radius: 10px;
  1056. box-shadow: 0rpx 1rpx 3rpx 0rpx rgba(0, 0, 0, 0.2);
  1057. font-size: 30rpx;
  1058. color: #FFFFFF;
  1059. background-size: 100% 100%;
  1060. background-repeat: no-repeat;
  1061. margin-right: 5rpx;
  1062. margin-bottom: 12rpx;
  1063. &:nth-of-type(2n) {
  1064. margin-right: 0;
  1065. margin-left: 5rpx;
  1066. }
  1067. .name {
  1068. z-index: 1;
  1069. top: 38rpx;
  1070. left: 30rpx;
  1071. color: #FFFFFF;
  1072. font-size: 40rpx;
  1073. position: absolute;
  1074. font-weight: 500;
  1075. }
  1076. view {
  1077. position: absolute;
  1078. left: 30rpx;
  1079. top: 87rpx;
  1080. font-size: 24rpx;
  1081. color: #FFFFFF;
  1082. }
  1083. .coverImg {
  1084. position: absolute;
  1085. }
  1086. .cv1 {
  1087. width: 238rpx;
  1088. height: 260rpx;
  1089. right: 30rpx;
  1090. bottom: 0;
  1091. }
  1092. .cv2 {
  1093. width: 200rpx;
  1094. height: 163rpx;
  1095. right: 44rpx;
  1096. bottom: 31rpx;
  1097. }
  1098. .cv3 {
  1099. width: 194rpx;
  1100. height: 180rpx;
  1101. right: 22rpx;
  1102. bottom: 25rpx;
  1103. }
  1104. .cv4 {
  1105. width: 187rpx;
  1106. height: 187rpx;
  1107. right: 53rpx;
  1108. bottom: 31rpx;
  1109. }
  1110. }
  1111. }
  1112. .rules {
  1113. font-size: 24rpx;
  1114. height: 80rpx;
  1115. line-height: 80rpx;
  1116. text-align: center;
  1117. font-weight: bold;
  1118. color: rgba(243, 67, 54, 1);
  1119. text {
  1120. margin-left: 9rpx;
  1121. }
  1122. }
  1123. .swiper_parant {
  1124. display: flex;
  1125. justify-content: space-between;
  1126. align-items: center;
  1127. background-color: #FF9C00;
  1128. border-radius: 10rpx;
  1129. height: 70rpx;
  1130. margin: 5px 0;
  1131. padding: 0 20rpx;
  1132. box-sizing: border-box;
  1133. // &::before{
  1134. // content: "";
  1135. // display: block;
  1136. // width: 30rpx;
  1137. // height: 30rpx;
  1138. // background-image: url(../../static/new/message.png);
  1139. // background-repeat: no-repeat;
  1140. // background-size: 100% 100%;
  1141. // margin-right: 10rpx;
  1142. // }
  1143. .message_icon_box {
  1144. color: #FA6342;
  1145. font-size: 32rpx;
  1146. width: 135rpx;
  1147. height: 54rpx;
  1148. padding: 14rpx 12rpx;
  1149. box-sizing: border-box;
  1150. display: flex;
  1151. align-items: center;
  1152. justify-content: space-between;
  1153. margin-right: 20rpx;
  1154. background-color: #FFFFFF;
  1155. border-radius: 8rpx;
  1156. .message_icon {
  1157. width: 32rpx;
  1158. height: 26rpx;
  1159. margin-right: 10rpx;
  1160. }
  1161. }
  1162. }
  1163. .swiper_message {
  1164. flex: 1;
  1165. height: 60rpx;
  1166. box-sizing: border-box;
  1167. line-height: 60rpx;
  1168. color: #FFFFFF;
  1169. font-size: 28rpx;
  1170. }
  1171. .hadChallenge {
  1172. position: fixed;
  1173. left: 0;
  1174. top: 0;
  1175. width: 100%;
  1176. height: 100%;
  1177. background: rgba(0, 0, 0, 0.3);
  1178. @include flex(column);
  1179. z-index: 2;
  1180. .challenage {
  1181. width: 574rpx;
  1182. height: 596rpx;
  1183. position: relative;
  1184. image {
  1185. width: 100%;
  1186. height: 100%;
  1187. }
  1188. .challengeName {
  1189. left: 0;
  1190. width: 100%;
  1191. top: 128rpx;
  1192. color: #F76454;
  1193. font-size: 36rpx;
  1194. position: absolute;
  1195. text-align: center;
  1196. }
  1197. }
  1198. .closeChallenge {
  1199. width: 62rpx;
  1200. height: 62rpx;
  1201. @include flex();
  1202. font-size: 56rpx;
  1203. margin-top: 30rpx;
  1204. border-radius: 50%;
  1205. background: #FFFFFF;
  1206. }
  1207. }
  1208. }
  1209. .courseDialog {
  1210. width: 80%;
  1211. margin: 0 auto;
  1212. height: 700rpx;
  1213. .courseImg {
  1214. display: block;
  1215. width: 100%;
  1216. }
  1217. }
  1218. </style>