index.vue 49 KB

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