index.vue 25 KB

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