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
b6a807a7
authored
Jan 16, 2018
by
zhanghui1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
91661234
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
27 deletions
+46
-27
package.json
+1
-1
src/assets/less/style.less
+4
-3
src/components/Create.vue
+37
-18
src/router/index.js
+4
-5
No files found.
package.json
View file @
b6a807a7
...
@@ -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 --host 172.16.
10.57
"
,
"dev"
:
"webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 172.16.
4.38
"
,
"start"
:
"npm run dev"
,
"start"
:
"npm run dev"
,
"build"
:
"node build/build.js"
"build"
:
"node build/build.js"
},
},
...
...
src/assets/less/style.less
View file @
b6a807a7
...
@@ -140,12 +140,13 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
...
@@ -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;}
.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;}
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;}
label {padding: 0;}
}
}
.descript-list {line-height: 1.5; text-align: justify;
.descript-list {line-height: 1.5; text-align: justify;
li {padding:0.1rem 0; color: @gray;}
li {padding:0.1rem 0; color: @gray;}
}
}
.descript{padding:0 0.3rem; color: @gray;}
}
}
.btn-group { .ohz;
.btn-group { .ohz;
&.full {
&.full {
...
@@ -157,7 +158,7 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
...
@@ -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);
.btn-coin {border: 1px solid #dcdedf;.fl; margin:0.2rem; padding:0;.pos(r);
input {.pos(a); left:0;top:0; opacity:0;}
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);}
.ltc {background-image:url(../img/index-tab1.png);}
.eth {background-image:url(../img/index-tab2.png);}
.eth {background-image:url(../img/index-tab2.png);}
.dash {background-image:url(../img/index-tab3.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
...
@@ -203,6 +204,6 @@ html,body {-webkit-tap-highlight-color: rgba(0, 0, 0,0); font-size: 0.28rem; bac
}
}
.mobile-ios {
.mobile-ios {
.page-header {padding-top: 20px;}
.page-header {padding-top: 20px;}
.page-content {top:6
6
px;}
.page-content {top:6
4
px;}
}
}
src/components/Create.vue
View file @
b6a807a7
...
@@ -6,30 +6,33 @@
...
@@ -6,30 +6,33 @@
<div
class=
"btns"
></div>
<div
class=
"btns"
></div>
</div>
</div>
<div
class=
"page-content bg-blue"
>
<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>
<label
for=
""
>
设置子账户名
</label>
<el-form-item
prop=
"username"
>
<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>
</el-form-item>
<label
for=
""
>
选择此子账户优先显示的币种
</label>
<label
for=
""
>
选择此子账户优先显示的币种
</label>
<el-form-item
prop=
"defaultCoin"
>
<div
class=
"coin-area f-cb"
>
<div
class=
"coin-area f-cb"
>
<label
class=
"btn-coin"
:class=
"defaultCoin=='ltc'?'active':''"
><b
class=
"ltc"
>
LTC
</b>
<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>
<input
type=
"radio"
id=
"ltc"
value=
"ltc"
v-model=
"defaultCoin"
>
<!--
<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>
<label
class=
"btn-coin"
:class=
"
defaultCoin=='eth'?'active':''"
><b
class=
"eth"
>
ETH
</b>
<label
class=
"btn-coin"
:class=
"createForm.
defaultCoin=='eth'?'active':''"
><b
class=
"eth"
>
ETH
</b>
<input
type=
"radio"
id=
"eth"
value=
"eth"
v-model=
"
defaultCoin"
>
<input
type=
"radio"
id=
"eth"
value=
"eth"
v-model=
"createForm.
defaultCoin"
>
</label>
</label>
<label
class=
"btn-coin"
:class=
"defaultCoin=='dash'?'active':''"
><b
class=
"dash"
>
DASH
</b>
<label
class=
"btn-coin"
:class=
"createForm.defaultCoin=='dash'?'active':''"
><b
class=
"dash"
>
DASH
</b>
<input
type=
"radio"
id=
"dash"
value=
"dash"
v-model=
"defaultCoin"
>
<input
type=
"radio"
id=
"dash"
value=
"dash"
v-model=
"createForm.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>
</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>
</div>
<label
for=
""
>
当切换到该子账户时,将默认显示该币种
</label>
</el-form-item>
<div
class=
"descript"
>
当切换到该子账户时,将默认显示该币种
</div>
<div
class=
'btn-group full pl30 pr30 mt50'
>
<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
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>
</div>
</el-form>
</el-form>
<div
class=
"p30"
>
<div
class=
"p30"
>
...
@@ -48,24 +51,40 @@ export default {
...
@@ -48,24 +51,40 @@ export default {
data
()
{
data
()
{
return
{
return
{
msg
:
'创建子账户'
,
msg
:
'创建子账户'
,
createFrom
:
{
createForm
:
{
username
:
''
username
:
''
,
defaultCoin
:
''
},
},
defaultCoin
:
''
,
createRules
:
{
createRules
:
{
username
:
[
username
:
[
{
required
:
true
,
message
:
'请输入子账户名称'
,
trigger
:
'blur'
},
{
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
()
{},
mounted
()
{},
methods
:
{
methods
:
{
goBack
()
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
alert
(
'submit!'
);
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
}
}
}
}
...
...
src/router/index.js
View file @
b6a807a7
...
@@ -153,7 +153,6 @@ router.beforeEach((to, from, next) => {
...
@@ -153,7 +153,6 @@ router.beforeEach((to, from, next) => {
// $store.commit('setEnterPannel', true);
// $store.commit('setEnterPannel', true);
// }
// }
function
getCoins
(
obj
)
{
function
getCoins
(
obj
)
{
//获取所支持币种['ltc','dash','eth'...]
let
arr_coins
=
[];
let
arr_coins
=
[];
_
.
map
(
obj
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
obj
.
regions
,
function
(
v
,
i
,
o
)
{
_
.
map
(
v
.
supported_coin_types
,
function
(
v1
,
i1
,
o1
)
{
_
.
map
(
v
.
supported_coin_types
,
function
(
v1
,
i1
,
o1
)
{
...
@@ -165,7 +164,7 @@ router.beforeEach((to, from, next) => {
...
@@ -165,7 +164,7 @@ router.beforeEach((to, from, next) => {
var
arr
=
[
'home'
,
'jump'
];
var
arr
=
[
'home'
,
'jump'
];
if
(
arr
.
indexOf
(
to
.
name
)
>
-
1
)
{
if
(
true
)
{
//初始全站入口支持数据(未登录页基础数据)
//初始全站入口支持数据(未登录页基础数据)
if
(
$store
.
state
.
cur_coins
.
length
==
0
)
{
if
(
$store
.
state
.
cur_coins
.
length
==
0
)
{
$axios
(
$store
.
state
.
base_url
)
$axios
(
$store
.
state
.
base_url
)
...
@@ -194,9 +193,9 @@ router.beforeEach((to, from, next) => {
...
@@ -194,9 +193,9 @@ router.beforeEach((to, from, next) => {
next
();
next
();
}
}
}
else
{
}
else
{
localStorage
.
removeItem
(
'access_token'
)
//
localStorage.removeItem('access_token')
localStorage
.
removeItem
(
'id_token'
)
//
localStorage.removeItem('id_token')
localStorage
.
removeItem
(
'expires_at'
)
//
localStorage.removeItem('expires_at')
// $auth.login();
// $auth.login();
next
();
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