index.vue 47 KB

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