Browse Source

优化

master
ltlzx 4 years ago
parent
commit
6b6af59461
  1. 52
      i18n/lang/en.json
  2. 23
      pages/base/mine.vue
  3. 8
      pages/exchange/index.vue
  4. 64
      pages/exchange/open-position.vue
  5. 4
      pages/exchange/symbol-list.vue
  6. 2
      pages/safe/forget-password.vue
  7. 8
      pages/safe/index.vue
  8. 19
      store/index.js

52
i18n/lang/en.json

@ -91,7 +91,7 @@
"b8": "Deduct the handling fee",
"b9": "Available",
"c0": "Buy",
"c1": "My Commission",
"c1": "My wallets",
"c2": "Identity Authentication",
"c3": "Security Center",
"c4": "Message Notification",
@ -102,7 +102,7 @@
"c9": "Cancelled successfully",
"d0": "Home",
"d1": "Transaction",
"d2": "Wallet",
"d2": "Wallets",
"d3": "Please enter search keywords",
"d4": "All",
"d5": "Motherboard",
@ -129,7 +129,7 @@
"a6": "Binding",
"a7": "Mailbox binding",
"a8": "Switch account",
"a9": "Logout",
"a9": "Log Out",
"b0": "Modify Nickname",
"b1": "Please enter a nickname",
"b2": "Language"
@ -262,8 +262,8 @@
"e0": "Please enter the total price",
"e1": "Order successfully placed",
"e2": "Average Price",
"e3": "Highest",
"e4": "Lowest",
"e3": "High",
"e4": "Low",
"e5": "amount",
"e6": "Order",
"e7": "Currency Information",
@ -358,21 +358,21 @@
},
"reg": {
"a0": "Mobile registration",
"a1": "Mailbox Registration",
"a2": "Mobile",
"a3": "Please enter your phone number",
"a1": "Regiser Account",
"a2": "Email",
"a3": "Enter your email address",
"a4": "Mailbox",
"a5": "Please enter the mailbox number",
"a6": "Verification Code",
"a7": "Please enter the verification code",
"a6": "Email verification Code",
"a7": "Enter the email verification code",
"a8": "Password",
"a9": "Please enter a password",
"a9": "Enter a password",
"b0": "Confirm Password",
"b1": "Please confirm your password",
"b1": "Confirm your password",
"b2": "Recommended person",
"b3": "Please enter the recommender",
"b4": "Optional",
"b5": "You have agreed",
"b5": "I have agreed",
"b6": "User Agreement",
"b7": "and understand ours",
"b8": "Privacy Agreement",
@ -383,8 +383,8 @@
"c3": "Please fill in the phone number",
"c4": "Please fill in the mailbox number",
"c5": "Registered successfully",
"c6":"Invitation code (required)",
"c7":"Please fill in the invitation code"
"c6":"Referral ID(required)",
"c7":"Fill in the referral ID"
},
"safe": {
"a0": "Untie",
@ -393,17 +393,17 @@
"a3": "Mailbox Number",
"a4": "Please enter the mailbox number",
"a5": "Email Verification Code",
"a6": "Please enter the verification code",
"a6": "Enter the verification code",
"a7": "Verification Code",
"a8": "Unbind successfully",
"a9": "Binding successful",
"b0": "Forgot login password",
"b1": "Account",
"b2": "Please enter your phone",
"b2": "Enter your email",
"b3": "New Password",
"b4": "Please enter a new password",
"b4": "Enter a new password",
"b5": "Confirm Password",
"b6": "Please confirm your password",
"b6": "Confirm your password",
"b7": "Confirm Modification",
"b8": "Please enter the correct phone or email number",
"b9": "Google Authenticator",
@ -415,7 +415,7 @@
"c5": "Google Verification Code",
"c6": "Confirm binding",
"c7": "Security Center",
"c8": "login password",
"c8": "Login Password",
"c9": "Modify",
"d0": "Settings",
"d1": "Transaction Password",
@ -495,11 +495,11 @@
"a2": "Classification"
},
"login": {
"a0": "Mobile phone or mailbox number",
"a1": "Please enter your phone or email number",
"a0": "Email",
"a1": "Enter your email",
"a2": "Password",
"a3": "Please enter a password",
"a4": "Login",
"a3": "Enter your password",
"a4": "Log In ",
"a5": "Forgot Password",
"a6": "No account",
"a7": "Register Now",
@ -552,7 +552,7 @@
"e1": "Can open more",
"e2": "sell",
"e3": "Can open empty",
"e4": "Available Max",
"e4": "Available Founds",
"e5": "Transfer",
"e6": "Fund Rate",
"e7": "Distance settlement",
@ -739,7 +739,7 @@
"a9":"multiple",
"b0":"Are you sure you want to log out?",
"b1":"Sign in or register",
"b2":"Hi, welcome to AMATAK",
"b2":"Hi, welcome to NHACOIN",
"b3":"amount",
"b4":"spot index ",
"b5":"Contract index",

23
pages/base/mine.vue

@ -15,11 +15,11 @@
</view>
</view>
<view class="m-t-md d-flex flex-wrap justify-center fn-center w-max">
<text class="fn-28 w-max">{{ filterMoney(account.total_assets_btc) }}</text>
<text class="fn-28 w-max">{{ filterMoney(account.total_assets_btc,true) }}</text>
<text class="fn-sm m-l-md w-max"
>
<!-- {{ filterMoney(account.total_assets_usd) }} USD -->
{{ (account.total_assets_usd).toFixed(4) }} USD
{{ filterMoney(account.total_assets_usd,false) }} USD
</text>
</view>
@ -121,7 +121,7 @@
<text class="fn-20 d-block color-light m-t-xs"
>
<!-- {{ filterMoney(account.funds_account_usd) }} -->
{{ (account.funds_account_usd).toFixed(4) }}
{{ (account.funds_account_usd).toFixed(2) }}
</text>
<text class="fn-sm d-block color-gray-6 m-t-xs"
>{{ $t("base.d6") }}(USDT)</text>
@ -195,7 +195,7 @@
<p class="color-gray-6" style="padding: 5px 0">
{{ $t("base.b9") }}
</p>
<p class="fn-lg color-light overflow-scroll">{{ item.usable_balance }}</p>
<p class="fn-lg color-light overflow-scroll">{{ (item.usable_balance).toFixed(2) }}</p>
</view>
<view class="w-4/12 fn-center">
<p class="color-gray-6" style="padding: 5px 0">
@ -208,7 +208,7 @@
{{ $t("base.e3") }}(USD)
</p>
<p class="fn-lg color-light overflow-scroll">
{{ omitTo(item.usd_estimate, item.priceDecimals) }}
{{ omitTo(item.usd_estimate, item.priceDecimals) | priceDecimals}}
</p>
</view>
</view>
@ -351,6 +351,12 @@ export default {
this.upDateData();
}
},
filters:{
priceDecimals(val){
console.info(val)
return (parseFloat(val)).toFixed(2)
}
},
methods: {
onRefresh(){
if (this.refreshing) return;
@ -370,9 +376,14 @@ export default {
...mapActions({
setHide: "hideMoney",
}),
filterMoney(val) {
filterMoney(val,type) {
if (this.hideMoney) return "******";
if(type){
return this.omitTo(val, 8);
}else{
return this.omitTo(val, 2);
}
},
ifShow(item) {

8
pages/exchange/index.vue

@ -40,15 +40,15 @@
<view class="col fn-right justify-center d-flex flex-col">
<table>
<tr>
<td>24H{{ $t("exchange.e3") }}</td>
<td>24h {{ $t("exchange.e3") }}</td>
<td class="color-light">{{ activeCoin.high }}</td>
</tr>
<tr>
<td>24H{{ $t("exchange.e4") }}</td>
<td>24h {{ $t("exchange.e4") }}</td>
<td class="color-light">{{ activeCoin.low }}</td>
</tr>
<tr v-if="!query.contract">
<td>24H{{ $t("exchange.e5") }}</td>
<td>24h {{ $t("exchange.e5") }}</td>
<!-- <td class="color-light">{{ (activeCoin.vol).toFixed(4)}}</td> -->
<td class="color-light">{{activeCoin.vol}}</td>
</tr>
@ -209,7 +209,7 @@ export default {
buyList: [],
sellList: [],
tradeList: [],
activeTime: "5",
activeTime: "1D",
index: "",
marketList: [],
collect: [],

64
pages/exchange/open-position.vue

@ -28,7 +28,7 @@
<view class="item w-33 t-no positions">
<view class="label">{{ $t("contract.d4") }}(USDT)</view>
<view class="num color-light d-flex align-center" style="margin-top:8px;">
<text>{{accountInfo.account_equity || "--"}}</text>
<text>{{ accountInfo.account_equity || "--"}}</text>
<van-icon name="exchange bg-form-panel-3" @click="_router.push('/pages/transfer/index')" class="p-l-xs color-theme-1 icon"/>
</view>
</view>
@ -203,8 +203,8 @@
block
class="w-max rounded"
>
{{ $t("contract.c0") }}
<span class="fn-10">({{ $t("contract.e0") }})</span>
<span class="but_text">{{ $t("contract.c0") }}</span>
<span class="fn-10 but_right">{{ $t("contract.e0") }}</span>
</v-button>
</template>
<template v-else>
@ -236,8 +236,8 @@
block
class="w-max rounded"
>
{{ $t("contract.c2") }}
<span class="fn-10">({{ $t("contract.e2") }})</span>
<span class="but_text">{{ $t("contract.c2") }}</span>
<span class="fn-10 but_right">{{ $t("contract.e2") }}</span>
</v-button>
</template>
<template v-else>
@ -1166,6 +1166,9 @@ export default {
// };
Contract.holdPosition(data, { loading: !boo }).then((res) => {
this.list = res.data.filter((item) => item.hold_position);
this.list.map(item=>{
item.unRealProfit=(parseFloat(item.unRealProfit)).toFixed(2)
})
if (!boo) {
this.sendPrice();
}
@ -1237,6 +1240,9 @@ export default {
symbol: this.symbolLeft,
};
Contract.contractAccount(data, { loading: !boo,toast:false }).then((res) => {
// console.info(res)
res.data.account_equity=(parseInt(res.data.account_equity)).toFixed(2)
res.data.usable_balance=(res.data.usable_balance).toFixed(2)
this.accountInfo = res.data;
if (!boo) {
// this.form.lever_rate = res.data.lever_rate;
@ -1291,25 +1297,26 @@ export default {
},
//
ifOpenPosition(side) {
console.info(this.form.lever_rate)
this.$dialog
.confirm({
title: this.$t("contract.c4"),
message: `${this.$t("contract.f7")}${
this.form.type == 0
? this.form.entrust_price
: this.$t("contract.d7")
}${this.$t("contract.f8")}${this.form.lever_rate}${this.$t(
"contract.f9"
)}${this.form.amount}${this.$t("contract.d8")}${
side == 1 ? this.$t("contract.g0") : this.$t("contract.g1")
}?`,
confirmButtonText: this.$t("common.confirm"), //
cancelButtonText: this.$t("common.cancel")
})
.then(() => {
this.openPosition(side);
});
// console.info(this.form.lever_rate)
// this.$dialog
// .confirm({
// title: this.$t("contract.c4"),
// message: `${this.$t("contract.f7")}${
// this.form.type == 0
// ? this.form.entrust_price
// : this.$t("contract.d7")
// }${this.$t("contract.f8")}${this.form.lever_rate}${this.$t(
// "contract.f9"
// )}${this.form.amount}${this.$t("contract.d8")}${
// side == 1 ? this.$t("contract.g0") : this.$t("contract.g1")
// }?`,
// confirmButtonText: this.$t("common.confirm"), //
// cancelButtonText: this.$t("common.cancel")
// })
// .then(() => {
// this.openPosition(side);
// });
},
//
openPosition(side) {
@ -1801,4 +1808,15 @@ export default {
.decreace{
color: #ff231f;
}
.rounded{
position: relative;
}
.but_right{
position: absolute;
right: 15px;
}
.but_text{
font-size: 14px;
}
</style>

4
pages/exchange/symbol-list.vue

@ -118,13 +118,15 @@ export default {
});
});
let arr = [
...this.marketList,
{
coin_name: this.$t("exchange.g0"),
isCollect: true,
marketInfoList: collects,
},
...this.marketList,
];
// console.info(arr)
return arr;
},
},

2
pages/safe/forget-password.vue

@ -6,7 +6,7 @@
<view class="form-item border-b p-md">
<view class="label m-b-xs">{{$t('safe.b1')}}</view>
<view class="input color-light">
<v-input v-model="form.account" :placeholder="`${$t('safe.b2')}/${$t('safe.a3')}`" @blur="checkAccount"></v-input>
<v-input v-model="form.account" :placeholder="`${$t('safe.b2')}`" @blur="checkAccount"></v-input>
</view>
</view>
<view class="form-item border-b p-md">

8
pages/safe/index.vue

@ -38,7 +38,7 @@
<van-icon name="arrow" />
</v-link> -->
<!-- -----------邮箱--------- -->
<v-link
<!-- <v-link
tag="li"
to="/pages/safe/email"
class="item link-active d-flex p-x-md p-y-md align-center border-b"
@ -48,9 +48,9 @@
<van-switch v-if="user.email" @click.native.stop @input="switchVer(2)" size="28rpx" :checked="user.email_status==1" />
</view>
<van-icon name="arrow" />
</v-link>
</v-link> -->
<!-- ----------手机---------- -->
<v-link
<!-- <v-link
tag="li"
to="/pages/safe/phone"
class="item link-active d-flex p-x-md p-y-md align-center border-b"
@ -60,7 +60,7 @@
<van-switch v-if="user.phone" @click.native.stop @input="switchVer(1)" size="28rpx" :checked="user.phone_status==1" />
</view>
<van-icon name="arrow" />
</v-link>
</v-link> -->
</view>
</main>
<van-popup

19
store/index.js

@ -77,14 +77,11 @@ let store = new Vuex.Store({
value: 'en',
label: 'English'
},
{
value: 'zh-CN',
label: '简体中文'
},
{
value: 'zh-TW',
label: '繁體中文'
},
// {
// value: 'zh-CN',
// label: '简体中文'
// },
{
value: 'tr',
label: 'Türk'
@ -132,7 +129,11 @@ let store = new Vuex.Store({
{
value: 'pt',
label: 'Português'
}
},
{
value: 'zh-TW',
label: '繁體中文'
},
],
// 主题
theme:uni.getStorageSync('theme')||defaultTheme(),

Loading…
Cancel
Save