index.vue 72 KB

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