index.vue 46 KB

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