Commit 2ed978d7 by zhanghui

Merge branch 'gaolei' into 'develop'

Gaolei



See merge request !14
parents 78b54381 8ddb3f40
......@@ -14,12 +14,12 @@
h1,h3,b{font-weight: 400; }
b {text-transform: uppercase;font-size: .20rem;margin-left: .08rem;display: inline-block;}
.pay-list {position: fixed;z-index: 9; left: 0; right: 0; height: 3.15rem; background-color: #103f73; color: #fff; box-sizing: border-box;
h1 {font-size: .90rem;
b {font-size: .48rem; }
}
span{color: #fff}
.v1{font-size: .90rem}
.k1{font-size: .48rem}
.v2{font-size: .30rem;}
.k2{width: 2.8rem;}
h3 {font-size: .24rem;color: #c3cfdc;}
p{font-size: .30rem;}
.d2{width: 2.8rem;}
i{font-size: .22rem;color: #dbe2ea;display: inline-block; vertical-align: top;margin-left: .05rem;}
}
.balance-list {margin: 3.35rem 0 .05rem 0;font-size: .34rem;background: #fff;
......@@ -144,3 +144,32 @@
}
}
}
//manager
//admin-list
.admin-list{background-color: #ededf2;
a{.pos(r);
&:after{.line.xb;}
}
}
//setEmail
.setEmail{background-color: #ededf2;
label{display: block;font-size: 0.28rem; color: #6c87b2;padding: 0 0 0 .30rem;}
.label{padding: 0.2rem 0.3rem; }
.el-input__inner{border:none;border-radius: 0;}
.el-form-item{margin-bottom: 0;background-color: #fff;}
.el-form-item__error{padding:.10rem 15px;}
.el-row{background-color: #fff;line-height: 40px;}
.el-col-8{.tr;padding-right: 15px;}
.btn-code{box-shadow: none;vertical-align: middle;}
.input_custom.is-disabled .el-input__inner{background-color: #fff;color: #1c5fa9;}
.el-form-item__error{z-index: 99999;}
.el-form-item.is-required .el-form-item__label:before{content: ''}
.line{
.el-form-item{.pos(r);
&:after{.line.xb;}
}
}
}
......@@ -252,5 +252,4 @@ export default {
},
}
};
</script>
......@@ -20,6 +20,7 @@ export default {
language: localStorage.getItem('language'),
regions: []
}
},
mounted() {
......
......@@ -6,40 +6,63 @@
<div class="page-content bottom">
<div class="pay-list pl30 pr30 pt20">
<div>
<h3>昨日收益<i class="iconfont icon-gantanhao"></i></h3>
<h1>{{yesterday.num}}<b class="ml15">{{yesterday.unit}}</b></h1>
<h3>{{txt[language].zuorishouyi}}<i @click="promptZuori" class="iconfont icon-gantanhao"></i></h3>
<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-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>
</p>
</div>
<div class="mt55" flex="dir:left box:last">
<div class="mt50" flex="dir:left box:last">
<div class="d1">
<h3 class="mb5">今日已挖(预估)<i class="iconfont icon-gantanhao"></i></h3>
<p>{{today.num}}<b>{{today.unit}}</b></p>
<h3 class="mb10">今日已挖(预估)<i class="iconfont icon-gantanhao"></i></h3>
<p>
<span class="v2" v-if="$store.state.coin_type=='xmr'"><animated-num :value="PaymentStats.today_estimate/Math.pow(10,12)" :fixed=12></animated-num></span>
<span class="v2" v-else><animated-num :value="PaymentStats.today_estimate/Math.pow(10,8)" :fixed=8></animated-num></span>
<span class="k2">{{init_url.coins[$store.state.coin_type]['symbol']}}</span>
</p>
</div>
<div class="d2">
<h3 class="mb5">已支付</h3>
<p>{{already.num}}<b>{{already.unit}}</b></p>
<h3 class="mb10">{{txt[language].yizhifu}}</h3>
<p>
<span class="v2" v-if="$store.state.coin_type=='XMR'"><animated-num :value="PaymentStats.total_paid_amount/Math.pow(10,12)" :fixed=12></animated-num></span>
<span class="v2" v-else><animated-num :value="PaymentStats.total_paid_amount/Math.pow(10,8)" :fixed=8></animated-num></span>
<span class="k2">{{init_url.coins[$store.state.coin_type]['symbol']}}</span></p>
</p>
</div>
</div>
</div>
<div class="balance-list p30" flex="dir:left box:mean">
<div>
<i class="iconfont icon-keyongyue"></i>余额
</div>
<div class="f-tar">
{{balanceList.num}}<b>{{balanceList.unit}}</b>
<span class="v" v-if="$store.state.coin_type=='XMR'"><animated-num :value="PaymentStats.balance/Math.pow(10,12)" :fixed=12></animated-num></span>
<span class="v" v-else><animated-num :value="PaymentStats.balance/Math.pow(10,8)" :fixed=8></animated-num></span>
<span class="k">{{init_url.coins[$store.state.coin_type]['symbol']}}</span>
</div>
</div>
<div class="ments-list p30" v-for='item in mentsList' flex="dir:left box:mean">
<div class="ments-list p30" v-for="items in PaymentHistory.data" flex="dir:left box:mean">
<div>
<span>{{item.time}}</span>
<s>{{item.module}}</s>
<span>{{items.date|date422}}</span>
<s>PPS模式</s>
</div>
<div class="ments-list-right f-tar">
<span>{{item.num}}<b>{{item.unit}}</b></span>
<s>{{item.balance}}</s>
<span>{{(items.amount/Math.pow(10,8)).toFixed(8)}}<b>
{{init_url.coins[$store.state.coin_type]['symbol']}}</b></span>
<s v-if="items.payment_status=='PAID'">
<el-button type="text" size="mini" style="color:#666;cursor:default;">{{txt[language].yizhifu}}</el-button>
</s>
<s v-if="items.payment_status=='PENDING'">
<el-button type="text" size="mini" style="color:#666;cursor:default;">{{txt[language].daizhifu}}</el-button>
</s>
<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" @:click="cunruyue">{{txt[language].yuanyin}}</el-button>
</el-tooltip>
</s>
</div>
</div>
</div>
<!-- page-content end -->
<tabbar></tabbar>
......@@ -50,85 +73,141 @@
import fn from '@/utils/function.js';
import { mapState } from 'vuex';
import tabbar from "@/components/Common/Tabbar.vue";
import animatedNum from "@/components/Common/AnimatedNum";
export default {
name: 'payments',
components: {
tabbar
tabbar,
animatedNum
},
data() {
return {
yesterday: {
num: '1.21270311',
unit: 'lct'
},
today: {
num: '3.79003919',
unit: 'lct'
},
already: {
num: '3.79003919',
unit: 'lct'
reason: "",
regions: [],
language: localStorage.getItem('language'),
PaymentStats: {
total_paid_amount: 0,
balance: 0,
today_estimate: 0,
yesterday_amount: 0
},
balanceList: {
num: '3.79003919',
unit: 'lct'
},
mentsList: [{
time: '2017-10-27',
module: 'PPS模式',
num: '3.79003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-26',
module: 'PPS模式',
num: '1.43003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-25',
module: 'PPS模式',
num: '4.99003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-24',
module: 'PPS模式',
num: '2.79003919',
unit: 'lct',
balance: '存入余额'
},{
time: '2017-10-27',
module: 'PPS模式',
num: '3.79003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-26',
module: 'PPS模式',
num: '1.43003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-25',
module: 'PPS模式',
num: '4.99003919',
unit: 'lct',
balance: '存入余额'
}, {
time: '2017-10-24',
module: 'PPS模式',
num: '2.79003919',
unit: 'lct',
balance: '存入余额'
}]
PaymentHistory: {},
}
},
mounted() {
methods: {
handleCurrentChange(v) {
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)
.then(api => fn.getPaymentHistory(api, puid, v))
.then(res => {
self.PaymentHistory = res.data.data;
//console.log("当前币种所在节点的子帐户支付历史PaymentHistory:", res.data)
self.reason = fn.getPaymentHistoryReason(res.data.data.data);
})
},
pageInitInterval() {
let self = this;
clearInterval(window.dingshiqi)
self.pageInit();
window.dingshiqi = setInterval(function() {
self.pageInit();
}, $store.state.refresh_time)
},
pageInit() {
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
fn.getStratumUrl(region_id, coin_type)
.then(res => {
self.stratum_url = res;
})
//获取所有节点
fn.getAllRegions().then(res => {
this.regions = res;
});
// //获取当前节点信息
fn.getRegionInfo(region_id).then(res => {
if (self.language == 'zh-cn') {
this.region_name = res['text_zh-cn'];
}
if (self.language == 'en') {
this.region_name = res['text_en'];
}
});
//获取支付状态
fn.getApiBaseUrl(region_id, coin_type)
.then(api => {
if (api == '') {
this.$toast("当前币种所在的节点不支持!");
$router.replace("/my/" + puid + "/" + localStorage.getItem('coin_type'))
} else {
fn.getPaymentStats(api, puid)
.then(res => {
if (res.data.err_no == 0) {
//console.log("当前币种所在节点的子帐户支付状态PaymentStats:", res.data.data);
this.PaymentStats = res.data.data;
} else {
this.$toast("当前币种所在节点的子帐户支付状态错误!")
$router.replace({
name: 'my_puid_cointype',
path: '/my/' + self.$route.params.puid + '/' + self.$route.params.coin_type
})
}
self.loading = false;
});
}
})
//获取支付历史
fn.getApiBaseUrl(region_id, coin_type)
.then(api => {
if (api == "") {
$router.replace({
name: 'my_puid_cointype',
path: '/my/' + self.$route.params.puid + '/' + self.$route.params.coin_type
})
} else {
fn.getPaymentHistory(api, puid, 1)
.then(res => {
self.PaymentHistory = res.data.data;
//console.log("当前币种所在节点的子帐户支付历史PaymentHistory:", res.data)
self.reason = fn.getPaymentHistoryReason(res.data.data.data);
self.loading = false;
})
}
})
},
promptZuori() {
this.$toast('昨日收益为国际标准时间昨日0:00-24:00(北京时间昨日8:00到今日8:00)之间的收益。');
},
cunruyue(){
this.$toast(reason[items.$index])
}
},
methods: {}
computed: {
...mapState(["txt", "init_url", "cur_coins"]),
refresh(v) {
return $store.state.refresh;
}
},
watch: {
'$route' (to, from) {
this.pageInitInterval();
},
refresh(v) {
this.pageInitInterval()
}
},
mounted() {
this.pageInitInterval();
}
}
</script>
<template>
<div class="page admin-list">
<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 class="btns"></div>
</div>
<div class="page-content">
<div class="mt40">
<mt-cell title="登录名">
<span class="fore-link-text">abc***@gmail.com</span>
</mt-cell>
</div>
<div class="mt40">
<mt-cell title="邮箱" v-if="!email" is-link to="/setEmail">
<span class="fore-link-text">设置</span>
</mt-cell>
<mt-cell title="邮箱" v-else is-link>
<span class="fore-link-text">{{email}}</span>
</mt-cell>
<mt-cell title="修改密码" is-link></mt-cell>
</div>
</div>
</div>
</template>
<script>
export default {
name: "Admin",
data() {
return {
msg: '账户管理',
email: ''
};
},
computed: {
},
mounted() {},
methods: {
goBack() {
//this.$router.go(-1);
},
}
};
</script>
<template>
<div class="page setEmail">
<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 class="btns"></div>
</div>
<div class="page-content">
<!-- 未设置邮箱 -->
<el-form :model="setEmail" ref="setEmail" label-width="0px">
<label class="label" for="">请输入你的邮箱地址</label>
<el-form-item prop="email" label="" :rules="[{ required: true, message: '请输入邮箱地址', trigger: 'blur' },{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur,change' }]">
<el-input v-model="setEmail.email" placeholder="输入邮箱"></el-input>
</el-form-item>
<div class='btn-group full pl30 pr30 mt70'>
<el-button type="primary" round @click="submitForm('setEmail')" :disabled="!showBtnEmail">下一步</el-button>
</div>
</el-form>
<!-- 未设置邮箱 -->
<!-- 已设置邮箱 -->
<el-form label-width="0px">
<label class="label" for="">你的邮箱地址为</label>
<el-form-item>
<el-input disabled v-model="messageEmail" class="input_custom"></el-input>
</el-form-item>
</el-form>
<!-- 已设置邮箱 -->
<!-- 输入验证码 -->
<el-form :model="setCode" ref="setCode" label-width="0px">
<label class="label" for="">已发送验证码到您的邮箱,请检查邮箱,在下方输入验证码</label>
<el-row>
<el-col :span="16">
<el-form-item prop="code" label="" :rules="[
{ required: true, message: '请输入验证码', trigger: 'blur,change' },
{ min: 6, max: 6, message: '请输入6位数字验证码', trigger: 'blur,change' }
]">
<el-input v-model="setCode.code" placeholder="请输入6位数字验证码"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-button type="primary" class="btn-code" size="small" :disabled="!showCode" @click="getCode">{{text}}</el-button>
</el-col>
</el-row>
<div class='btn-group full pl30 pr30 mt70'>
<el-button type="primary" round @click="submitForm('setCode')" :disabled="!showBtnCode">提交</el-button>
</div>
</el-form>
<!-- 输入验证码 -->
<!-- 修改密码 -->
<el-form status-icon :model="setPwd" ref="setPwd" :rules="modifyPsd" :label-position="labelPosition" label-width="85px">
<div class="mb85">
<el-form-item label="原密码" prop="usedPsd" :rules="[
{ required: true, message: '请输入原密码', trigger: 'blur,change' },
]">
<el-input type="password" v-model="setPwd.usedPsd" auto-complete="off"></el-input>
</el-form-item>
</div>
<div class="line">
<el-form-item label="密码" prop="newPsd">
<el-input type="password" v-model="setPwd.newPsd" auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="checkPsd">
<el-input type="password" v-model="setPwd.checkPsd" auto-complete="off"></el-input>
</el-form-item>
</div>
<div class='btn-group full pl30 pr30 mt70'>
<el-button type="primary" round @click="submitForm('setPwd')" :disabled="!showBtnPwd">提交</el-button>
</div>
</el-form>
<!-- 修改密码 -->
</div>
</div>
</template>
<script>
export default {
name: "setEmail",
data() {
var validatePass = (rule, value, callback) => {
if (value === null) {
callback(new Error('请再次输入密码'));
} else if (value !== this.setPwd.newPsd) {
callback(new Error('两次输入密码不一致!'));
} else {
callback();
}
}
return {
msg: "设置邮箱",
setEmail: {
email: ''
},
messageEmail: 'abc***@gmail.com',
setCode: {
code: ''
},
count: '',
showCode: true,
timer: null,
text: "获取验证码",
setPwd: {
usedPsd: null,
newPsd: null,
checkPsd: null
},
labelPosition: 'left',
modifyPsd: {
newPsd: [
{ required: true, message: '请输入新密码', trigger: 'blur,change' },
{
min: 6,
max: 18,
message: "密码过短,密码为6-18位数字+字母",
trigger: "blur,change"
}
],
checkPsd: [
{ validator: validatePass, trigger: 'blur,change' },
]
},
}
},
computed: {
showBtnEmail: function() {
return this.setEmail.email;
},
showBtnCode: function() {
return this.setCode.code;
},
showBtnPwd: function() {
return this.setPwd.usedPsd && this.setPwd.newPsd && this.setPwd.checkPsd;
},
},
mounted() {},
methods: {
goBack() {
this.$router.go(-1);
},
//设置邮箱
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
//this.$router.replace('/jump')
} else {
console.log('error submit!!');
return false;
}
});
},
//输入验证码
getCode() {
const TIME_COUNT = 60;
if (!this.timer) {
this.count = TIME_COUNT;
this.showCode = false;
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.text = this.count + 's 后重新获取'
this.count--;
} else {
this.showCode = true;
this.text = '获取验证码'
clearInterval(this.timer);
this.timer = null;
}
}, 1000)
}
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
//this.$router.replace('/jump')
this.$toast({
message: '邮箱已设置~',
iconClass: 'iconfont icon-dui'
});
} else {
console.log('error submit!!');
return false;
}
});
},
//修改密码
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
//this.$router.replace('/jump')
this.$toast({
message: '密码设置成功~',
iconClass: 'iconfont icon-dui'
});
} else {
console.log('error submit!!');
return false;
}
});
},
}
};
</script>
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