Browse Source

优化文档 2022.3.11

master
ltlzx 4 years ago
parent
commit
14fdfe11cf
  1. 3
      src/api/server/index.js
  2. 2
      src/api/wallet.js
  3. 1
      src/components/CommonFooter.vue
  4. 18
      src/components/CommonHeader.vue
  5. 3
      src/i18n/cn.json
  6. 3
      src/i18n/en.json
  7. 4
      src/views/contract/account.vue
  8. 4
      src/views/contract/exchange-store.vue
  9. 11
      src/views/exchange/make-deal.vue
  10. 2
      src/views/profile/certification.vue
  11. 5
      src/views/profile/index.vue
  12. 129
      src/views/purchase/index.vue
  13. 4
      src/views/setting/index.vue
  14. 17
      src/views/wallet/exchange-assets.vue
  15. 4
      src/views/wallet/funding.vue

3
src/api/server/index.js

@ -84,7 +84,8 @@ const exclude = [
`getUserCoinBalance`,
`getKline`,
`getEntrustTradeRecord`,
`floor`
`floor`,
`subscribeRecords`
];
let loading = null;

2
src/api/wallet.js

@ -152,4 +152,4 @@ class Wallet {
}
}
export default Wallet;
export default Wallet;

1
src/components/CommonFooter.vue

@ -242,6 +242,7 @@ export default {
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 15px;
.item_p{
font-size: 16px;
}

18
src/components/CommonHeader.vue

@ -177,6 +177,7 @@ export default {
data() {
return {
isDark: false,
setp:0,
home: {
label: this.$t("common.homepage"),
url: "/home"
@ -468,7 +469,22 @@ export default {
Profile.getUserInfo({}).then(res => {
this.userInfo = res
});
}
},
//
getAuthInfo() {
Profile.getAuthInfo().then(res => {
this.detail = res;
//
if (res.primary_status == 0) {
this.setp = 0;
return;
} else if (res.status == 0) {
this.setp = 1;
} else {
this.setp = 2;
}
}).catch(res => {});
},
},
created() {

3
src/i18n/cn.json

@ -909,7 +909,8 @@
"k9":"请输入认购码",
"l1":"涨幅比例",
"l2":"保证金",
"l3":"倍"
"l3":"倍",
"l4":"当前估值"
},
"otc": {
"a0": "请选择交易类型",

3
src/i18n/en.json

@ -973,7 +973,8 @@
"k8": "Please log in first to apply",
"k9":"Please enter the subscription code",
"l1":"Proportion of increase",
"l2":"Cost"
"l2":"Cost",
"l4":"Current valuation"
},
"otc": {
"a0": "Please select transaction type",

4
src/views/contract/account.vue

@ -33,7 +33,9 @@
<div class="increace">{{accountInfo.unRealProfit}}</div>
</div> -->
<div class="d-flex p-3 justify-content-between">
<div>{{$t('contract.a7')}}USDT</div>
<div>{{$t('contract.a7')}}
<!-- USDT -->
</div>
<div class="decreace">{{ accountInfo.riskRate || "0%" }}</div>
</div>
<!-- <div class="d-flex p-3 justify-content-between" v-if="false">

4
src/views/contract/exchange-store.vue

@ -6,11 +6,11 @@
$t("contract.d5")
}}</a>
</div>
<div class="nav-item">
<!-- <div class="nav-item">
<a class="nav-link" :class="{ active: tab == 2 }" @click="tab = 2">{{
$t("contract.d6")
}}</a>
</div>
</div> -->
<div class="flex-fill px-3 justify-content-end d-flex align-items-center">
<el-popover
placement="bottom"

11
src/views/exchange/make-deal.vue

@ -64,15 +64,16 @@
<!-- 交易处理 -->
<div class="market-trade ">
<ul class="nav nav-pills">
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&!isMarket}]" @click.prevent="isCondition=false;isMarket=false;">
{{ $t("common.limit") }}</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&isMarket}]" @click.prevent="isCondition=false;isMarket=true;">
{{ $t("common.market") }}
</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&!isMarket}]" @click.prevent="isCondition=false;isMarket=false;">
{{ $t("common.limit") }}</a>
</li>
<!-- <li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&!isMarket}]" @click.prevent="isCondition=true;isMarket=false;">
{{ $t("common.stop-limit") }}</a>
@ -279,7 +280,7 @@ export default {
data() {
return {
detail:[],
isMarket: false,
isMarket: true,
isCondition: false,
userBanlance: null,

2
src/views/profile/certification.vue

@ -228,7 +228,7 @@
</div>
</div>
<div v-else-if="detail.status==2">
<p class="mt-3 mb-4">{{$t('profile.congratulations')}}{{detail.status_text}}</p>
<p class="mt-3 mb-4" style="font-size:18px">{{$t('profile.congratulations')}}{{detail.status_text_lang}}</p>
<i class="el-icon-circle-check my-4 increace" style="font-size:60px"></i>
<div class="text-center">
<button

5
src/views/profile/index.vue

@ -14,7 +14,10 @@
<div class="status fn-14 text-tips">{{detail.user_auth_level_text }}</div>
</div>
<div class="tab-content">
<div class="mobile fn-30 font-weight-bolder">{{detail.account | userFilter}}</div>
<div class="mobile fn-30 font-weight-bolder">
{{detail.account }}
<!-- | userFilter -->
</div>
<div class="label my-2">{{$t('profile.verState')}}</div>
<div class="d-flex align-items-center">
<div class="icon mr-2">

129
src/views/purchase/index.vue

@ -7,7 +7,9 @@
<div class="h3 mb-3">{{ detail.coin_name }}</div>
<div class>{{ $t("purchase.sendPrice") }}</div>
<div class="price fn-20 blue">
1 {{ detail.coin_name }} = {{ detail.issue_price }} USDT
1 {{ detail.coin_name }} = {{issue_price}}
<!-- {{ detail.issue_price }} -->
USDT
</div>
<ul>
<li class="mt-3">
@ -84,16 +86,23 @@
</button>
</div>
</div>
<p v-if="activeCoin.usable_balance">
<!-- v-if="activeCoin.usable_balance" -->
<p >
{{ $t("wallet.availableBalance") }}{{ activeCoin.usable_balance }}
</p>
<p>
1 {{ activeCoin.coin_name }}
{{ activeCoin.proportion_amount | omitTo(5) }}
1
<!-- {{ activeCoin.coin_name }} -->
USDT
{{ 1 / detail.issue_price | omitTo(4)}}
<!-- {{ activeCoin.proportion_amount | omitTo(5) }} -->
{{ detail.coin_name }}
</p>
<p>
{{ num || 0 }} {{ activeCoin.coin_name }} {{ total }}
{{ num || 0 }} {{ activeCoin.coin_name }}
{{(activeCoin.CurrentPrice/ detail.issue_price)*num | omitTo(4)}}
<!-- {{ total }} -->
{{ detail.coin_name }}
</p>
<button
@ -155,6 +164,9 @@
<th>{{$t('purchase.subscriptionCurrency')}}</th>
<th>{{$t('contract.b1')}}</th>
<th>{{$t('contract.l1')}}</th>
<th>{{$t('contract.l4')}}
<!-- USDT -->
</th>
<th class="text-right">{{$t('wallet.status')}}</th>
</tr>
</thead>
@ -168,7 +180,10 @@
<td>{{ item.payment_amount }}</td>
<td>{{ item.payment_currency }}</td>
<td>{{ item.subscription_time|parseTime }}</td>
<td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td>
<td>{{(item.increase_ratio).toFixed(5)}}%</td>
<td>{{(item.total_value).toFixed(5)}}</td>
<!-- <td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td> -->
<!-- <td>{{ ( (((item.payment_amount/item.subscription_currency_amount))*detail.issue_price) ).toFixed(2) }}</td> -->
<td class="text-right">
<span class="success">{{$t('wallet.success')}}</span>
</td>
@ -290,22 +305,24 @@ import Wallet from "@/api/wallet";
export default {
data() {
return {
num: "",
coinList: [],
detail: {},
activeCoin: {},
code:"",
transferRecords: [],
coinName:"",
subscribeRecords:[],
activityList:[{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""}],
activestep:0
num: 1,
coinList: [],
detail: {},
activeCoin: {},
code:"",
transferRecords: [],
coinName:"",
subscribeRecords:[],
activityList:[{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""}],
activestep:0,
issue_price:0.03,
timer:''
};
},
computed: {
total() {
return utils.multiple(
this.num || 0,
this.num || 1,
this.activeCoin.proportion_amount * 1,
2
);
@ -378,22 +395,22 @@ export default {
},
ifSubscribeNow() {
if (this.chkValidate()) {
this.$confirm(
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t(
"purchase.subscribe"
)}?`,
this.$t("purchase.prompt"),
{
confirmButtonText: this.$t("common.confirmBtn"),
cancelButtonText: this.$t("common.cancelBtn"),
if (this.chkValidate()) {
this.$confirm(
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t(
"purchase.subscribe"
)}?`,
this.$t("purchase.prompt"),
{
confirmButtonText: this.$t("common.confirmBtn"),
cancelButtonText: this.$t("common.cancelBtn"),
}
)
.then(() => {
this.subscribeNow();
})
.catch(() => {});
}
)
.then(() => {
this.subscribeNow();
})
.catch(() => {});
}
},
sbumit(){
$("#editAddress").modal("hide");
@ -409,30 +426,34 @@ export default {
});
},
subscribeNow() {
let data = {
amount: this.num,
coin_name: this.activeCoin.coin_name,
};
Subscride.subscribeNow(data)
.then((res) => {
if (res) {
this.$message.success(this.$t("purchase.subscribeSuccess"));
this.num = "";
}
})
.catch((err) => {
if(err==4002){
$("#editAddress").modal("show");
}
});
let data = {
amount: this.num,
coin_name: this.activeCoin.coin_name,
};
Subscride.subscribeNow(data).then((res) => {
if (res) {
this.$message.success(this.$t("purchase.subscribeSuccess"));
this.num = "";
this.getTransferRecords()
}
})
.catch((err) => {
if(err==4002){
$("#editAddress").modal("show");
}
});
},
},
created() {
this.subscribeTokenList();
this.getInfo();
this.getTransferRecords()
this.activity()
},
created() {
this.subscribeTokenList();
this.getInfo();
this.getTransferRecords()
this.activity()
this.timer=setInterval(this.getTransferRecords,5000)
},
beforeDestroy() {
clearInterval(this.timer);
}
};
</script>

4
src/views/setting/index.vue

@ -73,7 +73,7 @@
</div>
</div> -->
<!-- 邮箱验证 -->
<div class="col-md-4 d-flex">
<!-- <div class="col-md-4 d-flex">
<div class="panel-box bg-panel shadow-sm mb-4 w-100 d-flex flex-column">
<div class="heading">{{$t('setting.emailVer')}}</div>
<div class="tab-content flex-fill d-flex flex-column justify-content-between align-items-start">
@ -94,7 +94,7 @@
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
<!-- 短信 -->

17
src/views/wallet/exchange-assets.vue

@ -117,13 +117,14 @@
<table class="table">
<thead>
<tr>
<th>#</th>
<th>{{$t('wallet.assets')}}</th>
<th>{{$t('wallet.totalAssets')}}</th>
<th>{{$t('wallet.availableBalance')}}</th>
<th>{{$t('wallet.fee')}}</th>
<th>USD{{$t('wallet.valuation')}}</th>
<th class="text-right">{{$t('wallet.operating')}}</th>
<th>#</th>
<th>{{$t('wallet.assets')}}</th>
<!-- <th>{{$t('wallet.totalAssets')}}</th> -->
<th>{{$t('wallet.availableBalance')}}</th>
<th>{{$t('wallet.fee')}}</th>
<th>USD{{$t('wallet.valuation')}}</th>
<!-- color-gray-6 m-r-xs -->
<th >{{$t('wallet.operating')}}</th>
</tr>
</thead>
<tbody>
@ -133,7 +134,7 @@
<!-- <img :src="item.image" alt="eth" /> -->
{{ item.coin_name }}
</td>
<td>{{ item.freeze_balance|add(item.usable_balance) }}</td>
<!-- <td>{{ item.freeze_balance|add(item.usable_balance) }}</td> -->
<td>{{item.usable_balance}}</td>
<td>{{item.freeze_balance}}</td>
<td>{{item.usd_estimate}}</td>

4
src/views/wallet/funding.vue

@ -46,7 +46,7 @@
<tr>
<th>{{$t('wallet.assets')}}</th>
<th>{{$t('wallet.date')}}</th>
<th>{{$t('wallet.address')}}/{{$t('wallet.hash')}}</th>
<!-- <th>{{$t('wallet.address')}}/{{$t('wallet.hash')}}</th> -->
<th>{{$t('wallet.num')}}</th>
<th>{{$t('wallet.progress')}}</th>
<th class="text-right">{{$t('wallet.status')}}</th>
@ -59,7 +59,7 @@
<img src="../../assets/img/icon/1.png" alt="eth" /> {{item.coin_name}}
</td>
<td>{{item.datetime|parseTime}}</td>
<td>{{item.address}}</td>
<!-- <td>{{item.address}}</td> -->
<td>{{item.amount}}</td>
<td>-/-</td>
<td class="text-right">

Loading…
Cancel
Save