kalel ma 4 years ago
commit fb50e888b3
  1. 21
      src/api/yyyf.js
  2. 25
      src/components/balances/banlanes-tabds.vue
  3. 2
      src/locales/lang/balances.zh-CN.js
  4. 2
      src/locales/lang/balances.zh-HK.js
  5. 122
      src/pages/entry.vue
  6. 60
      src/pages/yyyflogin.vue

@ -31,3 +31,24 @@ export function getExamDetails(data) {
params: data,
});
}
export function getUserTimeMoneyDto() {
return request({
method: 'get',
url: Host + 'exam/getUserTimeMoneyDto',
});
}
export function submit() {
return request({
method: 'get',
url: Host + 'exam/submit',
});
}
export function reStart() {
return request({
method: 'get',
url: Host + 'exam/reStart',
});
}

@ -78,19 +78,19 @@
<el-button type="text" class="white size">o.oooooo</el-button>
</div>-->
<div>
<!-- 充值 -->
<!-- 充值
<span
class="blue"
@click="handleTableActionClick('deposit', itembtc)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
> -->
<!-- 提币
<span
@click="handleTableActionClick('withdrawal', itembtc)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span
>
> -->
<!-- 划转 -->
<span
@click="handleTableActionClick('transfer', itembtc)"
@ -148,18 +148,18 @@
</div>
<div>
<!-- 充值 -->
<!-- 充值
<span
@click="handleTableActionClick('deposit', itemETH)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
>-->
<!-- 提币
<span
@click="handleTableActionClick('withdrawal', itemETH)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span
>
> -->
<!-- 划转 -->
<span
@click="handleTableActionClick('transfer', itemETH)"
@ -216,18 +216,18 @@
}}</span>
</div>
<div>
<!-- 充值 -->
<!-- 充值
<span
@click="handleTableActionClick('deposit', item)"
type="text"
>{{ $t('balances.table.header_last_recharge') }}</span
>
<!-- 提币 -->
>-->
<!-- 提币
<span
@click="handleTableActionClick('withdrawal', item)"
type="text"
>{{ $t('balances.table.header_last_mention') }}</span
>
> -->
<!-- 划转 -->
<span
@click="handleTableActionClick('transfer', item)"
@ -682,6 +682,7 @@ export default {
// btcusdt
if (this.USDTPrie[i].currencyPair == 'BTC-USDT') {
// console.log(this.USDTPrie[i].amount);
//
this.btcPrice = this.btcMang * this.USDTPrie[i].amount;
// console.log('btc'+this.btcPrice);
}

@ -6,7 +6,7 @@ export default {
header_last_yes: '可用',
header_last_no: '冻结',
header_last_ok: '操作',
header_last_recharge: '充',
header_last_recharge: '充',
header_last_mention: '提币',
header_last_deal: '交易',
header_last_financial: '财务记录',

@ -6,7 +6,7 @@ export default {
header_last_yes: '可用',
header_last_no: '凍結',
header_last_ok: '操作',
header_last_recharge: '充',
header_last_recharge: '充',
header_last_mention: '提幣',
header_last_deal: '交易',
header_last_financial: '財務記錄',

@ -116,6 +116,49 @@
<a href="javascript:;" class="entry-btn">
<img src="../images/entry/btn.png" />
</a>
<!-- <div class="usdList">
<div class="usdItem" element-loading-background="rgba(0, 0, 0, 0.2)">
<!-- 跳转到交易中心,携带交易对 --/>
<a href="javascript:;">
<p>微信 <i class="el-icon-star-off"></i></p>
<p>初始资金{{ userTimeMoneyDto.wxPayInit}} CNY</p>
<p>余额{{ userTimeMoneyDto.wxPay }} CNY</p>
</a>
</div>
<div class="usdItem" element-loading-background="rgba(0, 0, 0, 0.2)">
<!-- 跳转到交易中心,携带交易对 --/>
<a href="javascript:;">
<p>支付宝 <i class="el-icon-star-off"></i></p>
<p>初始资金{{ userTimeMoneyDto.aliPayInit}} CNY</p>
<p>余额{{ userTimeMoneyDto.aliPay }} CNY</p>
</a>
</div>
<div class="usdItem" element-loading-background="rgba(0, 0, 0, 0.2)">
<!-- 跳转到交易中心,携带交易对 --/>
<a href="javascript:;">
<p>银行卡 <i class="el-icon-star-off"></i></p>
<p>初始资金{{ userTimeMoneyDto.bankCardInit}} CNY</p>
<p>余额{{ userTimeMoneyDto.bankCard }} CNY</p>
</a>
</div>
</div>
<div class="usdList tabs">
<el-tabs v-model="activeName">
<el-tab-pane label="BTC" name="BTC"
>余额{{ userTimeMoneyDto.btc }} <br/><br/> 总额{{tatolPrice}} CNY <br/><br/> 地址{{userTimeMoneyDto.assessUserId}}</el-tab-pane
>
<el-tab-pane label="USDT" name="USDT"
>余额{{ userTimeMoneyDto.usdt }} <br/><br/> 总额{{tatolPrice}} CNY <br/><br/> 地址{{userTimeMoneyDto.assessUserId}}</el-tab-pane
>
<el-tab-pane label="EOS" name="EOS"
>余额{{ userTimeMoneyDto.eos }} <br/><br/> 总额{{tatolPrice}} CNY <br/><br/> 地址{{userTimeMoneyDto.assessUserId}}</el-tab-pane
>
<el-tab-pane label="ETH" name="ETH"
>余额{{ userTimeMoneyDto.eth }} <br/><br/> 总额{{tatolPrice}} CNY <br/><br/> 地址{{userTimeMoneyDto.assessUserId}}</el-tab-pane
>
</el-tabs>
</div>-->
</div>
<Footer />
</div>
@ -124,12 +167,15 @@
<script>
import NavHeader from '@/components/common/header';
import Footer from '@/components/common/footer';
import {getUserTimeMoneyDto} from '@/api/yyyf';
import {getLeftPrice} from '@/api/currency.js';
export default {
name: 'entry',
data() {
return {
activeName: 'BTC',
userTimeMoneyDto: {},
tatolPrice: 0,
};
},
components: {
@ -137,7 +183,79 @@ export default {
Footer,
},
methods: {
handleClick() {},
getUSDTPrie() {
getLeftPrice().then(res => {
this.USDTPrie = res.data.data;
// console.log(this.USDTPrie);
//
let cnyAmount = this.USDTPrie[0].cnyAmount;
let btcCount = 0;
let usdtCount = this.userTimeMoneyDto.usdt;
let eosCount = 0;
let ethCount = 0;
for (let i = 0; i < this.USDTPrie.length; i++) {
// btcusdt
if (this.USDTPrie[i].currencyPair == 'BTC-USDT') {
// console.log(this.USDTPrie[i].amount);
//
btcCount = this.userTimeMoneyDto.btc * this.USDTPrie[i].amount;
// console.log('btc'+this.btcPrice);
}
// return this.btcPrice;
}
for (let i = 0; i < this.USDTPrie.length; i++) {
// btcusdt
if (this.USDTPrie[i].currencyPair == 'EOS-USDT') {
// console.log(this.USDTPrie[i].amount);
//
eosCount = this.userTimeMoneyDto.eos * this.USDTPrie[i].amount;
// console.log('btc'+this.btcPrice);
}
// return this.btcPrice;
}
for (let i = 0; i < this.USDTPrie.length; i++) {
// btcusdt
if (this.USDTPrie[i].currencyPair == 'ETH-USDT') {
// console.log(this.USDTPrie[i].amount);
//
ethCount = this.userTimeMoneyDto.eth * this.USDTPrie[i].amount;
// console.log('btc'+this.btcPrice);
}
// return this.btcPrice;
}
let digitWallet =
(btcCount + usdtCount + eosCount + ethCount) * cnyAmount;
let total =
digitWallet +
this.userTimeMoneyDto.aliPay +
this.userTimeMoneyDto.wxPay +
this.userTimeMoneyDto.bankCard;
//
this.tatolPrice = Math.floor(total * 10) / 10;
// console.log(this.tatolPrice);
});
},
},
created() {
getUserTimeMoneyDto().then(res => {
if (res.data.code === 200) {
this.userTimeMoneyDto = res.data.data;
this.getUSDTPrie();
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
this.closeWindow();
},
});
}
});
},
};
</script>

@ -19,6 +19,8 @@ export default {
loading: null,
tel: null,
pass: null,
//0 1 2
reqType: null,
};
},
@ -26,6 +28,7 @@ export default {
created() {
this.startLoading();
let params = this.parseUrl();
this.reqType = params.reqType;
//
if (
!$.isEmptyObject(params) &&
@ -112,7 +115,8 @@ export default {
//tokencookie
// Cookie.set('token', res.data.data.token);
localStorage.setItem('token', res.data.data.token);
//
localStorage.setItem('isSubmit', JSON.stringify(false));
//cookie
// Cookie.set('userData', res.data.data);
localStorage.setItem('userData', JSON.stringify(res.data.data));
@ -125,21 +129,54 @@ export default {
//
localStorage.setItem('invitationCode', res.data.data.invitationCode);
this.endLoading();
location.href = '/';
location.href = '/entry';
} else {
this.$message.warning(res.data.msg);
}
});
},
loginFromYyyf: function(params) {
let self = this;
signInYyyf(params).then(res => {
if (res.data.code === 200) {
let status = res.data.data.status;
localStorage.setItem('yyyfToken', res.data.data.yyyfUserToken);
//0 1 2
localStorage.setItem('reqType', self.reqType);
if (self.reqType == 0) {
//
localStorage.setItem('remainingTime', res.data.data.remainingTime);
}
if (status == 1) {
//tokencookie
// Cookie.set('token', res.data.data.token);
localStorage.setItem('yyyfToken', res.data.data.yyyfUserToken);
self.dealLogin(res);
} else {
this.$message.warning({
message: res.data.data.msg,
onClose: function() {
if (status == 3) {
self.dealLogin(res);
} else {
self.closeWindow();
}
},
});
}
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
self.closeWindow();
},
});
}
});
},
dealLogin: function(res) {
let code = res.data.data.code;
this.tel = res.data.data.tel;
this.pass = res.data.data.password;
@ -157,23 +194,6 @@ export default {
} else {
this.login();
}
} else {
this.$message.warning({
message: res.data.data.msg,
onClose: function() {
this.closeWindow();
},
});
}
} else {
this.$message.warning({
message: res.data.msg,
onClose: function() {
this.closeWindow();
},
});
}
});
},
closeWindow: function() {
if (

Loading…
Cancel
Save