index.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721
  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. this.$request
  815. .login(this.loginForm)
  816. .then((res) => {
  817. if (res.data.full_info) {
  818. localStorage.setItem("user_account", res.data.user_account);
  819. localStorage.setItem("token", res.data.token);
  820. this.getInfo();
  821. } else {
  822. this.indexUserAccount = res.data.user_account;
  823. this.indexToken = res.data.token;
  824. this.isLogin = false;
  825. //弹窗
  826. this.bindShow = true;
  827. }
  828. })
  829. .catch((err) => {
  830. this.isLogin = false;
  831. this.$message({
  832. message: err.msg,
  833. type: "error",
  834. });
  835. });
  836. }
  837. });
  838. },
  839. /**
  840. * 获取登录短信
  841. */
  842. getLoginSms() {
  843. this.$refs.loginSmsForm.validateField("tel", (valid) => {
  844. if (!valid) {
  845. if (this.countDown == 0) {
  846. if (this.getLoginCodeLock) {
  847. return;
  848. }
  849. this.getLoginCodeLock = true;
  850. this.$request
  851. .getLoginSms({ tel: this.loginSmsForm.tel })
  852. .then((res) => {
  853. this.getLoginCodeLock = false;
  854. this.$message({
  855. message: `验证码已发送`,
  856. type: "success",
  857. });
  858. this.countDown = 60;
  859. this.countDownTimer = setInterval(() => {
  860. if (this.countDown == 0) {
  861. clearInterval(this.countDownTimer);
  862. } else {
  863. this.countDown--;
  864. }
  865. }, 1000);
  866. })
  867. .catch((err) => {
  868. this.getLoginCodeLock = false;
  869. });
  870. }
  871. }
  872. });
  873. },
  874. /**
  875. * 手机号登录
  876. */
  877. loginSms() {
  878. this.$refs.loginSmsForm.validate((valid) => {
  879. if (valid) {
  880. this.isloginSms = true;
  881. this.$request
  882. .loginSms(this.loginSmsForm)
  883. .then((res) => {
  884. this.isloginSms = false;
  885. if (res.data.full_info) {
  886. localStorage.setItem("user_account", res.data.user_account);
  887. localStorage.setItem("token", res.data.token);
  888. this.$tools.setUuid(new Date().valueOf() + "");
  889. this.getInfo();
  890. } else {
  891. this.indexUserAccount = res.data.user_account;
  892. this.indexToken = res.data.token;
  893. this.bindShow = true;
  894. }
  895. })
  896. .catch((err) => {
  897. this.isloginSms = false;
  898. this.$message({
  899. message: err.msg,
  900. type: "error",
  901. });
  902. });
  903. }
  904. });
  905. },
  906. /**
  907. * 获取用户登录信息
  908. */
  909. getInfo() {
  910. this.$request
  911. .getInfo()
  912. .then((res) => {
  913. this.loginForm = {};
  914. this.loginSmsForm = {};
  915. this.isLogin = false;
  916. this.isloginSms = false;
  917. this.setUserInfo(res.data);
  918. })
  919. .catch((err) => {
  920. this.isLogin = false;
  921. this.isloginSms = false;
  922. this.$message({
  923. message: err.msg,
  924. type: "error",
  925. });
  926. });
  927. },
  928. bind() {
  929. this.$refs.bindForm.validate((valid) => {
  930. if (valid) {
  931. this.isBind = true;
  932. let bindForm = JSON.parse(JSON.stringify(this.bindForm));
  933. bindForm.token = this.indexToken;
  934. this.$request
  935. .bindIdCard(bindForm)
  936. .then((res) => {
  937. this.isBind = false;
  938. this.bindShow = false;
  939. this.$message({
  940. message: "关联成功",
  941. type: "success",
  942. });
  943. localStorage.setItem("user_account", this.indexUserAccount);
  944. localStorage.setItem("token", this.indexToken);
  945. this.$tools.setUuid(new Date().valueOf() + "");
  946. this.getInfo();
  947. })
  948. .catch((err) => {
  949. this.isBind = false;
  950. this.$message({
  951. message: err.msg,
  952. type: "error",
  953. });
  954. });
  955. }
  956. });
  957. },
  958. bindNext() {
  959. this.bindShow = false;
  960. this.indexToken = "";
  961. this.indexUserAccount = "";
  962. },
  963. },
  964. };
  965. </script>
  966. <!-- Add "scoped" attribute to limit CSS to this component only -->
  967. <style scoped lang="scss">
  968. .text_align {
  969. text-align: center;
  970. font-size: 18px;
  971. margin: 40px 0px;
  972. }
  973. .home {
  974. .header {
  975. background: #ffffff;
  976. &__header {
  977. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
  978. .text-list {
  979. height: 40px;
  980. line-height: 40px;
  981. text-align: right;
  982. font-size: 0;
  983. a {
  984. color: #3f8dfd;
  985. font-size: 14px;
  986. padding: 0 14px;
  987. &:nth-last-of-type(1) {
  988. padding-right: 0;
  989. border-left: 1px solid #3f8dfd;
  990. }
  991. }
  992. }
  993. .icon-list {
  994. height: 40px;
  995. line-height: 40px;
  996. text-align: right;
  997. font-size: 0;
  998. a {
  999. color: #3f8dfd;
  1000. font-size: 14px;
  1001. padding: 0 14px;
  1002. position: relative;
  1003. .icon {
  1004. font-size: 20px;
  1005. }
  1006. .modal-box {
  1007. width: 162px;
  1008. background: #ffffff;
  1009. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  1010. border-radius: 8px;
  1011. position: absolute;
  1012. top: 34px;
  1013. left: -40px;
  1014. li {
  1015. margin-left: 10px;
  1016. border-bottom: 1px solid #eeeeee;
  1017. height: 40px;
  1018. line-height: 40px;
  1019. cursor: pointer;
  1020. padding-left: 5px;
  1021. color: #666666;
  1022. text-align: left;
  1023. &:hover {
  1024. background: #eeeeee;
  1025. color: #3f8dfd;
  1026. }
  1027. &:nth-last-of-type(1) {
  1028. border: 0;
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. &__body {
  1036. margin-top: 16px;
  1037. .logo {
  1038. float: left;
  1039. img {
  1040. width: 162px;
  1041. height: 33px;
  1042. }
  1043. h1 {
  1044. background: url("~@/assets/logo.png") no-repeat center;
  1045. width: 162px;
  1046. height: 33px;
  1047. }
  1048. }
  1049. .search {
  1050. float: left;
  1051. margin-left: 160px;
  1052. width: 648px;
  1053. background: #fafbfc;
  1054. border: 1px solid #3f8dfd;
  1055. border-radius: 8px;
  1056. display: flex;
  1057. overflow: hidden;
  1058. &__select {
  1059. width: 76px;
  1060. border-right: 1px solid #fff;
  1061. select {
  1062. text-align: center;
  1063. width: 100%;
  1064. height: 100%;
  1065. border: 0;
  1066. outline: none;
  1067. }
  1068. }
  1069. &__input {
  1070. flex: 1;
  1071. input {
  1072. width: 100%;
  1073. height: 100%;
  1074. }
  1075. }
  1076. &__btn {
  1077. padding: 0;
  1078. text-align: center;
  1079. width: 80px;
  1080. height: 40px;
  1081. line-height: 40px;
  1082. font-size: 14px;
  1083. border-radius: 0;
  1084. }
  1085. }
  1086. .contact {
  1087. float: right;
  1088. padding-left: 45px;
  1089. background: url("~@/assets/cus.png") no-repeat left top;
  1090. &__phone {
  1091. font-size: 18px;
  1092. font-family: Microsoft YaHei;
  1093. font-weight: bold;
  1094. color: #666666;
  1095. }
  1096. &__time {
  1097. font-size: 14px;
  1098. font-family: Microsoft YaHei;
  1099. font-weight: 400;
  1100. color: #666666;
  1101. }
  1102. }
  1103. }
  1104. }
  1105. .section {
  1106. margin-top: 40px;
  1107. .tabs {
  1108. margin-left: 324px;
  1109. .tab {
  1110. display: inline-block;
  1111. width: 138px;
  1112. height: 40px;
  1113. font-size: 16px;
  1114. text-align: center;
  1115. line-height: 40px;
  1116. color: #333;
  1117. &.active {
  1118. color: #3f8dfd;
  1119. background: #f0f5fc;
  1120. }
  1121. }
  1122. }
  1123. .swiper-wrap {
  1124. transition: background 0.3s;
  1125. height: 400px;
  1126. position: relative;
  1127. .container {
  1128. position: relative;
  1129. height: 400px;
  1130. .left-box {
  1131. position: absolute;
  1132. top: -40px;
  1133. left: 0;
  1134. height: 440px;
  1135. width: 300px;
  1136. z-index: 10;
  1137. &__header {
  1138. height: 40px;
  1139. line-height: 40px;
  1140. color: #fff;
  1141. font-size: 16px;
  1142. background: #3f8dfd;
  1143. text-align: center;
  1144. }
  1145. &__body {
  1146. position: relative;
  1147. height: 400px;
  1148. background: rgba(0, 0, 0, 0.5);
  1149. overflow: hidden;
  1150. &:hover {
  1151. overflow: visible;
  1152. .slide-list {
  1153. opacity: 1;
  1154. left: 100%;
  1155. }
  1156. }
  1157. .slide-list {
  1158. opacity: 0;
  1159. transition: all 0.3s;
  1160. width: 672px;
  1161. padding: 0;
  1162. background: rgba(255, 255, 255, 1);
  1163. position: absolute;
  1164. top: 0;
  1165. left: 0;
  1166. padding-left: 24px;
  1167. z-index: 10;
  1168. &__item {
  1169. min-height: 80px;
  1170. display: flex;
  1171. align-items: center;
  1172. border-bottom: 1px solid #ddd;
  1173. &:nth-last-of-type(1) {
  1174. border: 0;
  1175. }
  1176. .title {
  1177. cursor: pointer;
  1178. color: #fff;
  1179. width: 120px;
  1180. height: 28px;
  1181. border: 1px solid #ffffff;
  1182. border-radius: 14px;
  1183. background: #3f8dfd;
  1184. line-height: 26px;
  1185. text-align: center;
  1186. border-radius: 15px;
  1187. margin-right: 10px;
  1188. }
  1189. .nav {
  1190. flex: 1;
  1191. display: flex;
  1192. flex-wrap: wrap;
  1193. li {
  1194. margin: 9px 24px 9px 0;
  1195. display: flex;
  1196. .text {
  1197. cursor: pointer;
  1198. font-size: 14px;
  1199. font-family: Microsoft YaHei;
  1200. font-weight: 400;
  1201. color: #666;
  1202. }
  1203. }
  1204. }
  1205. }
  1206. }
  1207. .bg {
  1208. backdrop-filter: blur(10px);
  1209. position: absolute;
  1210. left: 0;
  1211. top: 0;
  1212. width: 100%;
  1213. height: 100%;
  1214. z-index: 12;
  1215. }
  1216. .list {
  1217. position: relative;
  1218. z-index: 22;
  1219. padding-left: 16px;
  1220. li {
  1221. padding: 12px 0;
  1222. height: 80px;
  1223. border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  1224. display: flex;
  1225. &:nth-last-of-type(1) {
  1226. border: 0;
  1227. }
  1228. .text {
  1229. flex: 1;
  1230. &__title {
  1231. cursor: pointer;
  1232. font-size: 16px;
  1233. font-family: Microsoft YaHei;
  1234. font-weight: 400;
  1235. color: #ffffff;
  1236. }
  1237. &__desc {
  1238. margin-top: 16px;
  1239. .item {
  1240. font-size: 14px;
  1241. font-family: Microsoft YaHei;
  1242. font-weight: 400;
  1243. color: #ffffff;
  1244. margin-right: 30px;
  1245. }
  1246. }
  1247. }
  1248. }
  1249. }
  1250. }
  1251. }
  1252. .swiper {
  1253. .swiper-slide {
  1254. cursor: pointer;
  1255. height: 400px;
  1256. img {
  1257. width: 100%;
  1258. height: 100%;
  1259. }
  1260. }
  1261. .swiper-pagination {
  1262. text-align: right;
  1263. padding-right: 324px;
  1264. /deep/ .swiper-pagination-bullet {
  1265. background: rgba(255, 255, 255, 0.4);
  1266. &-active {
  1267. background: rgba(255, 255, 255, 1);
  1268. }
  1269. }
  1270. }
  1271. }
  1272. .right-box {
  1273. width: 300px;
  1274. background: rgba(0, 0, 0, 0.5);
  1275. position: absolute;
  1276. right: 0;
  1277. bottom: 0;
  1278. top: 0;
  1279. z-index: 10;
  1280. .bg {
  1281. backdrop-filter: blur(10px);
  1282. position: absolute;
  1283. left: 0;
  1284. top: 0;
  1285. width: 100%;
  1286. height: 100%;
  1287. z-index: 2;
  1288. }
  1289. .no-login {
  1290. position: relative;
  1291. z-index: 10;
  1292. .input {
  1293. margin: 16px;
  1294. height: 40px;
  1295. background: #ffffff;
  1296. border-radius: 8px;
  1297. input {
  1298. padding: 0 16px;
  1299. width: 100%;
  1300. height: 100%;
  1301. font-size: 14px;
  1302. color: #333;
  1303. &::placeholder {
  1304. color: #999;
  1305. }
  1306. }
  1307. .btn {
  1308. font-size: 14px;
  1309. font-family: Microsoft YaHei;
  1310. font-weight: 400;
  1311. color: #3f8dfd;
  1312. white-space: nowrap;
  1313. cursor: pointer;
  1314. }
  1315. }
  1316. .submit {
  1317. margin: 16px;
  1318. font-size: 16px;
  1319. margin-top: 16px;
  1320. box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
  1321. display: block;
  1322. width: 268px;
  1323. }
  1324. .bottom-text {
  1325. margin: 16px;
  1326. display: flex;
  1327. justify-content: space-between;
  1328. .text {
  1329. color: #fff;
  1330. }
  1331. }
  1332. }
  1333. .has-login {
  1334. position: relative;
  1335. z-index: 10;
  1336. padding: 14px 0 0 14px;
  1337. .userinfo {
  1338. display: flex;
  1339. align-items: center;
  1340. .avatar {
  1341. width: 40px;
  1342. height: 40px;
  1343. }
  1344. .nickname {
  1345. font-size: 16px;
  1346. font-family: Microsoft YaHei;
  1347. font-weight: bold;
  1348. color: #ffffff;
  1349. margin-left: 7px;
  1350. }
  1351. }
  1352. .type-list {
  1353. display: flex;
  1354. margin-top: 28px;
  1355. padding-bottom: 14px;
  1356. border-bottom: 1px solid #fff;
  1357. &__item {
  1358. cursor: pointer;
  1359. margin-right: 38px;
  1360. .img {
  1361. width: 64px;
  1362. height: 64px;
  1363. }
  1364. .text {
  1365. text-align: center;
  1366. margin-top: 10px;
  1367. font-size: 14px;
  1368. font-family: Microsoft YaHei;
  1369. font-weight: 400;
  1370. color: #ffffff;
  1371. }
  1372. &:nth-last-of-type(1) {
  1373. margin-right: 0;
  1374. }
  1375. }
  1376. }
  1377. .history {
  1378. border-bottom: 1px solid #fff;
  1379. padding-bottom: 15px;
  1380. .btn {
  1381. margin-top: 15px;
  1382. width: 64px;
  1383. height: 24px;
  1384. border: 1px solid #ffffff;
  1385. border-radius: 8px;
  1386. text-align: center;
  1387. line-height: 24px;
  1388. color: #fff;
  1389. }
  1390. .title {
  1391. margin-top: 15px;
  1392. padding-right: 15px;
  1393. font-size: 14px;
  1394. font-family: Microsoft YaHei;
  1395. font-weight: 400;
  1396. color: #ffffff;
  1397. }
  1398. .progress {
  1399. margin-top: 15px;
  1400. display: flex;
  1401. justify-content: space-between;
  1402. padding-right: 15px;
  1403. span {
  1404. font-size: 14px;
  1405. font-family: Microsoft YaHei;
  1406. font-weight: 400;
  1407. color: #ffffff;
  1408. }
  1409. }
  1410. }
  1411. }
  1412. }
  1413. }
  1414. }
  1415. }
  1416. .course {
  1417. background: #f5f7fa;
  1418. padding-top: 40px;
  1419. &__header {
  1420. display: flex;
  1421. align-items: center;
  1422. .title {
  1423. background: url("~@/assets/video.png") no-repeat left center;
  1424. padding-left: 36px;
  1425. font-size: 24px;
  1426. font-family: YouSheBiaoTiHei;
  1427. font-weight: 400;
  1428. color: #333333;
  1429. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1430. }
  1431. .tabs {
  1432. margin-left: 40px;
  1433. display: flex;
  1434. align-items: center;
  1435. .tab {
  1436. cursor: pointer;
  1437. user-select: none;
  1438. // width: 88px;
  1439. padding: 0px 6px;
  1440. height: 24px;
  1441. border: 1px solid #f84e05;
  1442. border-radius: 12px;
  1443. text-align: center;
  1444. line-height: 24px;
  1445. color: #f84e05;
  1446. font-size: 14px;
  1447. margin: 0 4px;
  1448. &.active {
  1449. color: #fff;
  1450. background: #f84e05;
  1451. }
  1452. }
  1453. }
  1454. }
  1455. &__body {
  1456. .list {
  1457. width: 100%;
  1458. .course-item {
  1459. float: left;
  1460. }
  1461. }
  1462. }
  1463. &__footer {
  1464. overflow: hidden;
  1465. .btn {
  1466. cursor: pointer;
  1467. width: 146px;
  1468. height: 40px;
  1469. background: #e3eaf7;
  1470. border-radius: 8px;
  1471. margin: 20px auto 40px;
  1472. color: #3f8dfd;
  1473. text-align: center;
  1474. line-height: 40px;
  1475. transition: all 0.2s;
  1476. &:hover {
  1477. color: #fff;
  1478. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1479. background: #3f8dfd;
  1480. }
  1481. }
  1482. }
  1483. }
  1484. .bank {
  1485. background: #fff;
  1486. padding-top: 40px;
  1487. &__header {
  1488. display: flex;
  1489. align-items: center;
  1490. .title {
  1491. background: url("~@/assets/exercise.png") no-repeat left center;
  1492. padding-left: 36px;
  1493. font-size: 24px;
  1494. font-family: YouSheBiaoTiHei;
  1495. font-weight: 400;
  1496. color: #333333;
  1497. text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
  1498. }
  1499. .tabs {
  1500. margin-left: 40px;
  1501. display: flex;
  1502. align-items: center;
  1503. .tab {
  1504. cursor: pointer;
  1505. user-select: none;
  1506. padding: 0px 6px;
  1507. // width: 88px;
  1508. height: 24px;
  1509. border: 1px solid #437cff;
  1510. border-radius: 12px;
  1511. text-align: center;
  1512. line-height: 24px;
  1513. color: #437cff;
  1514. font-size: 14px;
  1515. margin: 0 4px;
  1516. &.active {
  1517. color: #fff;
  1518. background: #437cff;
  1519. }
  1520. }
  1521. }
  1522. }
  1523. &__body {
  1524. .list {
  1525. width: 100%;
  1526. .bank-item {
  1527. float: left;
  1528. }
  1529. }
  1530. }
  1531. &__footer {
  1532. overflow: hidden;
  1533. .btn {
  1534. cursor: pointer;
  1535. width: 146px;
  1536. height: 40px;
  1537. background: #e3eaf7;
  1538. border-radius: 8px;
  1539. margin: 20px auto 40px;
  1540. color: #3f8dfd;
  1541. text-align: center;
  1542. line-height: 40px;
  1543. transition: all 0.2s;
  1544. &:hover {
  1545. color: #fff;
  1546. box-shadow: 0px 8px 4px 0px rgba(7, 82, 208, 0.08);
  1547. background: #3f8dfd;
  1548. }
  1549. }
  1550. }
  1551. }
  1552. .bind {
  1553. /deep/ .el-dialog__header {
  1554. display: none;
  1555. }
  1556. /deep/ .el-dialog__body {
  1557. padding: 0;
  1558. overflow: unset;
  1559. }
  1560. &__close {
  1561. position: absolute;
  1562. right: 0;
  1563. top: -28px;
  1564. width: 24px;
  1565. height: 24px;
  1566. line-height: 24px;
  1567. text-align: center;
  1568. color: #eee;
  1569. border: 1px solid #eee;
  1570. border-radius: 50%;
  1571. }
  1572. &__header {
  1573. height: 40px;
  1574. text-align: center;
  1575. line-height: 40px;
  1576. border-bottom: 1px solid #eeeeee;
  1577. }
  1578. &__body {
  1579. height: 248px;
  1580. padding: 24px;
  1581. position: relative;
  1582. box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.04);
  1583. border-radius: 8px;
  1584. .submit {
  1585. width: 100%;
  1586. }
  1587. .bind-next {
  1588. font-size: 14px;
  1589. text-align: center;
  1590. color: #999;
  1591. margin-top: 10px;
  1592. cursor: pointer;
  1593. }
  1594. }
  1595. }
  1596. }
  1597. .fade-enter,
  1598. .fade-leave-to {
  1599. opacity: 0;
  1600. height: 0;
  1601. }
  1602. .fade-enter-to,
  1603. .fade-leave {
  1604. opacity: 1;
  1605. height: 122px;
  1606. }
  1607. .fade-enter-active,
  1608. .fade-leave-active {
  1609. transition: all 0.3s;
  1610. }
  1611. </style>