index.vue 46 KB

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