home.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <template>
  2. <div>
  3. <index-header></index-header>
  4. <div class="home-content">
  5. <!-- <div class="section-box">
  6. <ol>
  7. <li :class="{active:sectionState==item}" v-for="(item,index) in 5">
  8. <div class="item">0{{item}}</div>
  9. </li>
  10. </ol>
  11. </div> -->
  12. <div class="banner-block">
  13. <el-carousel trigger="click" height="900px" :autoplay="false" indicator-position="none" arrow="never">
  14. <el-carousel-item v-for="item in 4" :key="item">
  15. <!-- <img src="../assets/img/banner1.png" alt=""> -->
  16. <div class="banner"></div>
  17. </el-carousel-item>
  18. </el-carousel>
  19. <div class="button-line-box">
  20. <div class="button-line">
  21. <div class="about-line">
  22. <h3>ABOUT</h3>
  23. <h4>Mainstream reliable trading currencies</h4>
  24. <p class="word">交易币种</p>
  25. <hr>
  26. <p class="word-tip">精选主流币种</p>
  27. <p class="word-tip">多种报价模式</p>
  28. </div>
  29. <div class="button-line">
  30. <button class="btn1">申请代理</button>
  31. <!-- <button class="btn2">在线咨询</button> -->
  32. <span class="phoneNum">热线电话:4001-566-899</span>
  33. </div>
  34. </div>
  35. </div>
  36. <loginPart></loginPart>
  37. </div>
  38. <div class="coin-block">
  39. <div class="tras-block">
  40. <ul v-for="(item,index) in coinBlock">
  41. <li
  42. :class="{lastBlock:i.normal,noCoin:i.nocoin}"
  43. v-for="(i,num) in item"
  44. ><!-- @mouseenter="showBtn2('coinBlock',1,index,num,i)"
  45. @mouseleave="showBtn2('coinBlock',0,index,num,i)"
  46. @click="gohelp(i.coinname,i.normal)" -->
  47. <div class="part" v-if="i.state!==1">
  48. <!-- <p class="name">{{i.name}}</p> -->
  49. <div class="icon iconfont" :class="i.coin" v-if="!i.nocoin"></div>
  50. <p class="coin-name">{{i.coinname}}</p>
  51. </div>
  52. <!-- <div class="part2" v-if="i.state===1&&!i.normal">
  53. <div class="icon iconfont" :class="i.coin" v-if="!i.nocoin"></div>
  54. <p class="price" v-if="!i.nocoin">
  55. <span>{{i.coinname}}/BTC:</span>
  56. <em v-if='marketData[i.coinname+"BTC"].last'>{{marketData[i.coinname+"BTC"].last}}</em>
  57. </p>
  58. <p v-if="!i.nocoin" class="range">{{marketData[i.coinname+"BTC"].range|filterCoin}}</p>
  59. <p v-if="i.nocoin" class="expect-line">敬请期待</p>
  60. </div> -->
  61. </li>
  62. </ul>
  63. </div>
  64. </div>
  65. <addUs></addUs>
  66. <plat></plat>
  67. <server></server>
  68. <contactUs></contactUs>
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import indexHeader from "../../components/header.vue"
  74. import loginPart from "./login.vue"
  75. import addUs from "./addUs.vue"
  76. import plat from "./plat.vue"
  77. import server from "./server-block.vue"
  78. import contactUs from "../../components/contact.vue"
  79. import {ajax} from "../../assets/js/common.js"
  80. export default{
  81. data(){
  82. return{
  83. // dialogVisible:true,
  84. showBtnState:0,
  85. coinchange:0,
  86. marketData:{
  87. BCCBTC:{},
  88. LTCBTC:{},
  89. ZECBTC:{},
  90. ETHBTC:{},
  91. ETCBTC:{},
  92. BTCBTC:{},
  93. SCBTC:{},
  94. BTSBTC:{},
  95. },
  96. coinBlock:[
  97. [
  98. {
  99. name:"比特币",
  100. coinname:"BTC",
  101. coin:"icon-BTC1",
  102. state:0,
  103. },
  104. {
  105. name:"比特元",
  106. coinname:"BTY",
  107. coin:"icon-bty1",
  108. state:0,
  109. },
  110. {
  111. name:"以太坊经典",
  112. coinname:"ETC",
  113. coin:"icon-ETC",
  114. state:0,
  115. },
  116. /*{
  117. name:"比特股",
  118. coinname:"BTS",
  119. coin:"icon-BTS",
  120. state:0,
  121. },*/
  122. /*{
  123. state:0,
  124. nocoin:true,
  125. },*/
  126. ],
  127. [
  128. {
  129. name:"USDT",
  130. coinname:"USDT",
  131. coin:"icon-meiyuan",
  132. state:0,
  133. },
  134. {
  135. name:"以太坊",
  136. coinname:"ETH",
  137. coin:"icon-ETH1",
  138. state:0,
  139. },
  140. {
  141. name:"莱特币",
  142. coinname:"LTC",
  143. coin:"icon-ltc",
  144. state:0,
  145. },
  146. /*{
  147. state:0,
  148. nocoin:true,
  149. },*/
  150. ],
  151. [
  152. {
  153. name:"比特现金",
  154. coinname:"BCC",
  155. coin:"icon-BCC",
  156. state:0,
  157. },
  158. // {
  159. // name:"云储币",
  160. // coinname:"SC",
  161. // coin:"icon-SC",
  162. // state:0,
  163. // },
  164. {
  165. name:"零币",
  166. coinname:"ZEC",
  167. coin:"icon-ZEC1",
  168. state:0,
  169. },
  170. /*{
  171. state:0,
  172. nocoin:true,
  173. },*/
  174. {
  175. name:"主流",
  176. coinname:"主流币种",
  177. coin:"icon-jiaoyi",
  178. state:0,
  179. normal:true,
  180. },
  181. ],
  182. ],
  183. sectionState:1,
  184. requtime:'',//轮询计时器
  185. }
  186. },
  187. watch:{
  188. sectionState(val){
  189. console.log(val);
  190. }
  191. },
  192. components:{
  193. indexHeader,
  194. loginPart,
  195. contactUs,
  196. addUs,
  197. plat,
  198. server
  199. },
  200. filters:{
  201. filterCoin(val){
  202. if(val){
  203. let state=val.toString().indexOf("-");
  204. if(state===-1){
  205. val="+"+val;
  206. }
  207. return val;
  208. }
  209. },
  210. },
  211. destroyed:function(){
  212. clearInterval(this.requtime);
  213. },
  214. mounted(){
  215. this.$nextTick(()=>{
  216. this.windowScroll();
  217. this.getHomeMarket();
  218. this.requtime=setInterval(()=>{
  219. this.getHomeMarket();
  220. },5000);
  221. })
  222. },
  223. methods:{
  224. gohelp(coin,state){
  225. if(state){
  226. this.$router.push({path:"/help/coinintroduce"});
  227. }
  228. else{
  229. this.$router.push({path:"/help/coinintroduce",query:{"type":coin}});
  230. }
  231. },
  232. getHomeMarket(){
  233. let param={
  234. sort:"plat",
  235. };
  236. ajax(this,this.extendApi.getcoindata,param,(data)=>{
  237. if(data.code==200){
  238. for(let i=0;i<data.data.fxee.length;i++){
  239. this.marketData[data.data.fxee[i].symbol]=data.data.fxee[i];
  240. // for(let j=0;j<this.coinBlock.length;j++){
  241. // for(let k=0;k<this.coinBlock[j].length;k++){
  242. // if(this.coinBlock[j][k].coinname+"BTC"==data.data.fxee[i].symbol){
  243. // this.coinBlock[j][k]=object.assign(this.coinBlock[j][k],data.data.fxee[i]);
  244. // }
  245. // }
  246. // }
  247. }
  248. // console.log(this.coinBlock);
  249. }
  250. }, "GET");
  251. },
  252. windowScroll(){
  253. let that=this;
  254. window.onscroll=()=>{
  255. let num=parseInt(document.documentElement.scrollTop);
  256. if(num<=800){
  257. this.sectionState=1;
  258. }
  259. if(num>800&&num<=1600){
  260. this.sectionState=2;
  261. }
  262. if(num>1600&&num<=2400){
  263. this.sectionState=3;
  264. }
  265. if(num>2400&&num<=3200){
  266. this.sectionState=4;
  267. }
  268. if(num>3200){
  269. this.sectionState=5;
  270. }
  271. };
  272. },
  273. /*showBtn2(key,val,index,num,item){
  274. //最后一个方块不做hover效果
  275. if(!item.normal){
  276. this[key][index][num].state=val;
  277. }
  278. // if(index!==2||num!==2){
  279. // this[key][index][num].state=val;
  280. // }
  281. },*/
  282. // showBtn(key,val){
  283. // this[key]=val;
  284. // },
  285. }
  286. }
  287. </script>
  288. <style>
  289. .home-content{
  290. /*padding-top: 75px;*/
  291. .statement-box{
  292. .el-dialog{
  293. width: 1100px;
  294. }
  295. .el-dialog__header{
  296. padding-top: 30px;
  297. }
  298. .el-dialog__title{
  299. color: #165e8d;
  300. font-size: 24px;
  301. }
  302. .el-dialog__footer{
  303. text-align: center;
  304. .el-button{
  305. font-size: 18px;
  306. }
  307. }
  308. .el-dialog__body{
  309. padding-bottom:5px;
  310. }
  311. .el-button{
  312. width: 140px;
  313. height: 40px;
  314. border-radius: 20px;
  315. background-color: #1a6fa6;
  316. border:0;
  317. }
  318. }
  319. .section-box{
  320. position: fixed;
  321. left: 60px;
  322. top: 50%;
  323. transform: translateY(-50%);
  324. z-index: 50;
  325. color: #666;
  326. height: 570px;
  327. /*line-height: 114px;*/
  328. background: url("../../assets/img/home/secBg.png") no-repeat 0 top;
  329. padding-left: 1px;
  330. li{
  331. /*padding-left: 16px;
  332. margin: 35px 0;*/
  333. height: 114px;
  334. padding:35px 0;
  335. .item{
  336. line-height: 44px;
  337. padding-left: 16px;
  338. }
  339. }
  340. li.active{
  341. .item{
  342. color: #1a6fa6;
  343. border-left:3px solid #1a6fa6;
  344. }
  345. }
  346. }
  347. .el-carousel__item{
  348. img{
  349. position: relative;
  350. left:50%;
  351. transform: translateX(-50%);
  352. }
  353. }
  354. .banner-block{
  355. position: relative;
  356. .banner{
  357. background:url("../../assets/img/banner1.png") no-repeat center center;
  358. background-size: auto 100%;
  359. height: 900px;
  360. }
  361. }
  362. .server-block{
  363. height: 600px;
  364. width: 1200px;
  365. margin: 0 auto;
  366. padding-top: 68px;
  367. .serverList{
  368. margin-top: 80px;
  369. display: flex;
  370. justify-content: center;
  371. li{
  372. border:1px solid #dcdcdc;
  373. width: 176px;
  374. height: 176px;
  375. transform: rotate(45deg);
  376. margin-right: 72px;
  377. background-color: #fff;
  378. .item{
  379. width: 100%;
  380. height: 100%;
  381. line-height: 176px;
  382. transform: rotate(-45deg);
  383. .iconfont{
  384. font-size: 60px;
  385. color: #2580bb;
  386. }
  387. }
  388. .item2{
  389. width: 100%;
  390. height: 100%;
  391. display: flex;
  392. justify-content: center;
  393. align-items: center;
  394. transform: rotate(-45deg);
  395. color: #fff;
  396. font-size: 15px;
  397. }
  398. &:hover{
  399. background-color: #1a6fa6;
  400. }
  401. }
  402. }
  403. }
  404. .coin-block{
  405. height: 900px;
  406. background: url("../../assets/img/home/coinBg.png") no-repeat center bottom;
  407. position: relative;
  408. .tras-block{
  409. position: absolute;
  410. top: 360px;
  411. left:50%;
  412. transform: rotate(45deg) translateX(-50%);
  413. /*border:1px solid #dcdcdc;*/
  414. ul{
  415. display: flex;
  416. margin-bottom: 24px;
  417. li{
  418. width: 185px;
  419. height: 185px;
  420. margin-right: 24px;
  421. border:1px solid #dcdcdc;
  422. position: relative;
  423. cursor: pointer;
  424. transition: all 0.3s ease 0s;
  425. -moz-transition: all 0.3s ease 0s;
  426. -webkit-transition: all 0.3s ease 0s;
  427. -o-transition: all 0.3s ease 0s;
  428. .part{
  429. position: absolute;
  430. left:50%;
  431. margin-left: -40%;
  432. top: 50%;
  433. margin-top: -40%;
  434. width: 80%;
  435. height: 80%;
  436. transform: rotate(-45deg);
  437. line-height: 1;
  438. /*background-color: #ff0000;*/
  439. }
  440. .part2{
  441. position: absolute;
  442. width: 100%;
  443. height: 100%;
  444. /*top: 10;*/
  445. /*margin-top: 10px;
  446. margin-left:10px;*/
  447. transform: rotate(-45deg);
  448. color: #fff;
  449. }
  450. .expect-line{
  451. position: absolute;
  452. left: 50%;
  453. top:50%;
  454. width: 100%;
  455. transform: translateX(-50%) translateY(-50%);
  456. font-size: 24px;
  457. }
  458. .icon{
  459. font-size: 62px;
  460. margin-top: 10px;
  461. margin-bottom: 10px;
  462. color: #1a6fa6;
  463. }
  464. .price{
  465. font-size: 16px;
  466. margin-bottom: 20px;
  467. em{
  468. color:#ffc600;
  469. font-size: 22px;
  470. }
  471. }
  472. .range{
  473. font-size: 25px;
  474. }
  475. .name{
  476. font-size: 17px;
  477. color: #666;
  478. padding-top: 20px;
  479. }
  480. .coin-name{
  481. font-size: 30px;
  482. color: #999;
  483. margin-top: 20px;
  484. }
  485. /* &:hover{
  486. background-color:rgba(26,111,166,0.95);
  487. border-color: #1a6fa6;
  488. } */
  489. &.noCoin{
  490. background-image: url("../../assets/img/home/no-coin.png");
  491. background-repeat: no-repeat;
  492. background-position: center;
  493. }
  494. /* &.noCoin:hover{
  495. background-image: none;
  496. } */
  497. &.lastBlock{
  498. background-color: #fff;
  499. .name{
  500. font-size: 30px;
  501. color: #1a6fa6;
  502. padding-top: 45px;
  503. }
  504. .coin-name{
  505. font-size: 30px;
  506. color: #333;
  507. margin-top: 20px;
  508. }
  509. }
  510. &.lastBlock:hover{
  511. border-color: #dcdcdc;
  512. };
  513. }
  514. li:last-child{
  515. margin-right: 0;
  516. }
  517. li:hover{
  518. transform: scale(1.1);
  519. box-shadow: 2px 2px 50px #1A6FA6;
  520. }
  521. }
  522. ul:last-child{
  523. margin-bottom: 0;
  524. }
  525. }
  526. }
  527. .plat-block{
  528. height: 900px;
  529. background: url("../../assets/img/home/plat01.png") no-repeat center 30px;
  530. background-size: auto;
  531. position: relative;
  532. .plat-block-back{
  533. width: 100%;
  534. height: 417px;
  535. position: absolute;
  536. bottom: 0;
  537. background: url("../../assets/img/home/plat02.png") no-repeat center bottom;
  538. .word-box{
  539. width: 1200px;
  540. height: 250px;
  541. position: absolute;
  542. left:50%;
  543. transform: translateX(-50%);
  544. bottom: 85px;
  545. background-color:rgba(2,134,219,0.83);
  546. padding-left: 195px;
  547. text-align: left;
  548. color: #fff;
  549. img{
  550. position: absolute;
  551. top:-37px;
  552. left: 158px;
  553. }
  554. .tip1{
  555. line-height: 1;
  556. }
  557. .word1{
  558. font-size: 35px;
  559. margin-top: 30px;
  560. font-weight: bold;
  561. }
  562. .word2{
  563. font-size: 24px;
  564. margin-left: 80px;
  565. margin-top: 10px;
  566. font-weight: bold;
  567. }
  568. .word3{
  569. margin-top: 16px;
  570. font-size: 12px;
  571. line-height: 1.5;
  572. }
  573. hr{
  574. width: 45px;
  575. height: 2px;
  576. background-color: #fff;
  577. border:0;
  578. margin-top: 20px;
  579. }
  580. .ins-box{
  581. position: absolute;
  582. width: 400px;
  583. right: 250px;
  584. top:56px;
  585. font-size: 18px;
  586. text-align: center;
  587. line-height: 1.6;
  588. >span{
  589. display: block;
  590. padding: 5px 0;
  591. }
  592. }
  593. }
  594. }
  595. }
  596. .tt-line{
  597. display: flex;
  598. align-items: center;
  599. justify-content: space-between;
  600. h3{
  601. font-size: 35px;
  602. font-weight: bold;
  603. line-height: 1;
  604. }
  605. hr{
  606. width: 420px;
  607. height: 1px;
  608. background-color: #e5e5e5;
  609. border:0;
  610. }
  611. }
  612. .sub-title{
  613. font-size: 20px;
  614. color: #999;
  615. margin-top: 12px;
  616. }
  617. .add-block{
  618. height: 900px;
  619. width: 1200px;
  620. padding-top: 60px;
  621. margin: 0 auto;
  622. .adv-line{
  623. display: flex;
  624. margin-top: 80px;
  625. .apply-btn{
  626. position: absolute;
  627. bottom:-22px;
  628. width: 170px;
  629. height: 45px;
  630. background-color: #1a6fa6;
  631. color: #fff;
  632. padding-left: 18px;
  633. cursor: pointer;
  634. span{
  635. line-height: 45px;
  636. font-size: 15px;
  637. }
  638. i{
  639. display: inline-block;
  640. width: 45px;
  641. height: 45px;
  642. text-align: center;
  643. line-height: 45px;
  644. font-size: 16px;
  645. position: absolute;
  646. right: 0;
  647. top: 0;
  648. background-color: #2580bb;
  649. }
  650. }
  651. &-item:first-child{
  652. margin-right:200px;
  653. }
  654. &-item:hover{
  655. border:1px solid #1a6fa6;
  656. border-left:3px solid #1a6fa6;
  657. box-shadow: 0 0 20px 1px #e5e5e5;
  658. }
  659. &-item{
  660. position: relative;
  661. text-align: left;
  662. width: 430px;
  663. height: 250px;
  664. border:1px solid #eee;
  665. color: #333;
  666. padding: 32px 0 0 20px;
  667. background-color: #fff;
  668. h4{
  669. font-size: 25px;
  670. font-weight: bold;
  671. line-height: 1;
  672. }
  673. h5{
  674. font-size: 20px;
  675. line-height: 1;
  676. color: #999;
  677. font-weight: 500;
  678. margin-top: 10px;
  679. margin-bottom: 40px;
  680. }
  681. p{
  682. width: 255px;
  683. font-size: 15px;
  684. }
  685. img{
  686. position: absolute;
  687. top:20px;
  688. right: -135px;
  689. width: 270px;
  690. }
  691. }
  692. }
  693. }
  694. .button-line-box{
  695. background-color: rgba(0,0,0,0.46);
  696. position: absolute;
  697. bottom: 0;
  698. z-index: 10;
  699. height: 100px;
  700. text-align: center;
  701. width: 100%;
  702. color: #fff;
  703. padding: 30px 0;
  704. .about-line{
  705. position: absolute;
  706. top:-20px;
  707. width: 200px;
  708. height: 450px;
  709. background:#1a6fa6 url("../../assets/img/home/aboutBg.png") no-repeat left 125%;
  710. text-align: left;
  711. padding: 0 20px;
  712. h3{
  713. font-size: 45px;
  714. padding-top: 124px;
  715. line-height: 1;
  716. margin-bottom: 15px;
  717. }
  718. h4{
  719. font-size: 12px;
  720. margin-bottom: 30px;
  721. }
  722. .word{
  723. font-size: 30px;
  724. font-weight: bold;
  725. }
  726. .word-tip{
  727. color: #a8ddff;
  728. font-size: 18px;
  729. }
  730. hr{
  731. height: 2px;
  732. width: 60px;
  733. background-color: #fff;
  734. border: 0;
  735. margin: 20px 0;
  736. }
  737. }
  738. }
  739. .button-line{
  740. width: 1200px;
  741. margin: 0 auto;
  742. position: relative;
  743. button{
  744. width: 140px;
  745. height: 40px;
  746. border-radius: 20px;
  747. border: 0;
  748. font-size: 18px;
  749. font-weight: bold;
  750. margin-right: 60px;
  751. cursor: pointer;
  752. }
  753. .btn1{
  754. background-color: #1a6fa6;
  755. color: #fff;
  756. }
  757. .btn2{
  758. color: #1a6fa6;
  759. background-color: #fff;
  760. }
  761. .phoneNum{
  762. font-size: 25px;
  763. font-weight: bold;
  764. }
  765. }
  766. }
  767. </style>