Browse Source

修复币币卖出问题

master
ltlzx 4 years ago
parent
commit
8ac3be32a4
  1. 2
      src/views/exchange/index.vue
  2. 10
      src/views/exchange/make-deal.vue

2
src/views/exchange/index.vue

@ -167,7 +167,7 @@ export default {
}, },
watch: { watch: {
// symbol // symbol
symbol(newVal, oldVal) { symbol(newVal, oldVal) {
// //

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

@ -397,7 +397,7 @@ export default {
// //
newTrade(newVal, oldVal) { newTrade(newVal, oldVal) {
if (!this.isMarket) { // if (!this.isMarket ) {
// trade // trade
if (!oldVal && newVal) { // if (!oldVal && newVal) { //
@ -411,7 +411,7 @@ export default {
this.cachePrice = null; this.cachePrice = null;
this.reset(); this.reset();
} }
} // }
}, },
symbol(){ symbol(){
this.getCoinInfo() this.getCoinInfo()
@ -491,7 +491,7 @@ export default {
handleSellOrder() { handleSellOrder() {
// //
if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return; if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return;
// console.info(this.sellTotal)
const baseArgs = { const baseArgs = {
symbol: this.pair.to.concat('/', this.pair.from), symbol: this.pair.to.concat('/', this.pair.from),
type: this.type, type: this.type,
@ -513,11 +513,13 @@ export default {
// newTrade 0 // newTrade 0
// //
let price = this.cachePrice || 0; let price = this.cachePrice || 0;
// console.info(price)
// console.info(this.priceDecimals)
this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals); this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals);
this.buyorder.trigger_price = Math.omitTo(price, this.priceDecimals); this.buyorder.trigger_price = Math.omitTo(price, this.priceDecimals);
this.sellorder.entrust_price = Math.omitTo(price, this.priceDecimals); this.sellorder.entrust_price = Math.omitTo(price, this.priceDecimals);
// console.info(this.sellorder.entrust_price)
this.sellorder.trigger_price = Math.omitTo(price, this.priceDecimals); this.sellorder.trigger_price = Math.omitTo(price, this.priceDecimals);
// //

Loading…
Cancel
Save