Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
poolin_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d8e3227d
authored
Jan 30, 2018
by
zhanghui1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大量修改
parent
62483aa9
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
404 additions
and
192 deletions
+404
-192
src/App.vue
+4
-3
src/assets/less/style.less
+22
-0
src/components/Common/Tabbar.vue
+4
-4
src/components/Common/frameDashboard.vue
+21
-0
src/components/Dashboard/coin.vue
+1
-1
src/components/Dashboard/index.vue
+4
-6
src/components/Dashboard/no.vue
+64
-7
src/components/Jump.vue
+5
-5
src/components/Miners/index.vue
+2
-6
src/components/Payments/index.vue
+4
-12
src/components/Settings/Account.vue
+35
-13
src/components/Settings/DefaultCoin.vue
+25
-5
src/components/Settings/index.vue
+119
-50
src/components/homeChart.vue
+3
-0
src/main.js
+1
-1
src/router/index.js
+51
-41
src/utils/function.js
+39
-38
No files found.
src/App.vue
View file @
d8e3227d
<
template
>
<div
id=
"app"
:class=
"gradeClass"
>
<transition
:name=
"'vux-pop-' + (direction === '' ? '' : (direction === 'forward' ? 'in' : 'out'))"
>
<mr-navigation>
<router-view></router-view>
</mr-navigation>
<!--
<mr-navigation>
</mr-navigation>
-->
<router-view></router-view>
</transition>
</div>
</
template
>
...
...
src/assets/less/style.less
View file @
d8e3227d
...
...
@@ -61,6 +61,7 @@
html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; background: #fff;font-family: "Roboto","Helvetica Neue",Helvetica,"Hiragino Sans GB",STHeitiSC-Light,"Microsoft YaHei","微软雅黑",Arial,sans-serif;width:100%;height:100%;}
.bg-blue {background: #ededf2;}
.bg-white { background: #fff;}
.line{.pos(r);
&:after {width:100%; height:1px; background:#ccc;.pos(a); left: 0; right: 0; top:0; transform:scale(1,0.33) translateY(-1px);content:'';}
.xt{width:100%; height:1px; background:#ccc;.pos(a); left: 0; right: 0; top:0; transform:scale(1,0.33) translateY(-1px);content:'';}
...
...
@@ -227,6 +228,7 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
.k {color: @gray;font-size: 0.24rem; }
.v { color: #252525;font-size: 0.24rem;}
.c-red {color: @red;}
.c-green {color:@fontGreen;}
}
.list {
h3 { padding:0 0 .18rem .18rem; color: @gray; padding-top: 0.4rem;}
...
...
@@ -250,3 +252,22 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
}
}
.no {
.title {font-size: 0.3rem;}
.txt {font-size: 0.26rem; color:#727272;text-align: justify;
p {margin-top: 0.2rem; line-height: 1.5}
}
.tabs { border: 1px solid #eee;
.tab-tit {
li {.txt-ver(0.5rem);.tc; padding: 0 0.3rem;.fl; border-right:1px solid #eee;
&.active {background: @blue; color:#fff;}
}
}
.tab-con {border-top:1px solid #eee; padding:0.3rem;
li { padding: 0.1rem 0;
label { width: 1.5rem;.d-ib;}
input[type=text]{border: 1px solid #eee;background:#fff;padding:0.1rem;}
}
}
}
}
\ No newline at end of file
src/components/Common/Tabbar.vue
View file @
d8e3227d
...
...
@@ -42,16 +42,16 @@ export default {
this
.
$store
.
state
.
tab_bar
=
n
;
switch
(
n
)
{
case
0
:
this
.
$router
.
replace
(
'/
my
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/dashboard'
)
this
.
$router
.
replace
(
'/
frameDashboard
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/dashboard'
)
break
;
case
1
:
this
.
$router
.
replace
(
'/
my
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/miners'
)
this
.
$router
.
replace
(
'/
frameDashboard
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/miners'
)
break
;
case
2
:
this
.
$router
.
replace
(
'/
my
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/payments'
)
this
.
$router
.
replace
(
'/
frameDashboard
/'
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/payments'
)
break
;
case
3
:
this
.
$router
.
replace
(
'/settings'
)
this
.
$router
.
replace
(
'/
frameDashboard/
settings'
)
break
;
}
}
...
...
src/components/Common/frameDashboard.vue
0 → 100644
View file @
d8e3227d
<
template
>
<div
class=
"page"
>
<router-view></router-view>
<tabbar></tabbar>
</div>
</
template
>
<
script
>
import
tabbar
from
'@/components/common/Tabbar'
export
default
{
name
:
'frameDashboard'
,
data
()
{
return
{
}
},
components
:
{
tabbar
}
}
</
script
>
src/components/Dashboard/coin.vue
View file @
d8e3227d
...
...
@@ -21,7 +21,7 @@ export default {
},
methods
:
{
coinAcitve
(
cur_coin
)
{
this
.
$emit
(
'childCoin'
,
cur_coin
)
this
.
$emit
(
'childCoin'
,
cur_coin
)
this
.
$store
.
commit
(
'setCoinType'
,
cur_coin
)
this
.
coin_type
=
cur_coin
}
...
...
src/components/Dashboard/index.vue
View file @
d8e3227d
<
template
>
<div
class=
"
page
dashboard"
>
<div
class=
"dashboard"
>
<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
}}
-
{{
cur_region
[
'text_zh-cn'
]
}}
<i
class=
"iconfont icon-down"
></i></div>
...
...
@@ -78,7 +78,6 @@
</div>
</div>
</div>
<tabbar></tabbar>
</div>
</
template
>
<
script
>
...
...
@@ -88,7 +87,6 @@ import region from "@/components/Dashboard/region";
import
subaccount
from
"@/components/Dashboard/subaccount"
;
import
animatedNum
from
"@/components/Common/AnimatedNum"
;
import
dashboardChart
from
"@/components/Dashboard/dashboardChart.vue"
;
import
tabbar
from
"@/components/Common/Tabbar.vue"
;
export
default
{
name
:
"dashboard"
,
components
:
{
...
...
@@ -97,7 +95,6 @@ export default {
subaccount
,
animatedNum
,
dashboardChart
,
tabbar
},
data
()
{
return
{
...
...
@@ -152,7 +149,8 @@ export default {
fn
.
getApiBaseUrl
(
this
.
region_id
,
this
.
coin_type
).
then
(
api
=>
{
if
(
api
==
''
)
{
//自动到无节点页面
this
.
$router
.
replace
(
'/my/'
+
this
.
puid
+
'/'
+
this
.
coin_type
)
console
.
log
(
"dashboard/index.vue没有找到apiBaseUrl,所以跳到no.vue"
)
this
.
$router
.
replace
(
'/frameDashboard/'
+
this
.
puid
+
'/'
+
this
.
coin_type
)
}
else
{
//请求实时算力
fn
.
getWorkerStats
(
api
,
this
.
puid
).
then
(
res
=>
{
...
...
@@ -169,7 +167,7 @@ export default {
}
else
{
this
.
$message
.
error
(
"请求支付状态错误!"
)
}
this
.
loading
=
false
;
this
.
$indicator
.
close
()
;
});
}
})
...
...
src/components/Dashboard/no.vue
View file @
d8e3227d
<
template
>
<div
class=
"
page dashboard
"
>
<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>
...
...
@@ -18,11 +18,62 @@
<mt-popup
v-model=
"showSide"
position=
"left"
class=
"left show-left"
>
<subaccount
v-on:childSubAccount=
"fromSubAccount"
></subaccount>
</mt-popup>
<div>
无节点,无算力页
<div
class=
"block-list bg-white"
>
<div
class=
"cell"
flex=
"box:mean"
>
<div
flex=
"main:center dir:top box:center cross:center"
>
<p>
<span
class=
"v"
>
0.00
</span>
<span
class=
"k"
>
TH/s
</span>
</p>
<h3
class=
"title f24gray"
>
实时算力
</h3>
<p
class=
"small-k-v mt20"
>
<span
class=
"k"
>
24小时算力:
</span><span
class=
"v"
>
0.00 TH/s
</span>
</p>
</div>
<div
flex=
"main:center dir:top box:center cross:center"
>
<p><span
class=
"v c-green"
>
0
</span></p>
<h3
class=
"title f24gray"
>
矿机
</h3>
<p
class=
"small-k-v mt20"
><span
class=
"k"
>
总数:
</span><span
class=
"v c-green"
>
0
</span>
<span
class=
"k"
>
不活跃:
</span><span
class=
"v c-red"
>
0
</span></p>
</div>
</div>
</div>
<div
class=
"mt20 p30 bg-white"
>
<h2
class=
"title"
>
您需要添加矿机到矿池,然后开始挖矿
</h2>
<div
class=
"txt"
>
<p>
连接矿机所在的局域网,登录矿机后台,填写您的子账户(密码建议留空),保存即可,矿机将在一分钟内自动添加到矿池网站页面。
</p>
<p>
矿机名规则为:子账户+英文句号+编号,例如,您的子账户是
{{
account_name
}}
, 可以设置矿机名为
{{
account_name
}}
.001、
{{
account_name
}}
.002,以此类推,一个矿机名对应一台矿机。
</p>
</div>
</div>
<div
class=
"line"
><span
class=
"xt"
></span></div>
<div
class=
"p30 bg-white"
>
<h2
class=
"title"
>
矿机配置示例
</h2>
<div
class=
"tabs mt40"
>
<ul
class=
"tab-tit f-cb"
>
<li
v-for=
"(demo,idx) in demoData"
:key=
"demo.region_id"
@
click=
"demoIdx=idx"
:class=
"demoIdx==idx?'active':''"
>
{{
demo
[
"text_zh-cn"
]
}}
</li>
</ul>
<div
class=
"tab-con"
>
<form
action=
"#"
onsubmit=
"return false;"
>
<ul>
<li
v-for=
"(stratum_url,urlIdx) in demoData[demoIdx].coin_info.stratum_url"
:key=
"stratum_url.url"
>
<label
for=
""
>
url
{{
urlIdx
+
1
}}
</label>
<input
type=
"text"
:value=
"stratum_url.url"
:model=
"message[urlIdx]=stratum_url.url"
class=
"eq-font"
disabled=
""
/>
<el-button
type=
"primary"
v-clipboard:copy=
"message[urlIdx]"
v-clipboard:success=
"onCopy"
v-clipboard:error=
"onError"
>
复制
</el-button>
</li>
<li>
<label
for=
""
>
worker
</label>
<input
type=
"text"
:value=
"account_name+'.001'"
class=
"eq-font"
disabled=
""
/>
</li>
<li>
<label
for=
""
>
password
</label>
<input
type=
"text"
value=
"123"
class=
"eq-font"
disabled=
""
/>
<span
style=
"color: #999;"
>
建议不填
</span>
</li>
</ul>
</form>
</div>
</div>
</div>
</div>
<tabbar></tabbar>
</div>
</
template
>
<
script
>
...
...
@@ -30,14 +81,12 @@ import fn from "@/utils/function.js";
import
coin
from
"@/components/Dashboard/coin"
;
import
region
from
"@/components/Dashboard/region"
;
import
subaccount
from
"@/components/Dashboard/subaccount"
;
import
tabbar
from
"@/components/Common/Tabbar.vue"
;
export
default
{
name
:
"no"
,
components
:
{
coin
,
region
,
subaccount
,
tabbar
},
data
()
{
return
{
...
...
@@ -61,6 +110,8 @@ export default {
region_name
:
''
,
//中英文切换对应的text_en/text_zh-cn
account_name
:
''
,
//当前帐户对应的名字
message
:
[],
demoIdx
:
0
,
demoData
:
[{
region_id
:
''
,
text_en
:
""
,
...
...
@@ -113,6 +164,7 @@ export default {
//获取支持当前币种的节点信息和当前币种信息
fn
.
getStratumUrls
(
this
.
coin_type
).
then
(
res
=>
{
self
.
demoData
=
res
;
this
.
$indicator
.
close
()
});
},
getSide
()
{
...
...
@@ -160,7 +212,12 @@ export default {
name
:
'dashboard'
})
},
onCopy
:
function
(
e
)
{
this
.
$message
.
alert
(
'已经复制: '
+
e
.
text
,
'友情提示'
)
},
onError
:
function
(
e
)
{
this
.
$message
.
alert
(
'复制失败!'
,
'友情提示'
)
}
},
watch
:
{
'$route'
(
to
,
from
)
{
...
...
src/components/Jump.vue
View file @
d8e3227d
...
...
@@ -3,20 +3,20 @@
<h3>
这个需要根据情况判断跳转到下面可能的页面
</h3>
<ul>
<li>
<
router-link
to=
"/create"
>
1.跳转到新建子账户页
</router-link
>
<
!--
<router-link
to=
"/create"
>
1.跳转到新建子账户页
</router-link>
--
>
</li>
<!--
<li>
<router-link
to=
"/subaccount"
>
2.跳转到账户列表
</router-link>
</li>
-->
<li>
<
router-link
to=
"/welcome"
>
2.跳转到欢迎页,即列表页精简版
</router-link
>
<
!--
<router-link
to=
"/welcome"
>
2.跳转到欢迎页,即列表页精简版
</router-link>
--
>
</li>
<li
@
click=
"goDashboard"
style=
"cursor:pointer"
>
3.跳转到子账户面板
</li>
<li>
<
router-link
to=
"/my/7/ltc/shenzhen/dashboard"
>
4.跳入用户面板页面
</router-link
>
<
!--
<router-link
to=
"/my/7/ltc/shenzhen/dashboard"
>
4.跳入用户面板页面
</router-link>
--
>
</li>
<li>
<
router-link
to=
"/settings"
>
设置页
</router-link
>
<
!--
<router-link
to=
"/settings"
>
设置页
</router-link>
--
>
</li>
</ul>
</div>
...
...
@@ -40,7 +40,7 @@ export default {
},
methods
:
{
goDashboard
()
{
this
.
$router
.
replace
(
"/
my/7/"
+
this
.
coin_type
+
"/"
+
this
.
region_id
+
"/dashboard"
)
this
.
$router
.
replace
(
"/
frameDashboard/"
+
this
.
puid
+
'/'
+
this
.
coin_type
+
'/'
+
this
.
region_id
+
'/dashboard'
)
}
}
}
...
...
src/components/Miners/index.vue
View file @
d8e3227d
<
template
>
<div
class=
"
page
miners"
>
<div
class=
"miners"
>
<div
class=
"page-header"
flex=
"main:justify cross:center"
>
<div
class=
"edit"
><i
class=
"iconfont icon-fanhui"
></i></div>
<div
class=
"title"
@
click=
"getGroup"
>
{{
messageGroup
}}
</div>
...
...
@@ -47,8 +47,6 @@
<!-- 添加刷新加载位置 -->
</div>
</div>
<!-- page-content end -->
<tabbar></tabbar>
</div>
<!-- page end -->
</
template
>
...
...
@@ -59,13 +57,11 @@
import
fn
from
'@/utils/function.js'
;
import
sort
from
"@/components/Miners/sort"
;
import
group
from
"@/components/Miners/group"
;
import
tabbar
from
"@/components/Common/Tabbar.vue"
;
export
default
{
name
:
'miners'
,
components
:
{
sort
,
group
,
tabbar
},
data
()
{
return
{
...
...
@@ -192,7 +188,7 @@ export default {
}
},
mounted
()
{
this
.
$indicator
.
close
();
},
methods
:
{
goMinerShow
()
{
...
...
src/components/Payments/index.vue
View file @
d8e3227d
<
template
>
<div
class=
"pa
ge pa
yments"
>
<div
class=
"payments"
>
<div
class=
"page-header"
flex=
"main:justify cross:center"
>
<div
class=
"title"
>
收益
</div>
</div>
...
...
@@ -20,7 +20,6 @@
</div>
</div>
</div>
<div
class=
"balance-list p30"
flex=
"dir:left box:mean"
>
<div>
<i
class=
"iconfont icon-keyongyue"
></i>
余额
...
...
@@ -39,22 +38,16 @@
<s>
{{
item
.
balance
}}
</s>
</div>
</div>
</div>
<!-- page-content end -->
<tabbar></tabbar>
</div>
<!-- page end -->
</
template
>
<
script
>
import
fn
from
'@/utils/function.js'
;
import
{
mapState
}
from
'vuex'
;
import
tabbar
from
"@/components/Common/Tabbar.vue"
;
export
default
{
name
:
'payments'
,
components
:
{
tabbar
},
components
:
{},
data
()
{
return
{
yesterday
:
{
...
...
@@ -97,7 +90,7 @@ export default {
num
:
'2.79003919'
,
unit
:
'lct'
,
balance
:
'存入余额'
},{
},
{
time
:
'2017-10-27'
,
module
:
'PPS模式'
,
num
:
'3.79003919'
,
...
...
@@ -125,10 +118,9 @@ export default {
}
},
mounted
()
{
this
.
$indicator
.
close
();
},
methods
:
{}
}
</
script
>
src/components/Settings/Account.vue
View file @
d8e3227d
...
...
@@ -5,34 +5,56 @@
<div
class=
"title"
>
子账户选择
</div>
</div>
<div
class=
"page-content"
>
<h2>
请选择子账户
</h2>
<ul
class=
"list-coin active"
>
<li
v-for=
"cur_coin in $store.state['cur_coins']"
:key=
"cur_coin"
flex=
"dir:left box:last"
>
<span>
kuangchang
</span>
<span>
<b
:class=
"cur_coin"
>
{{
cur_coin
|
uppercase
}}
</b>
<i
class=
"iconfont icon-jiantou"
></i>
</span>
</li>
</ul>
<h2>
请选择子账户
</h2>
<ul
class=
"list-coin active"
>
<li
v-for=
"subaccount in subaccountList"
:key=
"subaccount.puid"
flex=
"dir:left box:last"
@
click=
"handleChild(subaccount)"
>
<span>
{{
subaccount
.
name
}}
</span>
<span><b
:class=
"subaccount['default_coin_type']"
>
{{
subaccount
[
'default_coin_type'
]
|
uppercase
}}
</b><i
class=
"iconfont icon-jiantou"
></i></span>
</li>
</ul>
</div>
</div>
</div>
</
template
>
<
script
>
import
fn
from
'@/utils/function'
export
default
{
name
:
'account'
,
data
()
{
return
{
subaccountList
:
[],
}
},
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'
);
}
},
mounted
()
{
this
.
getSubAccount
()
},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
},
getSubAccount
()
{
fn
.
getSubAccount
().
then
(
res
=>
{
if
(
res
.
data
.
err_no
==
0
)
{
this
.
subaccountList
=
res
.
data
.
data
}
else
{
alert
(
"接口错误!"
)
}
})
},
handleChild
(
account
){
this
.
$store
.
commit
(
'setPuid'
,
account
.
puid
);
this
.
$store
.
commit
(
'setCoinType'
,
account
.
default_coin_type
)
this
.
goBack
();
}
}
}
...
...
src/components/Settings/DefaultCoin.vue
View file @
d8e3227d
...
...
@@ -6,7 +6,7 @@
</div>
<div
class=
"page-content"
>
<el-form
:model=
"createForm"
:rules=
"createRules"
ref=
"createForm"
>
<label
for=
""
>
选择此子账户优先显示的币种
</label>
<label
for=
""
>
选择此子账户优先显示的币种
</label>
<el-form-item
prop=
"defaultCoin"
>
<div
class=
"coin-area f-cb"
>
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin==cur_coin?'active':''"
v-for=
"cur_coin in $store.state['cur_coins']"
:key=
"cur_coin"
><b
:class=
"cur_coin"
>
{{
cur_coin
|
uppercase
}}
</b>
...
...
@@ -16,11 +16,10 @@
</el-form-item>
<div
class=
"descript"
>
当切换到该子账户时,将默认显示该币种
</div>
<div
class=
'btn-group full pl30 pr30 mt50'
>
<el-button
type=
"primary"
round
@
click=
"submitForm('createForm')"
:disabled=
"!showBtn"
>
确定
</el-button>
<el-button
type=
"primary"
round
@
click=
"submitForm('createForm')"
:disabled=
"!showBtn"
>
确定
</el-button>
</div>
</el-form>
</div>
</div>
</
template
>
<
script
>
...
...
@@ -39,6 +38,15 @@ export default {
computed
:
{
showBtn
:
function
()
{
return
this
.
createForm
.
defaultCoin
;
},
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'
);
}
},
mounted
()
{},
...
...
@@ -47,15 +55,27 @@ export default {
this
.
$router
.
go
(
-
1
);
},
submitForm
(
formName
)
{
this
.
$indicator
.
open
({
spinnerType
:
'fading-circle'
})
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$messagebox
.
alert
(
"提交成功!"
,
"温馨提示"
);
this
.
updateDefaultCoin
()
}
else
{
this
.
$messagebox
.
alert
(
"提交错误!"
,
"温馨提示"
);
return
false
;
}
});
}
},
updateDefaultCoin
()
{
this
.
$store
.
commit
(
'setCoinType'
,
this
.
createForm
.
defaultCoin
)
this
.
$axios
.
post
(
this
.
$store
.
state
.
common_url
+
'/subaccount/'
+
this
.
puid
+
'/update-default-coin'
,
{
coin_type
:
this
.
createForm
.
defaultCoin
})
.
then
(
res
=>
{
// this.$messagebox.alert("默认币种更新成功!", "友情提示");
this
.
goBack
();
this
.
$indicator
.
close
();
})
},
}
}
...
...
src/components/Settings/index.vue
View file @
d8e3227d
<
template
>
<div
class=
"
page
settings"
>
<div
class=
"settings"
>
<div
class=
"page-header"
flex=
"main:justify cross:center"
>
<div
class=
"title"
>
设置页面
</div>
</div>
<div
class=
"page-content bottom"
>
<div
class=
"page-content bottom
bg-blue
"
>
<div
class=
"setting-content"
>
<div
class=
"settings-group current-subaccount"
>
<mt-cell
title=
"当前子账户"
is-link
to=
"/account"
>
<span
class=
"fore-link-text"
>
zhiyuan
</span>
<b
class=
"
ltc fore-link-img"
/>
<span
class=
"fore-link-text"
>
{{
account_name
}}
</span>
<b
class=
"
fore-link-img"
:class=
"account_default_coin_type"
/>
</mt-cell>
</div>
<div
class=
"mt40 settings-group subaccount-settings"
>
...
...
@@ -16,7 +16,7 @@
<mt-cell
title=
"LTC收益地址"
is-link
></mt-cell>
<mt-cell
title=
"DOGE补贴地址"
is-link
></mt-cell>
<mt-cell
title=
"默认币种设置"
is-link
to=
"/defaultCoin"
>
<b
class=
"
ltc fore-link-img"
/>
<b
class=
"
fore-link-img"
:class=
"coin_type"
/>
</mt-cell>
</div>
<div
class=
"mt40 settings-group notice-content"
>
...
...
@@ -36,7 +36,6 @@
<mt-cell
title=
"同类内容报警间隔"
is-link
>
<span
class=
"fore-link-text"
>
3小时
</span>
</mt-cell>
</div>
<div
class=
"mt40 settings-group alarm-contact"
>
<mt-cell
title=
"报警联系人"
is-link
></mt-cell>
...
...
@@ -45,84 +44,142 @@
<mt-cell
title=
"矿机设置"
is-link
>
<span
class=
"fore-link-text"
>
矿工必看
</span>
</mt-cell>
<mt-cell
title=
"语言设置"
is-link
to=
"/language"
>
<mt-cell
title=
"语言设置"
is-link
to=
"/language"
>
<span
class=
"language-img zh-cn"
></span>
</mt-cell>
</div>
</div>
</div>
<!-- page-content end -->
<tabbar></tabbar>
</div>
<!-- page end -->
</
template
>
<
script
>
import
tabbar
from
"@/components/Common/Tabbar.vue"
;
import
fn
from
'@/utils/function'
export
default
{
name
:
'settings'
,
components
:
{
tabbar
},
components
:
{},
data
()
{
return
{
account_name
:
''
,
account_default_coin_type
:
''
,
}
},
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'
);
}
},
mounted
()
{
this
.
$indicator
.
close
();
this
.
pageInit
();
},
methods
:
{
pageInit
()
{
//获取当前用户信息
fn
.
getSubAccountById
(
this
.
puid
).
then
(
res
=>
{
if
(
res
.
data
.
err_no
==
0
)
{
console
.
log
(
res
.
data
.
data
)
this
.
account_name
=
res
.
data
.
data
.
name
;
this
.
account_default_coin_type
=
res
.
data
.
data
.
default_coin_type
;
}
})
},
},
watch
:{
}
}
</
script
>
<
style
lang=
"less"
>
.settings
{
.settings
{
background
:
#ededf2
;
.page-content{
&.bottom{
bottom
:
1rem
;}
.setting-content
{
.page-content
{
&.bottom
{
bottom
:
1rem
;
}
.setting-content
{
padding-top
:
0.28rem
;
.current-subaccount{
.fore-link-img{
margin-right
:
0.1rem
;
.current-subaccount
{
.fore-link-img
{
margin-right
:
0.1rem
;
}
}
.settings-group
{
.line(){
&.xb{
left
:
0
;
right
:
0
;
height
:
1px
;
width
:
100%
;
background
:
#ccc
;
content
:
''
;
position
:
absolute
;
bottom
:
0
;
transform
:
scaleY
(
0.33
)
translateY
(
1px
);}
.settings-group
{
.line()
{
&.xb
{
left
:
0
;
right
:
0
;
height
:
1px
;
width
:
100%
;
background
:
#ccc
;
content
:
''
;
position
:
absolute
;
bottom
:
0
;
transform
:
scaleY
(
0.33
)
translateY
(
1px
);
}
}
box-sizing
:
border-box
;
width
:
7
.5rem
;
.settings-title
{
.settings-title
{
font-size
:
0.28rem
;
color
:
#727272
;
line-height
:
0.28rem
;
box-sizing
:
border-box
;
padding
:
0
0
0.18rem
0.18rem
;
padding
:
0
0
0.18rem
0.18rem
;
}
.mint-cell
{
.mint-cell
{
font-size
:
0.32rem
;
color
:
#252525
;
overflow
:
visible
;
.mint-cell-wrapper{
.mint-cell-wrapper
{
background-image
:
none
;
}
.fore-link-text
{
.fore-link-text
{
font-size
:
0.28rem
;
color
:
#959595
;
}
.fore-link-img
{
display
:
block
;
width
:
0.41rem
;
height
:
0.41rem
;
vertical-align
:
middle
;
padding
:
0
0.3rem
0
0
;
background-size
:
0.41rem
0.41rem
;
background-repeat
:
no-repeat
;
background-position
:
0.3rem
center
;
color
:
#999
;}
.ltc
{
background-image
:
url(../../assets/img/index-tab1-active.png)
;}
.eth
{
background-image
:
url(../../assets/img/index-tab2-active.png)
;}
.dash
{
background-image
:
url(../../assets/img/index-tab3-active.png)
;}
.xmr
{
background-image
:
url(../../assets/img/index-tab4-active.png)
;}
.btc
{
background-image
:
url(../../assets/img/index-tab5-active.png)
;}
.sc
{
background-image
:
url(../../assets/img/index-tab6-active.png)
;}
.zcash
{
background-image
:
url(../../assets/img/index-tab7-active.png)
;}
.doge
{
background-image
:
url(../../assets/img/index-tab8-active.png)
;}
.notice-badge
{
.fore-link-img
{
display
:
block
;
width
:
0.41rem
;
height
:
0.41rem
;
vertical-align
:
middle
;
padding
:
0
0.3rem
0
0
;
background-size
:
0.41rem
0.41rem
;
background-repeat
:
no-repeat
;
background-position
:
0.3rem
center
;
color
:
#999
;
}
.ltc
{
background-image
:
url(../../assets/img/index-tab1-active.png)
;
}
.eth
{
background-image
:
url(../../assets/img/index-tab2-active.png)
;
}
.dash
{
background-image
:
url(../../assets/img/index-tab3-active.png)
;
}
.xmr
{
background-image
:
url(../../assets/img/index-tab4-active.png)
;
}
.btc
{
background-image
:
url(../../assets/img/index-tab5-active.png)
;
}
.sc
{
background-image
:
url(../../assets/img/index-tab6-active.png)
;
}
.zcash
{
background-image
:
url(../../assets/img/index-tab7-active.png)
;
}
.doge
{
background-image
:
url(../../assets/img/index-tab8-active.png)
;
}
.notice-badge
{
display
:
inline-block
;
width
:
0.41rem
;
height
:
0.41rem
;
...
...
@@ -132,20 +189,32 @@ export default {
border-radius
:
50%
;
color
:
#fff
;
}
.fore-link-lang
{
.fore-link-lang
{
width
:
0.48rem
;
height
:
0.32rem
;
}
.language-img
{
display
:
inline-block
;
vertical-align
:
middle
;
padding
:
0rem
;
background-size
:
0.48rem
0.32rem
;
background-repeat
:
no-repeat
;
background-position
:
0rem
center
;
width
:
0.48rem
;
height
:
0.32rem
;
&.zh-cn
{
background-image
:
url(../../assets/img/cn.png)
;}
&
.en
{
background-image
:
url(../../assets/img/en.png)
;}
.language-img
{
display
:
inline-block
;
vertical-align
:
middle
;
padding
:
0rem
;
background-size
:
0.48rem
0.32rem
;
background-repeat
:
no-repeat
;
background-position
:
0rem
center
;
width
:
0.48rem
;
height
:
0.32rem
;
&.zh-cn
{
background-image
:
url(../../assets/img/cn.png)
;
}
&
.en
{
background-image
:
url(../../assets/img/en.png)
;
}
margin-top
:
-0
.02rem
;
}
&
:after
{
.line.xb;
}
&
:after
{
.line.xb;
}
}
.mint-cell
:last-child
{
.mint-cell
:last-child
{
background-image
:
none
;
}
}
...
...
src/components/homeChart.vue
View file @
d8e3227d
...
...
@@ -144,10 +144,12 @@ export default {
}
},
created() {
this.pageInitInterval()
},
methods: {
pageInitInterval() {
this.$indicator.open({ spinnerType: '
fading
-
circle
' })
let self = this;
clearInterval(window.dingshiqi)
self.pageInit();
...
...
@@ -169,6 +171,7 @@ export default {
})
fn
.
getShareHistory
(
72
,
"1h"
,
self
.
params_coin
).
then
(
res
=>
{
this
.
$indicator
.
close
();
let
hour
;
self
.
shareHistoryTime
=
[];
self
.
shareHistoryYes
=
[];
...
...
src/main.js
View file @
d8e3227d
...
...
@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => {
function
checkToken
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOdyJ9.eyJpc3MiOiJodHRwczovL2Jsb2NraW4uYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfD
U5ZjE3OTc5ZDljMGM1MzZiZjRhMzVjMSIsImF1ZCI6WyJodHRwczovL3d3dy5wb29saW4uY29tL2FwaSIsImh0dHBzOi8vYmxvY2tpbi5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNTE3MjE5NjA2LCJleHAiOjE1MTcyMjY4MDYsImF6cCI6IkZhczI5dWJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByZWFkIHdyaXRlIn0.eci--2LVo2qszdu8o9Enh561WEb-dLygsFFeX5_mvnfeVw8qxiLaNVkyWBHzyYYHLZk2WhRE1PQZ9dtslMwb3Dq6svXhfJhUi4jJizZa4qgNM1ceEGy-IsqexPdg1tIQvXAmg1GDRpt9vyFHRY1C5VYobg_v2LXyoF0RDmMeGAyJQD4ZP2sw0T10uts2dcfG24zlrLfzsbLH04mitYD2Zlj066XPAChIaeUR-fVZxx0bfHHDWAsZurPlkw5SeSRO6oxroPQ07oDN_NXQcfpJevn1gjfMOkLmOma978Aj0axqfqUZAHIzbPF27guUPx15Px9BncEaGCRCYYo_xvXrg
A'
);
resolve
(
'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOdyJ9.eyJpc3MiOiJodHRwczovL2Jsb2NraW4uYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfD
VhMzM4MWE2ZjczMzNjNjdkMzMxOWZiYyIsImF1ZCI6WyJodHRwczovL3d3dy5wb29saW4uY29tL2FwaSIsImh0dHBzOi8vYmxvY2tpbi5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNTE3MzAwNDc1LCJleHAiOjE1MTczMDc2NzUsImF6cCI6IkZhczI5dWJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSByZWFkIHdyaXRlIn0.Fph_SmGioigITf6VN_VXgDfKi_I-7HhpuEaQCIVnUZPzDkAgygsv7QrEAM7CCFnLtCgdTThceLC-oIIr9xMqDHswLQOVpkBIb19ifq8MYbR0n3ivvZDFmWfxaJfqlTudmLxPvLLgHbsrkl5B-qDwcq61cPkYxq7gNY2H2lgCHljp3C8AJpaRkKcqGBdjNO3C3aYepQKAlXWZCBvvi-PIdhI6l2-glS1kqxYafR9tRV_SYRvB__ZudFnCtYbrcOWEEOdqcRz3ZwhCn7cAs3ucpexvKjtHGR80NdtWt-hNVp-vb8figL3LkkebSoFF_tC9KBHoWLLvIP_WRFZl3XzYL
A'
);
})
}
...
...
src/router/index.js
View file @
d8e3227d
...
...
@@ -57,51 +57,60 @@ const router = new Router({
meta
:
{
title
:
'Subaccount.vue'
}
},
{
path
:
'/my/:puid/:coin_type'
,
name
:
'no'
,
component
:
resolve
=>
require
([
'@/components/Dashboard/no.vue'
],
resolve
),
meta
:
{
title
:
'no.vue'
}
},
{
path
:
'/my/:puid/:coin_type/:region_id/dashboard'
,
name
:
'dashboard'
,
component
:
resolve
=>
require
([
'@/components/Dashboard'
],
resolve
),
meta
:
{
title
:
'Dashboard.vue'
}
},
{
path
:
'/my/:puid/:coin_type/:region_id/miners'
,
name
:
'miners'
,
component
:
resolve
=>
require
([
'@/components/Miners/'
],
resolve
),
meta
:
{
title
:
'Miners.vue'
}
},
{
path
:
'/my/:puid/:coin_type/:region_id/miners/:worker_id'
,
name
:
'minershow'
,
component
:
resolve
=>
require
([
'@/components/Miners/detail.vue'
],
resolve
),
meta
:
{
title
:
'MinerShow.vue'
}
},
{
path
:
'/my/:puid/:coin_type/:region_id/payments'
,
name
:
'payments'
,
component
:
resolve
=>
require
([
'@/components/Payments'
],
resolve
),
meta
:
{
title
:
'Payments.vue'
}
path
:
'/frameDashboard'
,
name
:
'frameDashboard'
,
component
:
resolve
=>
require
([
'@/components/Common/frameDashboard.vue'
],
resolve
),
// redirect: 'my/:puid/:coin_type/:region_id/dashboard',
children
:
[{
path
:
':puid/:coin_type/:region_id/dashboard'
,
name
:
'dashboard'
,
component
:
resolve
=>
require
([
'@/components/Dashboard'
],
resolve
),
meta
:
{
title
:
'Dashboard.vue'
}
},{
path
:
':puid/:coin_type'
,
name
:
'no'
,
component
:
resolve
=>
require
([
'@/components/Dashboard/no.vue'
],
resolve
),
meta
:
{
title
:
'no.vue'
}
},
{
path
:
':puid/:coin_type/:region_id/miners'
,
name
:
'miners'
,
component
:
resolve
=>
require
([
'@/components/Miners/'
],
resolve
),
meta
:
{
title
:
'Miners.vue'
}
},
{
path
:
':puid/:coin_type/:region_id/miners/:worker_id'
,
name
:
'minershow'
,
component
:
resolve
=>
require
([
'@/components/Miners/detail.vue'
],
resolve
),
meta
:
{
title
:
'MinerShow.vue'
}
},
{
path
:
':puid/:coin_type/:region_id/payments'
,
name
:
'payments'
,
component
:
resolve
=>
require
([
'@/components/Payments'
],
resolve
),
meta
:
{
title
:
'Payments.vue'
}
},
{
path
:
'settings'
,
name
:
'settings'
,
component
:
resolve
=>
require
([
'@/components/Settings/index.vue'
],
resolve
),
meta
:
{
title
:
'Settings.vue'
}
}
]
},
{
path
:
'/settings'
,
name
:
'settings'
,
component
:
resolve
=>
require
([
'@/components/Settings/index.vue'
],
resolve
),
meta
:
{
title
:
'Settings.vue'
}
},
{
path
:
'/defaultCoin'
,
name
:
'defaultCoin'
,
component
:
resolve
=>
require
([
'@/components/Settings/DefaultCoin'
],
resolve
),
...
...
@@ -148,6 +157,7 @@ const router = new Router({
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// Vue.$indicator.open({ spinnerType: 'fading-circle' })
var
arr
=
[
'home'
,
'jump'
];
if
(
localStorage
.
getItem
(
'enter_panel'
)
==
null
)
{
$store
.
commit
(
'setEnterPannel'
,
$store
.
state
.
enter_panel
);
...
...
src/utils/function.js
View file @
d8e3227d
...
...
@@ -2,44 +2,44 @@ import Vue from 'vue'
import
Vuex
from
'vuex'
import
$axios
from
'axios'
Vue
.
filter
(
'date422'
,
function
(
value
)
{
Vue
.
filter
(
'date422'
,
function
(
value
)
{
if
(
!
value
)
{
return
''
}
value
=
value
.
toString
()
return
value
.
slice
(
0
,
4
)
+
'-'
+
value
.
slice
(
4
,
6
)
+
'-'
+
value
.
slice
(
6
,
8
);
})
Vue
.
filter
(
'uppercase'
,
function
(
value
)
{
Vue
.
filter
(
'uppercase'
,
function
(
value
)
{
if
(
!
value
)
{
return
''
}
value
=
value
.
toString
()
return
value
.
toUpperCase
();
})
Vue
.
filter
(
'lowercase'
,
function
(
value
)
{
Vue
.
filter
(
'lowercase'
,
function
(
value
)
{
if
(
!
value
)
{
return
''
}
value
=
value
.
toString
()
return
value
.
toLowerCase
();
})
Vue
.
filter
(
'formatPercent'
,
function
(
value
)
{
Vue
.
filter
(
'formatPercent'
,
function
(
value
)
{
if
(
value
==
0
)
{
return
'--'
};
return
(
value
*
100
).
toFixed
(
2
)
+
"%"
})
Vue
.
filter
(
'formatPercent2'
,
function
(
value
)
{
Vue
.
filter
(
'formatPercent2'
,
function
(
value
)
{
return
(
value
*
100
).
toFixed
(
2
)
+
"%"
})
Vue
.
filter
(
'formatStar'
,
function
(
str
)
{
Vue
.
filter
(
'formatStar'
,
function
(
str
)
{
return
str
.
slice
(
0
,
3
)
+
"******"
+
str
.
slice
(
str
.
length
-
3
,
str
.
length
);
})
Vue
.
filter
(
'formatDate'
,
function
(
time
)
{
Vue
.
filter
(
'formatDate'
,
function
(
time
)
{
var
date
=
new
Date
(
time
*
1000
);
return
formatDate
(
date
,
"yyyy-MM-dd hh:mm"
);
})
Vue
.
filter
(
'formatDate2'
,
function
(
time
)
{
Vue
.
filter
(
'formatDate2'
,
function
(
time
)
{
if
(
!
time
)
return
''
;
var
date
=
parseInt
((
new
Date
().
getTime
())
/
1000
-
time
);
if
(
localStorage
.
getItem
(
'language'
)
==
'zh-cn'
)
{
...
...
@@ -78,7 +78,7 @@ Vue.filter('formatDate2', function (time) {
}
})
Vue
.
filter
(
'formatDate3'
,
function
(
time
)
{
Vue
.
filter
(
'formatDate3'
,
function
(
time
)
{
var
date
=
new
Date
(
time
*
1000
);
return
formatDate
(
date
,
"yyyy-MM-dd hh:mm:ss"
);
})
...
...
@@ -187,17 +187,18 @@ export default {
* @return {[type]} [description]
*/
getSubAccountById
(
puid
)
{
return
new
Promise
(
function
(
relsove
,
reject
)
{
if
(
!
Vue
.
$store
.
state
.
SubAccount
)
Vue
.
$store
.
state
.
SubAccount
=
{};
if
(
Vue
.
$store
.
state
.
SubAccount
[
'SubAccount'
+
puid
])
{
relsove
(
Vue
.
$store
.
state
.
SubAccount
[
'SubAccount'
+
puid
])
}
else
{
$axios
(
Vue
.
$store
.
state
.
common_url
+
"/subaccount/"
+
puid
).
then
(
function
(
res
)
{
Vue
.
$store
.
state
.
SubAccount
[
'SubAccount'
+
puid
]
=
res
;
relsove
(
Vue
.
$store
.
state
.
SubAccount
[
'SubAccount'
+
puid
])
})
}
})
// return new Promise(function (relsove, reject) {
// if (!Vue.$store.state.SubAccount) Vue.$store.state.SubAccount = {};
// if (Vue.$store.state.SubAccount['SubAccount' + puid]) {
// relsove(Vue.$store.state.SubAccount['SubAccount' + puid])
// } else {
// $axios(Vue.$store.state.common_url + "/subaccount/" + puid).then(function (res) {
// Vue.$store.state.SubAccount['SubAccount' + puid] = res;
// relsove(Vue.$store.state.SubAccount['SubAccount' + puid])
// })
// }
// })
return
$axios
(
Vue
.
$store
.
state
.
common_url
+
"/subaccount/"
+
puid
)
},
/**
* [createAccount 创建子账户]
...
...
@@ -251,8 +252,8 @@ export default {
let
regions
=
[];
let
obj
=
{};
return
new
Promise
((
resolve
,
reject
)
=>
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
if
(
v1
.
coin_type
==
coin_type
)
{
obj
=
{
region_id
:
v
.
region_id
,
text_en
:
v
.
text_en
,
'text_zh-cn'
:
v
[
'text_zh-cn'
]
}
regions
.
push
(
obj
)
...
...
@@ -273,7 +274,7 @@ export default {
//console.log("getRegionInfo")
return
new
Promise
((
resolve
,
reject
)
=>
{
let
cur_region
;
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
if
(
v
.
region_id
==
region_id
)
{
cur_region
=
v
;
}
...
...
@@ -315,8 +316,8 @@ export default {
getZonglanList
(
url
,
cointype
)
{
//console.log("getZonglanList")
let
list
=
[];
_
.
each
(
url
.
regions
,
function
(
v
,
i
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
i1
)
{
_
.
each
(
url
.
regions
,
function
(
v
,
i
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
i1
)
{
if
(
v1
.
coin_type
==
cointype
)
{
list
.
push
({
'region_id'
:
v
.
region_id
,
'text_en'
:
v
.
text_en
,
'text_zh-cn'
:
v
[
'text_zh-cn'
],
'coin_type'
:
cointype
,
'api_base_url'
:
v1
.
api_base_url
,
'coins'
:
url
.
coins
[
cointype
]
})
}
...
...
@@ -337,9 +338,9 @@ export default {
// console.log("getApiBaseUrl")
return
new
Promise
((
resolve
,
reject
)
=>
{
let
api_base_url
=
''
;
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
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
)
{
api_base_url
=
v1
.
api_base_url
;
}
...
...
@@ -419,7 +420,7 @@ export default {
getPaymentHistoryReason
(
tableData
)
{
//console.log("getPaymentHistoryReason")
let
reason
=
[];
_
.
each
(
tableData
,
function
(
v
,
i
)
{
_
.
each
(
tableData
,
function
(
v
,
i
)
{
if
(
v
.
payment_status
==
'DELAYED'
)
{
if
(
v
.
unpaid_reason
.
code
==
'ERR_EMPTY_ADDRESS'
)
{
if
(
localStorage
.
getItem
(
"language"
)
==
"zh-cn"
)
reason
.
push
(
'未设定收款地址'
)
...
...
@@ -574,9 +575,9 @@ export default {
*/
getRegionCoins
(
region_id
)
{
let
arr_coins
=
[];
_
.
map
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
i
,
o
)
{
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
)
})
}
...
...
@@ -606,9 +607,9 @@ export default {
getStratumUrl
(
region_id
,
coin_type
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
stratum_url
=
''
;
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
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
)
{
stratum_url
=
v1
.
stratum_url
;
}
...
...
@@ -631,8 +632,8 @@ export default {
let
data
=
[];
return
new
Promise
((
resolve
,
reject
)
=>
{
let
stratum_url
=
''
;
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
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
})
}
...
...
@@ -663,8 +664,8 @@ export default {
let
regions
=
[];
let
obj
=
{};
return
new
Promise
((
resolve
,
reject
)
=>
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
_
.
each
(
Vue
.
$store
.
state
.
init_url
.
regions
,
function
(
v
,
k
)
{
_
.
each
(
v
.
supported_coin_types
,
function
(
v1
,
k1
)
{
if
(
v1
.
coin_type
==
coin_type
)
{
obj
=
{
region_id
:
v
.
region_id
,
text_en
:
v
.
text_en
,
'text_zh-cn'
:
v
[
'text_zh-cn'
]
}
regions
.
push
(
obj
)
...
...
@@ -703,8 +704,8 @@ export default {
*/
getCoinsOnly
(
obj
)
{
let
arr_coins
=
[];
_
.
map
(
obj
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
v
.
supported_coin_types
,
function
(
v1
,
i1
,
o1
)
{
_
.
map
(
obj
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
v
.
supported_coin_types
,
function
(
v1
,
i1
,
o1
)
{
arr_coins
.
push
(
v1
.
coin_type
)
})
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment