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
af09e4e9
authored
Jan 16, 2018
by
jingjie
Browse files
Options
Browse Files
Download
Plain Diff
jingjie
parents
e75a96ed
ed4ddfe6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
65 deletions
+94
-65
package.json
+1
-1
src/assets/less/style.less
+4
-3
src/components/Create.vue
+42
-23
src/components/Settings.vue
+10
-5
src/components/Tabbar.vue
+33
-28
src/router/index.js
+4
-5
No files found.
package.json
View file @
af09e4e9
...
...
@@ -5,7 +5,7 @@
"author"
:
"xin3w <xin3w@126.com>"
,
"private"
:
true
,
"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 172.16.6.191
"
,
"start"
:
"npm run dev"
,
"build"
:
"node build/build.js"
},
...
...
src/assets/less/style.less
View file @
af09e4e9
...
...
@@ -140,12 +140,13 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
.el-input__inner {border: 0px; padding:0; font-size: 0.32rem;}
}
label {font-size: 0.28rem;color: @gray; padding:0.2rem 0.3rem;.d-b;}
.coin-area {
background: #fff; padding: 0.2rem 0.3
rem;
.coin-area {
padding: 0.2rem 0
rem;
label {padding: 0;}
}
.descript-list {line-height: 1.5; text-align: justify;
li {padding:0.1rem 0; color: @gray;}
}
.descript{padding:0 0.3rem; color: @gray;}
}
.btn-group { .ohz;
&.full {
...
...
@@ -157,7 +158,7 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
}
.btn-coin {border: 1px solid #dcdedf;.fl; margin:0.2rem; padding:0;.pos(r);
input {.pos(a); left:0;top:0; opacity:0;}
b {.d-b;vertical-align:middle;padding:0
.15rem 0.3rem 0.15
rem 0.9rem;background-size:0.5rem 0.5rem; background-repeat: no-repeat; background-position: 0.3rem center;.eq-font; color: #999;}
b {.d-b;vertical-align:middle;padding:0
rem 0.3rem 0
rem 0.9rem;background-size:0.5rem 0.5rem; background-repeat: no-repeat; background-position: 0.3rem center;.eq-font; color: #999;}
.ltc {background-image:url(../img/index-tab1.png);}
.eth {background-image:url(../img/index-tab2.png);}
.dash {background-image:url(../img/index-tab3.png);}
...
...
@@ -203,6 +204,6 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
}
.mobile-ios {
.page-header {padding-top: 20px;}
.page-content {top:6
6
px;}
.page-content {top:6
4
px;}
}
src/components/Create.vue
View file @
af09e4e9
...
...
@@ -6,30 +6,33 @@
<div
class=
"btns"
></div>
</div>
<div
class=
"page-content bg-blue"
>
<el-form
:model=
"createF
rom"
:rules=
"createRules"
ref=
"createFro
m"
>
<el-form
:model=
"createF
orm"
:rules=
"createRules"
ref=
"createFor
m"
>
<label
for=
""
>
设置子账户名
</label>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"createF
rom.username"
auto-complete=
"off"
placeholder=
"输入子账户名,4-3
0个小写字母或数字"
></el-input>
<el-input
v-model=
"createF
orm.username"
auto-complete=
"off"
placeholder=
"输入子账户名,4-2
0个小写字母或数字"
></el-input>
</el-form-item>
<label
for=
""
>
选择此子账户优先显示的币种
</label>
<div
class=
"coin-area f-cb"
>
<label
class=
"btn-coin"
:class=
"defaultCoin=='ltc'?'active':''"
><b
class=
"ltc"
>
LTC
</b>
<input
type=
"radio"
id=
"ltc"
value=
"ltc"
v-model=
"defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"defaultCoin=='eth'?'active':''"
><b
class=
"eth"
>
ETH
</b>
<input
type=
"radio"
id=
"eth"
value=
"eth"
v-model=
"defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"defaultCoin=='dash'?'active':''"
><b
class=
"dash"
>
DASH
</b>
<input
type=
"radio"
id=
"dash"
value=
"dash"
v-model=
"defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"defaultCoin=='xmr'?'active':''"
><b
class=
"xmr"
>
XMR
</b>
<input
type=
"radio"
id=
"xmr"
value=
"xmr"
v-model=
"defaultCoin"
>
</label>
</div>
<label
for=
""
>
当切换到该子账户时,将默认显示该币种
</label>
<el-form-item
prop=
"defaultCoin"
>
<div
class=
"coin-area f-cb"
>
<el-radio
v-model=
"createForm.defaultCoin"
:label=
"cur_coin|uppercase"
border
v-for=
"cur_coin in $store.state['cur_coins']"
:key=
"cur_coin"
>
{{
cur_coin
|
uppercase
}}
</el-radio>
<!--
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin=='ltc'?'active':''"
><b
class=
"ltc"
>
LTC
</b>
<input
type=
"radio"
id=
"ltc"
value=
"ltc"
v-model=
"createForm.defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin=='eth'?'active':''"
><b
class=
"eth"
>
ETH
</b>
<input
type=
"radio"
id=
"eth"
value=
"eth"
v-model=
"createForm.defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin=='dash'?'active':''"
><b
class=
"dash"
>
DASH
</b>
<input
type=
"radio"
id=
"dash"
value=
"dash"
v-model=
"createForm.defaultCoin"
>
</label>
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin=='xmr'?'active':''"
><b
class=
"xmr"
>
XMR
</b>
<input
type=
"radio"
id=
"xmr"
value=
"xmr"
v-model=
"createForm.defaultCoin"
>
</label>
-->
</div>
</el-form-item>
<div
class=
"descript"
>
当切换到该子账户时,将默认显示该币种
</div>
<div
class=
'btn-group full pl30 pr30 mt50'
>
<el-button
type=
"primary"
class=
"button-primary"
round
disabled
v-if=
"!showBtn"
>
确定
</el-button>
<el-button
type=
"primary"
class=
"button-primary"
round
v-else
>
确定
</el-button>
<el-button
type=
"primary"
class=
"button-primary"
round
v-else
@
click=
"submitForm('createForm')"
>
确定
</el-button>
</div>
</el-form>
<div
class=
"p30"
>
...
...
@@ -48,24 +51,40 @@ export default {
data
()
{
return
{
msg
:
'创建子账户'
,
createFrom
:
{
username
:
''
createForm
:
{
username
:
''
,
defaultCoin
:
''
},
defaultCoin
:
''
,
createRules
:
{
username
:
[
{
required
:
true
,
message
:
'请输入子账户名称'
,
trigger
:
'blur'
},
{
min
:
4
,
max
:
30
,
message
:
'子账户名长度不够,请输入4-30个字母或数字'
,
trigger
:
'blur'
}
{
min
:
4
,
max
:
20
,
message
:
'子账户名长度不够,请输入4-20个字母或数字'
,
trigger
:
'blur'
}
],
defaultCoin
:
[
{
required
:
true
,
trigger
:
'blur'
},
]
},
showBtn
:
false
showBtn
:
false
}
},
computed
:{
},
mounted
()
{},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
'submit!'
);
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
}
}
...
...
src/components/Settings.vue
View file @
af09e4e9
<
template
>
<div
class=
"page settings"
>
<div
class=
"page-header"
flex=
"main:justify cross:center"
>
<div
class=
"back"
@
click=
"goBack"
><i
class=
"iconfont icon-fanhui"
></i></div>
<div
class=
"title"
>
{{
msg
}}
</div>
</div>
<div
class=
"page-content"
>
<div
class=
"page-content
bottom
"
>
<div
class=
"setting-content"
>
<div
class=
"settings-group current-subaccount"
>
<mt-cell
title=
"当前子账户"
>
...
...
@@ -52,11 +51,18 @@
</div>
</div>
</div>
<!-- page-content end -->
<tabbar></tabbar>
</div>
<!-- page end -->
</
template
>
<
script
>
import
tabbar
from
"@/components/Tabbar.vue"
;
export
default
{
name
:
'dashboard'
,
components
:
{
tabbar
},
data
()
{
return
{
msg
:
'设置页面'
...
...
@@ -66,9 +72,7 @@ export default {
},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
}
}
}
...
...
@@ -77,6 +81,7 @@ export default {
.settings
{
background
:
#ededf2
;
.page-content{
&.bottom{
bottom
:
1rem
;}
.setting-content
{
padding-top
:
0.28rem
;
.current-subaccount{
...
...
src/components/Tabbar.vue
View file @
af09e4e9
...
...
@@ -15,43 +15,48 @@
</li>
<li
@
click=
"goTo(3)"
:class=
"index==3?'active':''"
>
<i
class=
"iconfont icon-unie606"
></i>
<p>
设置
</p>
<p>
设置
</p>
</li>
</ul>
</div>
</
template
>
<
script
>
export
default
{
name
:
'tabbar'
,
data
()
{
return
{
msg
:
'底部选项卡'
,
index
:
0
,
}
},
mounted
()
{
var
indexNum
=
0
export
default
{
name
:
'tabbar'
,
data
()
{
return
{
msg
:
'底部选项卡'
,
index
:
indexNum
,
}
},
mounted
()
{
},
methods
:
{
goTo
(
n
)
{
this
.
index
=
n
;
switch
(
n
)
{
case
0
:
this
.
$router
.
replace
(
'/my/puid0/coin_type/region_id/payments'
)
break
;
case
1
:
this
.
$router
.
replace
(
'/my/puid1/coin_type/region_id/payments'
)
break
;
case
2
:
this
.
$router
.
replace
(
'/my/puid2/coin_type/region_id/payments'
)
break
;
default
:
this
.
$router
.
replace
(
'/my/puid3/coin_type/region_id/payments'
)
break
;
},
methods
:
{
goTo
(
n
)
{
this
.
index
=
n
;
switch
(
n
)
{
case
0
:
this
.
$router
.
replace
(
'/my/puid0/coin_type/region_id/payments'
)
indexNum
=
0
break
;
case
1
:
this
.
$router
.
replace
(
'/my/puid1/coin_type/region_id/payments'
)
indexNum
=
1
break
;
case
2
:
this
.
$router
.
replace
(
'/my/puid2/coin_type/region_id/payments'
)
indexNum
=
2
break
;
default
:
this
.
$router
.
replace
(
'/settings'
)
indexNum
=
3
break
;
}
}
}
}
}
</
script
>
<
style
lang=
"less"
>
...
...
src/router/index.js
View file @
af09e4e9
...
...
@@ -153,7 +153,6 @@ router.beforeEach((to, from, next) => {
// $store.commit('setEnterPannel', true);
// }
function
getCoins
(
obj
)
{
//获取所支持币种['ltc','dash','eth'...]
let
arr_coins
=
[];
_
.
map
(
obj
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
v
.
supported_coin_types
,
function
(
v1
,
i1
,
o1
)
{
...
...
@@ -165,7 +164,7 @@ router.beforeEach((to, from, next) => {
var
arr
=
[
'home'
,
'jump'
];
if
(
arr
.
indexOf
(
to
.
name
)
>
-
1
)
{
if
(
true
)
{
//初始全站入口支持数据(未登录页基础数据)
if
(
$store
.
state
.
cur_coins
.
length
==
0
)
{
$axios
(
$store
.
state
.
base_url
)
...
...
@@ -194,9 +193,9 @@ router.beforeEach((to, from, next) => {
next
();
}
}
else
{
localStorage
.
removeItem
(
'access_token'
)
localStorage
.
removeItem
(
'id_token'
)
localStorage
.
removeItem
(
'expires_at'
)
//
localStorage.removeItem('access_token')
//
localStorage.removeItem('id_token')
//
localStorage.removeItem('expires_at')
// $auth.login();
next
();
}
...
...
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