Commit b6a807a7 by zhanghui1

1

parent 91661234
......@@ -5,7 +5,7 @@
"author": "xin3w <xin3w@126.com>",
"private": true,
"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",
"build": "node build/build.js"
},
......
......@@ -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.3rem;
.coin-area {padding: 0.2rem 0rem;
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.15rem 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:0rem 0.3rem 0rem 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:66px;}
.page-content {top:64px;}
}
......@@ -6,30 +6,33 @@
<div class="btns"></div>
</div>
<div class="page-content bg-blue">
<el-form :model="createFrom" :rules="createRules" ref="createFrom">
<el-form :model="createForm" :rules="createRules" ref="createForm">
<label for="">设置子账户名</label>
<el-form-item prop="username">
<el-input v-model="createFrom.username" auto-complete="off" placeholder="输入子账户名,4-30个小写字母或数字"></el-input>
<el-input v-model="createForm.username" auto-complete="off" placeholder="输入子账户名,4-20个小写字母或数字"></el-input>
</el-form-item>
<label for="">选择此子账户优先显示的币种</label>
<el-form-item prop="defaultCoin">
<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">
<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="defaultCoin=='eth'?'active':''"><b class="eth">ETH</b>
<input type="radio" id="eth" value="eth" v-model="defaultCoin">
<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="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 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>
<label for="">当切换到该子账户时,将默认显示该币种</label>
</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;
}
});
},
}
}
......
......@@ -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();
}
......
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