luyisha 3 years ago
parent
commit
da4bf62c7e
  1. BIN
      dist88.zip
  2. 30
      src/views/contract/exchange-store.vue
  3. 27
      src/views/contract/handicap.vue
  4. 6
      src/views/exchange/order-list.vue

BIN
dist88.zip

Binary file not shown.

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

@ -177,7 +177,7 @@
<input <input
type="number" type="number"
class="form-control" class="form-control"
v-model="form.sl_trigger_price_buy" v-model="form.tp_trigger_price_buy"
:placeholder="$t('contract.i7')" :placeholder="$t('contract.i7')"
style="text-align:left;" style="text-align:left;"
/> />
@ -187,7 +187,7 @@
<input <input
type="number" type="number"
class="form-control" class="form-control"
v-model="form.tp_trigger_price_buy" v-model="form.sl_trigger_price_buy"
:placeholder="$t('contract.i8')" :placeholder="$t('contract.i8')"
style="text-align:left;" style="text-align:left;"
/> />
@ -296,7 +296,7 @@
<input <input
type="number" type="number"
class="form-control" class="form-control"
v-model="form.sl_trigger_price_sell" v-model="form.tp_trigger_price_sell"
:placeholder="$t('contract.i7')" :placeholder="$t('contract.i7')"
style="text-align:left;" style="text-align:left;"
/> />
@ -306,7 +306,7 @@
<input <input
type="number" type="number"
class="form-control" class="form-control"
v-model="form.tp_trigger_price_sell" v-model="form.sl_trigger_price_sell"
:placeholder="$t('contract.i8')" :placeholder="$t('contract.i8')"
style="text-align:left;" style="text-align:left;"
/> />
@ -405,10 +405,10 @@ export default {
amount_buy:"", amount_buy:"",
amount_sell:"", amount_sell:"",
lever_rate: "", lever_rate: "",
sl_trigger_price_sell:'',// sl_trigger_price_sell:'',//
sl_trigger_price_buy:'',// sl_trigger_price_buy:'',//
tp_trigger_price_sell:'',// tp_trigger_price_sell:'',//
tp_trigger_price_buy:'',// tp_trigger_price_buy:'',//
}, },
// //
maxNum: 0, maxNum: 0,
@ -678,8 +678,8 @@ export default {
side: 1, side: 1,
symbol: this.symbol, symbol: this.symbol,
type: this.form.type, type: this.form.type,
sl_trigger_price: this.form.sl_trigger_price_buy,// sl_trigger_price: this.form.sl_trigger_price_buy,//
tp_trigger_price: this.form.tp_trigger_price_buy,// tp_trigger_price: this.form.tp_trigger_price_buy,//
} }
}else if(side==2){ }else if(side==2){
data = { data = {
@ -689,8 +689,8 @@ export default {
side: 2, side: 2,
symbol: this.symbol, symbol: this.symbol,
type: this.form.type, type: this.form.type,
sl_trigger_price: this.form.sl_trigger_price_sell,// sl_trigger_price: this.form.sl_trigger_price_sell,//
tp_trigger_price: this.form.tp_trigger_price_sell,// tp_trigger_price: this.form.tp_trigger_price_sell,//
} }
} }
if(this.form.type==2){ if(this.form.type==2){
@ -710,9 +710,9 @@ export default {
this.form.amount = 0; this.form.amount = 0;
this.form.amount_buy = 0; this.form.amount_buy = 0;
this.form.amount_sell = 0; this.form.amount_sell = 0;
this.form.sl_trigger_price_sell = 0;// this.form.sl_trigger_price_sell = 0;
this.form.sl_trigger_price_buy = 0;// this.form.sl_trigger_price_buy = 0;
this.form.tp_trigger_price_sell = 0;// this.form.tp_trigger_price_sell = 0;
this.form.tp_trigger_price_buy = 0; this.form.tp_trigger_price_buy = 0;
this.$message.success(this.$t("contract.f5")); this.$message.success(this.$t("contract.f5"));
this.$emit("position"); this.$emit("position");

27
src/views/contract/handicap.vue

@ -104,9 +104,13 @@
<div class="w-10/24"> <div class="w-10/24">
{{ $t("contract.b1") }} {{ $t("contract.b1") }}
</div> </div>
<div class="w-7/24">{{ $t("contract.d8") }}(USDT)</div> <div class="w-7/24">
<div>{{ $t("contract.d8") }}</div>
<div>(USDT)</div>
</div>
<div class="w-7/24 text-right"> <div class="w-7/24 text-right">
{{ $t("contract.e1") }}({{ $t("contract.e2") }}) <div>{{ $t("contract.e1") }}</div>
<div>({{ $t("contract.e2") }})</div>
</div> </div>
</div> </div>
<div class="d-flex" v-for="(item, idx) in tradeList" :key="idx"> <div class="d-flex" v-for="(item, idx) in tradeList" :key="idx">
@ -174,7 +178,9 @@ export default {
let list = this.sellList.splice(0, 12); let list = this.sellList.splice(0, 12);
let total = 0; let total = 0;
list.forEach(item => { list.forEach(item => {
item.total = total += item.amount; // item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3);
}); });
// console.log(list,'sellListShow' ) // console.log(list,'sellListShow' )
return list.reverse(); return list.reverse();
@ -184,12 +190,23 @@ export default {
let list = this.buyList.splice(0, 12); let list = this.buyList.splice(0, 12);
let total = 0; let total = 0;
list.forEach(item => { list.forEach(item => {
item.total = total += item.amount; // item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3);
}); });
// console.log(list, 'buyListShow') // console.log(list, 'buyListShow')
return list; return list;
// return []; // return [];
} },
// tradeListShow(){
// let list = this.tradeList.splice(0, 12);
// let total = 0;
// list.forEach(item => {
// item.total = total += Number(item.amount);
// item.total = item.total.toFixed(3);
// });
// return list;
// }
}, },
created() { created() {
if (this.symbol) { if (this.symbol) {

6
src/views/exchange/order-list.vue

@ -213,7 +213,11 @@ export default {
'ordersHistory': { 'ordersHistory': {
handler(nv) { handler(nv) {
console.log(nv, 222, nv.total) console.log(nv, 222, nv.total)
this.ordersHistoryNew = nv; this.ordersHistoryNew.data = [];
this.ordersHistoryNew.total = 0;
console.log(this.ordersHistoryNew.data.length, this.ordersHistoryNew.total);
this.ordersHistoryNew.data.push(...nv.data);
this.ordersHistoryNew.total = nv.total;
// this.$set(this.ordersHistoryNew, nv); // this.$set(this.ordersHistoryNew, nv);
console.log(this.ordersHistoryNew.total); console.log(this.ordersHistoryNew.total);
}, },

Loading…
Cancel
Save