币币交易按钮增加防抖功能

master
钟海欣 5 years ago
parent 05f10dc53a
commit 19710039e8
  1. 33
      src/api/app.js
  2. 16
      src/pages/trade.vue

@ -1,14 +1,27 @@
export const c2cApi = 'http://192.168.105.16/otc'; //法币 // export const c2cApi = 'http://192.168.105.16/otc'; //法币
export const btcApi = 'http://192.168.105.16/btc'; //BTC钱包 // export const btcApi = 'http://192.168.105.16/btc'; //BTC钱包
export const eosApi = 'http://192.168.105.16/eos'; //EOS钱包 // export const eosApi = 'http://192.168.105.16/eos'; //EOS钱包
export const ethApi = 'http://192.168.105.16/eth'; //ETH钱包 // export const ethApi = 'http://192.168.105.16/eth'; //ETH钱包
export const cctApi = 'http://192.168.105.16/cct'; //币币 // export const cctApi = 'http://192.168.105.16/cct'; //币币
export const currencyApi = 'http://192.168.105.16/currency'; //行情 // export const currencyApi = 'http://192.168.105.16/currency'; //行情
export const jgimApi = 'http://192.168.105.16/imjg'; //聊天 // export const jgimApi = 'http://192.168.105.16/imjg'; //聊天
export const sysconfApi = 'http://192.168.105.16/sysconf'; //行情 // export const sysconfApi = 'http://192.168.105.16/sysconf'; //行情
export const userApi = 'http://192.168.105.16/user'; //用户 // export const userApi = 'http://192.168.105.16/user'; //用户
export const FILE_URL = 'http://192.168.105.16/files/'; //图片地址 // export const FILE_URL = 'http://192.168.105.16/files/'; //图片地址
export const c2cApi = 'http://47.244.223.156/otc'; //法币
export const cctApi = 'http://47.244.223.156/cct'; //币币
export const jgimApi = 'http://47.244.223.156/imjg'; //聊天
export const sysconfApi = 'http://47.244.223.156/sysconf'; //行情
export const userApi = 'http://47.244.223.156/user'; //用户
export const btcApi = 'http://47.244.202.188/btc'; //BTC钱包
export const eosApi = 'http://47.244.202.188/eos'; //EOS钱包
export const ethApi = 'http://47.244.202.188/eth'; //ETH钱包
export const currencyApi = 'http://47.244.202.188/currency'; //行情
export const FILE_URL = 'http://47.244.223.156/files/'; //图片地址
// export const c2cApi = 'https://c2c.flamex.io'; //法币 // export const c2cApi = 'https://c2c.flamex.io'; //法币
// export const btcApi = 'https://btc.flamex.io'; //BTC钱包 // export const btcApi = 'https://btc.flamex.io'; //BTC钱包

@ -1326,7 +1326,7 @@
<el-button @click="cancel(num)">{{ <el-button @click="cancel(num)">{{
$t('trade.table.header_cancel') $t('trade.table.header_cancel')
}}</el-button> }}</el-button>
<el-button type="primary" @click="subPay()">{{ <el-button type="primary" @click="subPay()" :disabled="tochange">{{
$t('trade.table.header_confirm') $t('trade.table.header_confirm')
}}</el-button> }}</el-button>
</span> </span>
@ -1521,6 +1521,7 @@ export default {
loading2: false, loading2: false,
loading3: false, loading3: false,
loading4: false, loading4: false,
tochange: false,
}; };
}, },
components: { components: {
@ -2638,6 +2639,7 @@ export default {
}, },
// //
subPay() { subPay() {
this.tochange = true; //
if (this.num == '1') { if (this.num == '1') {
this.loading1 = true; this.loading1 = true;
} else if (this.num == '2') { } else if (this.num == '2') {
@ -2695,17 +2697,20 @@ export default {
this.getFree(); // this.getFree(); //
// //
this.passdialogVisible = false; this.passdialogVisible = false;
this.tochange = false;
} else if (res.data.code === 12710) { } else if (res.data.code === 12710) {
this.loading1 = false; this.loading1 = false;
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
// , // ,
this.passdialogVisible = true; this.passdialogVisible = true;
this.tochange = false;
localStorage.removeItem('userpass'); localStorage.removeItem('userpass');
localStorage.removeItem('userdate'); localStorage.removeItem('userdate');
localStorage.removeItem('nowPassNOValue'); localStorage.removeItem('nowPassNOValue');
} else { } else {
this.loading1 = false; this.loading1 = false;
this.tochange = false;
this.passdialogVisible = false; this.passdialogVisible = false;
this.inputpassword = ''; // this.inputpassword = ''; //
this.$message.warning(res.data.msg); this.$message.warning(res.data.msg);
@ -2747,17 +2752,20 @@ export default {
this.getFree(); // this.getFree(); //
// //
this.passdialogVisible = false; this.passdialogVisible = false;
this.tochange = false;
} else if (res.data.code === 12710) { } else if (res.data.code === 12710) {
this.loading2 = false; this.loading2 = false;
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
// , // ,
this.passdialogVisible = true; this.passdialogVisible = true;
this.tochange = false;
localStorage.removeItem('userpass'); localStorage.removeItem('userpass');
localStorage.removeItem('userdate'); localStorage.removeItem('userdate');
localStorage.removeItem('nowPassNOValue'); localStorage.removeItem('nowPassNOValue');
} else { } else {
this.loading2 = false; this.loading2 = false;
this.tochange = false;
this.passdialogVisible = false; this.passdialogVisible = false;
this.$message.warning(res.data.msg); this.$message.warning(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
@ -2797,17 +2805,20 @@ export default {
this.getFree(); // this.getFree(); //
// //
this.passdialogVisible = false; this.passdialogVisible = false;
this.tochange = false;
} else if (res.data.code === 12710) { } else if (res.data.code === 12710) {
this.loading3 = false; this.loading3 = false;
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
// , // ,
this.passdialogVisible = true; this.passdialogVisible = true;
this.tochange = false;
localStorage.removeItem('userpass'); localStorage.removeItem('userpass');
localStorage.removeItem('userdate'); localStorage.removeItem('userdate');
localStorage.removeItem('nowPassNOValue'); localStorage.removeItem('nowPassNOValue');
} else { } else {
this.loading3 = false; this.loading3 = false;
this.tochange = false;
this.passdialogVisible = false; this.passdialogVisible = false;
this.$message.warning(res.data.msg); this.$message.warning(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
@ -2841,17 +2852,20 @@ export default {
this.getFree(); // this.getFree(); //
// //
this.passdialogVisible = false; this.passdialogVisible = false;
this.tochange = false;
} else if (res.data.code === 12710) { } else if (res.data.code === 12710) {
this.loading4 = false; this.loading4 = false;
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';
// , // ,
this.passdialogVisible = true; this.passdialogVisible = true;
this.tochange = false;
localStorage.removeItem('userpass'); localStorage.removeItem('userpass');
localStorage.removeItem('userdate'); localStorage.removeItem('userdate');
localStorage.removeItem('nowPassNOValue'); localStorage.removeItem('nowPassNOValue');
} else { } else {
this.loading4 = false; this.loading4 = false;
this.tochange = false;
this.passdialogVisible = false; this.passdialogVisible = false;
this.$message.warning(res.data.msg); this.$message.warning(res.data.msg);
this.inputpassword = ''; this.inputpassword = '';

Loading…
Cancel
Save