index.vue 47 KB

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