index.vue 47 KB

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