index.vue 28 KB

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