index.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735
  1. <template>
  2. <view class="index">
  3. <nav-logo :isShowLogo="true"></nav-logo>
  4. <view class="swiper">
  5. <swiper
  6. :indicator-dots="false"
  7. indicator-color="#fff"
  8. indicator-active-color="#007AFF"
  9. :style="{ height: swiperHeight + 'rpx' }"
  10. @change="swiperChange"
  11. :interval="interval"
  12. :duration="duration"
  13. :autoplay="autoplay"
  14. :circular="true"
  15. >
  16. <swiper-item
  17. v-for="(swiper, index) in list"
  18. :key="index"
  19. @click="swiperClick(swiper)"
  20. >
  21. <image
  22. @load="imageLoad"
  23. :src="$method.splitImgHost(swiper.adverUrl)"
  24. mode="widthFix"
  25. ></image>
  26. </swiper-item>
  27. </swiper>
  28. <view class="dots">
  29. <view
  30. class="dot"
  31. :class="{ active: index == current }"
  32. v-for="(swiper, index) in list"
  33. :key="index"
  34. ></view>
  35. </view>
  36. </view>
  37. <view class="content">
  38. <!-- <view class="notice" v-if="infoNums">
  39. <view class="notice__content">
  40. <image src="/static/icon/msg_icon1.png" class="icon"></image>
  41. <view class="text">
  42. 您有{{infoNums}}条新的通知
  43. </view>
  44. <view class="btn" @click="jumpPage">立即查看</view>
  45. </view>
  46. </view>
  47. <view class="my-list">
  48. <view class="my-list__item my-list__item--course" @click="go('course')">
  49. <image src="../../static/mycourse.png"></image>
  50. <text>我的网课</text>
  51. </view>
  52. <view class="my-list__item my-list__item--bank" @click="go('bank')">
  53. <image src="../../static/mybank.png"></image>
  54. <text>我的题库</text>
  55. </view>
  56. </view> -->
  57. <!-- 日历-->
  58. <!-- <view>
  59. <view class="calendar_card">
  60. <view class="card_box">
  61. <u-row gutter="16">
  62. <u-col span="10" >
  63. <view style="height:60rpx;">
  64. <text class="t1" v-if="nearByDay !== '' && nearByDay !== null">距离最近一次考试还剩{{nearByDay}}天</text>
  65. </view>
  66. </u-col>
  67. <u-col offset="1" span="1">
  68. <view @click="jumpPlan"><image src="/static/more.png" class="img_more"></image></view>
  69. </u-col>
  70. </u-row>
  71. </view>
  72. <u-line color="#EEEEEE" />
  73. <view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
  74. <view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
  75. </view>
  76. <view style="width: 100%; display: flex; margin-top: 40rpx; flex-wrap: wrap;">
  77. <view v-for="(item, index) in date_num" :key="index" class="date_num">
  78. <view class="items">
  79. {{ item.date }}
  80. </view>
  81. <view v-if="item.color == 0" class="date_num_color0" v-show="item.date > 0">
  82. {{ item.date }}
  83. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  84. <view v-if="item.dot" class="date_dot"></view>
  85. </view>
  86. <view v-if="item.color == 1" class="date_num_color1">
  87. {{ item.date }}
  88. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  89. <view v-if="item.dot" class="date_dot"></view>
  90. </view>
  91. <view v-if="item.color == 2" class="date_num_color2">
  92. {{ item.date }}
  93. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  94. <view v-if="item.dot" class="date_dot"></view>
  95. </view>
  96. <view v-if="item.color == 3" class="date_num_color3">
  97. {{ item.date }}
  98. <view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
  99. <view v-if="item.dot" class="date_dot"></view>
  100. </view>
  101. </view>
  102. </view>
  103. <view style="width: 100%;margin-top: 20rpx;" v-if="workList.length > 0">
  104. <u-row gutter="16">
  105. <u-col span="2" text-align="center">
  106. <view><image src="/static/left.png" class="arr-icon" @click="preveItem"></image></view>
  107. </u-col>
  108. <u-col span="8" text-align="center">
  109. <view class="course_title" @click="jumpGoodsDetail(goodsItem)">{{ goodsItem.goodsName }}</view>
  110. </u-col>
  111. <u-col span="2" text-align="center">
  112. <view><image src="/static/right.png" class="arr-icon" @click="nextItem"></image></view>
  113. </u-col>
  114. </u-row>
  115. </view>
  116. </view>
  117. </view> -->
  118. <!-- <u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs> -->
  119. <view class="tabs">
  120. <view
  121. v-for="(item, index) in menu"
  122. :key="index"
  123. class="tab_item"
  124. :class="{ nactive: tabNum == index }"
  125. @click="tab(index)"
  126. >{{ item.name }}</view
  127. >
  128. </view>
  129. <view class="filters">
  130. <scroll-view class="scroll_view_H" scroll-x="true">
  131. <template v-if="tabNum == 0 && courseName.length > 1">
  132. <view
  133. v-for="(item, index) in courseName"
  134. :key="index"
  135. class="filter_item"
  136. @click="changeCou(item.recommendId, index)"
  137. >
  138. <view class="name" :class="{ nactive: couIndex == index }">{{
  139. item.name
  140. }}</view>
  141. </view>
  142. </template>
  143. <template v-if="tabNum == 1 && bankName.length > 1">
  144. <view
  145. v-for="(item, index) in bankName"
  146. :key="index"
  147. class="filter_item"
  148. @click="changebank(item.recommendId, index)"
  149. >
  150. <view class="name" :class="{ nactive: bankIndex == index }">{{
  151. item.name
  152. }}</view>
  153. </view>
  154. </template>
  155. </scroll-view>
  156. </view>
  157. <!-- v-if="tabNum == 0" -->
  158. <!-- <view class="filters">
  159. <scroll-view class="scroll_view_H" scroll-x="true" >
  160. <template >
  161. <view v-for="(item, index) in subjectList" :key="index" class="filter_item" @click="changeSub(item.id, index)">
  162. <view class="name" :class="{nactive: subIndex == index}">{{ item.subjectName }}</view>
  163. </view>
  164. </template>
  165. </scroll-view>
  166. </view> -->
  167. <view class="course-list" v-show="tabCurrent == 0">
  168. <template v-if="list1.length">
  169. <!-- hover-class="none" -->
  170. <view
  171. class="list_item"
  172. v-for="(item, index) in list1"
  173. :key="index"
  174. @click="tobuy(item)"
  175. >
  176. <view class="course_content">
  177. <view class="c_title">{{ item.goodsName }}</view>
  178. <view class="c_downs">
  179. <view class="img">
  180. <image
  181. :src="$method.splitImgHost(item.coverUrl, true)"
  182. ></image>
  183. <view class="time" v-if="item.year">{{
  184. item.year ? item.year : ""
  185. }}</view>
  186. </view>
  187. <view class="text">
  188. <view class="desc">
  189. <view class="left">
  190. <view
  191. class="mon_t"
  192. :class="item.standPrice === 0 ? 'free' : ''"
  193. v-if="
  194. !item.specTemplateId ||
  195. (!item.maxPrice && !item.minPrice)
  196. "
  197. >
  198. {{
  199. item.standPrice === 0
  200. ? "免费"
  201. : `¥${item.standPrice}`
  202. }}
  203. </view>
  204. <!-- 范围价格 -->
  205. <view v-else class="mon_t">
  206. <view>{{ item.minPrice }}</view>
  207. <template v-if="item.minPrice != item.maxPrice">
  208. <text>-</text>
  209. <view>{{ item.maxPrice }}</view>
  210. </template>
  211. </view>
  212. <text v-if="item.linePrice" class="sale"> ¥ </text>
  213. <text v-if="item.linePrice" class="price_line"
  214. >&nbsp;{{ item.linePrice }}</text
  215. >
  216. </view>
  217. <view class="right">
  218. <view v-if="!hideBuyState" class="regiser_row"
  219. >立即购买</view
  220. >
  221. </view>
  222. </view>
  223. <view v-if="item.buyUserNum" class="joins">
  224. <!-- <image class="people" src="/static/index/people.png"></image> -->
  225. <!-- 为0时,不显示 -->
  226. <view class="people">{{ item.buyUserNum }}人参与</view>
  227. </view>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. </template>
  233. <template v-else>
  234. <u-empty text="暂无推荐课程" mode="list" margin-top="100"></u-empty>
  235. </template>
  236. </view>
  237. <view class="course-list" v-show="tabCurrent == 1">
  238. <template v-if="list2.length">
  239. <navigator
  240. hover-class="none"
  241. class="list_item"
  242. v-for="(item, index) in list2"
  243. :key="index"
  244. :url="'/pages2/bank/detail?id=' + item.goodsId"
  245. >
  246. <view class="course_content">
  247. <view class="c_title">{{ item.goodsName }}</view>
  248. <view class="c_downs">
  249. <view class="img">
  250. <image
  251. :src="$method.splitImgHost(item.coverUrl, true)"
  252. ></image>
  253. <view class="time" v-if="item.year">{{
  254. item.year ? item.year : ""
  255. }}</view>
  256. </view>
  257. <view class="text">
  258. <view class="desc">
  259. <view class="left">
  260. <view
  261. class="mon_t"
  262. :class="item.standPrice === 0 ? 'free' : ''"
  263. v-if="
  264. !item.specTemplateId ||
  265. (!item.maxPrice && !item.minPrice)
  266. "
  267. >
  268. {{
  269. item.standPrice === 0
  270. ? "免费"
  271. : `¥${item.standPrice}`
  272. }}
  273. </view>
  274. <!-- 范围价格 -->
  275. <view v-else class="mon_t">
  276. <view>{{ item.minPrice }}</view>
  277. <template v-if="item.minPrice != item.maxPrice">
  278. <text>-</text>
  279. <view>{{ item.maxPrice }}</view>
  280. </template>
  281. </view>
  282. <text v-if="item.linePrice" class="sale"> ¥ </text>
  283. <text v-if="item.linePrice" class="price_line"
  284. >&nbsp;{{ item.linePrice }}</text
  285. >
  286. </view>
  287. <view class="right">
  288. <view v-if="!hideBuyState" class="regiser_row"
  289. >立即购买</view
  290. >
  291. </view>
  292. </view>
  293. <view v-if="item.buyUserNum" class="joins">
  294. <!-- 为0时,不显示 -->
  295. <view class="people">{{ item.buyUserNum }}人参与</view>
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. </navigator>
  301. </template>
  302. <template v-else>
  303. <u-empty text="暂无推荐题库" mode="list" margin-top="100"></u-empty>
  304. </template>
  305. </view>
  306. <view class="bom-tip" v-html="config.footerRecordNo"></view>
  307. </view>
  308. <!-- #ifdef MP-WEIXIN -->
  309. <view :style="{ opacity: opacitys }" class="officials">
  310. <view class="weixin_official_account">
  311. <image class="off_logo" src="/static/index/official.png"></image>
  312. <view>
  313. <view class="one">关注 “祥粤学校” 公众号</view>
  314. <view class="two">学习提醒、 报考通知不会错过</view>
  315. </view>
  316. <button type="default" class="btn btn-official">
  317. 去关注
  318. <official-account
  319. class="official-account"
  320. id="official_account"
  321. ></official-account>
  322. </button>
  323. <view class="close_icon">
  324. <u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
  325. </view>
  326. </view>
  327. </view>
  328. <!-- #endif -->
  329. <view class="u-page">
  330. <!-- 所有内容的容器 -->
  331. </view>
  332. <!-- tabbar -->
  333. <myTabbar></myTabbar>
  334. </view>
  335. </template>
  336. <script>
  337. import { mapGetters, mapActions } from "vuex";
  338. import config from "@/common/config";
  339. export default {
  340. data() {
  341. return {
  342. tabNum: 0,
  343. infoNums: 0,
  344. list: [],
  345. tabCurrent: 0,
  346. date: ["日", "一", "二", "三", "四", "五", "六"],
  347. date_num: [],
  348. current: 2,
  349. indicatorDots: true,
  350. autoplay: true,
  351. interval: 2000,
  352. duration: 500,
  353. swiperHeight: 0,
  354. nearByDay: "", //距离最近一天考试
  355. menu: [
  356. {
  357. name: "推荐课程",
  358. },
  359. {
  360. name: "推荐题库",
  361. },
  362. ],
  363. goodsIndex: 0,
  364. goodsItem: 0,
  365. workList: [],
  366. workTextList: [],
  367. planGoodsList: [],
  368. paramList: [
  369. {
  370. pageNum: 1,
  371. pageSize: 10,
  372. total: 0,
  373. // showStatus: 0,
  374. getUserNum: 1, //是否返回商品购买用户数量 1带 0不带 ,会返回个buyUserNum
  375. goodsType: 1,
  376. },
  377. {
  378. pageNum: 1,
  379. pageSize: 10,
  380. total: 0,
  381. // showStatus: 0,
  382. getUserNum: 1,
  383. goodsType: 2,
  384. },
  385. ],
  386. total1: 0,
  387. total2: 0,
  388. list1: [],
  389. list2: [],
  390. isLogin: false,
  391. isOld: false,
  392. current: 0,
  393. showOfficial: false,
  394. // opacity: 1,
  395. isFollow: null, //是否关注过,不是1就是没关注
  396. curClose: true, // 当天时是否关闭过
  397. courseName: [],
  398. bankName: [],
  399. couIndex: 0,
  400. bankIndex: 0,
  401. courseId: "",
  402. bankId: "",
  403. subjectList: [],
  404. subIndex: 0,
  405. courSubjectId: "",
  406. optObj: {},
  407. imgwidth: 0,
  408. imgheight: 0,
  409. };
  410. },
  411. async onLoad(option) {
  412. uni.hideTabBar()
  413. // #ifdef H5
  414. uni.setNavigationBarTitle({
  415. title: this.config.companyName,
  416. });
  417. // #endif
  418. this.isLogin = this.$method.isLogin();
  419. this.dictObj;
  420. this.getAdvertising();
  421. if (this.$method.isLogin()) {
  422. try {
  423. await this.getUserInfo();
  424. } catch (err) {}
  425. } else {
  426. if (uni.getStorageSync("needToLogin")) {
  427. uni.removeStorageSync("needToLogin");
  428. uni.navigateTo({
  429. url: "/pages4/login/login",
  430. });
  431. }
  432. }
  433. this.init();
  434. wx.getSystemInfo({
  435. success: function (res) {
  436. let version = res.SDKVersion;
  437. console.log("该版本号为: ", version);
  438. },
  439. });
  440. },
  441. onShow() {
  442. this.getInfo(); // 判断有没有关注公众号
  443. this.isClickOff(); //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
  444. uni.removeStorageSync("goPath");
  445. this.list1 = [];
  446. this.list2 = [];
  447. this.paramList[0].pageNum = 1;
  448. this.paramList[1].pageNum = 1;
  449. this.courseLists();
  450. if (uni.getStorageSync("updateHome")) {
  451. this.init();
  452. uni.removeStorageSync("updateHome"); //消费首页刷新事件
  453. }
  454. this.appCommonConfig({
  455. version: config.version,
  456. });
  457. if (this.$method.isLogin()) {
  458. this.$store.state.allowLoading = false;
  459. this.$api.getinfoAttached().then((res) => {
  460. if (res.data.code === 200) {
  461. this.infoNums = res.data.data.informSum;
  462. const nums =
  463. res.data.data.informSum +
  464. res.data.data.orderSum +
  465. res.data.data.periodSum +
  466. res.data.data.planSum +
  467. res.data.data.subscribeSum;
  468. this.$store.commit("tabNum", nums);
  469. }
  470. });
  471. this.$store.state.allowLoading = true;
  472. } else {
  473. this.$store.commit("tabNum", 0);
  474. }
  475. },
  476. onShareAppMessage(res) {
  477. return {
  478. title: "中正",
  479. path:
  480. `/pages/index/index?inviteCode=` + userInfo == null
  481. ? ""
  482. : userInfo.userAccount,
  483. };
  484. },
  485. async onPullDownRefresh() {
  486. // console.log('下拉this.courseId:', this.courseId)
  487. if (this.tabNum == 0) {
  488. this.list1 = [];
  489. this.paramList[0].pageNum = 1;
  490. this.list1 = await this.getGoodsList(
  491. this.courseId,
  492. 0,
  493. this.courSubjectId
  494. );
  495. } else {
  496. this.list2 = [];
  497. this.paramList[1].pageNum = 1;
  498. this.list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId);
  499. }
  500. },
  501. async onReachBottom() {
  502. // console.log('加载this.courseId:', this.courseId, this.list1.length, this.paramList[0].total)
  503. if (this.tabNum == 0) {
  504. if (this.list1.length < this.paramList[0].total) {
  505. this.paramList[0].pageNum++;
  506. let list1 = await this.getGoodsList(
  507. this.courseId,
  508. 0,
  509. this.courSubjectId
  510. );
  511. this.list1.push(...list1);
  512. }
  513. } else {
  514. if (this.list2.length < this.paramList[1].total) {
  515. this.paramList[1].pageNum++;
  516. let list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId);
  517. this.list1.push(...list2);
  518. }
  519. }
  520. },
  521. computed: {
  522. ...mapGetters(["dictObj", "userInfo", "hideBuyState", "config"]),
  523. opacitys() {
  524. const value =
  525. [1011, 1017, 1025, 1047, 1124].includes(this.$store.state.scene) &&
  526. this.isLogin &&
  527. this.isFollow != 1 &&
  528. this.curClose
  529. ? 1
  530. : 0;
  531. return value;
  532. },
  533. },
  534. methods: {
  535. ...mapActions(["getUserInfo", "appCommonConfig"]),
  536. tobuy(item) {
  537. if (item.goodsType == 2) {
  538. uni.navigateTo({
  539. url: "/pages2/bank/detail?id=" + item.goodsId,
  540. });
  541. } else {
  542. // 视频、直播 /pages5/liveDetail/index
  543. uni.navigateTo({
  544. url:
  545. "/pages3/course/detail?id=" +
  546. item.goodsId +
  547. "&goodsType=" +
  548. item.goodsType,
  549. });
  550. }
  551. },
  552. getInfo() {
  553. if (!this.$method.isLogin()) {
  554. return;
  555. }
  556. // /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
  557. this.$api.getInfo({ fromPlat: 1 }).then((res) => {
  558. if (res.data.code == 200) {
  559. this.$store.state.userInfo = res.data.data;
  560. this.isFollow = res.data.data.userFollowWx; // 不是1就是没关注
  561. }
  562. });
  563. },
  564. // 每天最多显示1次;当天学员关闭弹窗后,无需再显示
  565. isClickOff() {
  566. //当天23:59:59秒 转换成的毫秒数
  567. const end = new Date(
  568. new Date(new Date().toLocaleDateString()).getTime() +
  569. 24 * 60 * 60 * 1000 -
  570. 1
  571. ).getTime();
  572. const start = new Date().getTime(); //当前时间的毫秒数
  573. if (uni.getStorageSync("endTime")) {
  574. //首先判断本地有没有存入当天23:59:59秒的毫秒数
  575. if (start > uni.getStorageSync("endTime")) {
  576. //当前时间毫秒数大于当天23:59:59秒
  577. this.curClose = true;
  578. uni.removeStorageSync("curClose");
  579. uni.removeStorageSync("endTime");
  580. } else {
  581. this.curClose = uni.getStorageSync("curClose") ? false : true;
  582. }
  583. } else {
  584. uni.setStorageSync("endTime", end); //存入当天晚上23:59:59秒的毫秒数
  585. }
  586. },
  587. closeOff() {
  588. this.curClose = false;
  589. uni.setStorageSync("curClose", "1");
  590. },
  591. toFixed(number) {
  592. if (number > 0) {
  593. return number.toFixed(2);
  594. } else {
  595. return "0.00";
  596. }
  597. },
  598. /**
  599. * @param {Object} swiper
  600. * 点击轮播图
  601. */
  602. swiperClick(swiper) {
  603. if (swiper.jumpType == 1) {
  604. //无跳转
  605. return;
  606. } else if (swiper.jumpType == 2) {
  607. //url
  608. let url = encodeURIComponent(swiper.jumpUrl);
  609. uni.navigateTo({
  610. url: "/pages/webview/index?url=" + swiper.jumpUrl,
  611. });
  612. } else if (swiper.jumpType == 3) {
  613. //内部接口
  614. const { jumpUrl } = swiper;
  615. const map = [
  616. "pages/index/index",
  617. "pages/course/index",
  618. "pages/learn/index",
  619. "pages/questionBank/index",
  620. "pages/wd/index",
  621. "pages/information/index"
  622. ];
  623. const isSwitch = map.find((e) => jumpUrl.includes(e));
  624. // tab页
  625. if (isSwitch) {
  626. // 解决携带参数问题
  627. uni.reLaunch({
  628. url: jumpUrl,
  629. });
  630. return;
  631. }
  632. uni.navigateTo({
  633. url: jumpUrl,
  634. });
  635. } else if (swiper.jumpType == 4) {
  636. //外部接口
  637. uni.navigateToMiniProgram({
  638. appId: swiper.remarks,
  639. path: swiper.jumpUrl,
  640. extraData: {},
  641. success(res) {
  642. // 打开成功
  643. },
  644. fail(err) {
  645. // console.log(err)
  646. },
  647. });
  648. }
  649. },
  650. /**
  651. * banner图片加载完成
  652. */
  653. imageLoad(e) {
  654. let winW = 750;
  655. let imgW = e.detail.width;
  656. let imgH = e.detail.height;
  657. this.swiperHeight = (750 * imgH) / imgW;
  658. },
  659. async getAdvertising() {
  660. await this.advertisingHomeLocation();
  661. await this.getLocation();
  662. // await this.advertisingList();
  663. },
  664. getUserSubscribeRecentExam() {
  665. return new Promise((resolve) => {
  666. this.$api.getUserSubscribeRecentExam().then((res) => {
  667. if (res.data.code == 200) {
  668. if (res.data.data) {
  669. let day = this.$method
  670. .timestampToTime(res.data.data.applySiteExamTime, true)
  671. .replace(/-/g, "/");
  672. let dayTime = day + " " + res.data.data.applySiteStartTime;
  673. let NowTime = new Date(); //考试时间
  674. let examTime = new Date(dayTime); //考试时间
  675. let t =
  676. examTime.getTime() / 1000 -
  677. (NowTime.getTime() / 1000).toFixed(0);
  678. if (t > 0) {
  679. let day = +this.$method.GetRTime(
  680. examTime.getTime() / 1000,
  681. true
  682. );
  683. this.nearByDay = day;
  684. }
  685. }
  686. resolve();
  687. }
  688. });
  689. });
  690. },
  691. advertisingHomeLocation() {
  692. return new Promise((resolve) => {
  693. this.$api.advertisingHomeLocation().then((res) => {
  694. this.interval = res.data.data.intervalTime * 1000;
  695. resolve();
  696. });
  697. });
  698. },
  699. getLocation() {
  700. this.$api
  701. .advertisingLocation({
  702. platform: 1,
  703. status: 1,
  704. locationKey: "home-banner",
  705. })
  706. .then((res) => {
  707. if (res.data.code == 200) {
  708. let locationId =
  709. (res.data.data && res.data.data[0].locationId) || 1;
  710. console.log("locationId:", locationId);
  711. this.advertisingList(locationId);
  712. }
  713. });
  714. },
  715. advertisingList(locationId) {
  716. // return new Promise(resolve => {
  717. this.$api.advertisingList({ locationId: locationId }).then((res) => {
  718. this.list = res.data.rows;
  719. // resolve()
  720. });
  721. // })
  722. },
  723. jumpPage() {
  724. this.$navTo.togo("/pages4/msg/index");
  725. },
  726. go(type) {
  727. if (!this.$method.isLogin()) {
  728. if (type == "course") {
  729. uni.setStorageSync("goPath", "course");
  730. } else if (type == "bank") {
  731. uni.setStorageSync("goPath", "bank");
  732. }
  733. this.$navTo.togo("/pages4/login/login");
  734. } else {
  735. if (type == "course") {
  736. uni.navigateTo({
  737. url: "/pages2/wd/class",
  738. });
  739. } else if (type == "bank") {
  740. this.$method.checkLock("bank").then((res) => {
  741. uni.navigateTo({
  742. url: "/pages2/wd/question_bank",
  743. });
  744. });
  745. }
  746. }
  747. },
  748. async changeCou(recommendId, index) {
  749. this.couIndex = index;
  750. this.courseId = recommendId;
  751. this.paramList[0].pageNum = 1;
  752. this.list1 = [];
  753. let list1 = await this.getGoodsList(recommendId, 0, this.courSubjectId);
  754. this.list1.push(...list1);
  755. },
  756. async changebank(recommendId, index) {
  757. this.bankIndex = index;
  758. this.bankId = recommendId;
  759. this.paramList[1].pageNum = 1;
  760. this.list2 = [];
  761. let list2 = await this.getGoodsList(recommendId, 1, this.courSubjectId);
  762. this.list2.push(...list2);
  763. },
  764. async changeSub(subjectId, index) {
  765. // console.log('subjectId, index:', subjectId, index, 'this.courseId:', this.courseId, 'this.bankId:', this.bankId)
  766. this.subIndex = index;
  767. this.courSubjectId = subjectId;
  768. this.paramList[this.tabNum].pageNum = 1;
  769. if (this.tabNum == 0) {
  770. this.list1 = [];
  771. let list1 = await this.getGoodsList(this.courseId, 0, subjectId);
  772. this.list1.push(...list1);
  773. } else {
  774. this.list2 = [];
  775. let list2 = await this.getGoodsList(this.bankId, 1, subjectId);
  776. this.list2.push(...list2);
  777. }
  778. },
  779. //课程
  780. courseLists() {
  781. // var param = this.paramList[0];
  782. // /app/common/goods/list
  783. this.$http({
  784. url: "/app/common/activity/recommend/list",
  785. method: "get",
  786. data: {
  787. platform: 1,
  788. status: 1,
  789. },
  790. noToken: true,
  791. }).then(async (res) => {
  792. if (res.data.code == 200) {
  793. let list = res.data.rows || [];
  794. //课程
  795. this.courseName = list
  796. .filter((x) => x.type == 1)
  797. .sort((a, b) => a.sort - b.sort)
  798. .map((x) => {
  799. return {
  800. name: x.name,
  801. recommendId: x.recommendId,
  802. };
  803. });
  804. // console.log('couIndex', this.couIndex, this.courseName)
  805. //题库
  806. this.bankName = list
  807. .filter((x) => x.type == 2)
  808. .sort((a, b) => a.sort - b.sort)
  809. .map((x) => {
  810. return {
  811. name: x.name,
  812. recommendId: x.recommendId,
  813. };
  814. });
  815. if (this.courseName.length) {
  816. let courseId = "";
  817. if (this.courseId) {
  818. courseId = this.courseId;
  819. } else {
  820. courseId = this.courseName[0].recommendId;
  821. this.courseId = this.courseName[0].recommendId;
  822. }
  823. // console.log('courseId:', courseId)
  824. this.getSubjectList(courseId);
  825. let list1 = await this.getGoodsList(courseId, 0, "");
  826. this.list1.push(...list1);
  827. }
  828. if (this.bankName.length) {
  829. let bankId = "";
  830. if (this.bankId) {
  831. bankId = this.bankId;
  832. } else {
  833. bankId = this.bankName[0].recommendId;
  834. this.bankId = this.bankName[0].recommendId;
  835. }
  836. let list2 = await this.getGoodsList(bankId, 1, "");
  837. this.list2.push(...list2);
  838. }
  839. }
  840. });
  841. },
  842. getGoodsList(recommendId, num, subjectId) {
  843. return new Promise((resolve, reject) => {
  844. let params = {
  845. pageNum: this.paramList[num].pageNum,
  846. pageSize: this.paramList[num].pageSize,
  847. recommendId: recommendId,
  848. };
  849. subjectId && (params.subjectId = subjectId);
  850. // console.log('params:', params)
  851. this.$http({
  852. url: `/app/common/activity/recommend/goodsList`,
  853. method: "get",
  854. data: params,
  855. noToken: true,
  856. }).then((res) => {
  857. if (res.data.code == 200) {
  858. this.paramList[num].total = res.data.total;
  859. resolve(res.data.rows);
  860. }
  861. });
  862. });
  863. },
  864. getSubjectList(recommendId) {
  865. this.$http({
  866. url: `/app/common/activity/recommend/subjectList`,
  867. method: "get",
  868. data: {
  869. recommendId: recommendId,
  870. },
  871. noToken: true,
  872. }).then((res) => {
  873. if (res.data.code == 200) {
  874. let data = res.data.data || [];
  875. this.subjectList = [{ id: "", subjectName: "全部" }, ...data];
  876. // console.log('this.subjectList:', this.subjectList)
  877. }
  878. });
  879. },
  880. /**
  881. * @param {Object} item
  882. * 跳转课程详情
  883. */
  884. async jumpGoodsDetail(item) {
  885. uni.navigateTo({
  886. url: "/pages2/wd/class",
  887. });
  888. },
  889. /**
  890. * @param {Object} goodsId 商品id
  891. * 查询商品重修状态
  892. */
  893. courseGoodsRebuildStatus(goodsId, gradeId) {
  894. return new Promise((resolve) => {
  895. this.$api
  896. .courseGoodsRebuildStatus({
  897. goodsId: goodsId,
  898. gradeId: gradeId,
  899. })
  900. .then((res) => {
  901. resolve(res.data.data);
  902. });
  903. });
  904. },
  905. preveItem() {
  906. if (this.goodsIndex > 0) {
  907. this.goodsIndex = this.goodsIndex - 1;
  908. this.planGoodsList = this.workList[this.goodsIndex].goodsVos;
  909. this.goodsItem = this.planGoodsList[0];
  910. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo);
  911. }
  912. },
  913. nextItem() {
  914. if (this.goodsIndex < this.workList.length - 1) {
  915. this.goodsIndex = this.goodsIndex + 1;
  916. this.planGoodsList = this.workList[this.goodsIndex].goodsVos;
  917. this.goodsItem = this.planGoodsList[0];
  918. this.dealRL(this.workList[this.goodsIndex].calendarStudyVo);
  919. }
  920. },
  921. jumpPlan() {
  922. if (!this.$method.isLogin()) {
  923. this.$navTo.togo("/pages4/login/login");
  924. } else {
  925. this.$navTo.togo("/pages2/plan/index", {});
  926. }
  927. },
  928. async init() {
  929. if (!this.$method.isLogin()) {
  930. //未登录
  931. this.date_num = [];
  932. this.workList = [];
  933. this.planGoodsList = [];
  934. this.initDay();
  935. } else {
  936. this.date_num = [];
  937. this.workList = [];
  938. this.planGoodsList = [];
  939. await this.userPlanSeven();
  940. await this.getUserSubscribeRecentExam();
  941. }
  942. },
  943. getMonDate() {
  944. var d = new Date(),
  945. day = d.getDay(),
  946. date = d.getDate();
  947. if (day == 0) return d;
  948. else d.setDate(date - day);
  949. return d;
  950. },
  951. initDay() {
  952. // d是当前星期一的日期对象
  953. var d = this.getMonDate();
  954. var arr = [];
  955. let date = new Date();
  956. let num = date.getDate();
  957. this.date_num = [];
  958. for (var i = 0; i < 7; i++) {
  959. let item = { date: d.getDate() };
  960. item.color = 0;
  961. if (d.getDate() == num) {
  962. item.color = 3;
  963. }
  964. this.date_num.push(item);
  965. d.setDate(d.getDate() + 1);
  966. }
  967. },
  968. dealRL(calendarStudyVo) {
  969. let self = this;
  970. self.date_num = [];
  971. let date = new Date();
  972. let num = date.getDate();
  973. let month = date.getMonth() + 1;
  974. let list = [];
  975. for (let j = 0; j < calendarStudyVo.length; j++) {
  976. let item = calendarStudyVo[j];
  977. list = item.dayStudyList;
  978. for (let i = 0; i < list.length; i++) {
  979. let item = list[i];
  980. item.color = 0;
  981. if (item.date == num) {
  982. item.color = 3;
  983. }
  984. if (item.perform == 1) {
  985. item.color = 1;
  986. }
  987. if (item.perform == 2) {
  988. item.color = 2;
  989. }
  990. item.note = item.studyCourseKnob;
  991. if (item.note > 0) {
  992. item.dot = true;
  993. }
  994. self.date_num.push(item);
  995. }
  996. }
  997. },
  998. userPlanSeven() {
  999. return new Promise((resolve) => {
  1000. let self = this;
  1001. this.$api.userPlanSeven().then((result) => {
  1002. if (result.data.data && result.data.data.length > 0) {
  1003. self.workList = result.data.data;
  1004. self.planGoodsList = self.workList[0].goodsVos;
  1005. if (self.planGoodsList != null && self.planGoodsList.length > 0) {
  1006. self.goodsItem = self.planGoodsList[0];
  1007. }
  1008. self.dealRL(result.data.data[0].calendarStudyVo);
  1009. } else {
  1010. self.initDay();
  1011. }
  1012. resolve();
  1013. });
  1014. });
  1015. },
  1016. swiperChange(e) {
  1017. this.current = e.detail.current;
  1018. },
  1019. tab(e) {
  1020. this.tabCurrent = e;
  1021. this.tabNum = e;
  1022. this.paramList[this.tabNum].pageNum = 1;
  1023. if (e == 0) {
  1024. this.list1 = [];
  1025. } else {
  1026. this.list2 = [];
  1027. }
  1028. this.courseLists();
  1029. // let recommendId = e == 0 ? this.courseId : this.bankId
  1030. // this.getSubjectList(recommendId)
  1031. },
  1032. updateHomePlan() {
  1033. this.$refs.home.init();
  1034. },
  1035. beforeSwitch(index) {
  1036. let that = this;
  1037. if (index == 1) {
  1038. this.isClick1 = true;
  1039. }
  1040. if (index == this.current) {
  1041. return false;
  1042. }
  1043. if (!this.$method.isLogin()) {
  1044. if (index == 0 || index == 1) {
  1045. return true;
  1046. } else {
  1047. this.$navTo.togo("/pages4/login/login");
  1048. return false;
  1049. }
  1050. } else {
  1051. if (index == 2) {
  1052. this.$refs.refMy.init();
  1053. }
  1054. return true;
  1055. }
  1056. },
  1057. },
  1058. };
  1059. </script>
  1060. <style>
  1061. page {
  1062. background: #eaeef1;
  1063. }
  1064. </style>
  1065. <style lang="scss" scoped>
  1066. @mixin threeDot {
  1067. overflow: hidden;
  1068. text-overflow: ellipsis;
  1069. white-space: nowrap;
  1070. }
  1071. .index {
  1072. padding-bottom: 110rpx;
  1073. .swiper {
  1074. width: 100%;
  1075. position: relative;
  1076. .dots {
  1077. position: absolute;
  1078. left: 0;
  1079. bottom: 8rpx;
  1080. width: 100%;
  1081. display: flex;
  1082. justify-content: center;
  1083. .dot {
  1084. width: 8rpx;
  1085. height: 8rpx;
  1086. background: #ffffff;
  1087. border-radius: 50%;
  1088. margin: 0 4rpx;
  1089. transition: all 0.3s;
  1090. &.active {
  1091. width: 24rpx;
  1092. height: 8rpx;
  1093. background: #007aff;
  1094. border-radius: 4rpx;
  1095. }
  1096. }
  1097. }
  1098. image {
  1099. width: 100%;
  1100. }
  1101. }
  1102. .content {
  1103. overflow: hidden;
  1104. padding: 0 16rpx;
  1105. background: rgba(234, 238, 241, 1);
  1106. padding-bottom: 30rpx;
  1107. .notice {
  1108. background: #fff;
  1109. border-radius: 16rpx;
  1110. margin-top: 32rpx;
  1111. overflow: hidden;
  1112. &__content {
  1113. padding: 0 8rpx;
  1114. height: 56rpx;
  1115. background: linear-gradient(
  1116. -90deg,
  1117. rgba(255, 209, 0, 0.3),
  1118. rgba(255, 255, 255, 0.3)
  1119. );
  1120. display: flex;
  1121. align-items: center;
  1122. }
  1123. .icon {
  1124. width: 40rpx;
  1125. height: 40rpx;
  1126. margin-right: 8rpx;
  1127. }
  1128. .text {
  1129. flex: 1;
  1130. font-size: 24rpx;
  1131. color: #333333;
  1132. position: relative;
  1133. }
  1134. .btn {
  1135. font-size: 24rpx;
  1136. color: #007aff;
  1137. }
  1138. }
  1139. .date-list {
  1140. margin-top: 16rpx;
  1141. width: 718rpx;
  1142. height: 330rpx;
  1143. background: #ffffff;
  1144. border-radius: 16rpx;
  1145. padding: 18rpx 27rpx;
  1146. .title {
  1147. font-size: 30rpx;
  1148. font-weight: bold;
  1149. color: #007aff;
  1150. }
  1151. .list {
  1152. margin-top: 40rpx;
  1153. display: flex;
  1154. justify-content: space-around;
  1155. .item {
  1156. .top {
  1157. text-align: center;
  1158. font-size: 26rpx;
  1159. color: rgba(102, 102, 102, 0.6);
  1160. }
  1161. .bottom {
  1162. text-align: center;
  1163. line-height: 48rpx;
  1164. margin-top: 30rpx;
  1165. width: 48rpx;
  1166. height: 48rpx;
  1167. border-radius: 50%;
  1168. color: rgba(51, 51, 51, 1);
  1169. font-size: 26rpx;
  1170. position: relative;
  1171. &.red {
  1172. color: #ff3b30;
  1173. }
  1174. &.green {
  1175. color: #36c75a;
  1176. }
  1177. &.blue {
  1178. background: #007aff;
  1179. color: #fff;
  1180. }
  1181. .note {
  1182. width: 30rpx;
  1183. height: 30rpx;
  1184. border: 2rpx solid #ff9500;
  1185. border-radius: 50%;
  1186. position: absolute;
  1187. top: -20rpx;
  1188. right: -20rpx;
  1189. line-height: 28rpx;
  1190. text-align: center;
  1191. color: #ff9500;
  1192. font-size: 26rpx;
  1193. }
  1194. .point {
  1195. margin: 0 auto;
  1196. width: 8rpx;
  1197. height: 8rpx;
  1198. background: #ff9500;
  1199. border-radius: 50%;
  1200. }
  1201. }
  1202. }
  1203. }
  1204. .btns {
  1205. margin-top: 50rpx;
  1206. display: flex;
  1207. align-items: center;
  1208. justify-content: center;
  1209. .left,
  1210. .right {
  1211. width: 40rpx;
  1212. height: 40rpx;
  1213. }
  1214. .center {
  1215. width: 440rpx;
  1216. height: 56rpx;
  1217. background: #ffffff;
  1218. box-shadow: 0px 0px 9rpx 1rpx rgba(47, 67, 121, 0.1);
  1219. border-radius: 28rpx;
  1220. color: rgba(255, 149, 0, 1);
  1221. line-height: 56rpx;
  1222. text-align: center;
  1223. font-size: 30rpx;
  1224. margin: 0 30rpx;
  1225. }
  1226. }
  1227. }
  1228. .tabs {
  1229. width: 100%;
  1230. height: 78rpx;
  1231. display: flex;
  1232. align-items: center;
  1233. justify-content: space-between;
  1234. background-color: #f2f7ff;
  1235. border-radius: 38rpx;
  1236. margin: 34rpx 0rpx 24rpx 0rpx;
  1237. padding: 0rpx 5rpx;
  1238. .tab_item {
  1239. width: 345rpx;
  1240. height: 65rpx;
  1241. line-height: 65rpx;
  1242. font-size: 28rpx;
  1243. font-weight: bold;
  1244. border-radius: 32rpx;
  1245. text-align: center;
  1246. color: #333;
  1247. &.nactive {
  1248. color: #fff;
  1249. background-color: #3577e8;
  1250. }
  1251. }
  1252. }
  1253. .course-list {
  1254. box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  1255. .list_item {
  1256. padding: 24rpx;
  1257. // height: 278rpx;
  1258. background: #ffffff;
  1259. box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1, 99, 235, 0.1);
  1260. border-radius: 24rpx;
  1261. background: #fff;
  1262. margin-bottom: 32rpx;
  1263. display: flex;
  1264. align-items: center;
  1265. .c_title {
  1266. font-size: 32rpx;
  1267. font-weight: bold;
  1268. margin-bottom: 24rpx;
  1269. font-weight: bold;
  1270. color: #222222;
  1271. }
  1272. .c_downs {
  1273. display: flex;
  1274. }
  1275. .img {
  1276. position: relative;
  1277. margin-right: 24rpx;
  1278. border-radius: 16rpx;
  1279. overflow: hidden;
  1280. width: 204rpx;
  1281. height: 120rpx;
  1282. image {
  1283. width: 100%;
  1284. height: 100%;
  1285. }
  1286. .time {
  1287. position: absolute;
  1288. bottom: 0;
  1289. right: 0;
  1290. width: 80rpx;
  1291. height: 32rpx;
  1292. background: rgba(1, 25, 45, 0.4);
  1293. color: #fff;
  1294. text-align: center;
  1295. line-height: 32rpx;
  1296. font-size: 24rpx;
  1297. border-radius: 10rpx 0px 10rpx 0px;
  1298. }
  1299. }
  1300. .text {
  1301. width: 440rpx;
  1302. position: relative;
  1303. display: flex;
  1304. flex-direction: column;
  1305. justify-content: space-between;
  1306. height: 120rpx;
  1307. .joins {
  1308. .people {
  1309. width: 160rpx;
  1310. font-size: 20rpx;
  1311. color: #999999;
  1312. padding: 0rpx 8rpx;
  1313. text-align: center;
  1314. height: 36rpx;
  1315. line-height: 36rpx;
  1316. background: #f6f7fb;
  1317. border-radius: 4px;
  1318. }
  1319. }
  1320. .desc {
  1321. margin-top: 10rpx;
  1322. display: flex;
  1323. align-items: center;
  1324. justify-content: space-between;
  1325. width: 100%;
  1326. .left {
  1327. flex: 1;
  1328. color: #333;
  1329. font-size: 26rpx;
  1330. .mon_t {
  1331. display: flex;
  1332. font-weight: bold;
  1333. color: #fc3f3f;
  1334. font-size: 36rpx;
  1335. view::before {
  1336. content: "¥";
  1337. font-size: 24rpx;
  1338. font-weight: bold;
  1339. }
  1340. }
  1341. .free {
  1342. font-size: 24rpx;
  1343. }
  1344. .sale {
  1345. color: #999999;
  1346. font-size: 24rpx;
  1347. margin-left: 8rpx;
  1348. }
  1349. .price_line {
  1350. color: #999999;
  1351. font-size: 24rpx;
  1352. text-decoration: line-through;
  1353. font-weight: 400;
  1354. }
  1355. }
  1356. .right {
  1357. font-size: 24rpx;
  1358. font-weight: bold;
  1359. .regiser_row {
  1360. width: 144rpx;
  1361. height: 52rpx;
  1362. line-height: 52rpx;
  1363. text-align: center;
  1364. border-radius: 16rpx;
  1365. background-color: #fc3f3f;
  1366. color: #fff;
  1367. font-weight: 500;
  1368. font-size: 26rpx;
  1369. }
  1370. }
  1371. }
  1372. }
  1373. }
  1374. }
  1375. .bom-tip {
  1376. color: #a7b0b8;
  1377. text-align: center;
  1378. padding: 0 30rpx;
  1379. font-size: 26rpx;
  1380. }
  1381. .filters {
  1382. width: 100%;
  1383. padding: 0rpx 16rpx;
  1384. margin-bottom: 32rpx;
  1385. display: flex;
  1386. align-items: center;
  1387. .scroll_view_H {
  1388. width: 100%;
  1389. overflow: hidden;
  1390. white-space: nowrap;
  1391. }
  1392. .filter_item {
  1393. display: inline-block;
  1394. margin-right: 16rpx;
  1395. .name {
  1396. font-size: 24rpx;
  1397. color: #666666;
  1398. padding: 12rpx 16rpx;
  1399. height: 56rpx;
  1400. text-align: center;
  1401. background: #ffffff;
  1402. border-radius: 8rpx;
  1403. &.nactive {
  1404. color: #3f8dfd;
  1405. }
  1406. }
  1407. }
  1408. }
  1409. }
  1410. .my-list {
  1411. margin: 32rpx 0;
  1412. display: flex;
  1413. justify-content: space-between;
  1414. &__item {
  1415. width: 351rpx;
  1416. height: 96rpx;
  1417. position: relative;
  1418. padding: 25rpx 0 0 25rpx;
  1419. font-size: 32rpx;
  1420. &--bank {
  1421. text {
  1422. position: relative;
  1423. z-index: 2;
  1424. color: #00998a;
  1425. }
  1426. }
  1427. &--course {
  1428. text {
  1429. position: relative;
  1430. z-index: 2;
  1431. color: #0062d9;
  1432. }
  1433. }
  1434. image {
  1435. width: 100%;
  1436. height: 100%;
  1437. left: 0;
  1438. top: 0;
  1439. position: absolute;
  1440. z-index: 1;
  1441. }
  1442. }
  1443. }
  1444. }
  1445. .date_dot {
  1446. width: 6rpx;
  1447. height: 6rpx;
  1448. background: #ffcc00;
  1449. border-radius: 50%;
  1450. margin: 0 auto;
  1451. }
  1452. .date_note {
  1453. border-radius: 50%;
  1454. width: 29rpx;
  1455. height: 29rpx;
  1456. border: 1px solid #ffcc00;
  1457. font-size: 18rpx;
  1458. color: #ffcc00;
  1459. text-align: center;
  1460. display: inline-block;
  1461. position: absolute;
  1462. top: -19rpx;
  1463. right: 9rpx;
  1464. }
  1465. .circle_num {
  1466. border-radius: 50%;
  1467. width: 29rpx;
  1468. height: 29rpx;
  1469. border: 1px solid #ffcc00;
  1470. font-size: 18rpx;
  1471. color: #ffcc00;
  1472. text-align: center;
  1473. display: inline-block;
  1474. margin: 5rpx;
  1475. }
  1476. .date_num {
  1477. width: 14%;
  1478. text-align: center;
  1479. position: relative;
  1480. display: inline-block;
  1481. margin-top: 20rpx;
  1482. .items {
  1483. width: 100%;
  1484. }
  1485. }
  1486. .course_title {
  1487. color: #2f4379;
  1488. box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
  1489. border-radius: 28rpx;
  1490. width: 100%;
  1491. height: 48rpx;
  1492. line-height: 48rpx;
  1493. overflow: hidden;
  1494. text-overflow: ellipsis;
  1495. white-space: nowrap;
  1496. }
  1497. .arr-icon {
  1498. width: 40rpx;
  1499. height: 40rpx;
  1500. }
  1501. .date_num_color0 {
  1502. color: #32467b;
  1503. }
  1504. .date_num_color1 {
  1505. color: #34c759;
  1506. }
  1507. .date_num_color2 {
  1508. color: #ff3b30;
  1509. }
  1510. .date_num_color3 {
  1511. color: #ffffff;
  1512. background-color: #ffcc00;
  1513. border-radius: 50%;
  1514. width: 40rpx;
  1515. height: 40rpx;
  1516. display: inline-block;
  1517. }
  1518. .card_date {
  1519. width: 14%;
  1520. text-align: center;
  1521. color: #7f8caf;
  1522. }
  1523. .calendar_card {
  1524. width: 100%;
  1525. background: #ffffff;
  1526. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
  1527. border-radius: 22rpx;
  1528. margin-top: 16rpx;
  1529. padding-bottom: 15rpx;
  1530. }
  1531. .calendar_card .card_box {
  1532. height: 60rpx;
  1533. line-height: 60rpx;
  1534. margin-left: 20rpx;
  1535. }
  1536. .calendar_card .t1 {
  1537. color: #007aff;
  1538. font-size: 24rpx;
  1539. }
  1540. .img_more {
  1541. width: 26rpx;
  1542. height: 26rpx;
  1543. }
  1544. .flex-d {
  1545. display: flex;
  1546. flex-direction: column;
  1547. justify-content: space-between;
  1548. height: 100%;
  1549. }
  1550. .contentZ {
  1551. flex: 1;
  1552. overflow-y: auto;
  1553. padding-left: 35rpx;
  1554. display: flex;
  1555. justify-content: space-around;
  1556. }
  1557. .contentZ::-webkit-scrollbar {
  1558. display: none;
  1559. }
  1560. .fots {
  1561. height: 100rpx;
  1562. display: flex;
  1563. align-items: center;
  1564. justify-content: space-around;
  1565. border-top: 1rpx solid #eee;
  1566. }
  1567. .leftBtns {
  1568. font-size: 30rpx;
  1569. color: #32467b;
  1570. font-weight: 500;
  1571. }
  1572. .right_Btns {
  1573. font-size: 30rpx;
  1574. color: #fff;
  1575. background-color: #32467b;
  1576. border-radius: 24rpx;
  1577. height: 60rpx;
  1578. line-height: 60rpx;
  1579. text-align: center;
  1580. padding: 0rpx 23rpx;
  1581. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1582. }
  1583. .lzs {
  1584. width: 31%;
  1585. margin: 0rpx 1%;
  1586. max-width: 31%;
  1587. }
  1588. .tylsz {
  1589. margin-top: 23rpx;
  1590. color: #666;
  1591. font-weight: 400;
  1592. font-size: 24rpx;
  1593. }
  1594. .tylsz:first-child {
  1595. text-align: center;
  1596. }
  1597. .activeStys {
  1598. font-weight: bold;
  1599. color: #32467b;
  1600. }
  1601. .officialsss {
  1602. position: fixed;
  1603. left: 0;
  1604. bottom: 100rpx;
  1605. width: 100%;
  1606. }
  1607. .officials {
  1608. width: 100%;
  1609. height: 104rpx;
  1610. position: fixed;
  1611. bottom: 0;
  1612. left: 0;
  1613. z-index: 999;
  1614. display: flex;
  1615. align-items: center;
  1616. justify-content: center;
  1617. }
  1618. .weixin_official_account {
  1619. position: fixed;
  1620. bottom: 0;
  1621. left: 0;
  1622. display: flex;
  1623. align-items: center;
  1624. // justify-content: space-between;
  1625. width: 718rpx;
  1626. height: 104rpx;
  1627. padding: 0 32rpx;
  1628. margin-left: 16rpx;
  1629. background: #3a3f54;
  1630. border-radius: 16rpx;
  1631. .off_logo {
  1632. width: 48rpx;
  1633. height: 48rpx;
  1634. margin-right: 24rpx;
  1635. }
  1636. .one {
  1637. color: #fff;
  1638. font-size: 24rpx;
  1639. font-weight: 500;
  1640. }
  1641. .two {
  1642. color: #bcbec7;
  1643. font-size: 20rpx;
  1644. }
  1645. .btn {
  1646. position: relative;
  1647. top: 0;
  1648. left: 35rpx;
  1649. width: 128rpx;
  1650. height: 56rpx;
  1651. line-height: 56rpx;
  1652. padding: 0;
  1653. background: linear-gradient(274deg, #408bf6 0%, #40b4f6 100%);
  1654. border-radius: 156rpx;
  1655. overflow: hidden;
  1656. text-align: center;
  1657. font-size: 24rpx;
  1658. color: #fff;
  1659. .official-account {
  1660. position: absolute;
  1661. z-index: 1000;
  1662. right: -9px;
  1663. top: -38px;
  1664. opacity: 0;
  1665. }
  1666. }
  1667. .close_icon {
  1668. width: 40rpx;
  1669. height: 40rpx;
  1670. background: #ffffff;
  1671. opacity: 0.2;
  1672. display: flex;
  1673. align-items: center;
  1674. position: absolute;
  1675. top: 0;
  1676. right: 0;
  1677. color: #fff;
  1678. border-radius: 0rpx 16rpx;
  1679. }
  1680. .icon-close {
  1681. display: flex;
  1682. align-items: center;
  1683. justify-content: center;
  1684. width: 50rpx;
  1685. height: 68rpx;
  1686. font-size: 22rpx;
  1687. color: #7b8284;
  1688. }
  1689. }
  1690. </style>