index.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781
  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 { 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. // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名
  455. // h.gdzzkj.net
  456. if (!uni.getStorageSync("h5_code")) {
  457. let ask_type =
  458. tenantId == "867735392558919680" ? "h.xyyxt.net" : "h.gdzzkj.net";
  459. location.replace("https://www.xyyxt.net/?ask_type=" + ask_type);
  460. return;
  461. }
  462. }
  463. // #endif
  464. this.getInfo(); // 判断有没有关注公众号
  465. this.isClickOff(); //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
  466. uni.removeStorageSync("goPath");
  467. this.list1 = [];
  468. this.list2 = [];
  469. this.paramList[0].pageNum = 1;
  470. this.paramList[1].pageNum = 1;
  471. this.courseLists();
  472. if (uni.getStorageSync("updateHome")) {
  473. this.init();
  474. uni.removeStorageSync("updateHome"); //消费首页刷新事件
  475. }
  476. this.appCommonConfig({
  477. version,
  478. });
  479. if (this.$method.isLogin()) {
  480. this.$store.state.allowLoading = false;
  481. this.$api.getinfoAttached().then((res) => {
  482. if (res.data.code === 200) {
  483. this.infoNums = res.data.data.informSum;
  484. const nums =
  485. res.data.data.informSum +
  486. res.data.data.orderSum +
  487. res.data.data.periodSum +
  488. res.data.data.planSum +
  489. res.data.data.subscribeSum;
  490. this.$store.commit("tabNum", nums);
  491. }
  492. });
  493. this.$store.state.allowLoading = true;
  494. } else {
  495. this.$store.commit("tabNum", 0);
  496. }
  497. },
  498. onShareAppMessage(res) {
  499. return {
  500. title: "中正",
  501. path:
  502. `/pages/index/index?inviteCode=` + userInfo == null
  503. ? ""
  504. : userInfo.userAccount,
  505. };
  506. },
  507. async onPullDownRefresh() {
  508. // console.log('下拉this.courseId:', this.courseId)
  509. if (this.tabNum == 0) {
  510. this.list1 = [];
  511. this.paramList[0].pageNum = 1;
  512. this.list1 = await this.getGoodsList(
  513. this.courseId,
  514. 0,
  515. this.courSubjectId
  516. );
  517. } else {
  518. this.list2 = [];
  519. this.paramList[1].pageNum = 1;
  520. this.list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId);
  521. }
  522. },
  523. async onReachBottom() {
  524. // console.log('加载this.courseId:', this.courseId, this.list1.length, this.paramList[0].total)
  525. if (this.tabNum == 0) {
  526. if (this.list1.length < this.paramList[0].total) {
  527. this.paramList[0].pageNum++;
  528. let list1 = await this.getGoodsList(
  529. this.courseId,
  530. 0,
  531. this.courSubjectId
  532. );
  533. this.list1.push(...list1);
  534. }
  535. } else {
  536. if (this.list2.length < this.paramList[1].total) {
  537. this.paramList[1].pageNum++;
  538. let list2 = await this.getGoodsList(this.bankId, 1, this.courSubjectId);
  539. this.list1.push(...list2);
  540. }
  541. }
  542. },
  543. computed: {
  544. ...mapGetters(["dictObj", "userInfo", "hideBuyState"]),
  545. opacitys() {
  546. const value =
  547. [1011, 1017, 1025, 1047, 1124].includes(this.$store.state.scene) &&
  548. this.isLogin &&
  549. this.isFollow != 1 &&
  550. this.curClose
  551. ? 1
  552. : 0;
  553. return value;
  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: 100rpx;
  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. .filters {
  1425. width: 100%;
  1426. padding: 0rpx 16rpx;
  1427. margin-bottom: 32rpx;
  1428. display: flex;
  1429. align-items: center;
  1430. .scroll_view_H {
  1431. width: 100%;
  1432. overflow: hidden;
  1433. white-space: nowrap;
  1434. }
  1435. .filter_item {
  1436. display: inline-block;
  1437. margin-right: 16rpx;
  1438. .name {
  1439. font-size: 24rpx;
  1440. color: #666666;
  1441. padding: 12rpx 16rpx;
  1442. height: 56rpx;
  1443. text-align: center;
  1444. background: #ffffff;
  1445. border-radius: 8rpx;
  1446. &.nactive {
  1447. color: #3f8dfd;
  1448. }
  1449. }
  1450. }
  1451. }
  1452. }
  1453. .my-list {
  1454. margin: 32rpx 0;
  1455. display: flex;
  1456. justify-content: space-between;
  1457. &__item {
  1458. width: 351rpx;
  1459. height: 96rpx;
  1460. position: relative;
  1461. padding: 25rpx 0 0 25rpx;
  1462. font-size: 32rpx;
  1463. &--bank {
  1464. text {
  1465. position: relative;
  1466. z-index: 2;
  1467. color: #00998a;
  1468. }
  1469. }
  1470. &--course {
  1471. text {
  1472. position: relative;
  1473. z-index: 2;
  1474. color: #0062d9;
  1475. }
  1476. }
  1477. image {
  1478. width: 100%;
  1479. height: 100%;
  1480. left: 0;
  1481. top: 0;
  1482. position: absolute;
  1483. z-index: 1;
  1484. }
  1485. }
  1486. }
  1487. }
  1488. .date_dot {
  1489. width: 6rpx;
  1490. height: 6rpx;
  1491. background: #ffcc00;
  1492. border-radius: 50%;
  1493. margin: 0 auto;
  1494. }
  1495. .date_note {
  1496. border-radius: 50%;
  1497. width: 29rpx;
  1498. height: 29rpx;
  1499. border: 1px solid #ffcc00;
  1500. font-size: 18rpx;
  1501. color: #ffcc00;
  1502. text-align: center;
  1503. display: inline-block;
  1504. position: absolute;
  1505. top: -19rpx;
  1506. right: 9rpx;
  1507. }
  1508. .circle_num {
  1509. border-radius: 50%;
  1510. width: 29rpx;
  1511. height: 29rpx;
  1512. border: 1px solid #ffcc00;
  1513. font-size: 18rpx;
  1514. color: #ffcc00;
  1515. text-align: center;
  1516. display: inline-block;
  1517. margin: 5rpx;
  1518. }
  1519. .date_num {
  1520. width: 14%;
  1521. text-align: center;
  1522. position: relative;
  1523. display: inline-block;
  1524. margin-top: 20rpx;
  1525. .items {
  1526. width: 100%;
  1527. }
  1528. }
  1529. .course_title {
  1530. color: #2f4379;
  1531. box-shadow: 0rpx 0rpx 9rpx 1rpx rgba(47, 67, 121, 0.1);
  1532. border-radius: 28rpx;
  1533. width: 100%;
  1534. height: 48rpx;
  1535. line-height: 48rpx;
  1536. overflow: hidden;
  1537. text-overflow: ellipsis;
  1538. white-space: nowrap;
  1539. }
  1540. .arr-icon {
  1541. width: 40rpx;
  1542. height: 40rpx;
  1543. }
  1544. .date_num_color0 {
  1545. color: #32467b;
  1546. }
  1547. .date_num_color1 {
  1548. color: #34c759;
  1549. }
  1550. .date_num_color2 {
  1551. color: #ff3b30;
  1552. }
  1553. .date_num_color3 {
  1554. color: #ffffff;
  1555. background-color: #ffcc00;
  1556. border-radius: 50%;
  1557. width: 40rpx;
  1558. height: 40rpx;
  1559. display: inline-block;
  1560. }
  1561. .card_date {
  1562. width: 14%;
  1563. text-align: center;
  1564. color: #7f8caf;
  1565. }
  1566. .calendar_card {
  1567. width: 100%;
  1568. background: #ffffff;
  1569. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
  1570. border-radius: 22rpx;
  1571. margin-top: 16rpx;
  1572. padding-bottom: 15rpx;
  1573. }
  1574. .calendar_card .card_box {
  1575. height: 60rpx;
  1576. line-height: 60rpx;
  1577. margin-left: 20rpx;
  1578. }
  1579. .calendar_card .t1 {
  1580. color: #007aff;
  1581. font-size: 24rpx;
  1582. }
  1583. .img_more {
  1584. width: 26rpx;
  1585. height: 26rpx;
  1586. }
  1587. .flex-d {
  1588. display: flex;
  1589. flex-direction: column;
  1590. justify-content: space-between;
  1591. height: 100%;
  1592. }
  1593. .contentZ {
  1594. flex: 1;
  1595. overflow-y: auto;
  1596. padding-left: 35rpx;
  1597. display: flex;
  1598. justify-content: space-around;
  1599. }
  1600. .contentZ::-webkit-scrollbar {
  1601. display: none;
  1602. }
  1603. .fots {
  1604. height: 100rpx;
  1605. display: flex;
  1606. align-items: center;
  1607. justify-content: space-around;
  1608. border-top: 1rpx solid #eee;
  1609. }
  1610. .leftBtns {
  1611. font-size: 30rpx;
  1612. color: #32467b;
  1613. font-weight: 500;
  1614. }
  1615. .right_Btns {
  1616. font-size: 30rpx;
  1617. color: #fff;
  1618. background-color: #32467b;
  1619. border-radius: 24rpx;
  1620. height: 60rpx;
  1621. line-height: 60rpx;
  1622. text-align: center;
  1623. padding: 0rpx 23rpx;
  1624. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1625. }
  1626. .lzs {
  1627. width: 31%;
  1628. margin: 0rpx 1%;
  1629. max-width: 31%;
  1630. }
  1631. .tylsz {
  1632. margin-top: 23rpx;
  1633. color: #666;
  1634. font-weight: 400;
  1635. font-size: 24rpx;
  1636. }
  1637. .tylsz:first-child {
  1638. text-align: center;
  1639. }
  1640. .activeStys {
  1641. font-weight: bold;
  1642. color: #32467b;
  1643. }
  1644. .officialsss {
  1645. position: fixed;
  1646. left: 0;
  1647. bottom: 100rpx;
  1648. width: 100%;
  1649. }
  1650. .officials {
  1651. width: 100%;
  1652. height: 104rpx;
  1653. position: fixed;
  1654. bottom: 0;
  1655. left: 0;
  1656. z-index: 999;
  1657. display: flex;
  1658. align-items: center;
  1659. justify-content: center;
  1660. }
  1661. .weixin_official_account {
  1662. position: fixed;
  1663. bottom: 0;
  1664. left: 0;
  1665. display: flex;
  1666. align-items: center;
  1667. // justify-content: space-between;
  1668. width: 718rpx;
  1669. height: 104rpx;
  1670. padding: 0 32rpx;
  1671. margin-left: 16rpx;
  1672. background: #3a3f54;
  1673. border-radius: 16rpx;
  1674. .off_logo {
  1675. width: 48rpx;
  1676. height: 48rpx;
  1677. margin-right: 24rpx;
  1678. }
  1679. .one {
  1680. color: #fff;
  1681. font-size: 24rpx;
  1682. font-weight: 500;
  1683. }
  1684. .two {
  1685. color: #bcbec7;
  1686. font-size: 20rpx;
  1687. }
  1688. .btn {
  1689. position: relative;
  1690. top: 0;
  1691. left: 35rpx;
  1692. width: 128rpx;
  1693. height: 56rpx;
  1694. line-height: 56rpx;
  1695. padding: 0;
  1696. background: linear-gradient(274deg, #408bf6 0%, #40b4f6 100%);
  1697. border-radius: 156rpx;
  1698. overflow: hidden;
  1699. text-align: center;
  1700. font-size: 24rpx;
  1701. color: #fff;
  1702. .official-account {
  1703. position: absolute;
  1704. z-index: 1000;
  1705. right: -9px;
  1706. top: -38px;
  1707. opacity: 0;
  1708. }
  1709. }
  1710. .close_icon {
  1711. width: 40rpx;
  1712. height: 40rpx;
  1713. background: #ffffff;
  1714. opacity: 0.2;
  1715. display: flex;
  1716. align-items: center;
  1717. position: absolute;
  1718. top: 0;
  1719. right: 0;
  1720. color: #fff;
  1721. border-radius: 0rpx 16rpx;
  1722. }
  1723. .icon-close {
  1724. display: flex;
  1725. align-items: center;
  1726. justify-content: center;
  1727. width: 50rpx;
  1728. height: 68rpx;
  1729. font-size: 22rpx;
  1730. color: #7b8284;
  1731. }
  1732. }
  1733. </style>