index.vue 27 KB

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