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

7
src/i18n/tw.json

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

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

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

Loading…
Cancel
Save