index.vue 47 KB

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