index.vue 46 KB

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