index.vue 28 KB

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