Commit 697c181e by zhanghui1

矿机接口数据

parent fac602f9
......@@ -310,6 +310,11 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
.top {top:64px;}
}
}
.miners{
.page-content{
.top{top:64px;}
}
}
}
.no {
......
......@@ -62,6 +62,7 @@ export default {
<style lang="less">
.tab-bar {
position: fixed;
z-index: 10;
left: 0;
right: 0;
bottom: 0;
......
<template>
<div class="dashboard bg-blue no">
<div class="page-header" :class="hasZIndex==true?'zIndexAuto':''" flex="main:justify cross:center">
<div class="side" @click="getSide"><i class="iconfont icon-mulu"></i></div>
<div class="title" @click="getRegion">{{account_name}} - {{region_name}}<i class="iconfont icon-down"></i></div>
<div class="btn-choose-coin" @click="getCoin"><span :class="coin_type"></span><i class="iconfont icon-down"></i></div>
<div class="page-header" :class="hasZIndex==true?'zIndexAuto':''">
<div class="l" @click="getSide"><span class="icon-side abs-left"><i class="iconfont icon-mulu"></i></span></div>
<div class="c" @click="getRegion">{{account_name}} - {{region_name}}<i class="iconfont icon-down"></i></div>
<div class="r" @click="getCoin"><span class="abs-right"><b class="bg-coin" :class="coin_type"></b><i class="iconfont icon-down mr10"></i></span></div>
</div>
<div class="page-content">
<!-- 切换币种 -->
......
<template>
<div class="my-popup">
<ul>
<li v-for="(items, index) in sortDate" @click="sortActive(items, index)" :key="items.text" :class="{active:group==items.text}">
<span>{{items.text}}</span>
<i class="iconfont icon-dui"></i>
</li>
</ul>
<ul>
<li :class="sideIndex==0?'active':''" @click="sideClick(0,0,'全部')"><span>{{txt[language].quanbu}}</span><i class="iconfont icon-dui"></i></li>
<li :class="sideIndex==-1?'active':''" @click="sideClick(-1,-1,'默认分组')"><span>{{txt[language].morenfenzu}}</span><i class="iconfont icon-dui"></i></li>
<li v-for="(item,index) in group_data" :key="item.group_id" :class="sideIndex==(index+1)?'active':''" @click="sideClick(index+1,item.group_id,item.name)"><span>{{item.name}}</span><i class="iconfont icon-dui"></i></li>
</ul>
</div>
</template>
<script>
export default {
name:'group',
props: ['group'],
data(){
return {
sortDate:[{
text:'全部'
},{
text:'默认分组'
},{
text:'北京机房'
},{
text:'四川'
}]
}
},
methods: {
sortActive(items, index){
this.$emit("childGroup",items.text)
import fn from '@/utils/function.js'
import { mapState } from 'vuex'
export default {
name: 'group',
props: ['group'],
data() {
return {
api: '',
group_data: [], //分组数据
group_id: 0, //默认为全部
group_name: "", //切换自定义分组名
status: "ALL", //默认当前状态
sideIndex: 0, //默认side为"全部"
}
},
computed: {
...mapState(['txt', 'language']),
puid() {
return this.$store.state.puid || localStorage.getItem('puid');
},
coin_type() {
return this.$store.state.coin_type || localStorage.getItem('coin_type');
},
region_id() {
return this.$store.state.region_id || localStorage.getItem('region_id');
},
language() {
return this.$store.state.language || localStorage.getItem('language');
}
},
methods: {
getGroup() {
//获取分组
let self = this;
fn.getApiBaseUrl(self.region_id, self.coin_type).then(api => {
this.api = api;
fn.getGroup(api, self.puid).then(res => {
if (res.err_no == 0) {
self.group_data = res.data;
} else {
this.$toast('获取当前子帐户分组信息错误!');
}
}
// self.getWorker();
});
});
},
sideClick(sideIndex, group_id, group_name) {
//分组点击事件
let self = this;
this.sideIndex = sideIndex;
this.group_id = group_id;
this.group_name = group_name;
this.status = "ALL";
this.$emit("childGroup", { "sideIndex": this.sideIndex, "group_id": this.group_id, "group_name": this.group_name, "status": this.status })
this.$indicator.open({ spinnerType: 'fading-circle' })
}
</script>
},
mounted() {
this.getGroup();
}
}
</script>
......@@ -218,8 +218,10 @@ export default {
text-align: justify;
}
.list-wrapper.content-scroll {
top: 4.5rem!important;
.payments {
.list-wrapper.content-scroll {
top: 4.5rem!important;
}
}
</style>
......@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => {
function checkToken() {
return new Promise((resolve, reject) => {
resolve('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOd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WJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByZWFkIHdyaXRlIn0.SOvx6Bq09ZSGU57WtjfxiD2qCqevEsHOEl7caRGthcB-hECP3N0L0ugRop2f0ufOjJQYJU730XKi4IhxAExUcrIVYg8ztBL869NLLgJaOZMBosulQvYaE99KQR-j6EyKtQ2hQVDSsRzWg-vvF9axtTYNVGMcd8Mj3cGGJhYmZgtqQ9U5DF8o-FqwMUR4tGNZZPrRSX1CdtucbGQ0LTR5r0uq6XKHDNFd6RgdGYzSg0p8G4xj6ufDSXSU7hiabbxYmZ0hmPrQLvff6Xmw6wXqT1fub9di94e23sCEmKlcKuCLORqnNfNx_EFKZpAF7zm3bdWl2FAciUhi6X4nYBvqEA');
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment