index.vue 27 KB

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