Browse Source

修改合约保证金限制、币币k线不会动、合约价格同步

master
liaoxinyu 11 months ago
parent
commit
38b662ef9d
  1. 2
      src/components/KLine.vue
  2. 3
      src/i18n/en.json
  3. 3
      src/i18n/tw.json
  4. 15
      src/views/contract/exchange-store.vue
  5. 2
      src/views/contract/handicap.vue
  6. 18
      src/views/contract/index.vue
  7. 10
      src/views/wallet/funding.vue

2
src/components/KLine.vue

@ -311,7 +311,7 @@ export default {
this.model.subscribe([
{
cmd: "sub",
msg: `Kline_${this.symbol}_${this.interval}min`
msg: `Kline_${this.symbol}_1day`
}
]);
console.log(this.lang)

3
src/i18n/en.json

@ -35,7 +35,8 @@
"c6":"Time of issue",
"c7":"White paper address",
"c8":"Official website address",
"c9":"brief introduction"
"c9":"brief introduction",
"rejection":"Reason for rejection"
},
"common": {
"million": "million",

3
src/i18n/tw.json

@ -35,7 +35,8 @@
"c6":"發行時間",
"c7":"白皮書地址",
"c8":"官網地址",
"c9":"簡介"
"c9":"簡介",
"rejection":"拒絕理由"
},
"common": {
"million": "幾百萬",

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

@ -99,6 +99,8 @@
class="form-control"
v-model="marginBuy"
:placeholder="tips"
@input="inputEnter(false)"
title=""
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
@ -222,6 +224,8 @@
class="form-control"
v-model="marginSell"
:placeholder="tips"
@input="inputEnter(true)"
title=""
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
@ -524,6 +528,17 @@ export default {
}
},
methods: {
inputEnter(boll) {
if(boll){
this.marginSell = this.marginSell
.replace(/[^\d.]/g, "") //
.replace(/^(\d*\.?\d{0,2}).*$/, "$1"); //
}else{
this.marginBuy = this.marginBuy
.replace(/[^\d.]/g, "") //
.replace(/^(\d*\.?\d{0,2}).*$/, "$1"); //
}
},
//
contractAccount(boo) {
if (!this.isLogin) return;

2
src/views/contract/handicap.vue

@ -198,6 +198,7 @@ export default {
bus.$on('collapse', msg => {
this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.$emit("input", this.newPriceObj);
localStorage.setItem("price",this.newPriceObj.price)
});
},
//
@ -214,6 +215,7 @@ export default {
this.tradeList = res.swapTradeList;
this.newPriceObj = this.tradeList[0];
this.$emit("input", this.newPriceObj);
localStorage.setItem("price",this.newPriceObj.price)
});
},
//

18
src/views/contract/index.vue

@ -20,7 +20,8 @@
decreace2: activeContract.increase < 0,
increase: activeContract.increase >= 0
}">
{{ activeContract.price }}
<!-- {{ activeContract.price }} -->
{{price1}}
</div>
<!-- <div class="title mb-1 text-secondary">
{{ $t("contract.h6") }}
@ -97,7 +98,7 @@
</td>
<td class="w-7/24 text-right" >
<!-- :class="item.increase < 0 ? 'decreace' : 'increase'" -->
{{ item.close }}
{{item.symbol == activeSymbol ? price1 : item.price}}
</td>
<td
class="w-8/24 text-right"
@ -239,7 +240,9 @@ export default {
symbolDetail:{},
currentIcon: '',
filterCoin: "",
contractListFilter: []
contractListFilter: [],
price1:0,
intervalId:''
};
},
computed: {
@ -309,8 +312,7 @@ export default {
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
})
});
this.startWatchingPrice();
},
//
mounted: function () {
@ -319,6 +321,12 @@ export default {
}, 2000)
},
methods: {
startWatchingPrice(){
this.intervalId = setInterval(() => {
let newPrice = localStorage.getItem('price');
this.price1 = newPrice;
}, 10); //
},
ispopover1(item){
this.activeSymbol=item;
// this.$refs.popover.showPopper = false;

10
src/views/wallet/funding.vue

@ -84,7 +84,8 @@
<th>{{$t('wallet.num')}}</th>
<th>{{$t('wallet.handlingFee1')}}</th>
<th class="text-right">{{$t('wallet.status')}}</th>
<!-- <th class="text-right">{{$t('contract.c0')}}</th> -->
<th class="text-right">{{$t('contract.c0')}}</th>
<th>{{$t('nav.rejection')}}</th>
</tr>
</thead>
<tbody>
@ -103,9 +104,12 @@
<!-- <td v-if="item.status==0" class="text-right">{{$t('wallet.processing')}}</td>
<td v-if="item.status==1" class="text-right">{{$t('wallet.success')}}</td>
<td v-if="item.status==2" class="text-right">{{$t('wallet.error')}}</td> -->
<!-- <td class="text-right">
<td class="text-right">
<button v-if="item.status==0" class="btn btn-danger btn-sm" @click="cancelWithdraw(item)">{{$t('contract.c2')}}</button>
</td> -->
</td>
<td style="word-wrap: break-word;width: 200px;">
<div style="width: 200px;" v-if="item.remark">{{item.remark}}</div>
</td>
</tr>
</tbody>
</table>

Loading…
Cancel
Save