Browse Source

添加成功提示

master
luyisha 3 years ago
parent
commit
6e26963f61
  1. 19
      src/api/server/index.js
  2. 8
      src/i18n/en.json
  3. 13
      src/views/exchange/make-deal.vue

19
src/api/server/index.js

@ -175,15 +175,16 @@ server.interceptors.response.use(
} }
// 错误提示 // 错误提示
Message({ // Message({
type: 'error', // type: 'error',
duration: 2 * 1000, // duration: 2 * 1000,
message, // message,
callback() { // callback() {
// 进入catch // // 进入catch
throw new Error(error); // throw new Error(error);
} // }
}); // });
return Promise.reject(error) return Promise.reject(error)
} }
) )

8
src/i18n/en.json

@ -1136,13 +1136,13 @@
"a23": "Buy, trade and hold 100+ cryptocurrencies", "a23": "Buy, trade and hold 100+ cryptocurrencies",
"a24": "Top up your account", "a24": "Top up your account",
"a25": "Sign up by email", "a25": "Sign up by email",
"a38": "Start transactions anytime, anywhere.", "a38": "Start trading anytime, anywhere.",
"a39": "Start trading safely and conveniently at any time through our APP and webpage", "a39": "Start trading safely and conveniently at any time through our APP and webpage",
"a40": "IOS and Android scan code download", "a40": "IOS and Android scan code download",
"a41": "Trustworthy cryptocurrency trading platform", "a41": "Trustworthy cryptocurrency trading platform",
"a42": "We are committed to ensuring the safety of users with strict protocols and industry-leading technical measures.", "a42": "We are committed to ensuring the safety of our users through strict protocols and industry-leading technological measures",
"a43": "User security asset funds", "a43": "User security asset funds",
"a44": "We store 10% of all transaction fees in safe asset funds to provide partial protection for user funds", "a44": "We store 10% of all transaction fees in safe asset funds to provide partial protection for user funds.",
"a45": "Personalized Access Control", "a45": "Personalized Access Control",
"a46": "Personalized access control restricts the devices and addresses that access personal accounts, so that users have no worries.", "a46": "Personalized access control restricts the devices and addresses that access personal accounts, so that users have no worries.",
"a47": "Advanced Data Encryption", "a47": "Advanced Data Encryption",
@ -1155,6 +1155,6 @@
"a79": "How to Trade Digital Currencies", "a79": "How to Trade Digital Currencies",
"a80": "Marketplace", "a80": "Marketplace",
"a81": "24 hours market trend", "a81": "24 hours market trend",
"a82": "Add cryptocurrency funds to your wallet and start trading instantly" "a82": "Add cryptocurrency funds to your wallet and start trading now"
} }
} }

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

@ -366,6 +366,7 @@ export default {
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price); this.buyorder.amount = Math.division(val, this.buyorder.entrust_price);
} else { // } else { //
this.cacheTotal = val; this.cacheTotal = val;
this.buyorder.amount = this.cacheTotal
} }
} }
}, },
@ -421,6 +422,10 @@ export default {
methods: { methods: {
getCoinInfo(){ getCoinInfo(){
// console.log(this.symbol.indexOf('usdt')!=-1) // console.log(this.symbol.indexOf('usdt')!=-1)
if(!this.symbol){
return;
}
if(this.symbol.indexOf('usdt')!=-1){ if(this.symbol.indexOf('usdt')!=-1){
var market=this.symbol.substring(0,this.symbol.length-4); var market=this.symbol.substring(0,this.symbol.length-4);
}else{ }else{
@ -479,6 +484,10 @@ export default {
Exchange.storeEntrust(Object.assign(this.buyorder, { Exchange.storeEntrust(Object.assign(this.buyorder, {
total: this.buyTotal, total: this.buyTotal,
}, baseArgs)).then(data => { }, baseArgs)).then(data => {
this.$message({
message:'success',
type: "success"
});
// //
this.$emit('update'); this.$emit('update');
// //
@ -499,6 +508,10 @@ export default {
Exchange.storeEntrust(Object.assign(this.sellorder, { Exchange.storeEntrust(Object.assign(this.sellorder, {
total: this.sellTotal total: this.sellTotal
}, baseArgs)).then(data => { }, baseArgs)).then(data => {
this.$message({
message:'success',
type: "success"
});
// //
this.$emit('update'); this.$emit('update');
// //

Loading…
Cancel
Save