index.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719
  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. },
  563. watch: {
  564. userInfo(val) {
  565. if (val) {
  566. this.getRecord();
  567. }
  568. },
  569. },
  570. methods: {
  571. swiperJump(swiper) {
  572. if (swiper.jumpType == 1) {
  573. //无跳转
  574. return;
  575. } else if (swiper.jumpType == 2) {
  576. //url
  577. window.open(swiper.jumpUrl, "_blank");
  578. } else if (swiper.jumpType == 3) {
  579. //内部接口
  580. this.$router.push({
  581. path: swiper.jumpUrl,
  582. });
  583. }
  584. },
  585. handleCommand(command) {
  586. switch (command) {
  587. case "1":
  588. this.go("/person-center/my-course");
  589. break;
  590. case "2":
  591. this.go("/person-center/my-bank");
  592. break;
  593. case "3":
  594. this.go("/person-center/my-info");
  595. break;
  596. case "4":
  597. this.$tools.exit();
  598. break;
  599. default:
  600. break;
  601. }
  602. },
  603. toFixed(num) {
  604. if (num) {
  605. let str = String(num).indexOf(".");
  606. if (str != -1) {
  607. return +num.toFixed(2);
  608. } else {
  609. return num;
  610. }
  611. } else {
  612. return 0;
  613. }
  614. },
  615. ...mapMutations(["setUserInfo"]),
  616. /**
  617. * 播放记录
  618. */
  619. getRecord() {
  620. this.$request
  621. .studRrecordListUserRecord({
  622. pageNum: 1,
  623. pageSize: 1,
  624. })
  625. .then((res) => {
  626. if (res.rows.length) {
  627. this.recordList = res.rows[0];
  628. }
  629. });
  630. },
  631. search() {
  632. if (!this.searchKey.trim()) {
  633. this.$message({
  634. type: "warning",
  635. duration: 2000,
  636. message: "请输入搜索内容",
  637. });
  638. return;
  639. }
  640. let type = this.type;
  641. //根据类型跳转题库或者列表页面
  642. if (type == "1") {
  643. this.$router.push({
  644. path: "/course-list",
  645. query: {
  646. searchKey: this.searchKey,
  647. },
  648. });
  649. } else {
  650. this.$router.push({
  651. path: "/bank-list",
  652. query: {
  653. searchKey: this.searchKey,
  654. },
  655. });
  656. }
  657. },
  658. /**
  659. * 查看商品详情
  660. */
  661. goodsDetail(item, type) {
  662. if (type === 1) {
  663. this.$router.push({
  664. path: "/course-detail/" + item.goodsId,
  665. });
  666. }
  667. if (type === 2) {
  668. this.$router.push({
  669. path: "/bank-detail/" + item.goodsId,
  670. });
  671. }
  672. },
  673. educationTypeList() {
  674. this.$request.educationTypeList().then((res) => {
  675. this.typeList = res.rows.slice(0, 5);
  676. this.typeList.forEach((typeItem, index) => {
  677. this.businessList(typeItem.id, index);
  678. });
  679. });
  680. },
  681. businessList(educationId, index) {
  682. this.$request
  683. .businessList({ educationId })
  684. .then((res) => {
  685. this.$set(this.slideList, index, res.rows);
  686. if (res.rows.length >= 2) {
  687. let newRows = res.rows.slice(0, 2);
  688. let length = 0;
  689. newRows.forEach((row) => {
  690. let str = row.projectName + "-" + row.businessName;
  691. length = length + str.length;
  692. });
  693. if (length >= 17) {
  694. this.$set(this.typeList[index], "list", res.rows.slice(0, 1));
  695. } else {
  696. this.$set(this.typeList[index], "list", res.rows.slice(0, 2));
  697. }
  698. } else {
  699. this.$set(this.typeList[index], "list", res.rows);
  700. }
  701. })
  702. .catch((err) => {
  703. console.log(err, "err");
  704. });
  705. },
  706. /**
  707. * 加入购物车
  708. */
  709. addCart(item) {
  710. this.$request
  711. .addCart({ goodsId: item.goodsId })
  712. .then((res) => {
  713. if (res) {
  714. this.getCartCount();
  715. this.$message({
  716. message: "加入购物车成功",
  717. type: "success",
  718. });
  719. }
  720. })
  721. .catch((err) => {
  722. if (err.code == 500) {
  723. this.$message({
  724. message: err.msg,
  725. type: "warning",
  726. });
  727. }
  728. });
  729. },
  730. /**
  731. * 获取推荐商品
  732. */
  733. getActivityList() {
  734. this.$request
  735. .appCommonActivityRecommendList({ platform: 2, status: 1 })
  736. .then((res) => {
  737. let goodsList1 = []; //推荐视频商品
  738. let goodsList2 = []; //推荐题库商品
  739. res.rows.forEach((item) => {
  740. if (item.type === 1) {
  741. goodsList1.push(item);
  742. }
  743. if (item.type === 2) {
  744. goodsList2.push(item);
  745. }
  746. });
  747. this.goodsList1 = goodsList1.sort((a, b) => a.sort - b.sort);
  748. this.goodsList2 = goodsList2.sort((a, b) => a.sort - b.sort);
  749. });
  750. },
  751. goCourse(item) {
  752. this.$router.push({
  753. path: "/course-list",
  754. query: {
  755. educationId: item.educationId ? item.educationId : item.id || "",
  756. projectId: item.projectId || "",
  757. businessId: item.educationId ? item.id : "",
  758. },
  759. });
  760. },
  761. slideChangeTransitionStart(e) {
  762. this.color = this.colors[this.$refs.mySwiper.swiper.realIndex];
  763. },
  764. advertisingList() {
  765. this.$request
  766. .advertisinghomeLocationList({
  767. platform: 2, //1小程序2PC网站
  768. status: 1,
  769. locationKey: "home-banner", //首页轮播KEY
  770. })
  771. .then((res) => {
  772. this.swiperOptions.autoplay.delay = res.data[0].intervalTime * 1000;
  773. /**
  774. * 如果存在-调用轮播图列表
  775. */
  776. if (res.data.length) {
  777. this.$request
  778. .advertisingList({ locationId: res.data[0].locationId })
  779. .then((res) => {
  780. this.bannerList = res.rows;
  781. this.colors = res.rows.map((item) => {
  782. return item.color ? item.color : "rgba(225,225,225,0.1)";
  783. });
  784. this.color = this.colors[0];
  785. });
  786. }
  787. });
  788. },
  789. go(path, query) {
  790. this.$router.push({
  791. path,
  792. query,
  793. });
  794. },
  795. mouseover() {
  796. clearTimeout(this.timer);
  797. this.showBox = true;
  798. },
  799. mouseLeave() {
  800. clearTimeout(this.timer);
  801. this.timer = setTimeout(() => {
  802. this.showBox = false;
  803. }, 500);
  804. },
  805. login() {
  806. this.$refs.loginForm.validate((valid) => {
  807. if (valid) {
  808. this.isLogin = true;
  809. let loginForm = JSON.parse(JSON.stringify(this.loginForm));
  810. loginForm.pwd = this.$tools.encryptor(loginForm.pwd);
  811. console.log(this.loginForm);
  812. this.$request
  813. .login(loginForm)
  814. .then((res) => {
  815. if (res.data.full_info) {
  816. localStorage.setItem("user_account", res.data.user_account);
  817. localStorage.setItem("token", res.data.token);
  818. this.getInfo();
  819. } else {
  820. this.indexUserAccount = res.data.user_account;
  821. this.indexToken = res.data.token;
  822. this.isLogin = false;
  823. //弹窗
  824. this.bindShow = true;
  825. }
  826. })
  827. .catch((err) => {
  828. this.isLogin = false;
  829. this.$message({
  830. message: err.msg,
  831. type: "error",
  832. });
  833. });
  834. }
  835. });
  836. },
  837. /**
  838. * 获取登录短信
  839. */
  840. getLoginSms() {
  841. this.$refs.loginSmsForm.validateField("tel", (valid) => {
  842. if (!valid) {
  843. if (this.countDown == 0) {
  844. if (this.getLoginCodeLock) {
  845. return;
  846. }
  847. this.getLoginCodeLock = true;
  848. this.$request
  849. .getLoginSms({ tel: this.loginSmsForm.tel })
  850. .then((res) => {
  851. this.getLoginCodeLock = false;
  852. this.$message({
  853. message: `验证码已发送`,
  854. type: "success",
  855. });
  856. this.countDown = 60;
  857. this.countDownTimer = setInterval(() => {
  858. if (this.countDown == 0) {
  859. clearInterval(this.countDownTimer);
  860. } else {
  861. this.countDown--;
  862. }
  863. }, 1000);
  864. })
  865. .catch((err) => {
  866. this.getLoginCodeLock = false;
  867. });
  868. }
  869. }
  870. });
  871. },
  872. /**
  873. * 手机号登录
  874. */
  875. loginSms() {
  876. this.$refs.loginSmsForm.validate((valid) => {
  877. if (valid) {
  878. this.isloginSms = true;
  879. this.$request
  880. .loginSms(this.loginSmsForm)
  881. .then((res) => {
  882. this.isloginSms = false;
  883. if (res.data.full_info) {
  884. localStorage.setItem("user_account", res.data.user_account);
  885. localStorage.setItem("token", res.data.token);
  886. this.$tools.setUuid(new Date().valueOf() + "");
  887. this.getInfo();
  888. } else {
  889. this.indexUserAccount = res.data.user_account;
  890. this.indexToken = res.data.token;
  891. this.bindShow = true;
  892. }
  893. })
  894. .catch((err) => {
  895. this.isloginSms = false;
  896. this.$message({
  897. message: err.msg,
  898. type: "error",
  899. });
  900. });
  901. }
  902. });
  903. },
  904. /**
  905. * 获取用户登录信息
  906. */
  907. getInfo() {
  908. this.$request
  909. .getInfo()
  910. .then((res) => {
  911. this.loginForm = {};
  912. this.loginSmsForm = {};
  913. this.isLogin = false;
  914. this.isloginSms = false;
  915. this.setUserInfo(res.data);
  916. })
  917. .catch((err) => {
  918. this.isLogin = false;
  919. this.isloginSms = false;
  920. this.$message({
  921. message: err.msg,
  922. type: "error",
  923. });
  924. });
  925. },
  926. bind() {
  927. this.$refs.bindForm.validate((valid) => {
  928. if (valid) {
  929. this.isBind = true;
  930. let bindForm = JSON.parse(JSON.stringify(this.bindForm));
  931. bindForm.token = this.indexToken;
  932. this.$request
  933. .bindIdCard(bindForm)
  934. .then((res) => {
  935. this.isBind = false;
  936. this.bindShow = false;
  937. this.$message({
  938. message: "关联成功",
  939. type: "success",
  940. });
  941. localStorage.setItem("user_account", this.indexUserAccount);
  942. localStorage.setItem("token", this.indexToken);
  943. this.$tools.setUuid(new Date().valueOf() + "");
  944. this.getInfo();
  945. })
  946. .catch((err) => {
  947. this.isBind = false;
  948. this.$message({
  949. message: err.msg,
  950. type: "error",
  951. });
  952. });
  953. }
  954. });
  955. },
  956. bindNext() {
  957. this.bindShow = false;
  958. this.indexToken = "";
  959. this.indexUserAccount = "";
  960. },
  961. },
  962. };
  963. </script>
  964. <!-- Add "scoped" attribute to limit CSS to this component only -->
  965. <style scoped lang="scss">
  966. .text_align {
  967. text-align: center;
  968. font-size: 18px;
  969. margin: 40px 0px;
  970. }
  971. .home {
  972. .header {
  973. background: #ffffff;
  974. &__header {
  975. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
  976. .text-list {
  977. height: 40px;
  978. line-height: 40px;
  979. text-align: right;
  980. font-size: 0;
  981. a {
  982. color: #3f8dfd;
  983. font-size: 14px;
  984. padding: 0 14px;
  985. &:nth-last-of-type(1) {
  986. padding-right: 0;
  987. border-left: 1px solid #3f8dfd;
  988. }
  989. }
  990. }
  991. .icon-list {
  992. height: 40px;
  993. line-height: 40px;
  994. text-align: right;
  995. font-size: 0;
  996. a {
  997. color: #3f8dfd;
  998. font-size: 14px;
  999. padding: 0 14px;
  1000. position: relative;
  1001. .icon {
  1002. font-size: 20px;
  1003. }
  1004. .modal-box {
  1005. width: 162px;
  1006. background: #ffffff;
  1007. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  1008. border-radius: 8px;
  1009. position: absolute;
  1010. top: 34px;
  1011. left: -40px;
  1012. li {
  1013. margin-left: 10px;
  1014. border-bottom: 1px solid #eeeeee;
  1015. height: 40px;
  1016. line-height: 40px;
  1017. cursor: pointer;
  1018. padding-left: 5px;
  1019. color: #666666;
  1020. text-align: left;
  1021. &:hover {
  1022. background: #eeeeee;
  1023. color: #3f8dfd;
  1024. }
  1025. &:nth-last-of-type(1) {
  1026. border: 0;
  1027. }
  1028. }
  1029. }
  1030. }
  1031. }
  1032. }
  1033. &__body {
  1034. margin-top: 16px;
  1035. .logo {
  1036. float: left;
  1037. img {
  1038. width: 162px;
  1039. height: 33px;
  1040. }
  1041. h1 {
  1042. background: url("~@/assets/logo.png") no-repeat center;
  1043. width: 162px;
  1044. height: 33px;
  1045. }
  1046. }
  1047. .search {
  1048. float: left;
  1049. margin-left: 160px;
  1050. width: 648px;
  1051. background: #fafbfc;
  1052. border: 1px solid #3f8dfd;
  1053. border-radius: 8px;
  1054. display: flex;
  1055. overflow: hidden;
  1056. &__select {
  1057. width: 76px;
  1058. border-right: 1px solid #fff;
  1059. select {
  1060. text-align: center;
  1061. width: 100%;
  1062. height: 100%;
  1063. border: 0;
  1064. outline: none;
  1065. }
  1066. }
  1067. &__input {
  1068. flex: 1;
  1069. input {
  1070. width: 100%;
  1071. height: 100%;
  1072. }
  1073. }
  1074. &__btn {
  1075. padding: 0;
  1076. text-align: center;
  1077. width: 80px;
  1078. height: 40px;
  1079. line-height: 40px;
  1080. font-size: 14px;
  1081. border-radius: 0;
  1082. }
  1083. }
  1084. .contact {
  1085. float: right;
  1086. padding-left: 45px;
  1087. background: url("~@/assets/cus.png") no-repeat left top;
  1088. &__phone {
  1089. font-size: 18px;
  1090. font-family: Microsoft YaHei;
  1091. font-weight: bold;
  1092. color: #666666;
  1093. }
  1094. &__time {
  1095. font-size: 14px;
  1096. font-family: Microsoft YaHei;
  1097. font-weight: 400;
  1098. color: #666666;
  1099. }
  1100. }
  1101. }
  1102. }
  1103. .section {
  1104. margin-top: 40px;
  1105. .tabs {
  1106. margin-left: 324px;
  1107. .tab {
  1108. display: inline-block;
  1109. width: 138px;
  1110. height: 40px;
  1111. font-size: 16px;
  1112. text-align: center;
  1113. line-height: 40px;
  1114. color: #333;
  1115. &.active {
  1116. color: #3f8dfd;
  1117. background: #f0f5fc;
  1118. }
  1119. }
  1120. }
  1121. .swiper-wrap {
  1122. transition: background 0.3s;
  1123. height: 400px;
  1124. position: relative;
  1125. .container {
  1126. position: relative;
  1127. height: 400px;
  1128. .left-box {
  1129. position: absolute;
  1130. top: -40px;
  1131. left: 0;
  1132. height: 440px;
  1133. width: 300px;
  1134. z-index: 10;
  1135. &__header {
  1136. height: 40px;
  1137. line-height: 40px;
  1138. color: #fff;
  1139. font-size: 16px;
  1140. background: #3f8dfd;
  1141. text-align: center;
  1142. }
  1143. &__body {
  1144. position: relative;
  1145. height: 400px;
  1146. background: rgba(0, 0, 0, 0.5);
  1147. overflow: hidden;
  1148. &:hover {
  1149. overflow: visible;
  1150. .slide-list {
  1151. opacity: 1;
  1152. left: 100%;
  1153. }
  1154. }
  1155. .slide-list {
  1156. opacity: 0;
  1157. transition: all 0.3s;
  1158. width: 672px;
  1159. padding: 0;
  1160. background: rgba(255, 255, 255, 1);
  1161. position: absolute;
  1162. top: 0;
  1163. left: 0;
  1164. padding-left: 24px;
  1165. z-index: 10;
  1166. &__item {
  1167. min-height: 80px;
  1168. display: flex;
  1169. align-items: center;
  1170. border-bottom: 1px solid #ddd;
  1171. &:nth-last-of-type(1) {
  1172. border: 0;
  1173. }
  1174. .title {
  1175. cursor: pointer;
  1176. color: #fff;
  1177. width: 120px;
  1178. height: 28px;
  1179. border: 1px solid #ffffff;
  1180. border-radius: 14px;
  1181. background: #3f8dfd;
  1182. line-height: 26px;
  1183. text-align: center;
  1184. border-radius: 15px;
  1185. margin-right: 10px;
  1186. }
  1187. .nav {
  1188. flex: 1;
  1189. display: flex;
  1190. flex-wrap: wrap;
  1191. li {
  1192. margin: 9px 24px 9px 0;
  1193. display: flex;
  1194. .text {
  1195. cursor: pointer;
  1196. font-size: 14px;
  1197. font-family: Microsoft YaHei;
  1198. font-weight: 400;
  1199. color: #666;
  1200. }
  1201. }
  1202. }
  1203. }
  1204. }
  1205. .bg {
  1206. backdrop-filter: blur(10px);
  1207. position: absolute;
  1208. left: 0;
  1209. top: 0;
  1210. width: 100%;
  1211. height: 100%;
  1212. z-index: 12;
  1213. }
  1214. .list {
  1215. position: relative;
  1216. z-index: 22;
  1217. padding-left: 16px;
  1218. li {
  1219. padding: 12px 0;
  1220. height: 80px;
  1221. border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  1222. display: flex;
  1223. &:nth-last-of-type(1) {
  1224. border: 0;
  1225. }
  1226. .text {
  1227. flex: 1;
  1228. &__title {
  1229. cursor: pointer;
  1230. font-size: 16px;
  1231. font-family: Microsoft YaHei;
  1232. font-weight: 400;
  1233. color: #ffffff;
  1234. }
  1235. &__desc {
  1236. margin-top: 16px;
  1237. .item {
  1238. font-size: 14px;
  1239. font-family: Microsoft YaHei;
  1240. font-weight: 400;
  1241. color: #ffffff;
  1242. margin-right: 30px;
  1243. }
  1244. }
  1245. }
  1246. }
  1247. }
  1248. }
  1249. }
  1250. .swiper {
  1251. .swiper-slide {
  1252. cursor: pointer;
  1253. height: 400px;
  1254. img {
  1255. width: 100%;
  1256. height: 100%;
  1257. }
  1258. }
  1259. .swiper-pagination {
  1260. text-align: right;
  1261. padding-right: 324px;
  1262. /deep/ .swiper-pagination-bullet {
  1263. background: rgba(255, 255, 255, 0.4);
  1264. &-active {
  1265. background: rgba(255, 255, 255, 1);
  1266. }
  1267. }
  1268. }
  1269. }
  1270. .right-box {
  1271. width: 300px;
  1272. background: rgba(0, 0, 0, 0.5);
  1273. position: absolute;
  1274. right: 0;
  1275. bottom: 0;
  1276. top: 0;
  1277. z-index: 10;
  1278. .bg {
  1279. backdrop-filter: blur(10px);
  1280. position: absolute;
  1281. left: 0;
  1282. top: 0;
  1283. width: 100%;
  1284. height: 100%;
  1285. z-index: 2;
  1286. }
  1287. .no-login {
  1288. position: relative;
  1289. z-index: 10;
  1290. .input {
  1291. margin: 16px;
  1292. height: 40px;
  1293. background: #ffffff;
  1294. border-radius: 8px;
  1295. input {
  1296. padding: 0 16px;
  1297. width: 100%;
  1298. height: 100%;
  1299. font-size: 14px;
  1300. color: #333;
  1301. &::placeholder {
  1302. color: #999;
  1303. }
  1304. }
  1305. .btn {
  1306. font-size: 14px;
  1307. font-family: Microsoft YaHei;
  1308. font-weight: 400;
  1309. color: #3f8dfd;
  1310. white-space: nowrap;
  1311. cursor: pointer;
  1312. }
  1313. }
  1314. .submit {
  1315. margin: 16px;
  1316. font-size: 16px;
  1317. margin-top: 16px;
  1318. box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
  1319. display: block;
  1320. width: 268px;
  1321. }
  1322. .bottom-text {
  1323. margin: 16px;
  1324. display: flex;
  1325. justify-content: space-between;
  1326. .text {
  1327. color: #fff;
  1328. }
  1329. }
  1330. }
  1331. .has-login {
  1332. position: relative;
  1333. z-index: 10;
  1334. padding: 14px 0 0 14px;
  1335. .userinfo {
  1336. display: flex;
  1337. align-items: center;
  1338. .avatar {
  1339. width: 40px;
  1340. height: 40px;
  1341. }
  1342. .nickname {
  1343. font-size: 16px;
  1344. font-family: Microsoft YaHei;
  1345. font-weight: bold;
  1346. color: #ffffff;
  1347. margin-left: 7px;
  1348. }
  1349. }
  1350. .type-list {
  1351. display: flex;
  1352. margin-top: 28px;
  1353. padding-bottom: 14px;
  1354. border-bottom: 1px solid #fff;
  1355. &__item {
  1356. cursor: pointer;
  1357. margin-right: 38px;
  1358. .img {
  1359. width: 64px;
  1360. height: 64px;
  1361. }
  1362. .text {
  1363. text-align: center;
  1364. margin-top: 10px;
  1365. font-size: 14px;
  1366. font-family: Microsoft YaHei;
  1367. font-weight: 400;
  1368. color: #ffffff;
  1369. }
  1370. &:nth-last-of-type(1) {
  1371. margin-right: 0;
  1372. }
  1373. }
  1374. }
  1375. .history {
  1376. border-bottom: 1px solid #fff;
  1377. padding-bottom: 15px;
  1378. .btn {
  1379. margin-top: 15px;
  1380. width: 64px;
  1381. height: 24px;
  1382. border: 1px solid #ffffff;
  1383. border-radius: 8px;
  1384. text-align: center;
  1385. line-height: 24px;
  1386. color: #fff;
  1387. }
  1388. .title {
  1389. margin-top: 15px;
  1390. padding-right: 15px;
  1391. font-size: 14px;
  1392. font-family: Microsoft YaHei;
  1393. font-weight: 400;
  1394. color: #ffffff;
  1395. }
  1396. .progress {
  1397. margin-top: 15px;
  1398. display: flex;
  1399. justify-content: space-between;
  1400. padding-right: 15px;
  1401. span {
  1402. font-size: 14px;
  1403. font-family: Microsoft YaHei;
  1404. font-weight: 400;
  1405. color: #ffffff;
  1406. }
  1407. }
  1408. }
  1409. }
  1410. }
  1411. }
  1412. }
  1413. }
  1414. .course {
  1415. background: #f5f7fa;
  1416. padding-top: 40px;
  1417. &__header {
  1418. display: flex;
  1419. align-items: center;
  1420. .title {
  1421. background: url("~@/assets/video.png") no-repeat left center;
  1422. padding-left: 36px;
  1423. font-size: 24px;
  1424. font-family: YouSheBiaoTiHei;
  1425. font-weight: 400;
  1426. color: #333333;
  1427. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1428. }
  1429. .tabs {
  1430. margin-left: 40px;
  1431. display: flex;
  1432. align-items: center;
  1433. .tab {
  1434. cursor: pointer;
  1435. user-select: none;
  1436. // width: 88px;
  1437. padding: 0px 6px;
  1438. height: 24px;
  1439. border: 1px solid #f84e05;
  1440. border-radius: 12px;
  1441. text-align: center;
  1442. line-height: 24px;
  1443. color: #f84e05;
  1444. font-size: 14px;
  1445. margin: 0 4px;
  1446. &.active {
  1447. color: #fff;
  1448. background: #f84e05;
  1449. }
  1450. }
  1451. }
  1452. }
  1453. &__body {
  1454. .list {
  1455. width: 100%;
  1456. .course-item {
  1457. float: left;
  1458. }
  1459. }
  1460. }
  1461. &__footer {
  1462. overflow: hidden;
  1463. .btn {
  1464. cursor: pointer;
  1465. width: 146px;
  1466. height: 40px;
  1467. background: #e3eaf7;
  1468. border-radius: 8px;
  1469. margin: 20px auto 40px;
  1470. color: #3f8dfd;
  1471. text-align: center;
  1472. line-height: 40px;
  1473. transition: all 0.2s;
  1474. &:hover {
  1475. color: #fff;
  1476. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1477. background: #3f8dfd;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. .bank {
  1483. background: #fff;
  1484. padding-top: 40px;
  1485. &__header {
  1486. display: flex;
  1487. align-items: center;
  1488. .title {
  1489. background: url("~@/assets/exercise.png") no-repeat left center;
  1490. padding-left: 36px;
  1491. font-size: 24px;
  1492. font-family: YouSheBiaoTiHei;
  1493. font-weight: 400;
  1494. color: #333333;
  1495. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1496. }
  1497. .tabs {
  1498. margin-left: 40px;
  1499. display: flex;
  1500. align-items: center;
  1501. .tab {
  1502. cursor: pointer;
  1503. user-select: none;
  1504. padding: 0px 6px;
  1505. // width: 88px;
  1506. height: 24px;
  1507. border: 1px solid #437cff;
  1508. border-radius: 12px;
  1509. text-align: center;
  1510. line-height: 24px;
  1511. color: #437cff;
  1512. font-size: 14px;
  1513. margin: 0 4px;
  1514. &.active {
  1515. color: #fff;
  1516. background: #437cff;
  1517. }
  1518. }
  1519. }
  1520. }
  1521. &__body {
  1522. .list {
  1523. width: 100%;
  1524. .bank-item {
  1525. float: left;
  1526. }
  1527. }
  1528. }
  1529. &__footer {
  1530. overflow: hidden;
  1531. .btn {
  1532. cursor: pointer;
  1533. width: 146px;
  1534. height: 40px;
  1535. background: #e3eaf7;
  1536. border-radius: 8px;
  1537. margin: 20px auto 40px;
  1538. color: #3f8dfd;
  1539. text-align: center;
  1540. line-height: 40px;
  1541. transition: all 0.2s;
  1542. &:hover {
  1543. color: #fff;
  1544. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1545. background: #3f8dfd;
  1546. }
  1547. }
  1548. }
  1549. }
  1550. .bind {
  1551. /deep/ .el-dialog__header {
  1552. display: none;
  1553. }
  1554. /deep/ .el-dialog__body {
  1555. padding: 0;
  1556. overflow: unset;
  1557. }
  1558. &__close {
  1559. position: absolute;
  1560. right: 0;
  1561. top: -28px;
  1562. width: 24px;
  1563. height: 24px;
  1564. line-height: 24px;
  1565. text-align: center;
  1566. color: #eee;
  1567. border: 1px solid #eee;
  1568. border-radius: 50%;
  1569. }
  1570. &__header {
  1571. height: 40px;
  1572. text-align: center;
  1573. line-height: 40px;
  1574. border-bottom: 1px solid #eeeeee;
  1575. }
  1576. &__body {
  1577. height: 248px;
  1578. padding: 24px;
  1579. position: relative;
  1580. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  1581. border-radius: 8px;
  1582. .submit {
  1583. width: 100%;
  1584. }
  1585. .bind-next {
  1586. font-size: 14px;
  1587. text-align: center;
  1588. color: #999;
  1589. margin-top: 10px;
  1590. cursor: pointer;
  1591. }
  1592. }
  1593. }
  1594. }
  1595. .fade-enter,
  1596. .fade-leave-to {
  1597. opacity: 0;
  1598. height: 0;
  1599. }
  1600. .fade-enter-to,
  1601. .fade-leave {
  1602. opacity: 1;
  1603. height: 122px;
  1604. }
  1605. .fade-enter-active,
  1606. .fade-leave-active {
  1607. transition: all 0.3s;
  1608. }
  1609. </style>