index.vue 46 KB

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