index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  1. <template>
  2. <view class="index">
  3. <u-navbar class="navbar" :is-back="false" :border-bottom="false" title-color="#333333" back-icon-color="#ffffff">
  4. <view class="slot-wrap">
  5. <image src="/static/logo2.png"></image>
  6. </view>
  7. </u-navbar>
  8. <view class="swiper">
  9. <swiper :indicator-dots="false" indicator-color="#fff" indicator-active-color="#007AFF" :style="{'height':swiperHeight+'rpx'}" @change="swiperChange" :interval="interval" :duration="duration" :autoplay="autoplay" :circular="true">
  10. <swiper-item v-for="(swiper,index) in list" :key="index" @click="swiperClick(swiper)">
  11. <image @load="imageLoad" :src="$method.splitImgHost(swiper.adverUrl, true)" mode="widthFix"></image>
  12. </swiper-item>
  13. <!-- <swiper-item >
  14. <image @load="imageLoad" src="http://file.xyyxt.net/oss/images/file/20220111.jpg" mode="widthFix"></image>
  15. </swiper-item> -->
  16. </swiper>
  17. <view class="dots">
  18. <view class="dot" :class="{'active':index == current}" v-for="(swiper,index) in list" :key="index"></view>
  19. </view>
  20. </view>
  21. <view class="content">
  22. <view class="notice" v-if="infoNums">
  23. <view class="notice__content">
  24. <image src="/static/icon/msg_icon1.png" class="icon"></image>
  25. <view class="text">
  26. 您有{{infoNums}}条新的通知
  27. </view>
  28. <view class="btn" @click="jumpPage">立即查看</view>
  29. </view>
  30. </view>
  31. <view>
  32. <!-- 日历-->
  33. <view class="calendar_card">
  34. <view class="card_box">
  35. <u-row gutter="16">
  36. <u-col span="10" >
  37. <view style="height:60rpx;">
  38. <text class="t1" v-if="nearByDay !== '' && nearByDay !== null">距离最近一次考试还剩{{nearByDay}}天</text>
  39. </view>
  40. </u-col>
  41. <u-col offset="1" span="1">
  42. <view @click="jumpPlan"><image src="/static/more.png" class="img_more"></image></view>
  43. </u-col>
  44. </u-row>
  45. </view>
  46. <u-line color="#EEEEEE" />
  47. <view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
  48. <view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
  49. </view>
  50. <view style="width: 100%;display: flex;justify-content:center;margin-top: 40rpx;">
  51. <view v-for="(item, index) in date_num" :key="index" class="date_num">
  52. <view v-if="item.color == 0" class="date_num_color0" v-show="item.date > 0">
  53. {{ item.date }}
  54. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  55. <view v-if="item.dot" class="date_dot"></view>
  56. </view>
  57. <view v-if="item.color == 1" class="date_num_color1">
  58. {{ item.date }}
  59. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  60. <view v-if="item.dot" class="date_dot"></view>
  61. </view>
  62. <view v-if="item.color == 2" class="date_num_color2">
  63. {{ item.date }}
  64. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  65. <view v-if="item.dot" class="date_dot"></view>
  66. </view>
  67. <view v-if="item.color == 3" class="date_num_color3">
  68. {{ item.date }}
  69. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  70. <view v-if="item.dot" class="date_dot"></view>
  71. </view>
  72. </view>
  73. </view>
  74. <view style="width: 100%;margin-top: 20rpx;" v-if="workList.length > 0">
  75. <u-row gutter="16">
  76. <u-col span="2" text-align="center">
  77. <view><image src="/static/left.png" class="arr-icon" @click="preveItem"></image></view>
  78. </u-col>
  79. <u-col span="8" text-align="center">
  80. <view class="course_title" @click="jumpGoodsDetail(goodsItem)">{{ goodsItem.goodsName }}</view>
  81. </u-col>
  82. <u-col span="2" text-align="center">
  83. <view><image src="/static/right.png" class="arr-icon" @click="nextItem"></image></view>
  84. </u-col>
  85. </u-row>
  86. </view>
  87. </view>
  88. </view>
  89. <u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs>
  90. <view class="course-list" v-show="tabCurrent==0">
  91. <navigator hover-class="none" class="item" v-for="(item,index) in list1" :key="index" :url="'/pages3/course/detail?id='+item.goodsId">
  92. <view class="img">
  93. <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
  94. <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
  95. </view>
  96. <view class="text">
  97. <view class="title">{{item.goodsName}}</view>
  98. <view class="desc">
  99. <view class="left">
  100. {{item.classHours}}
  101. <text>学时</text>
  102. </view>
  103. <view class="right">¥ {{toFixed(item.standPrice)}}</view>
  104. </view>
  105. </view>
  106. </navigator>
  107. </view>
  108. <view class="course-list" v-show="tabCurrent==1">
  109. <navigator hover-class="none" class="item" v-for="(item,index) in list2" :key="index" :url="'/pages2/bank/detail?id='+item.goodsId">
  110. <view class="img">
  111. <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
  112. <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
  113. </view>
  114. <view class="text">
  115. <view class="title">{{item.goodsName}}</view>
  116. <view class="desc">
  117. <view class="left" v-if="false">
  118. {{item.classHours}}
  119. <text>学时</text>
  120. </view>
  121. <view class="right">¥ {{toFixed(item.standPrice)}}</view>
  122. </view>
  123. </view>
  124. </navigator>
  125. </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import { mapGetters, mapActions } from 'vuex';
  131. import { websocket } from '@/common/socket.js';
  132. import {socket_url} from '@/common/request.js';
  133. export default {
  134. components: {},
  135. data() {
  136. return {
  137. infoNums:0,
  138. list:[],
  139. tabCurrent:0,
  140. date:['日','一','二','三','四','五','六'],
  141. date_num: [],
  142. current:0,
  143. indicatorDots: true,
  144. autoplay: true,
  145. interval: 2000,
  146. duration: 500,
  147. swiperHeight:0,
  148. nearByDay:'', //距离最近一天考试
  149. menu: [{
  150. name: '推荐课程',
  151. }, {
  152. name: '推荐题库',
  153. }],
  154. goodsIndex: 0,
  155. goodsItem: 0,
  156. workList: [],
  157. workTextList: [],
  158. planGoodsList: [],
  159. paramList: [
  160. {
  161. pageNum: 1,
  162. pageSize: 10,
  163. total: 0,
  164. showStatus: 0,
  165. goodsType:1
  166. },
  167. {
  168. pageNum: 1,
  169. pageSize: 10,
  170. total: 0,
  171. showStatus: 0,
  172. goodsType:2
  173. }
  174. ],
  175. list1: [],
  176. list2: [],
  177. isLogin:false,
  178. isOld:false
  179. };
  180. },
  181. onPullDownRefresh() {},
  182. async onLoad(option) {
  183. this.courseList();
  184. this.bankList();
  185. this.getAdvertising();
  186. if(this.$method.isLogin()) {
  187. try {
  188. await this.getUserInfo()
  189. // websocket.sokcet(socket_url+this.userInfo.userId+'-'+this.$method.getRandomString(6))
  190. websocket.sokcet(socket_url+this.userInfo.userAccount)
  191. }catch(err) {
  192. }
  193. } else {
  194. if(uni.getStorageSync('needToLogin')) {
  195. uni.removeStorageSync('needToLogin');
  196. uni.navigateTo({
  197. url:'/pages/login/login'
  198. })
  199. }
  200. }
  201. this.init()
  202. },
  203. onShow() {
  204. if (uni.getStorageSync('updateHome')){
  205. this.init()
  206. uni.removeStorageSync('updateHome'); //消费首页刷新事件
  207. }
  208. this.appCommonConfig();
  209. if(this.$method.isLogin()){
  210. this.$store.state.allowLoading = false;
  211. this.$api.getinfoAttached().then(res => {
  212. if(res.data.code ===200){
  213. this.infoNums = res.data.data.informSum
  214. const nums = res.data.data.informSum + res.data.data.orderSum + res.data.data.periodSum + res.data.data.planSum + res.data.data.subscribeSum;
  215. this.$store.commit('tabNum', nums);
  216. }
  217. })
  218. this.$store.state.allowLoading = true;
  219. }else{
  220. this.$store.commit('tabNum', 0);
  221. }
  222. },
  223. onShareAppMessage(res) {
  224. var self = this;
  225. return {
  226. title: '中正',
  227. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  228. };
  229. },
  230. methods: {
  231. ...mapActions(['getUserInfo','appCommonConfig']),
  232. toFixed(number) {
  233. if(number > 0) {
  234. return number.toFixed(2)
  235. } else {
  236. return '0.00'
  237. }
  238. },
  239. /**
  240. * @param {Object} swiper
  241. * 点击轮播图
  242. */
  243. swiperClick(swiper) {
  244. if(swiper.jumpType == 1) { //无跳转
  245. return;
  246. } else if(swiper.jumpType == 2) { //url
  247. let url = encodeURIComponent(swiper.jumpUrl)
  248. uni.navigateTo({
  249. url:'/pages/webview/index?url='+swiper.jumpUrl
  250. })
  251. } else if(swiper.jumpType == 3) { //内部接口
  252. uni.navigateTo({
  253. url:swiper.jumpUrl
  254. })
  255. } else if(swiper.jumpType == 4) { //外部接口
  256. uni.navigateToMiniProgram({
  257. appId: swiper.remarks,
  258. path: swiper.jumpUrl,
  259. extraData: {
  260. },
  261. success(res) {
  262. // 打开成功
  263. },
  264. fail(err) {
  265. console.log(err)
  266. // uni.showToast({
  267. // title:'无效的appId,'+err.errMsg,
  268. // icon:'none'
  269. // })
  270. }
  271. })
  272. }
  273. },
  274. /**
  275. * banner图片加载完成
  276. */
  277. imageLoad(e) {
  278. let winW = 750;
  279. let imgW = e.detail.width;
  280. let imgH = e.detail.height;
  281. this.swiperHeight = 750 * imgH / imgW;
  282. },
  283. async getAdvertising() {
  284. await this.advertisingHomeLocation();
  285. await this.advertisingList();
  286. },
  287. getUserSubscribeRecentExam() {
  288. return new Promise(resolve => {
  289. this.$api.getUserSubscribeRecentExam().then(res => {
  290. if(res.data.code == 200) {
  291. if(res.data.data) {
  292. let day = this.$method.timestampToTime(res.data.data.applySiteExamTime,true).replace(/-/g,'/')
  293. let dayTime = day + ' ' + res.data.data.applySiteStartTime
  294. let NowTime = new Date(); //考试时间
  295. let examTime = new Date(dayTime); //考试时间
  296. let t = (examTime.getTime() / 1000) - (NowTime.getTime() / 1000).toFixed(0);
  297. if(t > 0) {
  298. let day = +this.$method.GetRTime(examTime.getTime() / 1000,true)
  299. this.nearByDay = day;
  300. }
  301. }
  302. resolve()
  303. }
  304. console.log(res)
  305. })
  306. })
  307. },
  308. advertisingHomeLocation() {
  309. return new Promise(resolve => {
  310. this.$api.advertisingHomeLocation().then(res => {
  311. this.interval = res.data.data.intervalTime * 1000
  312. resolve()
  313. })
  314. })
  315. },
  316. advertisingList() {
  317. return new Promise(resolve => {
  318. this.$api.advertisingList().then(res => {
  319. this.list = res.data.rows;
  320. resolve()
  321. })
  322. })
  323. },
  324. jumpPage(){
  325. this.$navTo.togo('/pages2/msg/index')
  326. },
  327. //课程
  328. courseList() {
  329. var self = this;
  330. var param = this.paramList[0];
  331. this.$api.goodsList(param).then(res => {
  332. self.paramList[0].total = res.data.total;
  333. self.list1.push.apply(self.list1, res.data.rows);
  334. if (self.list1.length === res.data.total) {
  335. self.paramList[0].showStatus = true;
  336. }
  337. });
  338. },
  339. //题库
  340. bankList() {
  341. var self = this;
  342. var param = this.paramList[1];
  343. this.$api.goodsList(param).then(res => {
  344. self.paramList[1].total = res.data.total;
  345. self.list2.push.apply(self.list2, res.data.rows);
  346. if (self.list2.length === res.data.total) {
  347. self.paramList[1].showStatus = true;
  348. }
  349. });
  350. },
  351. /**
  352. * @param {Object} item
  353. * 跳转课程详情
  354. */
  355. async jumpGoodsDetail(item){
  356. uni.navigateTo({
  357. url:'/pages2/wd/class'
  358. })
  359. // let currentTime = this.$method.getZeroTime();
  360. // if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
  361. // uni.showToast({
  362. // title:'不在学习有效期,不可以学习了哦',
  363. // icon:'none'
  364. // })
  365. // return;
  366. // }
  367. // if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
  368. // uni.showToast({
  369. // title:'不在班级有效期,不能进入学习',
  370. // icon:'none'
  371. // })
  372. // return;
  373. // }
  374. // if(item.learningStatus == 2) {
  375. // uni.showToast({
  376. // title:'开放学习时间待定,不能进入学习',
  377. // icon:'none'
  378. // })
  379. // return;
  380. // }
  381. // if(item.classStatus == 0 ) {
  382. // uni.showToast({
  383. // title:'尚未开班,不能进入学习',
  384. // icon:'none'
  385. // })
  386. // return;
  387. // }
  388. // if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
  389. // uni.showToast({
  390. // title:'不在开放学习时间,不能进入学习',
  391. // icon:'none'
  392. // })
  393. // return;
  394. // }
  395. // if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) && (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
  396. // uni.showModal({
  397. // title:'提示',
  398. // content:'班级已过期,需要重新选班',
  399. // showCancel:false,
  400. // success:() => {
  401. // uni.navigateTo({
  402. // url:"/pages2/wd/class"
  403. // })
  404. // }
  405. // })
  406. // return;
  407. // }
  408. // let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
  409. // if(rebuildStatus == 0) {
  410. // this.$navTo.togo('/pages2/learn/details', {
  411. // gradeId:item.gradeId,
  412. // goodsId: item.goodsId
  413. // })
  414. // return;
  415. // }
  416. // if(item.courseNum == 1 ) {
  417. // this.$api.courseCourseList({
  418. // pageNum:1,
  419. // pageSize:1,
  420. // goodsId:item.goodsId,
  421. // gradeId:item.gradeId
  422. // }).then(res => {
  423. // if(res.data.code == 200) {
  424. // uni.navigateTo({
  425. // url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
  426. // })
  427. // }
  428. // });
  429. // return;
  430. // }
  431. // this.$navTo.togo('/pages2/wd/course', {
  432. // id: item.goodsId,
  433. // gid:item.gradeId
  434. // });
  435. },
  436. /**
  437. * @param {Object} goodsId 商品id
  438. * 查询商品重修状态
  439. */
  440. courseGoodsRebuildStatus(goodsId,gradeId) {
  441. return new Promise(resolve => {
  442. this.$api.courseGoodsRebuildStatus({
  443. goodsId:goodsId,
  444. gradeId:gradeId
  445. }).then(res => {
  446. resolve(res.data.data)
  447. })
  448. })
  449. },
  450. preveItem() {
  451. if (this.goodsIndex > 0) {
  452. this.goodsIndex = this.goodsIndex - 1;
  453. this.planGoodsList =this.workList[this.goodsIndex].goodsVos
  454. this.goodsItem = this.planGoodsList[0];
  455. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo)
  456. }
  457. },
  458. nextItem() {
  459. if (this.goodsIndex < this.workList.length - 1) {
  460. this.goodsIndex = this.goodsIndex + 1;
  461. this.planGoodsList =this.workList[this.goodsIndex].goodsVos
  462. this.goodsItem = this.planGoodsList[0];
  463. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo)
  464. }
  465. },
  466. jumpPlan() {
  467. if (!this.$method.isLogin()) {
  468. this.$navTo.togo('/pages/login/login');
  469. } else {
  470. this.$navTo.togo('/pages2/plan/index', {});
  471. }
  472. },
  473. async init() {
  474. if (!this.$method.isLogin()) {
  475. //未登录
  476. this.date_num = [];
  477. this.workList = [];
  478. this.planGoodsList = [];
  479. this.initDay();
  480. } else {
  481. this.date_num = [];
  482. this.workList = [];
  483. this.planGoodsList = [];
  484. await this.userPlanSeven();
  485. await this.getUserSubscribeRecentExam();
  486. }
  487. },
  488. getMonDate() {
  489. var d = new Date(),
  490. day = d.getDay(),
  491. date = d.getDate();
  492. if (day == 0) return d;
  493. else d.setDate(date - day);
  494. return d;
  495. },
  496. initDay() {
  497. // d是当前星期一的日期对象
  498. var d = this.getMonDate();
  499. var arr = [];
  500. let date = new Date();
  501. let num = date.getDate();
  502. this.date_num = []
  503. for (var i = 0; i < 7; i++) {
  504. let item = { date: d.getDate() };
  505. item.color = 0;
  506. if (d.getDate() == num) {
  507. item.color = 3;
  508. }
  509. this.date_num.push(item);
  510. d.setDate(d.getDate() + 1);
  511. }
  512. },
  513. dealRL(calendarStudyVo){
  514. let self = this
  515. self.date_num = []
  516. let date = new Date();
  517. let num = date.getDate();
  518. let month = date.getMonth() + 1;
  519. let list = [];
  520. for (let j = 0; j < calendarStudyVo.length; j++) {
  521. let item = calendarStudyVo[j];
  522. list = item.dayStudyList;
  523. for (let i = 0; i < list.length; i++) {
  524. let item = list[i];
  525. item.color = 0;
  526. if (item.date == num) {
  527. item.color = 3;
  528. }
  529. if (item.perform == 1) {
  530. item.color = 1;
  531. }
  532. if (item.perform == 2) {
  533. item.color = 2;
  534. }
  535. item.note = item.studyCourseKnob;
  536. if (item.note > 0) {
  537. item.dot = true;
  538. }
  539. self.date_num.push(item);
  540. }
  541. }
  542. },
  543. userPlanSeven() {
  544. return new Promise(resolve => {
  545. let self = this;
  546. this.$api.userPlanSeven().then(result => {
  547. if (result.data.data && result.data.data.length>0) {
  548. self.workList = result.data.data
  549. self.planGoodsList = self.workList[0].goodsVos;
  550. if (self.planGoodsList != null && self.planGoodsList.length > 0) {
  551. self.goodsItem = self.planGoodsList[0];
  552. }
  553. self.dealRL(result.data.data[0].calendarStudyVo)
  554. /* let date = new Date();
  555. let num = date.getDate();
  556. let month = date.getMonth() + 1;
  557. let list = [];
  558. for (let i = 0; i < result.data.data[0].calendarStudyVo.length; i++) {
  559. let item = result.data.data[0].calendarStudyVo[i];
  560. if (item.month == month) {
  561. list = item.dayStudyList;
  562. }
  563. }
  564. for (let i = 0; i < list.length; i++) {
  565. let item = list[i];
  566. item.color = 0;
  567. if (item.date == num) {
  568. item.color = 3;
  569. }
  570. if (item.perform == 1) {
  571. item.color = 1;
  572. }
  573. if (item.perform == 2) {
  574. item.color = 2;
  575. }
  576. item.note = item.studyCourseKnob;
  577. if (item.note > 0) {
  578. item.dot = true;
  579. }
  580. self.date_num.push(item);
  581. } */
  582. } else {
  583. self.initDay();
  584. }
  585. resolve()
  586. });
  587. })
  588. },
  589. swiperChange(e) {
  590. this.current = e.detail.current;
  591. },
  592. tab(e) {
  593. this.tabCurrent = e;
  594. },
  595. updateHomePlan() {
  596. this.$refs.home.init();
  597. },
  598. beforeSwitch(index) {
  599. let that = this;
  600. if (index == 1) {
  601. this.isClick1 = true;
  602. }
  603. if (index == this.current) {
  604. return false;
  605. }
  606. if (!this.$method.isLogin()) {
  607. if (index == 0 || index == 1) {
  608. return true;
  609. } else {
  610. this.$navTo.togo('/pages/login/login');
  611. return false;
  612. }
  613. } else {
  614. if (index == 2) {
  615. this.$refs.refMy.init();
  616. }
  617. return true;
  618. }
  619. }
  620. },
  621. onReachBottom() {},
  622. computed: { ...mapGetters(['userInfo']) }
  623. };
  624. </script>
  625. <style lang="scss" scoped>
  626. .index {
  627. .navbar {
  628. /deep/ .u-navbar-inner {
  629. margin-right:0!important;
  630. }
  631. .slot-wrap {
  632. width:100%;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. image {
  637. width: 178rpx;
  638. height: 31rpx;
  639. }
  640. }
  641. }
  642. .swiper {
  643. width:100%;
  644. position: relative;
  645. .dots {
  646. position:absolute;
  647. left:0;
  648. bottom:8rpx;
  649. width:100%;
  650. display: flex;
  651. justify-content: center;
  652. .dot {
  653. width: 8rpx;
  654. height: 8rpx;
  655. background: #FFFFFF;
  656. border-radius: 50%;
  657. margin:0 4rpx;
  658. transition: all 0.3s;
  659. &.active {
  660. width: 24rpx;
  661. height: 8rpx;
  662. background: #007AFF;
  663. border-radius: 4rpx;
  664. }
  665. }
  666. }
  667. image {
  668. width:100%;
  669. }
  670. }
  671. .content {
  672. overflow: hidden;
  673. padding:0 16rpx 16rpx;
  674. background: rgba(234, 238, 241, 1);
  675. .notice {
  676. background:#fff;
  677. border-radius: 16rpx;
  678. margin-top:16rpx;
  679. overflow: hidden;
  680. &__content {
  681. padding:0 8rpx;
  682. height: 56rpx;
  683. background: linear-gradient(-90deg, rgba(255, 209, 0, 0.3), rgba(255, 255, 255, 0.3));
  684. display: flex;
  685. align-items: center;
  686. }
  687. .icon {
  688. width: 40rpx;
  689. height: 40rpx;
  690. margin-right: 8rpx;
  691. }
  692. .text {
  693. flex:1;
  694. font-size: 24rpx;
  695. color: #333333;
  696. position: relative;
  697. }
  698. .btn {
  699. font-size: 24rpx;
  700. color: #007AFF;
  701. }
  702. }
  703. .date-list {
  704. margin-top:16rpx;
  705. width: 718rpx;
  706. height: 330rpx;
  707. background: #FFFFFF;
  708. border-radius: 16rpx;
  709. padding:18rpx 27rpx;
  710. .title {
  711. font-size: 30rpx;
  712. font-weight: bold;
  713. color: #007AFF;
  714. }
  715. .list {
  716. margin-top:40rpx;
  717. display: flex;
  718. justify-content: space-around;
  719. .item {
  720. .top {
  721. text-align: center;
  722. font-size: 26rpx;
  723. color: rgba(102, 102, 102, 0.6);
  724. }
  725. .bottom {
  726. text-align: center;
  727. line-height: 48rpx;
  728. margin-top:30rpx;
  729. width: 48rpx;
  730. height: 48rpx;
  731. border-radius: 50%;
  732. color:rgba(51, 51, 51, 1);
  733. font-size: 26rpx;
  734. position:relative;
  735. &.red {
  736. color:#FF3B30;
  737. }
  738. &.green {
  739. color:#36C75A;
  740. }
  741. &.blue {
  742. background: #007AFF;
  743. color:#fff;
  744. }
  745. .note {
  746. width: 30rpx;
  747. height: 30rpx;
  748. border: 2rpx solid #FF9500;
  749. border-radius: 50%;
  750. position:absolute;
  751. top:-20rpx;
  752. right:-20rpx;
  753. line-height: 28rpx;
  754. text-align: center;
  755. color:#FF9500;
  756. font-size: 26rpx;
  757. }
  758. .point {
  759. margin:0 auto;
  760. width: 8rpx;
  761. height: 8rpx;
  762. background: #FF9500;
  763. border-radius: 50%;
  764. }
  765. }
  766. }
  767. }
  768. .btns {
  769. margin-top:50rpx;
  770. display: flex;
  771. align-items: center;
  772. justify-content: center;
  773. .left,.right {
  774. width: 40rpx;
  775. height: 40rpx;
  776. }
  777. .center{
  778. width: 440rpx;
  779. height: 56rpx;
  780. background: #FFFFFF;
  781. box-shadow: 0px 0px 9rpx 1rpx rgba(47, 67, 121, 0.1);
  782. border-radius: 28rpx;
  783. color:rgba(255, 149, 0, 1);
  784. line-height: 56rpx;
  785. text-align: center;
  786. font-size: 30rpx;
  787. margin:0 30rpx;
  788. }
  789. }
  790. }
  791. .tabs {
  792. /deep/ .u-tabs {
  793. background:none!important;
  794. }
  795. }
  796. .course-list {
  797. background:#fff;
  798. padding:0 8rpx;
  799. box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  800. border-radius: 16rpx ;
  801. .item {
  802. padding:16rpx 0;
  803. border-bottom:1rpx solid #eeeeee;
  804. display: flex;
  805. .img {
  806. position:relative;
  807. margin-right:10rpx;
  808. border-radius: 16rpx ;
  809. overflow: hidden;
  810. width: 320rpx;
  811. height: 155rpx;
  812. image {
  813. width:100%;
  814. height:100%;
  815. }
  816. .time {
  817. position:absolute;
  818. bottom:0;
  819. right:0;
  820. width: 80rpx;
  821. height: 32rpx;
  822. background: rgba(1, 25, 45, 0.4);
  823. color:#fff;
  824. text-align: center;
  825. line-height: 32rpx;
  826. font-size: 24rpx;
  827. border-radius: 10rpx 0px 10rpx 0px;
  828. }
  829. }
  830. .text {
  831. flex:1;
  832. padding-right:10rpx;
  833. position: relative;
  834. .title {
  835. font-size: 30rpx;
  836. color: #333333;
  837. }
  838. .desc {
  839. margin-top:40rpx;
  840. display: flex;
  841. position: absolute;
  842. bottom: 0;
  843. width: 100%;
  844. .left {
  845. flex:1;
  846. color:#333;
  847. font-size: 26rpx;
  848. text {
  849. font-size: 24rpx;
  850. color:#999;
  851. }
  852. }
  853. .right {
  854. font-size: 24rpx;
  855. font-weight: bold;
  856. color: #FF2D55;
  857. }
  858. }
  859. }
  860. }
  861. }
  862. }
  863. }
  864. .date_dot {
  865. width: 6rpx;
  866. height: 6rpx;
  867. background: #ffcc00;
  868. border-radius: 50%;
  869. margin: 0 auto;
  870. }
  871. .date_note {
  872. border-radius: 50%;
  873. width: 29rpx;
  874. height: 29rpx;
  875. border: 1px solid #ffcc00;
  876. font-size: 18rpx;
  877. color: #ffcc00;
  878. text-align: center;
  879. display: inline-block;
  880. position: absolute;
  881. top: -19rpx;
  882. right: 9rpx;
  883. }
  884. .circle_num {
  885. border-radius: 50%;
  886. width: 29rpx;
  887. height: 29rpx;
  888. border: 1px solid #ffcc00;
  889. font-size: 18rpx;
  890. color: #ffcc00;
  891. text-align: center;
  892. display: inline-block;
  893. margin: 5rpx;
  894. }
  895. .date_num {
  896. width: 14%;
  897. text-align: center;
  898. position: relative;
  899. display: inline-block;
  900. margin-top: 20rpx;
  901. }
  902. .course_title {
  903. color: #2f4379;
  904. box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
  905. border-radius: 28rpx;
  906. width: 100%;
  907. height: 48rpx;
  908. line-height: 48rpx;
  909. overflow: hidden;
  910. text-overflow:ellipsis;
  911. white-space: nowrap;
  912. }
  913. .arr-icon {
  914. width: 40rpx;
  915. height: 40rpx;
  916. }
  917. .date_num_color0 {
  918. color: #32467b;
  919. }
  920. .date_num_color1 {
  921. color: #34c759;
  922. }
  923. .date_num_color2 {
  924. color: #ff3b30;
  925. }
  926. .date_num_color3 {
  927. color: #ffffff;
  928. background-color: #ffcc00;
  929. border-radius: 50%;
  930. width: 40rpx;
  931. height: 40rpx;
  932. display: inline-block;
  933. }
  934. .card_date {
  935. width: 14%;
  936. text-align: center;
  937. color: #7f8caf;
  938. }
  939. page {
  940. background: #ffffff;
  941. font-size: 28rpx;
  942. }
  943. .calendar_card {
  944. width: 100%;
  945. background: #ffffff;
  946. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
  947. border-radius: 22rpx;
  948. margin-top: 16rpx;
  949. padding-bottom: 15rpx;
  950. }
  951. .calendar_card .card_box {
  952. height: 60rpx;
  953. line-height: 60rpx;
  954. margin-left: 20rpx;
  955. }
  956. .calendar_card .t1 {
  957. color: #007AFF;
  958. font-size: 24rpx;
  959. }
  960. .img_more {
  961. width: 26rpx;
  962. height: 26rpx;
  963. }
  964. .flex-d {
  965. display: flex;
  966. flex-direction: column;
  967. justify-content: space-between;
  968. height: 100%;
  969. }
  970. .contentZ {
  971. flex: 1;
  972. overflow-y: auto;
  973. padding-left: 35rpx;
  974. display: flex;
  975. justify-content: space-around;
  976. }
  977. .contentZ::-webkit-scrollbar {
  978. display: none;
  979. }
  980. .fots {
  981. height: 100rpx;
  982. display: flex;
  983. align-items: center;
  984. justify-content: space-around;
  985. border-top: 1rpx solid #eee;
  986. }
  987. .leftBtns {
  988. font-size: 30rpx;
  989. color: #32467b;
  990. font-weight: 500;
  991. }
  992. .right_Btns {
  993. font-size: 30rpx;
  994. color: #fff;
  995. background-color: #32467b;
  996. border-radius: 24rpx;
  997. height: 60rpx;
  998. line-height: 60rpx;
  999. text-align: center;
  1000. padding: 0rpx 23rpx;
  1001. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1002. }
  1003. .lzs {
  1004. width: 31%;
  1005. margin: 0rpx 1%;
  1006. max-width: 31%;
  1007. }
  1008. .tylsz{
  1009. margin-top: 23rpx;
  1010. color: #666;
  1011. font-weight: 400;
  1012. font-size: 24rpx;
  1013. }
  1014. .tylsz:first-child{
  1015. text-align: center;
  1016. }
  1017. .activeStys{
  1018. font-weight: bold;
  1019. color: #32467B;
  1020. }
  1021. </style>