index.vue 47 KB

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