|
|
|
@ -276,6 +276,10 @@ |
|
|
|
<script> |
|
|
|
import Exchange from "@/api/exchange"; |
|
|
|
import Market from "@/api/market"; |
|
|
|
import { |
|
|
|
Message, |
|
|
|
Loading |
|
|
|
} from 'element-ui' |
|
|
|
export default { |
|
|
|
|
|
|
|
props: ["isLogin", "socket", "symbol", "pair", "buyorder", "sellorder", "fromBalance", "toBalance", "newTrade", "minQty", "minTotal", "priceDecimals", "qtyDecimals"], |
|
|
|
@ -479,10 +483,18 @@ export default { |
|
|
|
Exchange.storeEntrust(Object.assign(this.buyorder, { |
|
|
|
total: this.buyTotal, |
|
|
|
}, baseArgs)).then(data => { |
|
|
|
console.log(data, 876789798099); |
|
|
|
Message({ |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
message:'success', |
|
|
|
}); |
|
|
|
setTimeout(() => { |
|
|
|
// 触发父组件的方法 更新余额和订单 |
|
|
|
this.$emit('update'); |
|
|
|
// 清空表单 |
|
|
|
this.reset(); |
|
|
|
}, 0); |
|
|
|
}).catch(err => { |
|
|
|
|
|
|
|
}); |
|
|
|
@ -499,6 +511,11 @@ export default { |
|
|
|
Exchange.storeEntrust(Object.assign(this.sellorder, { |
|
|
|
total: this.sellTotal |
|
|
|
}, baseArgs)).then(data => { |
|
|
|
Message({ |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
message:'success', |
|
|
|
}); |
|
|
|
// 触发父组件的方法 更新余额和订单 |
|
|
|
this.$emit('update'); |
|
|
|
// 清空表单 |
|
|
|
|