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