index.vue 47 KB

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