index.vue 27 KB

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