index.vue 45 KB

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