Browse Source

新增轮播

master
ltlzx 4 years ago
parent
commit
7b1f7fccbc
  1. 18
      src/views/contract/index.vue
  2. 19
      src/views/exchange/index.vue

18
src/views/contract/index.vue

@ -1,5 +1,12 @@
<template>
<div class="contract-page">
<div class="banner-block col-xs-8">
<el-carousel :interval="6000" height="450px">
<el-carousel-item v-for="item in pcBannerList" :key="item.id">
<img :src="item.imgurl" width="100%" height="100%" />
</el-carousel-item>
</el-carousel>
</div>
<div class="page-top d-flex pt-2">
<div class="kline-box flex-fill mr-2">
<div
@ -194,6 +201,7 @@ import exchangeStore from "./exchange-store.vue";
import pageBottom from "./page-bottom.vue";
import Contract from "../../api/contract";
import Socket from "@/api/server/Socket.js";
import Home from "@/api/home";
export default {
components: {
kline,
@ -209,6 +217,7 @@ export default {
holdPositionAll: false,
holdPositionList: [],
newPriceObj: {},
pcBannerList:[],
accountInfo: {},
defaultPrice: "",
wsUrl: this.Globals.Server.Path.WS1,
@ -244,6 +253,7 @@ export default {
// this.openStatus();
this.getMarketList();
this.holdPosition();
this.indexList();
this._time = setInterval(() => {
if (this.contractOpen) {
this.holdPosition();
@ -319,6 +329,14 @@ export default {
this.$message.success(this.$t('contract.j9'));
});
},
indexList() {
Home.indexList().then((res) => {
this.pcBannerList = res.pcBannerList
setTimeout(() => {
this.skroll();
}, 100);
}).catch((res) => {});
},
//
setactiveItem(index=0){
this.accountInfo=this.holdPositionList[index]

19
src/views/exchange/index.vue

@ -1,5 +1,12 @@
<template>
<div>
<div class="banner-block col-xs-8">
<el-carousel :interval="6000" height="450px">
<el-carousel-item v-for="item in pcBannerList" :key="item.id">
<img :src="item.imgurl" width="100%" height="100%" />
</el-carousel-item>
</el-carousel>
</div>
<div class="container-fluid mtb15 no-fluid">
<div class="row sm-gutters">
@ -28,7 +35,7 @@ import Socket from '@/api/server/Socket.js';
import Market from '@/api/market.js';
import Exchange from "@/api/exchange";
import Order from "@/api/order"
import Home from "@/api/home";
export default {
components: {
@ -59,6 +66,7 @@ export default {
},
marketList: [], // symbol
trade: [],
pcBannerList:[],
newTrade: null,
//
@ -391,6 +399,14 @@ export default {
.catch(err => {})
}
},
indexList() {
Home.indexList().then((res) => {
this.pcBannerList = res.pcBannerList
setTimeout(() => {
this.skroll();
}, 100);
}).catch((res) => {});
},
},
created() {
@ -462,6 +478,7 @@ export default {
});
});
if (this.symbol) this.getCurrencyExCny();
this.indexList()
// this.update();
},

Loading…
Cancel
Save