index.vue 47 KB

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