index.vue 47 KB

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