luyisha 3 years ago
parent
commit
c037421196
  1. BIN
      dist.zip
  2. 10
      src/views/contract/exchange-store.vue
  3. 1
      src/views/contract/handicap.vue
  4. 4
      src/views/contract/hold-position.vue
  5. 17
      src/views/exchange/make-deal.vue

BIN
dist.zip

Binary file not shown.

10
src/views/contract/exchange-store.vue

@ -140,7 +140,7 @@
<div class="d-flex justify-content-between mb-3" style="color: #999;"> <div class="d-flex justify-content-between mb-3" style="color: #999;">
<div>{{ $t("contract.e1") }}</div> <div>{{ $t("contract.e1") }}</div>
<!-- {{$t("contract.e2")}} --> <!-- {{$t("contract.e2")}} -->
<div>{{ amount }} </div> <div>{{ amount }}</div>
</div> </div>
<!-- <div class="d-flex justify-content-between mb-4"> <!-- <div class="d-flex justify-content-between mb-4">
<div>{{ $t("contract.a3") }}:</div> <div>{{ $t("contract.a3") }}:</div>
@ -470,7 +470,13 @@ export default {
symbol: this.symbol, symbol: this.symbol,
...this.form ...this.form
}; };
console.log(this.form, 111111) if(this.form.type==2){
// data.entrust_price = this.margin;
data.entrust_price = this.newPriceObj.price;
data.amount = this.amount;
}
console.log(this.margin, '保证金')
console.log(data, 111111, this.newPriceObj.price);
Contract.openPosition(data).then(() => { Contract.openPosition(data).then(() => {
this.contractAccount(); this.contractAccount();
this.form.amount = 0; this.form.amount = 0;

1
src/views/contract/handicap.vue

@ -268,6 +268,7 @@ export default {
} else if (sub == this.msg.trade) { } else if (sub == this.msg.trade) {
this.tradeList.unshift(data); this.tradeList.unshift(data);
this.tradeList.pop(); this.tradeList.pop();
console.info(this.tradeList, 2222222)
// this.newPriceObj = data; // this.newPriceObj = data;
// this.$emit("input", this.newPriceObj); // this.$emit("input", this.newPriceObj);
} else if (type == "ping" ||cmd == "ping") { } else if (type == "ping" ||cmd == "ping") {

4
src/views/contract/hold-position.vue

@ -32,7 +32,7 @@
<th>{{ $t("contract.a5") }}{{ $t("contract.e2") }}</th> --> <th>{{ $t("contract.a5") }}{{ $t("contract.e2") }}</th> -->
<th>{{ $t("contract.g9") }}</th> <th>{{ $t("contract.g9") }}</th>
<th>{{ $t("contract.g3") }}</th> <th>{{ $t("contract.g3") }}</th>
<th>{{ $t("contract.a8") }}</th> <!-- <th>{{ $t("contract.a8") }}</th> -->
<th >{{ $t("contract.a6") }}</th> <th >{{ $t("contract.a6") }}</th>
<th>{{ $t("contract.h0") }}</th> <th>{{ $t("contract.h0") }}</th>
<th>{{ $t("contract.i7") }} /{{ $t("contract.i8") }}</th> <th>{{ $t("contract.i7") }} /{{ $t("contract.i8") }}</th>
@ -50,7 +50,7 @@
<td>{{ item.freeze_position }}</td> --> <td>{{ item.freeze_position }}</td> -->
<td>{{ item.avg_price * 1 }}</td> <td>{{ item.avg_price * 1 }}</td>
<td>{{ item.realtimePrice }}</td> <td>{{ item.realtimePrice }}</td>
<td>{{ item.flatPrice }}</td> <!-- <td>{{ item.flatPrice }}</td> -->
<td :class="item.unRealProfit>0?'increase':item.unRealProfit<0?'decreace':''">{{ (parseFloat(item.unRealProfit)).toFixed(2) }}</td> <td :class="item.unRealProfit>0?'increase':item.unRealProfit<0?'decreace':''">{{ (parseFloat(item.unRealProfit)).toFixed(2) }}</td>
<td>{{ item.profitRate }}</td> <td>{{ item.profitRate }}</td>
<td>{{ item.tpPrice || "--" }}/{{ item.slPrice || "--" }}</td> <td>{{ item.tpPrice || "--" }}/{{ item.slPrice || "--" }}</td>

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

@ -276,6 +276,10 @@
<script> <script>
import Exchange from "@/api/exchange"; import Exchange from "@/api/exchange";
import Market from "@/api/market"; import Market from "@/api/market";
import {
Message,
Loading
} from 'element-ui'
export default { export default {
props: ["isLogin", "socket", "symbol", "pair", "buyorder", "sellorder", "fromBalance", "toBalance", "newTrade", "minQty", "minTotal", "priceDecimals", "qtyDecimals"], 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, { Exchange.storeEntrust(Object.assign(this.buyorder, {
total: this.buyTotal, total: this.buyTotal,
}, baseArgs)).then(data => { }, baseArgs)).then(data => {
console.log(data, 876789798099);
Message({
type: 'success',
duration: 2000,
message:'success',
});
setTimeout(() => {
// //
this.$emit('update'); this.$emit('update');
// //
this.reset(); this.reset();
}, 0);
}).catch(err => { }).catch(err => {
}); });
@ -499,6 +511,11 @@ 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 => {
Message({
type: 'success',
duration: 2000,
message:'success',
});
// //
this.$emit('update'); this.$emit('update');
// //

Loading…
Cancel
Save