Commit 772f3082 by zhanghui1

部分细节修改

parent 2a11f561
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<meta content="telephone=no" name="format-detection" /> <meta content="telephone=no" name="format-detection" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_538501_uluquoo98e12a9k9.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/font_538501_iihxu81if6r.css" />
<script src="https://cdn.bootcss.com/underscore.js/1.8.3/underscore-min.js"></script> <script src="https://cdn.bootcss.com/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tween.js@16.3.4"></script> <script src="https://cdn.jsdelivr.net/npm/tween.js@16.3.4"></script>
<title>poolin_app</title> <title>poolin_app</title>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"author": "xin3w <xin3w@126.com>", "author": "xin3w <xin3w@126.com>",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.1.57",
"start": "npm run dev", "start": "npm run dev",
"build": "node build/build.js" "build": "node build/build.js"
}, },
......
...@@ -86,6 +86,16 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac ...@@ -86,6 +86,16 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
.bg-blue{background: #ededf2;} .bg-blue{background: #ededf2;}
/*样式修正*/ /*样式修正*/
.bg-coin { .wh(0.5rem); .d-ib; vertical-align: middle; background-size: cover; margin-right: 0.1rem;
&.ltc {background-image:url(../img/index-tab1-active.png);}
&.eth {background-image:url(../img/index-tab2-active.png);}
&.dash {background-image:url(../img/index-tab3-active.png);}
&.xmr {background-image:url(../img/index-tab4-active.png);}
&.btc {background-image:url(../img/index-tab5-active.png);}
&.sc {background-image:url(../img/index-tab6-active.png);}
&.zcash {background-image:url(../img/index-tab7-active.png);}
&.doge {background-image:url(../img/index-tab8-active.png);}
}
.page {width:100%;height:100%; overflow: hidden;.pos(a); .page {width:100%;height:100%; overflow: hidden;.pos(a);
.page-header {background:@blue;color:#fff;.pos(f); left:0; top:0; right:0; height:44px; z-index: 9999; .page-header {background:@blue;color:#fff;.pos(f); left:0; top:0; right:0; height:44px; z-index: 9999;
......
...@@ -42,16 +42,16 @@ export default { ...@@ -42,16 +42,16 @@ export default {
this.$store.state.tab_bar = n; this.$store.state.tab_bar = n;
switch (n) { switch (n) {
case 0: case 0:
this.$router.replace('/frameDashboard/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/dashboard') this.$router.replace('/my/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/dashboard')
break; break;
case 1: case 1:
this.$router.replace('/frameDashboard/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/miners') this.$router.replace('/my/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/miners')
break; break;
case 2: case 2:
this.$router.replace('/frameDashboard/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/payments') this.$router.replace('/my/' + this.puid + '/' + this.coin_type + '/' + this.region_id + '/payments')
break; break;
case 3: case 3:
this.$router.replace('/frameDashboard/settings') this.$router.replace('/my/settings')
break; break;
} }
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<script> <script>
import tabbar from '@/components/common/Tabbar' import tabbar from '@/components/common/Tabbar'
export default { export default {
name: 'frameDashboard', name: 'my',
data() { data() {
return { return {
......
...@@ -98,11 +98,6 @@ export default { ...@@ -98,11 +98,6 @@ export default {
}, },
data() { data() {
return { return {
puid: '',
coin_type: '',
region_id: '',
language: '',
hasZIndex: false, //侧栏滑出的zindex调整 hasZIndex: false, //侧栏滑出的zindex调整
showCoin: false, showCoin: false,
showRegion: false, showRegion: false,
...@@ -127,6 +122,20 @@ export default { ...@@ -127,6 +122,20 @@ export default {
} }
}; };
}, },
computed: {
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');
}
},
mounted() { mounted() {
this.pageInitInterval(); this.pageInitInterval();
}, },
...@@ -141,16 +150,11 @@ export default { ...@@ -141,16 +150,11 @@ export default {
}, },
pageInit() { pageInit() {
let self = this; let self = this;
this.puid = this.$route.params.puid || localStorage.getItem('puid'); //相关路由参数
this.coin_type = this.$route.params.coin_type || localStorage.getItem('coin_type');
this.region_id = this.$route.params.region_id || localStorage.getItem('region_id');
this.language = localStorage.getItem('language');
fn.getApiBaseUrl(this.region_id, this.coin_type).then(api => { fn.getApiBaseUrl(this.region_id, this.coin_type).then(api => {
if (api == '') { if (api == '') {
//自动到无节点页面 //自动到无节点页面
console.log("dashboard/index.vue没有找到apiBaseUrl,所以跳到no.vue") console.log("dashboard/index.vue没有找到apiBaseUrl,所以跳到no.vue")
this.$router.replace('/frameDashboard/' + this.puid + '/' + this.coin_type) this.$router.replace('/my/' + this.puid + '/' + this.coin_type)
} else { } else {
//请求实时算力 //请求实时算力
fn.getWorkerStats(api, this.puid).then(res => { fn.getWorkerStats(api, this.puid).then(res => {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<li> <li>
<label for="">password</label> <label for="">password</label>
<input type="text" value="123" class="eq-font" disabled="" /> <input type="text" value="123" class="eq-font" disabled="" />
<span style="color: #999;">建议不填</span> <!-- <span style="color: #999;">建议不填</span> -->
</li> </li>
</ul> </ul>
</form> </form>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div class="list-item"> <div class="list-item">
<div class="list" v-for="subaccount in subaccountList" :key="subaccount.puid" @click="subaccountActive(subaccount)" :class="subaccount.puid==puid?'active':''"> <div class="list" v-for="subaccount in subaccountList" :key="subaccount.puid" @click="subaccountActive(subaccount)" :class="subaccount.puid==puid?'active':''">
<span>{{subaccount.name}}</span> <span><b class="bg-coin" :class="subaccount.default_coin_type"></b>{{subaccount.name}}</span>
<i v-show="puid == subaccount.puid" class="iconfont icon-dui"></i> <i v-show="puid == subaccount.puid" class="iconfont icon-dui"></i>
</div> </div>
<div class="subAdd" @click="goCreate"> <div class="subAdd" @click="goCreate">
...@@ -24,22 +24,31 @@ export default { ...@@ -24,22 +24,31 @@ export default {
data() { data() {
return { return {
infoUser: 'xuzhiyuan@163.com', infoUser: 'xuzhiyuan@163.com',
puid: this.$route.params.puid,
coin_type: this.$route.params.coin_type,
region_id: this.$route.params.region_id,
language: localStorage.getItem('language'),
subaccountList: [], subaccountList: [],
cur_account_info: {}, cur_account_info: {},
} }
}, },
computed: {
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');
}
},
mounted() { mounted() {
this.getSubAccount(); this.getSubAccount();
this.getSubAccountById(); this.getSubAccountById();
}, },
methods: { methods: {
subaccountActive(obj) { subaccountActive(obj) {
this.puid = obj.puid this.$store.commit('setPuid',obj.puid);
this.$emit('childSubAccount', obj) this.$emit('childSubAccount', obj)
}, },
goCreate() { goCreate() {
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
}, },
methods: { methods: {
goDashboard() { goDashboard() {
this.$router.replace("/frameDashboard/"+this.puid+'/'+this.coin_type+'/'+this.region_id+'/dashboard') this.$router.replace("/my/"+this.puid+'/'+this.coin_type+'/'+this.region_id+'/dashboard')
} }
} }
} }
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<div class="page-content bottom"> <div class="page-content bottom">
<div class="pay-list pl30 pr30 pt20"> <div class="pay-list pl30 pr30 pt20">
<div> <div>
<h3>{{txt[language].zuorishouyi}}<i @click="promptZuori" class="iconfont icon-gantanhao"></i></h3> <h3 @click="promptZuori">{{txt[language].zuorishouyi}}<i class="iconfont icon-gantanhao"></i> </h3>
<p> <p>
<span class="v1" v-if="$store.state.coin_type=='xmr'"><animated-num :value="PaymentStats.yesterday_amount/Math.pow(10,12)" :fixed=12></animated-num></span> <span class="v1" v-if="$store.state.coin_type=='xmr'" style="font-size:0.76rem"><animated-num :value="PaymentStats.yesterday_amount/Math.pow(10,12)" :fixed=12></animated-num></span>
<span class="v1" v-else><animated-num :value="PaymentStats.yesterday_amount/Math.pow(10,8)" :fixed=8></animated-num></span> <span class="v1" v-else><animated-num :value="PaymentStats.yesterday_amount/Math.pow(10,8)" :fixed=8></animated-num></span>
<span class="k1">{{init_url.coins[$store.state.coin_type]['symbol']}}</span> <span class="k1">{{init_url.coins[$store.state.coin_type]['symbol']}}</span>
</p> </p>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<span class="k">{{init_url.coins[$store.state.coin_type]['symbol']}}</span> <span class="k">{{init_url.coins[$store.state.coin_type]['symbol']}}</span>
</div> </div>
</div> </div>
<div class="ments-list p30" v-for="items in PaymentHistory.data" flex="dir:left box:mean"> <div class="ments-list p30" v-for="(items,idx) in PaymentHistory.data" flex="dir:left box:mean">
<div> <div>
<span>{{items.date|date422}}</span> <span>{{items.date|date422}}</span>
<s>PPS模式</s> <s>PPS模式</s>
...@@ -57,8 +57,9 @@ ...@@ -57,8 +57,9 @@
<el-button type="text" size="mini" style="color:#666;cursor:default;">{{txt[language].daizhifu}}</el-button> <el-button type="text" size="mini" style="color:#666;cursor:default;">{{txt[language].daizhifu}}</el-button>
</s> </s>
<s v-if="items.payment_status=='DELAYED'"> <s v-if="items.payment_status=='DELAYED'">
<el-button type="text" size="mini" style="color:#fa5943;cursor:default;">{{txt[language].cunruyue}}</el-button><i style="font-family:simsun;color:#ccc; padding-left: 5px; padding-right: 5px;">|</i> <el-button type="text" size="mini" style="color:#727272;cursor:default;">{{txt[language].cunruyue}}</el-button>
<el-button type="text" size="mini" @:click="cunruyue">{{txt[language].yuanyin}}</el-button> <!-- <i style="font-family:simsun;color:#ccc; padding-left: 5px; padding-right: 5px;">|</i>
<el-button type="text" size="mini" @click="cunruyue(idx)">{{txt[language].yuanyin}}</el-button> -->
</el-tooltip> </el-tooltip>
</s> </s>
</div> </div>
...@@ -78,9 +79,8 @@ export default { ...@@ -78,9 +79,8 @@ export default {
}, },
data() { data() {
return { return {
reason: "", // reason: "",
regions: [], regions: [],
language: localStorage.getItem('language'),
PaymentStats: { PaymentStats: {
total_paid_amount: 0, total_paid_amount: 0,
balance: 0, balance: 0,
...@@ -90,18 +90,29 @@ export default { ...@@ -90,18 +90,29 @@ export default {
PaymentHistory: {}, PaymentHistory: {},
} }
}, },
computed: {
...mapState(["txt", "init_url", "cur_coins"]),
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: { methods: {
handleCurrentChange(v) { handleCurrentChange(v) {
self = this; self = this;
let puid = this.$route.params.puid;
let coin_type = this.$route.params.coin_type;
let region_id = this.$route.params.region_id;
//获取支付历史 //获取支付历史
fn.getApiBaseUrl(region_id, coin_type) fn.getApiBaseUrl(region_id, coin_type)
.then(api => fn.getPaymentHistory(api, puid, v)) .then(api => fn.getPaymentHistory(api, puid, v))
.then(res => { .then(res => {
self.PaymentHistory = res.data.data; self.PaymentHistory = res.data.data;
//console.log("当前币种所在节点的子帐户支付历史PaymentHistory:", res.data)
self.reason = fn.getPaymentHistoryReason(res.data.data.data); self.reason = fn.getPaymentHistoryReason(res.data.data.data);
}) })
}, },
...@@ -115,90 +126,79 @@ export default { ...@@ -115,90 +126,79 @@ export default {
}, },
pageInit() { pageInit() {
let self = this; let self = this;
let puid = this.$route.params.puid;
let coin_type = this.$route.params.coin_type;
let region_id = this.$route.params.region_id;
this.language = localStorage.getItem('language');
//获取stratum_url //获取stratum_url
fn.getStratumUrl(region_id, coin_type) fn.getStratumUrl(this.region_id, this.coin_type).then(res => {
.then(res => { this.stratum_url = res;
self.stratum_url = res;
}) })
//获取所有节点 //获取所有节点
fn.getAllRegions().then(res => { fn.getAllRegions().then(res => {
this.regions = res; this.regions = res;
}); });
// //获取当前节点信息 // //获取当前节点信息
fn.getRegionInfo(region_id).then(res => { fn.getRegionInfo(this.region_id).then(res => {
if (self.language == 'zh-cn') { if (this.language == 'zh-cn') {
this.region_name = res['text_zh-cn']; this.region_name = res['text_zh-cn'];
} }
if (self.language == 'en') { if (this.language == 'en') {
this.region_name = res['text_en']; this.region_name = res['text_en'];
} }
}); });
//获取支付状态 //获取支付状态
fn.getApiBaseUrl(region_id, coin_type) fn.getApiBaseUrl(this.region_id, this.coin_type)
.then(api => { .then(api => {
if (api == '') { if (api == '') {
this.$toast("当前币种所在的节点不支持!"); this.$toast("当前币种所在的节点不支持!");
$router.replace("/my/" + puid + "/" + localStorage.getItem('coin_type')) this.$router.replace("/my/" + puid + "/" + localStorage.getItem('coin_type'))
} else { } else {
fn.getPaymentStats(api, puid) fn.getPaymentStats(api, this.puid)
.then(res => { .then(res => {
if (res.data.err_no == 0) { if (res.data.err_no == 0) {
//console.log("当前币种所在节点的子帐户支付状态PaymentStats:", res.data.data); //console.log("当前币种所在节点的子帐户支付状态PaymentStats:", res.data.data);
this.PaymentStats = res.data.data; this.PaymentStats = res.data.data;
} else { } else {
this.$toast("当前币种所在节点的子帐户支付状态错误!") this.$toast("当前币种所在节点的子帐户支付状态错误!")
$router.replace({ this.$router.replace({
name: 'my_puid_cointype', name: 'no',
path: '/my/' + self.$route.params.puid + '/' + self.$route.params.coin_type path: '/my/' + this.$route.params.puid + '/' + this.$route.params.coin_type
}) })
} }
self.loading = false; // this.loading = false;
}); });
} }
}) })
//获取支付历史 //获取支付历史
fn.getApiBaseUrl(region_id, coin_type) fn.getApiBaseUrl(this.region_id, this.coin_type)
.then(api => { .then(api => {
if (api == "") { if (api == "") {
$router.replace({ this.$router.replace({
name: 'my_puid_cointype', name: 'no',
path: '/my/' + self.$route.params.puid + '/' + self.$route.params.coin_type path: '/my/' + this.$route.params.puid + '/' + this.$route.params.coin_type
}) })
} else { } else {
fn.getPaymentHistory(api, puid, 1) fn.getPaymentHistory(api, this.puid, 1)
.then(res => { .then(res => {
self.PaymentHistory = res.data.data; self.PaymentHistory = res.data.data;
//console.log("当前币种所在节点的子帐户支付历史PaymentHistory:", res.data) // self.reason = fn.getPaymentHistoryReason(res.data.data.data);
self.reason = fn.getPaymentHistoryReason(res.data.data.data); // self.loading = false;
self.loading = false;
}) })
} }
}) })
}, },
promptZuori() { promptZuori() {
this.$toast('昨日收益为国际标准时间昨日0:00-24:00(北京时间昨日8:00到今日8:00)之间的收益。'); this.$toast({
message: '昨日收益为国际标准时间昨日0:00-24:00(北京时间昨日8:00到今日8:00)之间的收益。',
position: 'middle',
className: 'text-justify'
});
}, },
cunruyue(){ // cunruyue(n) {
this.$toast(reason[items.$index]) // this.$toast(this.reason[n])
} // }
},
computed: {
...mapState(["txt", "init_url", "cur_coins"]),
refresh(v) {
return $store.state.refresh;
}
}, },
watch: { watch: {
'$route' (to, from) { '$route' (to, from) {
this.pageInitInterval(); this.pageInitInterval();
},
refresh(v) {
this.pageInitInterval()
} }
}, },
mounted() { mounted() {
...@@ -207,3 +207,6 @@ export default { ...@@ -207,3 +207,6 @@ export default {
} }
</script> </script>
<style lang="less">
.text-justify .mint-toast-text {text-align: justify;}
</style>
...@@ -27,13 +27,15 @@ ...@@ -27,13 +27,15 @@
<div class="p30"> <div class="p30">
<ul class="descript-list"> <ul class="descript-list">
<li>• 子账户支持多个币种和多个地区挖矿,你可以创建多个子账户管理不同的币种和地区挖矿。</li> <li>• 子账户支持多个币种和多个地区挖矿,你可以创建多个子账户管理不同的币种和地区挖矿。</li>
<li>• 您最多可设置50个子账户。这一子账户名称加上矿机编号即为矿机设置页的矿机名(worker  name),如: "zizhanghu.001","zizhangh</li> <li>• 您最多可设置50个子账户。这一子账户名称加上矿机编号即为矿机设置页的矿机名(worker name),如: "zizhanghu.001","zizhanghu.002"。</li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import fn from '@/utils/function.js'
import { MessageBox } from 'mint-ui';
export default { export default {
name: "create", name: "create",
data() { data() {
...@@ -70,16 +72,37 @@ export default { ...@@ -70,16 +72,37 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
this.$messagebox.alert("提交成功!", "温馨提示"); this.createAccount({ 'name': this.createForm.username, 'coin_type': this.createForm.defaultCoin })
} else { } else {
this.$messagebox.alert("提交错误!", "温馨提示"); this.$toast('填写错误!', '友情提示')
return false; return false;
} }
}); });
},
createAccount(params) {
fn.createAccount(params).then(res => {
if (res.data.err_no == 100) {
this.$toast('该账户已创建过多的子账户!')
} else {
if (res.data.err_no == 101) {
this.$toast("该子账户已存在!")
} else {
this.$toast({
message: '子账号已创建!',
iconClass: 'iconfont icon-caozuochenggong c-green'
});
this.$store.commit('setPuid', res.data.data.puid);
this.$store.commit('setCoinType', res.data.data.default_coin_type);
this.$router.push('/my/' + this.$store.state.puid + '/' + this.$store.state.coin_type);
} }
} }
})
},
}
}; };
</script> </script>
<style> <style>
</style> </style>
...@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => { ...@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => {
function checkToken() { function checkToken() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOdyJ9.eyJpc3MiOiJodHRwczovL2Jsb2NraW4uYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDVhMzM4MWE2ZjczMzNjNjdkMzMxOWZiYyIsImF1ZCI6WyJodHRwczovL3d3dy5wb29saW4uY29tL2FwaSIsImh0dHBzOi8vYmxvY2tpbi5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNTE3MzA3OTIzLCJleHAiOjE1MTczMTUxMjMsImF6cCI6IkZhczI5dWJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByZWFkIHdyaXRlIn0.B9Ng3zmsPNn9A_pMxnLRAS2JRoG-yX8L15Ik1w8OmLfrxYTObhQ2TtC5V_f_QkXPPduc__BNa1Nz5OkLIxVl_BabiHal0MET-yI_EYiGVse6KLrKl5QiAlHKS_dJwxd0sE4nQDOlPxgNJVkcRaMo0t-M6OZUQpSoZe980OY4ugkqgpmaqzB07UT1HC7gFxZIF2Csf8FZcGylyYkryTPLaUvIMKSH7QIUnYChSKxaP2r-FAUu5C_ThTcjme8KhswQNwIowrcy82gwULlvN0ldUb4UlilwDSXPUlUkDC3LY7SXpiyfxbKrKejjJmDgvl2FSKiFjTbzvA7XIhCu8HuIXg'); resolve('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOdyJ9.eyJpc3MiOiJodHRwczovL2Jsb2NraW4uYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDVhMzM4MWE2ZjczMzNjNjdkMzMxOWZiYyIsImF1ZCI6WyJodHRwczovL3d3dy5wb29saW4uY29tL2FwaSIsImh0dHBzOi8vYmxvY2tpbi5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNTE3Mzg3NjY0LCJleHAiOjE1MTczOTQ4NjQsImF6cCI6IkZhczI5dWJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByZWFkIHdyaXRlIn0.CAjxVLkrBa09VoEhZ_DN_NmTvLK5WqIQEgeTeAl8Rv1CtOi5d5-WuUybTJWIQEfvUpMdmE63p80PLYICsoqQSq3VMpM39eITR2wFlySfDKihXskBuYg0NbTuQkHXbYt2AAfe9DzfFb7eJ0F9YOjP93BOqYMugsSwj8T5tWkpuiHa9OExqlJw0d4M-bpoNtyhQI3nDtPfdg_Q3g0lBp9zC1nbVlBy0lVvV7-1NzBFOvPHaAIg232ggpecOr0escVpwDnOX1otfUl-JoEckw-K4mKC8_CKBaZyF1uPxbNuyv5Q4FfVBKg3CDqXQjudy-FviRLzZFLZsg1IUsabc2u-Sg');
}) })
} }
......
...@@ -59,9 +59,9 @@ const router = new Router({ ...@@ -59,9 +59,9 @@ const router = new Router({
} }
}, },
{ {
path: '/frameDashboard', path: '/my',
name: 'frameDashboard', name: 'my',
component: resolve => require(['@/components/Common/frameDashboard.vue'], resolve), component: resolve => require(['@/components/Common/my.vue'], resolve),
// redirect: 'my/:puid/:coin_type/:region_id/dashboard', // redirect: 'my/:puid/:coin_type/:region_id/dashboard',
children: [{ children: [{
path: ':puid/:coin_type/:region_id/dashboard', path: ':puid/:coin_type/:region_id/dashboard',
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getLucky(coin_type) { getLucky(coin_type) {
return $axios(Vue.$store.state.common_url + "/pool/lucky?coin_type=" + coin_type) return $axios($store.state.common_url + "/pool/lucky?coin_type=" + coin_type)
}, },
/** /**
* [getBlocks 获取矿池出块数据] * [getBlocks 获取矿池出块数据]
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getBlocks(coin_type) { getBlocks(coin_type) {
return $axios(Vue.$store.state.common_url + "/pool/blocks/merge?coin_type=" + coin_type) return $axios($store.state.common_url + "/pool/blocks/merge?coin_type=" + coin_type)
}, },
/** /**
* [getStats 获取矿池实时算力-合并] * [getStats 获取矿池实时算力-合并]
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getStats(coin_type) { getStats(coin_type) {
return $axios(Vue.$store.state.common_url + "/pool/stats/merge?coin_type=" + coin_type) return $axios($store.state.common_url + "/pool/stats/merge?coin_type=" + coin_type)
}, },
/** /**
* [getShareHistory 获取矿池算力历史-合并] * [getShareHistory 获取矿池算力历史-合并]
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getShareHistory(count, dimension, coin_type) { getShareHistory(count, dimension, coin_type) {
return $axios(Vue.$store.state.common_url + "/pool/share-history/merge?count=" + count + "&dimension=" + dimension + "&coin_type=" + coin_type) return $axios($store.state.common_url + "/pool/share-history/merge?count=" + count + "&dimension=" + dimension + "&coin_type=" + coin_type)
}, },
/** /**
* [getSubAccount 获取子账户列表] * [getSubAccount 获取子账户列表]
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getSubAccount() { getSubAccount() {
return $axios(Vue.$store.state.common_url + "/subaccount") return $axios($store.state.common_url + "/subaccount")
}, },
/** /**
* [getSubAccountById 获取子账户详情] * [getSubAccountById 获取子账户详情]
...@@ -188,17 +188,17 @@ export default { ...@@ -188,17 +188,17 @@ export default {
*/ */
getSubAccountById(puid) { getSubAccountById(puid) {
// return new Promise(function (relsove, reject) { // return new Promise(function (relsove, reject) {
// if (!Vue.$store.state.SubAccount) Vue.$store.state.SubAccount = {}; // if (!$store.state.SubAccount) $store.state.SubAccount = {};
// if (Vue.$store.state.SubAccount['SubAccount' + puid]) { // if ($store.state.SubAccount['SubAccount' + puid]) {
// relsove(Vue.$store.state.SubAccount['SubAccount' + puid]) // relsove($store.state.SubAccount['SubAccount' + puid])
// } else { // } else {
// $axios(Vue.$store.state.common_url + "/subaccount/" + puid).then(function (res) { // $axios($store.state.common_url + "/subaccount/" + puid).then(function (res) {
// Vue.$store.state.SubAccount['SubAccount' + puid] = res; // $store.state.SubAccount['SubAccount' + puid] = res;
// relsove(Vue.$store.state.SubAccount['SubAccount' + puid]) // relsove($store.state.SubAccount['SubAccount' + puid])
// }) // })
// } // }
// }) // })
return $axios(Vue.$store.state.common_url + "/subaccount/" + puid) return $axios($store.state.common_url + "/subaccount/" + puid)
}, },
/** /**
* [createAccount 创建子账户] * [createAccount 创建子账户]
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
createAccount(params) { createAccount(params) {
return $axios.post(Vue.$store.state.common_url + "/subaccount/create", params) return $axios.post($store.state.common_url + "/subaccount/create", params)
}, },
/** /**
* [getUrl 获取初始接口] * [getUrl 获取初始接口]
...@@ -219,7 +219,7 @@ export default { ...@@ -219,7 +219,7 @@ export default {
*/ */
getUrl() { getUrl() {
//console.log("getUrl") //console.log("getUrl")
return $axios(Vue.$store.state.base_url) return $axios($store.state.base_url)
// .then(res => { return mock.getUrl }) // .then(res => { return mock.getUrl })
}, },
/** /**
...@@ -232,9 +232,9 @@ export default { ...@@ -232,9 +232,9 @@ export default {
getCoins() { getCoins() {
//console.log("getCoins") //console.log("getCoins")
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
resolve(Vue.$store.state.init_url.coins) resolve($store.state.init_url.coins)
}) })
// return $axios(Vue.$store.state.base_url).then(res => { return res.data.coins }) // return $axios($store.state.base_url).then(res => { return res.data.coins })
}, },
/** /**
* [getAllRegions 获取初始接口的所有节点] * [getAllRegions 获取初始接口的所有节点]
...@@ -246,13 +246,13 @@ export default { ...@@ -246,13 +246,13 @@ export default {
getAllRegions() { getAllRegions() {
//console.log("getAllRegions") //console.log("getAllRegions")
// return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
// resolve(Vue.$store.state.init_url.regions) // resolve($store.state.init_url.regions)
// }) // })
let coin_type = localStorage.getItem('coin_type'); let coin_type = localStorage.getItem('coin_type');
let regions = []; let regions = [];
let obj = {}; let obj = {};
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
_.each(v.supported_coin_types, function(v1, k1) { _.each(v.supported_coin_types, function(v1, k1) {
if (v1.coin_type == coin_type) { if (v1.coin_type == coin_type) {
obj = { region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'] } obj = { region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'] }
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
//console.log("getRegionInfo") //console.log("getRegionInfo")
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let cur_region; let cur_region;
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
if (v.region_id == region_id) { if (v.region_id == region_id) {
cur_region = v; cur_region = v;
} }
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
*/ */
getUserList() { getUserList() {
//console.log("getUserList") //console.log("getUserList")
return $axios(Vue.$store.state.common_url + '/subaccount'); return $axios($store.state.common_url + '/subaccount');
}, },
/** /**
* [getUser 获取当前帐户信息] * [getUser 获取当前帐户信息]
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
*/ */
getUser(puid) { getUser(puid) {
//console.log("getUser") //console.log("getUser")
return $axios(Vue.$store.state.common_url + '/subaccount/' + puid) return $axios($store.state.common_url + '/subaccount/' + puid)
}, },
/** /**
* [getZonglanList 获取单个币种多个节点数据] * [getZonglanList 获取单个币种多个节点数据]
...@@ -338,7 +338,7 @@ export default { ...@@ -338,7 +338,7 @@ export default {
// console.log("getApiBaseUrl") // console.log("getApiBaseUrl")
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let api_base_url = ''; let api_base_url = '';
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
if (v.region_id == region_id) { if (v.region_id == region_id) {
_.each(v.supported_coin_types, function(v1, k1) { _.each(v.supported_coin_types, function(v1, k1) {
if (v1.coin_type == cointype) { if (v1.coin_type == cointype) {
...@@ -575,7 +575,7 @@ export default { ...@@ -575,7 +575,7 @@ export default {
*/ */
getRegionCoins(region_id) { getRegionCoins(region_id) {
let arr_coins = []; let arr_coins = [];
_.map(Vue.$store.state.init_url.regions, function(v, i, o) { _.map($store.state.init_url.regions, function(v, i, o) {
if (v.region_id == region_id) { if (v.region_id == region_id) {
_.map(v.supported_coin_types, function(v1, i1, o1) { _.map(v.supported_coin_types, function(v1, i1, o1) {
arr_coins.push(v1.coin_type) arr_coins.push(v1.coin_type)
...@@ -607,7 +607,7 @@ export default { ...@@ -607,7 +607,7 @@ export default {
getStratumUrl(region_id, coin_type) { getStratumUrl(region_id, coin_type) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let stratum_url = ''; let stratum_url = '';
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
if (v.region_id == region_id) { if (v.region_id == region_id) {
_.each(v.supported_coin_types, function(v1, k1) { _.each(v.supported_coin_types, function(v1, k1) {
if (v1.coin_type == coin_type) { if (v1.coin_type == coin_type) {
...@@ -628,11 +628,11 @@ export default { ...@@ -628,11 +628,11 @@ export default {
*/ */
getStratumUrls(coin_type) { getStratumUrls(coin_type) {
//mock.getUrl.data //mock.getUrl.data
//Vue.$store.state.init_url //$store.state.init_url
let data = []; let data = [];
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let stratum_url = ''; let stratum_url = '';
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
_.each(v.supported_coin_types, function(v1, k1) { _.each(v.supported_coin_types, function(v1, k1) {
if (v1.coin_type == coin_type) { if (v1.coin_type == coin_type) {
data.push({ region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'], coin_info: v1 }) data.push({ region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'], coin_info: v1 })
...@@ -651,7 +651,7 @@ export default { ...@@ -651,7 +651,7 @@ export default {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
getSummary(puid, coin_type) { getSummary(puid, coin_type) {
return $axios(Vue.$store.state.common_url + "/subaccount/summary?puid=" + puid + "&coin_type=" + coin_type) return $axios($store.state.common_url + "/subaccount/summary?puid=" + puid + "&coin_type=" + coin_type)
}, },
/** /**
* [getAllRegionByCoin 根据币种获取到所有节点所支持的所有节点] * [getAllRegionByCoin 根据币种获取到所有节点所支持的所有节点]
...@@ -664,7 +664,7 @@ export default { ...@@ -664,7 +664,7 @@ export default {
let regions = []; let regions = [];
let obj = {}; let obj = {};
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
_.each(Vue.$store.state.init_url.regions, function(v, k) { _.each($store.state.init_url.regions, function(v, k) {
_.each(v.supported_coin_types, function(v1, k1) { _.each(v.supported_coin_types, function(v1, k1) {
if (v1.coin_type == coin_type) { if (v1.coin_type == coin_type) {
obj = { region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'] } obj = { region_id: v.region_id, text_en: v.text_en, 'text_zh-cn': v['text_zh-cn'] }
...@@ -679,25 +679,25 @@ export default { ...@@ -679,25 +679,25 @@ export default {
* 创建 token * 创建 token
*/ */
createToken(puid, params) { createToken(puid, params) {
return $axios.post(Vue.$store.state.common_url + '/watcher/token/create?puid=' + puid, params) return $axios.post($store.state.common_url + '/watcher/token/create?puid=' + puid, params)
}, },
/** /**
* 列出 token * 列出 token
*/ */
listToken(puid, coin) { listToken(puid, coin) {
return $axios(Vue.$store.state.common_url + '/watcher/token?puid=' + puid + '&coin_type=' + coin) return $axios($store.state.common_url + '/watcher/token?puid=' + puid + '&coin_type=' + coin)
}, },
/** /**
* 获取 token 详情 * 获取 token 详情
*/ */
getTokenInfo(token) { getTokenInfo(token) {
return $axios(Vue.$store.state.common_url + '/watcher/token/info?token=' + token) return $axios($store.state.common_url + '/watcher/token/info?token=' + token)
}, },
/** /**
* 移除 token * 移除 token
*/ */
delToken(puid, params) { delToken(puid, params) {
return $axios.post(Vue.$store.state.common_url + '/watcher/token/delete?puid=' + puid, params) return $axios.post($store.state.common_url + '/watcher/token/delete?puid=' + puid, params)
}, },
/** /**
* 获取所支持币种 * 获取所支持币种
......
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