index.vue 46 KB

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