Browse Source

新增充值实名和优化语言

master
ltlzx 4 years ago
parent
commit
9b680d00ea
  1. 6
      src/i18n/en.json
  2. 7
      src/i18n/tw.json
  3. 171
      src/views/wallet/exchange-assets.vue

6
src/i18n/en.json

@ -382,6 +382,8 @@
"upLoadSuccess": "apply success!"
},
"wallet": {
"auth":"Please conduct real name authentication first",
"obtain":"Get recharge address",
"inside": "Inner Transfer",
"from": "From",
"history": "view history",
@ -680,6 +682,8 @@
"buyLevel": "equal"
},
"profile": {
"country":"Country",
"country1":"Please enter your country",
"realName": "Real Name Authentication",
"primaryCertification": "primary certification",
"advancedCertification": "Advanced certification application has been submitted",
@ -1092,4 +1096,4 @@
"m3":"End of order",
"m4":"Order cancellation"
}
}
}

7
src/i18n/tw.json

@ -211,6 +211,7 @@
"month": "月"
},
"login": {
"confirm-password":"確認密碼",
"resend": "重新發送",
"sms": "簡訊",
"sendOK": "驗證碼發送成功!",
@ -320,6 +321,8 @@
"upLoadSuccess": "上傳成功"
},
"wallet": {
"auth":"請先進行實名認證",
"obtain":"獲取充值地址",
"inside": "內部資金劃轉",
"from": "從",
"history": "查看歷史",
@ -618,6 +621,8 @@
"buyLevel": "買平"
},
"profile": {
"country":"國家",
"country1":"請輸入國家",
"realName": "實名認證",
"primaryCertification": "初級認證",
"advancedCertification": "高級認證申請已提交",
@ -1030,4 +1035,4 @@
"m3":"訂單結束",
"m4":"訂單取消"
}
}
}

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

@ -199,12 +199,23 @@
)</template>
</label>
<div class="input-group input-group-sm">
<input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required />
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address">
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'">
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a>
</span>
</div>
<!-- <input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required />
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address">
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'">
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a>
</span>
</div> -->
<template v-if="deposite.address!=''">
<input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required />
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address">
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'">
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a>
</span>
</div>
</template>
<template v-else>
<el-button type="primary" style="width:100%" @click="getRechargeAdd">{{$t('wallet.obtain')}}</el-button>
</template>
</div>
</div>
<div class="form-group mt-2" v-if="false">
@ -373,6 +384,7 @@
<script>
import InnerTransfer from "../components/inner-transfer.vue";
import Wallet from "@/api/wallet";
import Profile from "@/api/profile";
import ClipboardJS from "clipboard";
import getCode from "./getCode";
import vueQr from "vue-qr";
@ -385,60 +397,60 @@ export default {
data() {
return {
//
userAssets: {
contract_account_btc: 0,
contract_account_usd: 0,
funds_account_btc: 0,
funds_account_usd: 0,
total_assets_btc: 0,
total_assets_usd: 0
},
coinAssets: [], //
isHideZero: false, // 0
keyword: "",
showValue: true, //
depositeCoin: null,
depositeAdressType: 1, // 1 omin 2 erc20
withdrawCoin: null,
//
deposite: {
coin_id: "",
amount: "",
address: ""
},
//
withdraw: {
coin_id: "",
amount: "",
address: "",
addressType: 1, // 1 omni 2 erc20,
code_type: 1,
code: ''
},
withdrawFee: {
usable_balance: "-",
withdrawal_fee: "-",
withdrawal_min: "-",
withdrawal_max: "-"
}, //
//
allAssets: false, //
cacheInputAssets: null,
verShow: false,
active:0,
paypal:{
number:"",
amount:"",
images:""
}
userAssets: {
contract_account_btc: 0,
contract_account_usd: 0,
funds_account_btc: 0,
funds_account_usd: 0,
total_assets_btc: 0,
total_assets_usd: 0
},
userInfo:{},//
coinAssets: [], //
isHideZero: false, // 0
keyword: "",
showValue: true, //
depositeCoin: null,
depositeAdressType: 1, // 1 omin 2 erc20
withdrawCoin: null,
//
deposite: {
coin_id: "",
amount: "",
address: ""
},
//
withdraw: {
coin_id: "",
amount: "",
address: "",
addressType: 1, // 1 omni 2 erc20,
code_type: 1,
code: ''
},
withdrawFee: {
usable_balance: "-",
withdrawal_fee: "-",
withdrawal_min: "-",
withdrawal_max: "-"
}, //
//
allAssets: false, //
cacheInputAssets: null,
verShow: false,
active:0,
paypal:{
number:"",
amount:"",
images:""
}
};
},
@ -531,12 +543,12 @@ export default {
//
getDepositeAdress() {
Wallet.walletImage({
coin_id: this.deposite.coin_id,
address_type: this.depositeAdressType //
})
Wallet.walletImage({
coin_id: this.deposite.coin_id,
address_type: this.depositeAdressType //
})
.then(data => {
this.deposite.address = data.address;
this.deposite.address = data.address;
})
.catch(err => { });
},
@ -548,6 +560,14 @@ export default {
//
this.getDepositeAdress();
},
//
getRechargeAdd(){
if(this.userInfo.user_auth_level!=0){
}else{
this.$message.error(this.$t("wallet.auth"))
}
},
//
handleDeposite() {
@ -605,24 +625,31 @@ export default {
},
//
codeComplete(obj) {
this.withdraw.code_type = obj.code_type
this.withdraw.code = obj.code
this.verShow = false
this.handleWithdraw()
this.withdraw.code_type = obj.code_type
this.withdraw.code = obj.code
this.verShow = false
this.handleWithdraw()
},
//
createWalletAddress() {
//
// Wallet.createWalletAddress();
},
//
getUserInfo() {
Profile.getUserInfo({}).then(res => {
this.userInfo = res
});
}
},
},
created() {
created() {
this.getPaypal()
this.getUserAssets();
this.getCoinAssets();
this.createWalletAddress();
},
this.getUserInfo()
},
mounted() {
const clipboard = new ClipboardJS(".dopsite-control");

Loading…
Cancel
Save