index.vue 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  1. <template>
  2. <div class="home">
  3. <header class="header">
  4. <div class="header__header">
  5. <div class="container">
  6. <div class="text-list" v-if="!userInfo">
  7. <a @click="go('/login', { state: 1 })">登录</a>
  8. <a @click="go('/login', { state: 2 })">注册</a>
  9. </div>
  10. <div class="icon-list" v-else>
  11. <!-- <a @click="go('/person-center/my-message')">
  12. <i class="el-icon-message-solid icon"></i>
  13. </a> -->
  14. <el-tooltip
  15. placement="bottom-end"
  16. v-model="msgShow"
  17. :hide-after="0"
  18. manual
  19. popper-class="tooltipStyle"
  20. >
  21. <el-badge
  22. :is-dot="msgCount > 0 ? true : false"
  23. class="item"
  24. style="vertical-align: baseline"
  25. >
  26. <el-button
  27. style="font-size: 20px; padding: 0px"
  28. icon="el-icon-message-solid"
  29. type="text"
  30. @click="go('/person-center/my-message')"
  31. ></el-button>
  32. </el-badge>
  33. <div slot="content" class="dis_plays">
  34. <p style="max-width: 247px">{{ msgData.text }}</p>
  35. <div class="toolbth" @click="newGoToStudy">立即学习</div>
  36. <i
  37. style="font-size: 18px;cursor:pointer;"
  38. class="el-icon-close"
  39. @click="clearMsg"
  40. ></i>
  41. </div>
  42. </el-tooltip>
  43. <el-dropdown @command="handleCommand">
  44. <span class="el-dropdown-link">
  45. <i
  46. class="el-icon-user-solid"
  47. style="
  48. font-size: 20px;
  49. color: #3f8dfd;
  50. cursor: pointer;
  51. margin-left: 20px;
  52. "
  53. @click="go('/person-center/my-course')"
  54. ></i>
  55. </span>
  56. <el-dropdown-menu slot="dropdown">
  57. <el-dropdown-item command="1">我的课程</el-dropdown-item>
  58. <el-dropdown-item command="2">我的题库</el-dropdown-item>
  59. <el-dropdown-item command="3">个人中心</el-dropdown-item>
  60. <el-dropdown-item command="4">退出登录</el-dropdown-item>
  61. </el-dropdown-menu>
  62. </el-dropdown>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="header__body">
  67. <div class="container clearfix">
  68. <a class="logo">
  69. <img
  70. v-if="header.companyLogo"
  71. :src="$tools.splitImgHost(header.companyLogo)"
  72. alt=""
  73. />
  74. <h1 v-else></h1>
  75. </a>
  76. <div class="search">
  77. <div class="search__select">
  78. <select v-model="type">
  79. <option value="1">课程</option>
  80. <option value="2">题库</option>
  81. <option value="6">直播</option>
  82. </select>
  83. </div>
  84. <div class="search__input">
  85. <input
  86. v-model="searchKey"
  87. type="text"
  88. autocomplete="new-password"
  89. />
  90. </div>
  91. <el-button type="primary" @click="search" class="search__btn"
  92. >搜索</el-button
  93. >
  94. </div>
  95. <div
  96. class="contact"
  97. v-show="false"
  98. v-if="header.serviceTel.status == 1"
  99. >
  100. <div class="contact__phone">{{ header.serviceTel.tel }}</div>
  101. <div class="contact__time">
  102. {{ header.serviceTel.time }}
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </header>
  108. <section class="section">
  109. <div class="container">
  110. <div class="tabs">
  111. <template v-for="(item, index) in showNav(header.Nav)">
  112. <a v-if="item.name === '首页'" :key="index" class="tab active"
  113. >首页</a
  114. >
  115. <a
  116. v-if="item.name === '走进祥粤'"
  117. :key="index"
  118. class="tab"
  119. @click="go('/about')"
  120. >走进祥粤</a
  121. >
  122. <a
  123. v-if="item.name === '课程'"
  124. :key="index"
  125. class="tab"
  126. @click="go('/course-list')"
  127. >课程</a
  128. >
  129. <a
  130. v-if="item.name === '题库'"
  131. :key="index"
  132. class="tab"
  133. @click="go('/bank-list')"
  134. >题库</a
  135. >
  136. <a
  137. v-if="item.name === '直播'"
  138. :key="index"
  139. class="tab"
  140. @click="go('/live-list')"
  141. >直播</a
  142. >
  143. </template>
  144. </div>
  145. </div>
  146. <div class="swiper-wrap" :style="{ background: color }">
  147. <div class="container">
  148. <div class="left-box">
  149. <div class="left-box__header">课程导航</div>
  150. <div class="left-box__body">
  151. <div class="bg"></div>
  152. <div class="slide-list">
  153. <div
  154. class="slide-list__item"
  155. v-for="(type, typeItem) in typeList"
  156. :key="'type' + typeItem"
  157. >
  158. <div class="title" @click="goCourse(type)">
  159. {{ type.educationName }}
  160. </div>
  161. <ul class="nav">
  162. <li
  163. v-for="(slideItem, slideIndex) in slideList[typeItem]"
  164. :key="'item' + slideIndex"
  165. @click="goCourse(slideItem)"
  166. >
  167. <div class="text">
  168. <!-- {{ slideItem.projectName }}-{{ slideItem.businessName }} -->
  169. {{ slideItem.aliasName }}
  170. </div>
  171. </li>
  172. </ul>
  173. </div>
  174. </div>
  175. <ul class="list">
  176. <li v-for="(item, index) in typeList" :key="index">
  177. <div class="text">
  178. <div class="text__title" @click="goCourse(item)">
  179. {{ item.educationName }}
  180. </div>
  181. <div class="text__desc">
  182. <a
  183. @click="goCourse(aItem)"
  184. class="item"
  185. v-for="(aItem, aIndex) in item.list"
  186. :key="'aItem' + aIndex"
  187. >
  188. <!-- {{ aItem.projectName }}-{{ aItem.businessName }} -->
  189. {{ aItem.aliasName }}
  190. </a>
  191. </div>
  192. </div>
  193. </li>
  194. </ul>
  195. </div>
  196. </div>
  197. <div class="swiper">
  198. <swiper
  199. v-if="bannerList.length > 0"
  200. ref="mySwiper"
  201. @slideChangeTransitionStart="slideChangeTransitionStart($event)"
  202. class=""
  203. v-bind:options="swiperOptions"
  204. >
  205. <swiper-slide
  206. v-for="(item, index) in bannerList"
  207. v-bind:key="index"
  208. @click.native="swiperJump(item)"
  209. >
  210. <img
  211. :src="$tools.splitImgHost(item.adverUrl, true, 1272)"
  212. alt=""
  213. />
  214. </swiper-slide>
  215. <div class="swiper-pagination" slot="pagination"></div>
  216. <!-- <div class="swiper-button-prev" slot="button-prev"></div>
  217. <div class="swiper-button-next" slot="button-next"></div> -->
  218. </swiper>
  219. </div>
  220. <div class="right-box">
  221. <div class="bg"></div>
  222. <div class="no-login" v-if="!userInfo">
  223. <template v-if="loginType == 1">
  224. <el-form :model="loginForm" ref="loginForm" :rules="loginRules">
  225. <div class="input">
  226. <el-form-item prop="account">
  227. <el-input
  228. autocomplete="new-password"
  229. v-model="loginForm.account"
  230. @keyup.enter.native="login"
  231. placeholder="请输入手机号或身份证号"
  232. ></el-input>
  233. </el-form-item>
  234. </div>
  235. <div class="input">
  236. <el-form-item prop="pwd">
  237. <el-input
  238. autocomplete="new-password"
  239. type="password"
  240. v-model="loginForm.pwd"
  241. placeholder="请输入密码"
  242. @keyup.enter.native="login"
  243. ></el-input>
  244. </el-form-item>
  245. </div>
  246. <el-button
  247. type="primary"
  248. class="submit"
  249. @click="login()"
  250. :loading="isLogin"
  251. >登录</el-button
  252. >
  253. <div class="bottom-text">
  254. <a class="text" @click="loginType = 2">手机验证码登录</a>
  255. <a class="text" @click="go('/login?state=2')">注册</a>
  256. </div>
  257. <div class="dis_flex">
  258. <div class="dis_flex_wxloginImg">
  259. <img src="@/assets/wx.png" alt="" @click="wxLoginFunc" />
  260. </div>
  261. </div>
  262. </el-form>
  263. </template>
  264. <template v-if="loginType == 2">
  265. <el-form
  266. :model="loginSmsForm"
  267. ref="loginSmsForm"
  268. :rules="loginSmsRules"
  269. >
  270. <div class="input">
  271. <el-form-item prop="tel">
  272. <el-input
  273. autocomplete="new-password"
  274. v-model="loginSmsForm.tel"
  275. placeholder="请输入手机号"
  276. ></el-input>
  277. </el-form-item>
  278. </div>
  279. <div class="input">
  280. <el-form-item prop="code">
  281. <el-input
  282. autocomplete="new-password"
  283. v-model="loginSmsForm.code"
  284. placeholder="请输入验证码"
  285. >
  286. <span slot="suffix" @click="getLoginSms" class="btn">{{
  287. countDown == 0
  288. ? "获取验证码"
  289. : `${countDown}秒重新获取`
  290. }}</span>
  291. </el-input>
  292. </el-form-item>
  293. </div>
  294. <el-button
  295. type="primary"
  296. class="submit"
  297. :loading="isloginSms"
  298. @click="loginSms()"
  299. >登录</el-button
  300. >
  301. <div class="bottom-text">
  302. <a class="text" @click="loginType = 1">账号密码登录</a>
  303. <a class="text" @click="go('/login?state=2')">注册</a>
  304. </div>
  305. <div class="dis_flex">
  306. <div class="dis_flex_wxloginImg">
  307. <img src="@/assets/wx.png" alt="" @click="wxLoginFunc" />
  308. </div>
  309. </div>
  310. </el-form>
  311. </template>
  312. </div>
  313. <div class="has-login" v-else>
  314. <div class="userinfo">
  315. <img src="@/assets/ava.png" class="avatar" alt="" />
  316. <div class="nickname">{{ userInfo && userInfo.realname }}</div>
  317. </div>
  318. <div class="type-list">
  319. <div
  320. class="type-list__item"
  321. @click="go('/person-center/my-course')"
  322. >
  323. <img src="@/assets/kc.png" alt="" />
  324. <div class="text">课程</div>
  325. </div>
  326. <div
  327. class="type-list__item"
  328. @click="go('/person-center/my-bank')"
  329. >
  330. <img src="@/assets/tk.png" alt="" />
  331. <div class="text">题库</div>
  332. </div>
  333. <div
  334. class="type-list__item"
  335. @click="go('/person-center/my-order')"
  336. >
  337. <img src="@/assets/dd.png" alt="" />
  338. <div class="text">订单</div>
  339. </div>
  340. </div>
  341. <div class="history">
  342. <div class="btn">上次播放</div>
  343. <div class="title" @click="goLast">
  344. {{ recordList.goodsName }}
  345. </div>
  346. <div class="progress">
  347. <span
  348. >已学{{
  349. toFixed(
  350. (recordList.videoCurrentTime /
  351. recordList.durationTime) *
  352. 100
  353. )
  354. }}%</span
  355. >
  356. <span>{{ recordList.date }}</span>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. </section>
  364. <section class="course">
  365. <div class="container">
  366. <div class="course__header">
  367. <div class="title">推荐课程</div>
  368. <div class="tabs">
  369. <div
  370. v-for="(item, index) in goodsList1"
  371. :key="index"
  372. class="tab"
  373. :class="active1 === index ? 'active' : ''"
  374. @click="active1 = index"
  375. >
  376. {{ item.name }}
  377. </div>
  378. </div>
  379. </div>
  380. <div class="course__body">
  381. <p
  382. v-if="
  383. !goodsList1[active1] ||
  384. !goodsList1[active1].goodsList ||
  385. goodsList1[active1].goodsList.length === 0
  386. "
  387. class="text_align"
  388. >
  389. 该培训项目无推荐课程
  390. </p>
  391. <ul v-else class="list clearfix">
  392. <template v-for="(item, index) in goodsList1[active1].goodsList">
  393. <li class="course-item" :key="index" v-if="index < 15">
  394. <GoodsItem :item="item"></GoodsItem>
  395. </li>
  396. </template>
  397. </ul>
  398. </div>
  399. <div class="course__footer">
  400. <div class="btn" @click="go('/course-list')">查看更多</div>
  401. </div>
  402. </div>
  403. </section>
  404. <section class="bank">
  405. <div class="container">
  406. <div class="bank__header">
  407. <div class="title">推荐题库</div>
  408. <div class="tabs">
  409. <div
  410. v-for="(item, index) in goodsList2"
  411. :key="index"
  412. class="tab"
  413. :class="active2 === index ? 'active' : ''"
  414. @click="active2 = index"
  415. >
  416. {{ item.name }}
  417. </div>
  418. </div>
  419. </div>
  420. <div class="bank__body">
  421. <p
  422. v-if="
  423. !goodsList2[active2] ||
  424. !goodsList2[active2].goodsList ||
  425. goodsList2[active2].goodsList.length === 0
  426. "
  427. class="text_align"
  428. >
  429. 该培训项目无推荐题库
  430. </p>
  431. <ul v-else class="list clearfix">
  432. <template v-for="(item, index) in goodsList2[active2].goodsList">
  433. <li
  434. class="bank-item"
  435. v-if="index < 15"
  436. :key="index"
  437. @click="goodsDetail(item, 2)"
  438. >
  439. <GoodsItem :item="item"></GoodsItem>
  440. <!-- <div class="bank-item__img">
  441. <div class="note" v-if="item.year">{{ item.year }}</div>
  442. <img
  443. v-if="item.coverUrl"
  444. :src="$tools.splitImgHost(item.coverUrl)"
  445. alt=""
  446. />
  447. </div>
  448. <div class="bank-item__title">
  449. {{ item.goodsName }}
  450. </div>
  451. <div class="bank-item__desc">
  452. <div class="price">¥{{ item.standPrice }}</div>
  453. <a class="add" @click.stop="addCart(item)">加购物车</a>
  454. </div> -->
  455. </li>
  456. </template>
  457. </ul>
  458. </div>
  459. <div class="bank__footer">
  460. <div class="btn" @click="go('/bank-list')">查看更多</div>
  461. </div>
  462. </div>
  463. </section>
  464. <el-dialog
  465. :visible.sync="bindShow"
  466. width="348px"
  467. center
  468. :close-on-click-modal="false"
  469. :close-on-press-escape="false"
  470. class="bind"
  471. >
  472. <a class="bind__close" @click="bindNext">X</a>
  473. <div class="bind__header">关联学员身份</div>
  474. <div class="bind__body">
  475. <el-form
  476. class="bind-form"
  477. ref="bindForm"
  478. :model="bindForm"
  479. :rules="bindForm"
  480. >
  481. <el-form-item prop="realname"
  482. ><el-input placeholder="真实姓名" v-model="bindForm.realname">
  483. </el-input
  484. ></el-form-item>
  485. <el-form-item prop="idCard">
  486. <el-input placeholder="身份证号码" v-model="bindForm.idCard" maxlength="18">
  487. </el-input
  488. ></el-form-item>
  489. <el-button
  490. class="submit"
  491. type="primary"
  492. :loading="isBind"
  493. round
  494. @click="bind()"
  495. >确定</el-button
  496. >
  497. <div class="bind-next" @click="bindNext">下次再关联</div>
  498. </el-form>
  499. </div>
  500. </el-dialog>
  501. <ToolBar></ToolBar>
  502. <Footer></Footer>
  503. <wx-login ref="wxLogin" @wxLoginBack="wxLoginBack"></wx-login>
  504. <RebuildModal
  505. ref="rebuildModal"
  506. @rebuildSubmit="rebuildSubmit($event)"
  507. ></RebuildModal>
  508. </div>
  509. </template>
  510. <script>
  511. import RebuildModal from "@/components/rebuildModal";
  512. import wxLogin from "@/components/wxLogin/index";
  513. import Footer from "@/components/footer/index";
  514. import ToolBar from "@/components/toolbar/index";
  515. import GoodsItem from "@/components/goodsItem/index";
  516. import { swiper, swiperSlide } from "vue-awesome-swiper";
  517. import { mapGetters, mapMutations } from "vuex";
  518. import "swiper/swiper-bundle.css";
  519. export default {
  520. name: "Home",
  521. components: {
  522. swiper,
  523. swiperSlide,
  524. Footer,
  525. GoodsItem,
  526. ToolBar,
  527. wxLogin,
  528. RebuildModal,
  529. },
  530. computed: {
  531. ...mapGetters(["userInfo", "token", "header", "msgCount"]),
  532. showNav: function () {
  533. return function (list) {
  534. var newList = [];
  535. if (list) {
  536. newList = list.filter((item) => {
  537. return item.status === 1;
  538. });
  539. }
  540. return newList;
  541. };
  542. },
  543. },
  544. data() {
  545. return {
  546. msgShow: false,
  547. msgData: {},
  548. showBox: false,
  549. indexToken: "",
  550. indexUserAccount: "",
  551. colors: [],
  552. color: "",
  553. countDown: 0,
  554. countDownTimer: null,
  555. loginRules: {
  556. account: [
  557. { required: true, trigger: "blur", message: "请输入手机号/身份证号" },
  558. ],
  559. pwd: [{ required: true, trigger: "blur", message: "请输入密码" }],
  560. },
  561. loginSmsRules: {
  562. code: [{ required: true, trigger: "blur", message: "请输入验证码" }],
  563. tel: [{ required: true, trigger: "blur", message: "请输入手机号" }],
  564. },
  565. bindRules: {
  566. code: [{ required: true, trigger: "blur", message: "请输入验证码" }],
  567. tel: [{ required: true, trigger: "blur", message: "请输入手机号" }],
  568. pwd: [{ required: true, trigger: "blur", message: "请输入密码" }],
  569. read: [{ required: true, trigger: "blur", message: "请勾选服务协议" }],
  570. },
  571. bindShow: false,
  572. loginType: 2,
  573. loginForm: {},
  574. loginSmsForm: {},
  575. bindForm: {},
  576. isLogin: false,
  577. isLoginSms: false,
  578. isBind: false,
  579. getLoginCodeLock: false,
  580. isloginSms: false,
  581. swiperOptions: {
  582. loop: true,
  583. observer: true,
  584. observeParents: true,
  585. speed: 300,
  586. autoplayDisableOnInteraction: false,
  587. autoplayStopOnLast: false,
  588. autoplay: {
  589. delay: 1000,
  590. disableOnInteraction: false,
  591. },
  592. // 显示分页
  593. pagination: {
  594. el: ".swiper-pagination",
  595. clickable: true, //允许分页点击跳转
  596. },
  597. // 设置点击箭头
  598. navigation: {
  599. nextEl: ".swiper-button-next",
  600. prevEl: ".swiper-button-prev",
  601. },
  602. },
  603. bannerList: [],
  604. goodsList1: [{}], //推荐课程列表
  605. goodsList2: [{}], //推荐题库列表
  606. typeList: [],
  607. slideList: [],
  608. active1: 0, //推荐课程index
  609. active2: 0, //推荐题库index
  610. searchKey: "",
  611. type: "1",
  612. recordList: {},
  613. };
  614. },
  615. mounted() {
  616. if (this.userInfo) {
  617. this.getRecord();
  618. this.getmsg();
  619. this.getMsgCount();
  620. }
  621. this.getActivityList();
  622. // this.color = this.colors[0];
  623. this.advertisingList();
  624. this.educationTypeList();
  625. },
  626. watch: {
  627. userInfo(val) {
  628. if (val) {
  629. this.getRecord();
  630. this.getmsg();
  631. this.getMsgCount();
  632. }
  633. },
  634. },
  635. methods: {
  636. /**
  637. * 关闭消息
  638. */
  639. clearMsg() {
  640. let ary = {
  641. userId: this.msgData.userId,
  642. msgId: this.msgData.id,
  643. updateTime: new Date(new Date().toLocaleDateString()).getTime(),
  644. };
  645. localStorage.setItem("msg", JSON.stringify(ary));
  646. this.msgShow = false;
  647. },
  648. rebuildSubmit(item) {
  649. this.$router.push({
  650. path: `/my-course-detail/${item.goodsId}`,
  651. query: {
  652. gradeId: item.gradeId,
  653. orderGoodsId: item.orderGoodsId,
  654. rebuild: 1,
  655. },
  656. });
  657. },
  658. getGoodsData() {
  659. return new Promise((resolve, reject) => {
  660. this.$request.goodsDetail(this.msgData.goodsId).then((res) => {
  661. resolve(res.data);
  662. });
  663. });
  664. },
  665. /**
  666. * 前往学习
  667. */
  668. async newGoToStudy() {
  669. let item = await this.getGoodsData();
  670. if (item.goodsType == 1) {
  671. this.sysTime = this.$tools.timest();
  672. item.orderGoodsId = this.msgData.orderGoodsId;
  673. this.canJump(item).then((res) => {
  674. this.clearMsg();
  675. this.$router.push({
  676. path: `/my-course-detail/${item.goodsId}`,
  677. query: {
  678. gradeId: item.gradeId,
  679. orderGoodsId: item.orderGoodsId,
  680. courseId: res.rows[0].courseId || "",
  681. },
  682. });
  683. });
  684. // arsty = '立刻学习';
  685. //题库
  686. } else if (item.goodsType == 2) {
  687. this.clearMsg();
  688. this.$router.push({
  689. path: "/person-center/my-bank/bank-detail/" + item.goodsId,
  690. query: {
  691. orderGoodsId: item.orderGoodsId,
  692. },
  693. });
  694. }
  695. },
  696. canJump(item) {
  697. return new Promise((resolve) => {
  698. this.$request
  699. .orderInfo({
  700. orderGoodsId: item.orderGoodsId,
  701. })
  702. .then(async (res) => {
  703. let items = res.data;
  704. let currentTime = this.$tools.timest();
  705. if (items.interfaceAccountId > 0) {
  706. //学习账号已开通
  707. if (items.learnStatus == 1) {
  708. //跳转第三方h5
  709. const confirmText = [
  710. "您的学习账号已经开通,请按照步骤操作,进行学习。",
  711. "1.点击【跳转学习网址】按钮",
  712. "2.打开学习网址后,选择【个人用户】进行登录",
  713. "(1)账号:您个人的身份证号码",
  714. "(2)密码:身份证号码,再加111111",
  715. ];
  716. const newDatas = [];
  717. const h = this.$createElement;
  718. for (const i in confirmText) {
  719. newDatas.push(h("p", null, confirmText[i]));
  720. }
  721. this.$confirm(h("div", null, newDatas), "温馨提示", {
  722. confirmButtonText: "跳转学习网址",
  723. cancelButtonText: "关闭",
  724. closeOnClickModal: false,
  725. closeOnPressEscape: false,
  726. distinguishCancelAndClose: false,
  727. showClose: false,
  728. })
  729. .then((_) => {
  730. window.open("http://admin.zhujianpeixun.com/", "_blank");
  731. })
  732. .catch((_) => {});
  733. return;
  734. } else {
  735. this.$message({
  736. type: "warning",
  737. message:
  738. "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
  739. });
  740. return;
  741. }
  742. }
  743. // //内部系统
  744. // if (items.interfacePushId > 0 && items.officialStatus != 1) {
  745. // this.$message({
  746. // type: "warning",
  747. // message:
  748. // "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
  749. // });
  750. // return;
  751. // }
  752. if (items.goodsType !== 6) {
  753. if (
  754. this.sysTime <= items.serviceStartTime ||
  755. this.sysTime >= items.serviceEndTime
  756. ) {
  757. this.$message({
  758. type: "warning",
  759. message: "不在学习服务期,不能进入学习",
  760. });
  761. return;
  762. }
  763. if (
  764. (items.classStartTime &&
  765. this.sysTime <= items.classStartTime) ||
  766. (items.classEndTime && this.sysTime >= items.classEndTime)
  767. ) {
  768. this.$message({
  769. type: "warning",
  770. message: "不在班级有效期,不能进入学习",
  771. });
  772. return;
  773. }
  774. if (items.learningStatus == 2) {
  775. this.$message({
  776. type: "warning",
  777. message: "开放学习时间待定,不能进入学习",
  778. });
  779. return;
  780. }
  781. if (items.classStatus == 0) {
  782. this.$message({
  783. type: "warning",
  784. message: "尚未开班,不能进入学习",
  785. });
  786. return;
  787. }
  788. if (
  789. items.learningStatus == 3 &&
  790. this.sysTime < items.learningTimeStart
  791. ) {
  792. this.$message({
  793. type: "warning",
  794. message: "不在开放学习时间,不能进入学习",
  795. });
  796. return;
  797. }
  798. let rebuildStatus = await this.courseGoodsRebuildStatus(
  799. items.goodsId,
  800. items.gradeId
  801. );
  802. if (rebuildStatus == 0) {
  803. this.$refs.rebuildModal.showModal(items);
  804. return;
  805. }
  806. }
  807. // if (item.educationName == "继续教育") {
  808. this.$request
  809. .lockLockStatus({
  810. action: "jxjy",
  811. })
  812. .then((res) => {
  813. //有其他端在操作,不能学习
  814. this.$message({
  815. type: "warning",
  816. message: res.msg,
  817. });
  818. })
  819. .catch((err) => {
  820. //可以学习
  821. this.$request
  822. .courseCourseList({
  823. pageNum: 1,
  824. pageSize: 1,
  825. goodsId: items.goodsId,
  826. gradeId: items.gradeId,
  827. })
  828. .then((res) => {
  829. if (res.rows.length) {
  830. resolve(res);
  831. } else {
  832. this.$message({
  833. type: "warning",
  834. message: "课程内暂无可以学习的科目",
  835. });
  836. }
  837. });
  838. });
  839. // } else {
  840. // this.$request
  841. // .courseCourseList({
  842. // pageNum: 1,
  843. // pageSize: 1,
  844. // goodsId: items.goodsId,
  845. // gradeId: items.gradeId,
  846. // })
  847. // .then((res) => {
  848. // if (res.rows.length) {
  849. // resolve(res);
  850. // } else {
  851. // this.$message({
  852. // type: "warning",
  853. // message: "课程内暂无可以学习的科目",
  854. // });
  855. // }
  856. // });
  857. // }
  858. });
  859. });
  860. },
  861. /**
  862. * @param {Object} goodsId 商品id
  863. * 查询商品重修状态
  864. */
  865. courseGoodsRebuildStatus(goodsId, gradeId) {
  866. return new Promise((resolve) => {
  867. this.$request
  868. .courseGoodsRebuildStatus({
  869. goodsId: goodsId,
  870. gradeId: gradeId,
  871. })
  872. .then((res) => {
  873. resolve(res.data);
  874. });
  875. });
  876. },
  877. /**
  878. * 微信登入
  879. */
  880. wxLoginFunc() {
  881. this.$refs.wxLogin.openBoxs();
  882. },
  883. /**
  884. * 微信登入—返回数据
  885. */
  886. wxLoginBack(res) {
  887. localStorage.setItem("user_account", res.data.user_account);
  888. localStorage.setItem("token", res.data.token);
  889. if (res.data.full_info) {
  890. this.getInfo();
  891. } else {
  892. this.indexUserAccount = res.data.user_account;
  893. this.indexToken = res.data.token;
  894. this.isLogin = false;
  895. // 弹窗
  896. this.bindShow = true;
  897. }
  898. },
  899. goLast() {
  900. if (this.recordList.goodsType == 6) {
  901. this.go("/my-live-detail/" + this.recordList.goodsId, {
  902. gradeId: this.recordList.gradeId,
  903. orderGoodsId: this.recordList.orderGoodsId,
  904. courseId: this.recordList.courseId,
  905. });
  906. } else if (this.recordList.goodsType == 1) {
  907. this.go("/my-course-detail/" + this.recordList.goodsId, {
  908. gradeId: this.recordList.gradeId,
  909. orderGoodsId: this.recordList.orderGoodsId,
  910. courseId: this.recordList.courseId,
  911. });
  912. }
  913. },
  914. swiperJump(swiper) {
  915. if (swiper.jumpType == 1) {
  916. //无跳转
  917. return;
  918. } else if (swiper.jumpType == 2) {
  919. //url
  920. window.open(swiper.jumpUrl, "_blank");
  921. } else if (swiper.jumpType == 3) {
  922. //内部接口
  923. this.$router.push({
  924. path: swiper.jumpUrl,
  925. });
  926. }
  927. },
  928. handleCommand(command) {
  929. switch (command) {
  930. case "1":
  931. this.go("/person-center/my-course");
  932. break;
  933. case "2":
  934. this.go("/person-center/my-bank");
  935. break;
  936. case "3":
  937. this.go("/person-center/my-info");
  938. break;
  939. case "4":
  940. this.$tools.exit();
  941. break;
  942. default:
  943. break;
  944. }
  945. },
  946. toFixed(num) {
  947. if (num) {
  948. let str = String(num).indexOf(".");
  949. if (str != -1) {
  950. return +num.toFixed(2);
  951. } else {
  952. return num;
  953. }
  954. } else {
  955. return 0;
  956. }
  957. },
  958. ...mapMutations(["setUserInfo", "getMsgCount"]),
  959. /**
  960. * 播放记录
  961. */
  962. getRecord() {
  963. this.$request
  964. .studRrecordListUserRecord({
  965. pageNum: 1,
  966. pageSize: 1,
  967. })
  968. .then((res) => {
  969. if (res.rows.length) {
  970. this.recordList = res.rows[0];
  971. }
  972. });
  973. },
  974. search() {
  975. if (!this.searchKey.trim()) {
  976. this.$message({
  977. type: "warning",
  978. duration: 2000,
  979. message: "请输入搜索内容",
  980. });
  981. return;
  982. }
  983. let type = this.type;
  984. //根据类型跳转题库或者列表页面
  985. if (type == "1") {
  986. this.$router.push({
  987. path: "/course-list",
  988. query: {
  989. searchKey: this.searchKey,
  990. },
  991. });
  992. } else if (type == "6") {
  993. this.$router.push({
  994. path: "/live-list",
  995. query: {
  996. searchKey: this.searchKey,
  997. },
  998. });
  999. } else {
  1000. this.$router.push({
  1001. path: "/bank-list",
  1002. query: {
  1003. searchKey: this.searchKey,
  1004. },
  1005. });
  1006. }
  1007. },
  1008. /**
  1009. * 查看商品详情
  1010. */
  1011. goodsDetail(item, type) {
  1012. if (type === 1) {
  1013. this.$router.push({
  1014. path: "/course-detail/" + item.goodsId,
  1015. });
  1016. }
  1017. if (type === 2) {
  1018. this.$router.push({
  1019. path: "/bank-detail/" + item.goodsId,
  1020. });
  1021. }
  1022. },
  1023. educationTypeList() {
  1024. this.$request.educationTypeList().then((res) => {
  1025. this.typeList = res.rows.slice(0, 5);
  1026. this.typeList.forEach((typeItem, index) => {
  1027. this.businessList(typeItem.id, index);
  1028. });
  1029. });
  1030. },
  1031. businessList(educationId, index) {
  1032. this.$request
  1033. .businessList({ educationId })
  1034. .then((res) => {
  1035. let rows = res.rows.filter((item) => item.aliasName)
  1036. this.$set(this.slideList, index, rows);
  1037. if (rows.length >= 2) {
  1038. let newRows = rows.slice(0, 2);
  1039. let length = 0;
  1040. newRows.forEach((row) => {
  1041. let str = row.projectName + "-" + row.businessName;
  1042. length = length + str.length;
  1043. });
  1044. if (length >= 17) {
  1045. this.$set(this.typeList[index], "list", rows.slice(0, 1));
  1046. } else {
  1047. this.$set(this.typeList[index], "list", rows.slice(0, 2));
  1048. }
  1049. } else {
  1050. this.$set(this.typeList[index], "list", rows);
  1051. }
  1052. console.log('this.typeList:',this.slideList, this.typeList)
  1053. })
  1054. .catch((err) => {
  1055. console.log(err, "err");
  1056. });
  1057. },
  1058. /**
  1059. * 加入购物车
  1060. */
  1061. addCart(item) {
  1062. this.$request
  1063. .addCart({ goodsId: item.goodsId })
  1064. .then((res) => {
  1065. if (res) {
  1066. this.getCartCount();
  1067. this.$message({
  1068. message: "加入购物车成功",
  1069. type: "success",
  1070. });
  1071. }
  1072. })
  1073. .catch((err) => {
  1074. if (err.code == 500) {
  1075. this.$message({
  1076. message: err.msg,
  1077. type: "warning",
  1078. });
  1079. }
  1080. });
  1081. },
  1082. /**
  1083. * 获取推荐商品
  1084. */
  1085. getActivityList() {
  1086. this.$request
  1087. .appCommonActivityRecommendList({ platform: 2, status: 1 })
  1088. .then((res) => {
  1089. let goodsList1 = []; //推荐视频商品
  1090. let goodsList2 = []; //推荐题库商品
  1091. res.rows.forEach((item) => {
  1092. if (item.type === 1) {
  1093. goodsList1.push(item);
  1094. }
  1095. if (item.type === 2) {
  1096. goodsList2.push(item);
  1097. }
  1098. });
  1099. this.goodsList1 = goodsList1.sort((a, b) => a.sort - b.sort);
  1100. this.goodsList2 = goodsList2.sort((a, b) => a.sort - b.sort);
  1101. });
  1102. },
  1103. goCourse(item) {
  1104. console.log('sdsf', item)
  1105. this.$router.push({
  1106. path: "/goodsTopic",
  1107. // query: {
  1108. // educationId: item.educationId ? item.educationId : item.id || "",
  1109. // projectId: item.projectId || "",
  1110. // businessId: item.educationId ? item.id : "",
  1111. // },
  1112. })
  1113. return
  1114. this.$router.push({
  1115. path: "/course-list",
  1116. query: {
  1117. educationId: item.educationId ? item.educationId : item.id || "",
  1118. projectId: item.projectId || "",
  1119. businessId: item.educationId ? item.id : "",
  1120. },
  1121. });
  1122. },
  1123. slideChangeTransitionStart(e) {
  1124. this.color = this.colors[this.$refs.mySwiper.swiper.realIndex];
  1125. },
  1126. advertisingList() {
  1127. this.$request
  1128. .advertisinghomeLocationList({
  1129. platform: 2, //1小程序2PC网站
  1130. status: 1,
  1131. locationKey: "home-banner", //首页轮播KEY
  1132. })
  1133. .then((res) => {
  1134. this.swiperOptions.autoplay.delay = res.data[0].intervalTime * 1000;
  1135. /**
  1136. * 如果存在-调用轮播图列表
  1137. */
  1138. if (res.data.length) {
  1139. this.$request
  1140. .advertisingList({ locationId: res.data[0].locationId })
  1141. .then((res) => {
  1142. this.bannerList = res.rows;
  1143. this.colors = res.rows.map((item) => {
  1144. return item.color ? item.color : "rgba(225,225,225,0.1)";
  1145. });
  1146. this.color = this.colors[0];
  1147. });
  1148. }
  1149. });
  1150. },
  1151. go(path, query) {
  1152. this.$router.push({
  1153. path,
  1154. query,
  1155. });
  1156. },
  1157. mouseover() {
  1158. clearTimeout(this.timer);
  1159. this.showBox = true;
  1160. },
  1161. mouseLeave() {
  1162. clearTimeout(this.timer);
  1163. this.timer = setTimeout(() => {
  1164. this.showBox = false;
  1165. }, 500);
  1166. },
  1167. login() {
  1168. this.$refs.loginForm.validate((valid) => {
  1169. if (valid) {
  1170. this.isLogin = true;
  1171. let loginForm = JSON.parse(JSON.stringify(this.loginForm));
  1172. loginForm.pwd = this.$tools.encryptor(loginForm.pwd);
  1173. console.log(this.loginForm);
  1174. this.$request
  1175. .login(loginForm)
  1176. .then((res) => {
  1177. localStorage.setItem("user_account", res.data.user_account);
  1178. localStorage.setItem("token", res.data.token);
  1179. if (res.data.full_info) {
  1180. // localStorage.setItem("user_account", res.data.user_account);
  1181. // localStorage.setItem("token", res.data.token);
  1182. this.getInfo();
  1183. } else {
  1184. this.indexUserAccount = res.data.user_account;
  1185. this.indexToken = res.data.token;
  1186. this.isLogin = false;
  1187. // 弹窗
  1188. this.bindShow = true;
  1189. }
  1190. })
  1191. .catch((err) => {
  1192. this.isLogin = false;
  1193. this.$message({
  1194. message: err.msg,
  1195. type: "error",
  1196. });
  1197. });
  1198. }
  1199. });
  1200. },
  1201. /**
  1202. * 获取登录短信
  1203. */
  1204. getLoginSms() {
  1205. this.$refs.loginSmsForm.validateField("tel", (valid) => {
  1206. if (!valid) {
  1207. if (this.countDown == 0) {
  1208. if (this.getLoginCodeLock) {
  1209. return;
  1210. }
  1211. this.getLoginCodeLock = true;
  1212. this.$request
  1213. .getLoginSms({ tel: this.loginSmsForm.tel })
  1214. .then((res) => {
  1215. this.getLoginCodeLock = false;
  1216. this.$message({
  1217. message: `验证码已发送`,
  1218. type: "success",
  1219. });
  1220. this.countDown = 60;
  1221. this.countDownTimer = setInterval(() => {
  1222. if (this.countDown == 0) {
  1223. clearInterval(this.countDownTimer);
  1224. } else {
  1225. this.countDown--;
  1226. }
  1227. }, 1000);
  1228. })
  1229. .catch((err) => {
  1230. this.$message.error(err.msg);
  1231. this.getLoginCodeLock = false;
  1232. });
  1233. }
  1234. }
  1235. });
  1236. },
  1237. /**
  1238. * 手机号登录
  1239. */
  1240. loginSms() {
  1241. this.$refs.loginSmsForm.validate((valid) => {
  1242. if (valid) {
  1243. this.isloginSms = true;
  1244. this.$request
  1245. .loginSms(this.loginSmsForm)
  1246. .then((res) => {
  1247. this.isloginSms = false;
  1248. localStorage.setItem("user_account", res.data.user_account);
  1249. localStorage.setItem("token", res.data.token);
  1250. this.$tools.setUuid(new Date().valueOf() + "");
  1251. if (res.data.full_info) {
  1252. this.getInfo();
  1253. } else {
  1254. this.indexUserAccount = res.data.user_account;
  1255. this.indexToken = res.data.token;
  1256. this.bindShow = true;
  1257. }
  1258. })
  1259. .catch((err) => {
  1260. this.isloginSms = false;
  1261. this.$message({
  1262. message: err.msg,
  1263. type: "error",
  1264. });
  1265. });
  1266. }
  1267. });
  1268. },
  1269. /**
  1270. * 消息提示
  1271. */
  1272. getmsg() {
  1273. this.$request.informUserselectLastUnStudyMsg().then((res) => {
  1274. if (res.data && res.data.id) {
  1275. let today = new Date(new Date().toLocaleDateString()).getTime();
  1276. if (localStorage.getItem("msg")) {
  1277. let ary = JSON.parse(localStorage.getItem("msg"));
  1278. if (ary.updateTime === today) {
  1279. this.msgShow = false;
  1280. return;
  1281. }
  1282. }
  1283. this.$nextTick(() => {
  1284. this.msgData = res.data;
  1285. this.msgShow = true;
  1286. });
  1287. } else {
  1288. this.msgShow = false;
  1289. }
  1290. });
  1291. },
  1292. /**
  1293. * 获取用户登录信息
  1294. */
  1295. getInfo() {
  1296. this.$request
  1297. .getInfo({fromPlat: 2})
  1298. .then((res) => {
  1299. this.loginForm = {};
  1300. this.loginSmsForm = {};
  1301. this.isLogin = false;
  1302. this.isloginSms = false;
  1303. this.setUserInfo(res.data);
  1304. this.getmsg();
  1305. })
  1306. .catch((err) => {
  1307. this.isLogin = false;
  1308. this.isloginSms = false;
  1309. this.$message({
  1310. message: err.msg,
  1311. type: "error",
  1312. });
  1313. });
  1314. },
  1315. bind() {
  1316. this.$refs.bindForm.validate((valid) => {
  1317. if (valid) {
  1318. this.isBind = true;
  1319. let bindForm = JSON.parse(JSON.stringify(this.bindForm));
  1320. bindForm.token = this.indexToken;
  1321. this.$request
  1322. .bindIdCard(bindForm)
  1323. .then((res) => {
  1324. this.isBind = false;
  1325. this.bindShow = false;
  1326. this.$message({
  1327. message: "关联成功",
  1328. type: "success",
  1329. });
  1330. localStorage.setItem("user_account", this.indexUserAccount);
  1331. localStorage.setItem("token", this.indexToken);
  1332. this.$tools.setUuid(new Date().valueOf() + "");
  1333. this.getInfo();
  1334. })
  1335. .catch((err) => {
  1336. this.isBind = false;
  1337. this.$message({
  1338. message: err.msg,
  1339. type: "error",
  1340. });
  1341. });
  1342. }
  1343. });
  1344. },
  1345. bindNext() {
  1346. this.bindShow = false;
  1347. this.indexToken = "";
  1348. this.indexUserAccount = "";
  1349. this.getInfo();
  1350. },
  1351. },
  1352. };
  1353. </script>
  1354. <!-- Add "scoped" attribute to limit CSS to this component only -->
  1355. <style scoped lang="scss">
  1356. .text_align {
  1357. text-align: center;
  1358. font-size: 18px;
  1359. margin: 40px 0px;
  1360. }
  1361. .home {
  1362. .header {
  1363. background: #ffffff;
  1364. &__header {
  1365. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
  1366. .text-list {
  1367. height: 40px;
  1368. line-height: 40px;
  1369. text-align: right;
  1370. font-size: 0;
  1371. a {
  1372. color: #3f8dfd;
  1373. font-size: 14px;
  1374. padding: 0 14px;
  1375. &:nth-last-of-type(1) {
  1376. padding-right: 0;
  1377. border-left: 1px solid #3f8dfd;
  1378. }
  1379. }
  1380. }
  1381. .icon-list {
  1382. height: 40px;
  1383. line-height: 40px;
  1384. text-align: right;
  1385. font-size: 0;
  1386. a {
  1387. color: #3f8dfd;
  1388. font-size: 14px;
  1389. padding: 0 14px;
  1390. position: relative;
  1391. .icon {
  1392. font-size: 20px;
  1393. }
  1394. .modal-box {
  1395. width: 162px;
  1396. background: #ffffff;
  1397. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  1398. border-radius: 8px;
  1399. position: absolute;
  1400. top: 34px;
  1401. left: -40px;
  1402. li {
  1403. margin-left: 10px;
  1404. border-bottom: 1px solid #eeeeee;
  1405. height: 40px;
  1406. line-height: 40px;
  1407. cursor: pointer;
  1408. padding-left: 5px;
  1409. color: #666666;
  1410. text-align: left;
  1411. &:hover {
  1412. background: #eeeeee;
  1413. color: #3f8dfd;
  1414. }
  1415. &:nth-last-of-type(1) {
  1416. border: 0;
  1417. }
  1418. }
  1419. }
  1420. }
  1421. }
  1422. }
  1423. &__body {
  1424. margin-top: 16px;
  1425. .logo {
  1426. float: left;
  1427. img {
  1428. width: 162px;
  1429. height: 33px;
  1430. }
  1431. h1 {
  1432. background: url("~@/assets/logo.png") no-repeat center;
  1433. width: 162px;
  1434. height: 33px;
  1435. }
  1436. }
  1437. .search {
  1438. float: left;
  1439. margin-left: 160px;
  1440. width: 648px;
  1441. background: #fafbfc;
  1442. border: 1px solid #3f8dfd;
  1443. border-radius: 8px;
  1444. display: flex;
  1445. overflow: hidden;
  1446. &__select {
  1447. width: 76px;
  1448. border-right: 1px solid #fff;
  1449. select {
  1450. text-align: center;
  1451. width: 100%;
  1452. height: 100%;
  1453. border: 0;
  1454. outline: none;
  1455. }
  1456. }
  1457. &__input {
  1458. flex: 1;
  1459. input {
  1460. width: 100%;
  1461. height: 100%;
  1462. }
  1463. }
  1464. &__btn {
  1465. padding: 0;
  1466. text-align: center;
  1467. width: 80px;
  1468. height: 40px;
  1469. line-height: 40px;
  1470. font-size: 14px;
  1471. border-radius: 0;
  1472. }
  1473. }
  1474. .contact {
  1475. float: right;
  1476. padding-left: 45px;
  1477. background: url("~@/assets/cus.png") no-repeat left top;
  1478. &__phone {
  1479. font-size: 18px;
  1480. font-family: Microsoft YaHei;
  1481. font-weight: bold;
  1482. color: #666666;
  1483. }
  1484. &__time {
  1485. font-size: 14px;
  1486. font-family: Microsoft YaHei;
  1487. font-weight: 400;
  1488. color: #666666;
  1489. }
  1490. }
  1491. }
  1492. }
  1493. .section {
  1494. margin-top: 40px;
  1495. .tabs {
  1496. margin-left: 324px;
  1497. .tab {
  1498. display: inline-block;
  1499. width: 138px;
  1500. height: 40px;
  1501. font-size: 16px;
  1502. text-align: center;
  1503. line-height: 40px;
  1504. color: #333;
  1505. &.active {
  1506. color: #3f8dfd;
  1507. background: #f0f5fc;
  1508. }
  1509. }
  1510. }
  1511. .swiper-wrap {
  1512. transition: background 0.3s;
  1513. height: 400px;
  1514. position: relative;
  1515. .container {
  1516. position: relative;
  1517. height: 400px;
  1518. .left-box {
  1519. position: absolute;
  1520. top: -40px;
  1521. left: 0;
  1522. height: 440px;
  1523. width: 300px;
  1524. z-index: 10;
  1525. &__header {
  1526. height: 40px;
  1527. line-height: 40px;
  1528. color: #fff;
  1529. font-size: 16px;
  1530. background: #3f8dfd;
  1531. text-align: center;
  1532. }
  1533. &__body {
  1534. position: relative;
  1535. height: 400px;
  1536. background: rgba(0, 0, 0, 0.5);
  1537. overflow: hidden;
  1538. &:hover {
  1539. overflow: visible;
  1540. .slide-list {
  1541. opacity: 1;
  1542. left: 100%;
  1543. }
  1544. }
  1545. .slide-list {
  1546. opacity: 0;
  1547. transition: all 0.3s;
  1548. width: 672px;
  1549. padding: 0;
  1550. background: rgba(255, 255, 255, 1);
  1551. position: absolute;
  1552. top: 0;
  1553. left: 0;
  1554. padding-left: 24px;
  1555. z-index: 10;
  1556. &__item {
  1557. min-height: 80px;
  1558. display: flex;
  1559. align-items: center;
  1560. border-bottom: 1px solid #ddd;
  1561. &:nth-last-of-type(1) {
  1562. border: 0;
  1563. }
  1564. .title {
  1565. cursor: pointer;
  1566. color: #fff;
  1567. width: 120px;
  1568. height: 28px;
  1569. border: 1px solid #ffffff;
  1570. border-radius: 14px;
  1571. background: #3f8dfd;
  1572. line-height: 26px;
  1573. text-align: center;
  1574. border-radius: 15px;
  1575. margin-right: 10px;
  1576. }
  1577. .nav {
  1578. flex: 1;
  1579. display: flex;
  1580. flex-wrap: wrap;
  1581. li {
  1582. margin: 9px 24px 9px 0;
  1583. display: flex;
  1584. .text {
  1585. cursor: pointer;
  1586. font-size: 14px;
  1587. font-family: Microsoft YaHei;
  1588. font-weight: 400;
  1589. color: #666;
  1590. }
  1591. }
  1592. }
  1593. }
  1594. }
  1595. .bg {
  1596. backdrop-filter: blur(10px);
  1597. position: absolute;
  1598. left: 0;
  1599. top: 0;
  1600. width: 100%;
  1601. height: 100%;
  1602. z-index: 12;
  1603. }
  1604. .list {
  1605. position: relative;
  1606. z-index: 22;
  1607. padding-left: 16px;
  1608. li {
  1609. padding: 12px 0;
  1610. height: 80px;
  1611. border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  1612. display: flex;
  1613. &:nth-last-of-type(1) {
  1614. border: 0;
  1615. }
  1616. .text {
  1617. flex: 1;
  1618. &__title {
  1619. cursor: pointer;
  1620. font-size: 16px;
  1621. font-family: Microsoft YaHei;
  1622. font-weight: 400;
  1623. color: #ffffff;
  1624. }
  1625. &__desc {
  1626. margin-top: 16px;
  1627. .item {
  1628. font-size: 14px;
  1629. font-family: Microsoft YaHei;
  1630. font-weight: 400;
  1631. color: #ffffff;
  1632. margin-right: 30px;
  1633. }
  1634. }
  1635. }
  1636. }
  1637. }
  1638. }
  1639. }
  1640. .swiper {
  1641. .swiper-slide {
  1642. cursor: pointer;
  1643. height: 400px;
  1644. img {
  1645. width: 100%;
  1646. height: 100%;
  1647. }
  1648. }
  1649. .swiper-pagination {
  1650. text-align: right;
  1651. padding-right: 324px;
  1652. /deep/ .swiper-pagination-bullet {
  1653. background: rgba(255, 255, 255, 0.4);
  1654. &-active {
  1655. background: rgba(255, 255, 255, 1);
  1656. }
  1657. }
  1658. }
  1659. }
  1660. .right-box {
  1661. width: 300px;
  1662. background: rgba(0, 0, 0, 0.5);
  1663. position: absolute;
  1664. right: 0;
  1665. bottom: 0;
  1666. top: 0;
  1667. z-index: 10;
  1668. .bg {
  1669. backdrop-filter: blur(10px);
  1670. position: absolute;
  1671. left: 0;
  1672. top: 0;
  1673. width: 100%;
  1674. height: 100%;
  1675. z-index: 2;
  1676. }
  1677. .no-login {
  1678. position: relative;
  1679. z-index: 10;
  1680. .input {
  1681. margin: 16px;
  1682. height: 40px;
  1683. background: #ffffff;
  1684. border-radius: 8px;
  1685. input {
  1686. padding: 0 16px;
  1687. width: 100%;
  1688. height: 100%;
  1689. font-size: 14px;
  1690. color: #333;
  1691. &::placeholder {
  1692. color: #999;
  1693. }
  1694. }
  1695. .btn {
  1696. font-size: 14px;
  1697. font-family: Microsoft YaHei;
  1698. font-weight: 400;
  1699. color: #3f8dfd;
  1700. white-space: nowrap;
  1701. cursor: pointer;
  1702. }
  1703. }
  1704. .submit {
  1705. margin: 16px;
  1706. font-size: 16px;
  1707. margin-top: 16px;
  1708. box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
  1709. display: block;
  1710. width: 268px;
  1711. }
  1712. .bottom-text {
  1713. margin: 16px;
  1714. display: flex;
  1715. justify-content: space-between;
  1716. .text {
  1717. color: #fff;
  1718. }
  1719. }
  1720. }
  1721. .has-login {
  1722. position: relative;
  1723. z-index: 10;
  1724. padding: 14px 0 0 14px;
  1725. .userinfo {
  1726. display: flex;
  1727. align-items: center;
  1728. .avatar {
  1729. width: 40px;
  1730. height: 40px;
  1731. }
  1732. .nickname {
  1733. font-size: 16px;
  1734. font-family: Microsoft YaHei;
  1735. font-weight: bold;
  1736. color: #ffffff;
  1737. margin-left: 7px;
  1738. }
  1739. }
  1740. .type-list {
  1741. display: flex;
  1742. margin-top: 28px;
  1743. padding-bottom: 14px;
  1744. border-bottom: 1px solid #fff;
  1745. &__item {
  1746. cursor: pointer;
  1747. margin-right: 38px;
  1748. .img {
  1749. width: 64px;
  1750. height: 64px;
  1751. }
  1752. .text {
  1753. text-align: center;
  1754. margin-top: 10px;
  1755. font-size: 14px;
  1756. font-family: Microsoft YaHei;
  1757. font-weight: 400;
  1758. color: #ffffff;
  1759. }
  1760. &:nth-last-of-type(1) {
  1761. margin-right: 0;
  1762. }
  1763. }
  1764. }
  1765. .history {
  1766. border-bottom: 1px solid #fff;
  1767. padding-bottom: 15px;
  1768. .btn {
  1769. margin-top: 15px;
  1770. width: 64px;
  1771. height: 24px;
  1772. border: 1px solid #ffffff;
  1773. border-radius: 8px;
  1774. text-align: center;
  1775. line-height: 24px;
  1776. color: #fff;
  1777. }
  1778. .title {
  1779. cursor: pointer;
  1780. margin-top: 15px;
  1781. padding-right: 15px;
  1782. font-size: 14px;
  1783. font-family: Microsoft YaHei;
  1784. font-weight: 400;
  1785. color: #ffffff;
  1786. }
  1787. .progress {
  1788. margin-top: 15px;
  1789. display: flex;
  1790. justify-content: space-between;
  1791. padding-right: 15px;
  1792. span {
  1793. font-size: 14px;
  1794. font-family: Microsoft YaHei;
  1795. font-weight: 400;
  1796. color: #ffffff;
  1797. }
  1798. }
  1799. }
  1800. }
  1801. }
  1802. }
  1803. }
  1804. }
  1805. .course {
  1806. background: #f5f7fa;
  1807. padding-top: 40px;
  1808. &__header {
  1809. display: flex;
  1810. align-items: center;
  1811. .title {
  1812. background: url("~@/assets/video.png") no-repeat left center;
  1813. padding-left: 36px;
  1814. font-size: 24px;
  1815. font-family: YouSheBiaoTiHei;
  1816. font-weight: 400;
  1817. color: #333333;
  1818. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1819. }
  1820. .tabs {
  1821. margin-left: 40px;
  1822. display: flex;
  1823. align-items: center;
  1824. .tab {
  1825. cursor: pointer;
  1826. user-select: none;
  1827. // width: 88px;
  1828. padding: 0px 6px;
  1829. height: 24px;
  1830. border: 1px solid #f84e05;
  1831. border-radius: 12px;
  1832. text-align: center;
  1833. line-height: 24px;
  1834. color: #f84e05;
  1835. font-size: 14px;
  1836. margin: 0 4px;
  1837. &.active {
  1838. color: #fff;
  1839. background: #f84e05;
  1840. }
  1841. }
  1842. }
  1843. }
  1844. &__body {
  1845. .list {
  1846. width: 100%;
  1847. .course-item {
  1848. float: left;
  1849. }
  1850. }
  1851. }
  1852. &__footer {
  1853. overflow: hidden;
  1854. .btn {
  1855. cursor: pointer;
  1856. width: 146px;
  1857. height: 40px;
  1858. background: #e3eaf7;
  1859. border-radius: 8px;
  1860. margin: 20px auto 40px;
  1861. color: #3f8dfd;
  1862. text-align: center;
  1863. line-height: 40px;
  1864. transition: all 0.2s;
  1865. &:hover {
  1866. color: #fff;
  1867. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1868. background: #3f8dfd;
  1869. }
  1870. }
  1871. }
  1872. }
  1873. .bank {
  1874. background: #fff;
  1875. padding-top: 40px;
  1876. &__header {
  1877. display: flex;
  1878. align-items: center;
  1879. .title {
  1880. background: url("~@/assets/exercise.png") no-repeat left center;
  1881. padding-left: 36px;
  1882. font-size: 24px;
  1883. font-family: YouSheBiaoTiHei;
  1884. font-weight: 400;
  1885. color: #333333;
  1886. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1887. }
  1888. .tabs {
  1889. margin-left: 40px;
  1890. display: flex;
  1891. align-items: center;
  1892. .tab {
  1893. cursor: pointer;
  1894. user-select: none;
  1895. padding: 0px 6px;
  1896. // width: 88px;
  1897. height: 24px;
  1898. border: 1px solid #437cff;
  1899. border-radius: 12px;
  1900. text-align: center;
  1901. line-height: 24px;
  1902. color: #437cff;
  1903. font-size: 14px;
  1904. margin: 0 4px;
  1905. &.active {
  1906. color: #fff;
  1907. background: #437cff;
  1908. }
  1909. }
  1910. }
  1911. }
  1912. &__body {
  1913. .list {
  1914. width: 100%;
  1915. .bank-item {
  1916. float: left;
  1917. }
  1918. }
  1919. }
  1920. &__footer {
  1921. overflow: hidden;
  1922. .btn {
  1923. cursor: pointer;
  1924. width: 146px;
  1925. height: 40px;
  1926. background: #e3eaf7;
  1927. border-radius: 8px;
  1928. margin: 20px auto 40px;
  1929. color: #3f8dfd;
  1930. text-align: center;
  1931. line-height: 40px;
  1932. transition: all 0.2s;
  1933. &:hover {
  1934. color: #fff;
  1935. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1936. background: #3f8dfd;
  1937. }
  1938. }
  1939. }
  1940. }
  1941. .bind {
  1942. /deep/ .el-dialog__header {
  1943. display: none;
  1944. }
  1945. /deep/ .el-dialog__body {
  1946. padding: 0;
  1947. overflow: unset;
  1948. }
  1949. &__close {
  1950. position: absolute;
  1951. right: 0;
  1952. top: -28px;
  1953. width: 24px;
  1954. height: 24px;
  1955. line-height: 24px;
  1956. text-align: center;
  1957. color: #eee;
  1958. border: 1px solid #eee;
  1959. border-radius: 50%;
  1960. }
  1961. &__header {
  1962. height: 40px;
  1963. text-align: center;
  1964. line-height: 40px;
  1965. border-bottom: 1px solid #eeeeee;
  1966. }
  1967. &__body {
  1968. height: 248px;
  1969. padding: 24px;
  1970. position: relative;
  1971. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  1972. border-radius: 8px;
  1973. .submit {
  1974. width: 100%;
  1975. }
  1976. .bind-next {
  1977. font-size: 14px;
  1978. text-align: center;
  1979. color: #999;
  1980. margin-top: 10px;
  1981. cursor: pointer;
  1982. }
  1983. }
  1984. }
  1985. }
  1986. .fade-enter,
  1987. .fade-leave-to {
  1988. opacity: 0;
  1989. height: 0;
  1990. }
  1991. .fade-enter-to,
  1992. .fade-leave {
  1993. opacity: 1;
  1994. height: 122px;
  1995. }
  1996. .fade-enter-active,
  1997. .fade-leave-active {
  1998. transition: all 0.3s;
  1999. }
  2000. .dis_flex {
  2001. user-select: none;
  2002. display: flex;
  2003. align-items: center;
  2004. justify-content: center;
  2005. .dis_flex_wxloginImg {
  2006. cursor: pointer;
  2007. width: 76px;
  2008. height: 76px;
  2009. border-radius: 50%;
  2010. overflow: hidden;
  2011. background-color: #fff;
  2012. line-height: 76px;
  2013. text-align: center;
  2014. img {
  2015. vertical-align: middle;
  2016. width: 40px;
  2017. height: 40px;
  2018. }
  2019. }
  2020. }
  2021. /deep/ .el-badge__content.is-fixed {
  2022. top: 7px;
  2023. }
  2024. .dis_plays {
  2025. display: flex;
  2026. align-items: center;
  2027. }
  2028. .toolbth {
  2029. border-radius: 55px;
  2030. background-color: #fff;
  2031. color: #3f8dfd;
  2032. font-size: 14px;
  2033. padding: 5px 14px;
  2034. margin-right: 16px;
  2035. user-select: none;
  2036. cursor: pointer;
  2037. }
  2038. </style>
  2039. <style lang="scss">
  2040. .tooltipStyle {
  2041. background-color: #3f8dfd !important;
  2042. color: #fff;
  2043. }
  2044. .tooltipStyle .popper__arrow {
  2045. border-bottom-color: #3f8dfd!important;
  2046. }
  2047. .tooltipStyle .popper__arrow::after {
  2048. border-bottom-color: #3f8dfd!important;
  2049. }
  2050. </style>