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`, `getUserCoinBalance`,
`getKline`, `getKline`,
`getEntrustTradeRecord`, `getEntrustTradeRecord`,
`floor` `floor`,
`subscribeRecords`
]; ];
let loading = null; 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; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
padding: 0 15px;
.item_p{ .item_p{
font-size: 16px; font-size: 16px;
} }

18
src/components/CommonHeader.vue

@ -177,6 +177,7 @@ export default {
data() { data() {
return { return {
isDark: false, isDark: false,
setp:0,
home: { home: {
label: this.$t("common.homepage"), label: this.$t("common.homepage"),
url: "/home" url: "/home"
@ -468,7 +469,22 @@ export default {
Profile.getUserInfo({}).then(res => { Profile.getUserInfo({}).then(res => {
this.userInfo = 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() { created() {

3
src/i18n/cn.json

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

3
src/i18n/en.json

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

4
src/views/contract/account.vue

@ -33,7 +33,9 @@
<div class="increace">{{accountInfo.unRealProfit}}</div> <div class="increace">{{accountInfo.unRealProfit}}</div>
</div> --> </div> -->
<div class="d-flex p-3 justify-content-between"> <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 class="decreace">{{ accountInfo.riskRate || "0%" }}</div>
</div> </div>
<!-- <div class="d-flex p-3 justify-content-between" v-if="false"> <!-- <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") $t("contract.d5")
}}</a> }}</a>
</div> </div>
<div class="nav-item"> <!-- <div class="nav-item">
<a class="nav-link" :class="{ active: tab == 2 }" @click="tab = 2">{{ <a class="nav-link" :class="{ active: tab == 2 }" @click="tab = 2">{{
$t("contract.d6") $t("contract.d6")
}}</a> }}</a>
</div> </div> -->
<div class="flex-fill px-3 justify-content-end d-flex align-items-center"> <div class="flex-fill px-3 justify-content-end d-flex align-items-center">
<el-popover <el-popover
placement="bottom" placement="bottom"

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

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

2
src/views/profile/certification.vue

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

4
src/views/setting/index.vue

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

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

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

4
src/views/wallet/funding.vue

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

Loading…
Cancel
Save