Browse Source

新增二维码、修改提币页面,合约最新价格

master
liaoxinyu 7 months ago
parent
commit
241aca2e52
  1. BIN
      src/assets/img/home/mhb.png
  2. BIN
      src/assets/img/home/toco.png
  3. 4
      src/components/CommonFooter.vue
  4. 2
      src/components/CommonHeader.vue
  5. 29
      src/views/contract/handicap.vue
  6. 2
      src/views/contract/history-commission.vue
  7. 26
      src/views/contract/index.vue
  8. 2
      src/views/home/index.vue
  9. 4
      src/views/wallet/funding.vue

BIN
src/assets/img/home/mhb.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/img/home/toco.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

4
src/components/CommonFooter.vue

@ -264,7 +264,7 @@
<div style="font-size: 20px;">{{ $t("homeNewText.bb40",{name:'Tococoin'}) }}</div> <div style="font-size: 20px;">{{ $t("homeNewText.bb40",{name:'Tococoin'}) }}</div>
<router-link class="jump_btn" to="/sign-up" v-if="!isLogin">{{ $t("homeNewText.bb38") }}</router-link> <router-link class="jump_btn" to="/sign-up" v-if="!isLogin">{{ $t("homeNewText.bb38") }}</router-link>
<router-link class="jump_btn" to="/exchange" v-else>{{ $t("homeNewText.bb39") }}</router-link> <router-link class="jump_btn" to="/exchange" v-else>{{ $t("homeNewText.bb39") }}</router-link>
<!-- <img src="@/assets/img/home/mhb.png" alt="" style="width: 120px;height: 120px;"> --> <img src="@/assets/img/home/toco.png" alt="" style="width: 120px;height: 120px;">
<div style="font-size: 16px; color: #9c9c9c;margin-top: 12px;">{{ $t("homeNewText.bb41",{name:'Tococoin'}) }}</div> <div style="font-size: 16px; color: #9c9c9c;margin-top: 12px;">{{ $t("homeNewText.bb41",{name:'Tococoin'}) }}</div>
</div> </div>
</div> </div>
@ -444,7 +444,7 @@ export default {
// //
Member.getUnameByUid({user_id:user.pid}).then(rfres=>{ Member.getUnameByUid({user_id:user.pid}).then(rfres=>{
// query referr uname // query referr uname
this.ifurl ="https://cs.btcaholic.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id; this.ifurl ="https://cs.tococoin.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id;
// show popup // show popup
this.ispopup = ! this.ispopup this.ispopup = ! this.ispopup
this.chatRead() this.chatRead()

2
src/components/CommonHeader.vue

@ -141,7 +141,7 @@
<div class="dropdown-menu download"> <div class="dropdown-menu download">
<div class="dropdown-item"> <div class="dropdown-item">
<div style="width:142px;white-space: pre-wrap;line-height: 25px;">{{ $t("homeNewText.bb42") }}</div> <div style="width:142px;white-space: pre-wrap;line-height: 25px;">{{ $t("homeNewText.bb42") }}</div>
<!-- <img src="@/assets/img/home/mhb.png"> --> <img src="@/assets/img/home/toco.png">
</div> </div>
</div> </div>
</li> </li>

29
src/views/contract/handicap.vue

@ -67,7 +67,8 @@
<div style="width: 200px;"> <div style="width: 200px;">
<div class="name fn-14 px-3" style="display: inline-block;">{{ $t("contract.g3") }}</div> <div class="name fn-14 px-3" style="display: inline-block;">{{ $t("contract.g3") }}</div>
<div class="num fn-20 increace" style="display: inline-block;"> <div class="num fn-20 increace" style="display: inline-block;">
{{ newPriceObj.price }} <!-- {{ newPriceObj.price }} -->
{{ price1 }}
</div> </div>
</div> </div>
<div class="w-14/24 text-right"> <div class="w-14/24 text-right">
@ -134,6 +135,8 @@ export default {
buyList: [], buyList: [],
tradeList: [], tradeList: [],
newPriceObj: {}, newPriceObj: {},
price1:0,
intervalId:''
}; };
}, },
props: { props: {
@ -193,15 +196,28 @@ export default {
this.getMarketInfo(); this.getMarketInfo();
this.linkSocket(); this.linkSocket();
} }
bus.$on('collapse', msg => { // bus.$on('collapse', msg => {
this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); // this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.$emit("input", this.newPriceObj); // this.$emit("input", this.newPriceObj);
}); // });
this.startWatchingPrice()
},
beforeDestroy() {
this.stopWatchingPrice(); //
}, },
// //
methods: { methods: {
parseTime: date.parseTime, parseTime: date.parseTime,
omitTo: math.omitTo, omitTo: math.omitTo,
startWatchingPrice(){
this.intervalId = setInterval(() => {
let newPrice = localStorage.getItem('price');
this.price1 = newPrice;
}, 100); //
},
stopWatchingPrice() {
clearInterval(this.intervalId); //
},
getMarketInfo() { getMarketInfo() {
let data = { let data = {
symbol: this.symbol symbol: this.symbol
@ -264,6 +280,9 @@ export default {
this.tradeList.pop(); this.tradeList.pop();
// this.newPriceObj = data; // this.newPriceObj = data;
// this.$emit("input", this.newPriceObj); // this.$emit("input", this.newPriceObj);
this.newPriceObj = data;
localStorage.setItem("price",this.newPriceObj.price)
this.$emit("input", this.newPriceObj);
} else if (type == "ping" ||cmd == "ping") { } else if (type == "ping" ||cmd == "ping") {
this.ws.send({ this.ws.send({
cmd: "pong" cmd: "pong"

2
src/views/contract/history-commission.vue

@ -11,6 +11,7 @@
<th>{{$t('contract.b5')}}/{{$t('contract.b6')}}</th> <th>{{$t('contract.b5')}}/{{$t('contract.b6')}}</th>
<th>{{$t('contract.b7')}}</th> <th>{{$t('contract.b7')}}</th>
<th>{{$t('contract.b8')}}</th> <th>{{$t('contract.b8')}}</th>
<th>{{$t('option.yield')}}</th>
<th>{{$t('contract.j0')}}</th> <th>{{$t('contract.j0')}}</th>
<!-- <th>{{$t('contract.k1')}}</th> --> <!-- <th>{{$t('contract.k1')}}</th> -->
<th>{{$t('contract.b9')}}</th> <th>{{$t('contract.b9')}}</th>
@ -28,6 +29,7 @@
<td>{{item.avg_price||'--'}}/{{ item.entrust_price || "--" }}</td> <td>{{item.avg_price||'--'}}/{{ item.entrust_price || "--" }}</td>
<td>{{ item.margin * 1 }}</td> <td>{{ item.margin * 1 }}</td>
<td>{{ item.fee * 1 }}</td> <td>{{ item.fee * 1 }}</td>
<td :class="profite(item)">{{ item.profitRate }}</td>
<td :class="profite(item)"> <td :class="profite(item)">
{{item.profit||'--'}} {{item.profit||'--'}}
</td> </td>

26
src/views/contract/index.vue

@ -20,7 +20,8 @@
decreace2: activeContract.increase < 0, decreace2: activeContract.increase < 0,
increase: activeContract.increase >= 0 increase: activeContract.increase >= 0
}"> }">
{{ activeContract.price }} <!-- {{ activeContract.price }} -->
{{ price1 }}
</div> </div>
<!-- <div class="title mb-1 text-secondary"> <!-- <div class="title mb-1 text-secondary">
{{ $t("contract.h6") }} {{ $t("contract.h6") }}
@ -101,7 +102,10 @@
<div style="margin-left: 10px;">{{ item.symbol }}/{{ parent.coin_name }}</div> <div style="margin-left: 10px;">{{ item.symbol }}/{{ parent.coin_name }}</div>
</div> </div>
</div> </div>
<div class="text-right width-32">{{ item.close }}</div> <div class="text-right width-32">
<!-- {{ item.close }} -->
{{ item.symbol == activeSymbol ? price1 : item.price }}
</div>
<div class="text-right width-32" :class="item.increase < 0 ? 'decreace' : 'increase'">{{ item.increaseStr }}</div> <div class="text-right width-32" :class="item.increase < 0 ? 'decreace' : 'increase'">{{ item.increaseStr }}</div>
</td> </td>
<!-- <td class="w-7/24 text-right" >{{ item.close }}</td> <!-- <td class="w-7/24 text-right" >{{ item.close }}</td>
@ -241,7 +245,9 @@ export default {
currentIcon: '', currentIcon: '',
filterCoin: "", filterCoin: "",
contractListFilter: [], contractListFilter: [],
Liste:[] Liste:[],
price1:0,
intervalId:''
}; };
}, },
computed: { computed: {
@ -311,6 +317,8 @@ export default {
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
}) })
}); });
this.startWatchingPrice();
}, },
// //
mounted: function () { mounted: function () {
@ -318,7 +326,19 @@ export default {
this.holdPosition(); this.holdPosition();
}, 2000) }, 2000)
}, },
beforeDestroy() {
this.stopWatchingPrice(); //
},
methods: { methods: {
startWatchingPrice(){
this.intervalId = setInterval(() => {
let newPrice = localStorage.getItem('price');
this.price1 = newPrice;
}, 100); //
},
stopWatchingPrice() {
clearInterval(this.intervalId); //
},
ispopover1(item){ ispopover1(item){
this.activeSymbol=item; this.activeSymbol=item;
// this.$refs.popover.showPopper = false; // this.$refs.popover.showPopper = false;

2
src/views/home/index.vue

@ -531,7 +531,7 @@
<div class="positionBox_box4"> <div class="positionBox_box4">
<div class="trade_box"> <div class="trade_box">
<div class="trade_img"> <div class="trade_img">
<!-- <img src="@/assets/img/home/mhb.png" style="border-radius: 10px;" alt=""> --> <img src="@/assets/img/home/toco.png" style="border-radius: 10px;" alt="">
</div> </div>
<div style="margin-left: 15px;"> <div style="margin-left: 15px;">
<div>{{ $t("homeNewText.bb36") }}</div> <div>{{ $t("homeNewText.bb36") }}</div>

4
src/views/wallet/funding.vue

@ -85,7 +85,7 @@
<th>{{$t('wallet.num')}}</th> <th>{{$t('wallet.num')}}</th>
<th>{{$t('wallet.handlingFee1')}}</th> <th>{{$t('wallet.handlingFee1')}}</th>
<th class="text-right">{{$t('wallet.status')}}</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> <th>{{$t('nav.rejection')}}</th>
</tr> </tr>
</thead> </thead>
@ -113,7 +113,7 @@
<td style="word-wrap: break-word;width: 200px;"> <td style="word-wrap: break-word;width: 200px;">
<div v-if="item.remark"> <div v-if="item.remark">
<div style="width: 200px;">{{item.remark}}</div> <div style="width: 200px;">{{item.remark}}</div>
<div v-if="!remarktext(item.updated_at)" style="color: #0089ff;cursor: pointer;">{{$t('common.c20')}}</div> <!-- <div v-if="!remarktext(item.updated_at)" style="color: #0089ff;cursor: pointer;">{{$t('common.c20')}}</div> -->
</div> </div>
</td> </td>
</tr> </tr>

Loading…
Cancel
Save