Browse Source

在币币和合约中添加ico,隐藏控制台输出

master
liaoxinyu 2 years ago
parent
commit
570c186251
  1. 2
      pages/assets/draw.vue
  2. 2
      pages/assets/recharge.vue
  3. 2
      pages/auth/primary.vue
  4. 2
      pages/base/contract.vue
  5. 2
      pages/base/exchange-operation.vue
  6. 3
      pages/base/home.vue
  7. 2
      pages/base/mine.vue
  8. 2
      pages/exchange/his.vue
  9. 14
      pages/exchange/open-position.vue
  10. 57
      pages/exchange/symbol-list.vue
  11. 6
      pages/exchange/trade-list.vue
  12. 2
      pages/index/index.vue
  13. 2
      pages/purchase/bill.vue
  14. 2
      pages/wallets/mine.vue

2
pages/assets/draw.vue

@ -433,7 +433,7 @@ export default {
let list = [...this.list, ...res.data.data];// let list = [...this.list, ...res.data.data];//
this.list.splice(0,this.list.length,...list); this.list.splice(0,this.list.length,...list);
// this.list.push(...list); // this.list.push(...list);
console.log('length---------------',this.list.length, '页数:',res.data.current_page); // console.log('length---------------',this.list.length, '',res.data.current_page);
if (res.data.data.length < res.data.per_page) this.loadMore = false; if (res.data.data.length < res.data.per_page) this.loadMore = false;
}); });
}, },

2
pages/assets/recharge.vue

@ -184,7 +184,7 @@ export default {
coin(n) { coin(n) {
if (n) { if (n) {
this.form.address = ""; this.form.address = "";
console.info(this.coin) // console.info(this.coin)
if (this.coin != "USDT") { if (this.coin != "USDT") {
this.rechargeType = 1; this.rechargeType = 1;
}else{ }else{

2
pages/auth/primary.vue

@ -153,7 +153,7 @@ export default {
getCountryCode() { getCountryCode() {
Member.getCountryCode() Member.getCountryCode()
.then((res) => { .then((res) => {
console.info(res) // console.info(res)
this.countryList = res.data.map(item=>{ this.countryList = res.data.map(item=>{
return { return {
...item, ...item,

2
pages/base/contract.vue

@ -61,7 +61,7 @@
@close="symbolListShow = false" @close="symbolListShow = false"
close-on-popstate close-on-popstate
position="left" position="left"
custom-style="height:100%;width:70%" custom-style="height:100%;width:85%"
> >
<symbol-list <symbol-list
:collect="collect" :collect="collect"

2
pages/base/exchange-operation.vue

@ -63,7 +63,7 @@
@close="symbolListShow = false" @close="symbolListShow = false"
close-on-popstate close-on-popstate
position="left" position="left"
custom-style="height:100%;width:70%" custom-style="height:100%;width:85%"
> >
<symbol-list <symbol-list
:collect="collect" :collect="collect"

3
pages/base/home.vue

@ -1291,7 +1291,7 @@
*/ */
getCollegeLinks() { getCollegeLinks() {
College.getCategoryList().then(res => { College.getCategoryList().then(res => {
console.log(res, 11111); // console.log(res, 11111);
let list = res.data; let list = res.data;
list.forEach(item => { list.forEach(item => {
if (this.guideId === '') { if (this.guideId === '') {
@ -2315,6 +2315,7 @@
margin: auto; margin: auto;
font-weight: bold; font-weight: bold;
border-radius: 20px; border-radius: 20px;
text-decoration: none;
.Trading_a_box{ .Trading_a_box{
display: flex; display: flex;

2
pages/base/mine.vue

@ -353,7 +353,7 @@
}, },
filters: { filters: {
priceDecimals(val) { priceDecimals(val) {
console.info(val) // console.info(val)
return (parseFloat(val)).toFixed(2) return (parseFloat(val)).toFixed(2)
} }
}, },

2
pages/exchange/his.vue

@ -131,7 +131,7 @@ export default {
}, },
watch:{ watch:{
tab(n){ tab(n){
console.log(n) // console.log(n)
} }
}, },
methods: { methods: {

14
pages/exchange/open-position.vue

@ -845,8 +845,8 @@ export default {
// ); // );
// }, // },
amount(){ amount(){
console.info(this.form.lever_rate) // console.info(this.form.lever_rate)
console.info(this.margin) // console.info(this.margin)
if (!this.form.lever_rate || !this.margin) return 0; if (!this.form.lever_rate || !this.margin) return 0;
let p=this.margin*this.form.lever_rate; let p=this.margin*this.form.lever_rate;
p = p.toFixed(0) p = p.toFixed(0)
@ -1260,7 +1260,7 @@ export default {
this.buyList = res.data.swapBuyList; this.buyList = res.data.swapBuyList;
this.tradeList = res.data.swapTradeList; this.tradeList = res.data.swapTradeList;
this.newPrice = this.tradeList[0] || {}; this.newPrice = this.tradeList[0] || {};
console.info(this.newPrice) // console.info(this.newPrice)
this.form.entrust_price = this.newPrice.price; this.form.entrust_price = this.newPrice.price;
this.linkSocket(data.symbol); this.linkSocket(data.symbol);
}); });
@ -1292,7 +1292,7 @@ export default {
symbol: this.symbolLeft, symbol: this.symbolLeft,
}; };
Contract.getSymbolDetail(data).then((res) => { Contract.getSymbolDetail(data).then((res) => {
console.info('res.data', res.data.default_lever, res.data.lever_rage, res) // console.info('res.data', res.data.default_lever, res.data.lever_rage, res)
this.unit_amount = res.data.unit_amount; this.unit_amount = res.data.unit_amount;
// if (!this.lever_rage.length) { // if (!this.lever_rage.length) {
@ -1375,7 +1375,7 @@ export default {
} }
Contract.openPosition(data, { btn }).then(() => { Contract.openPosition(data, { btn }).then(() => {
this.$toast(this.$t("contract.g2")); this.$toast(this.$t("contract.g2"));
console.info(this.form.type) // console.info(this.form.type)
if(this.form.type==1){ if(this.form.type==1){
this.holdPosition() this.holdPosition()
}else{ }else{
@ -1386,14 +1386,14 @@ export default {
}); });
}, },
sliderChange(n,i) { sliderChange(n,i) {
console.info(n,i) // console.info(n,i)
this.form.amount = Math.round((this.maxNum * n) / 100); this.form.amount = Math.round((this.maxNum * n) / 100);
this.sliderActive=i this.sliderActive=i
this.sliderActive1=n this.sliderActive1=n
this.margin=(this.form.amount/this.form.lever_rate) this.margin=(this.form.amount/this.form.lever_rate)
}, },
pingChange(n,i) { pingChange(n,i) {
console.log(n) // console.log(n)
this.pingAmount = Math.round((this.activeItem.avail_position * n) / 100); this.pingAmount = Math.round((this.activeItem.avail_position * n) / 100);
this.pingActive=i this.pingActive=i
}, },

57
pages/exchange/symbol-list.vue

@ -17,13 +17,20 @@
<view class="p-x-xs m-t-md"> <view class="p-x-xs m-t-md">
<table class="w-max"> <table class="w-max">
<thead v-if="heyue==0"> <!-- <thead v-if="heyue==0">
<tr class="fn-sm"> <tr class="fn-sm">
<th class="p-l-md p-y-xs fn-left">{{ $t("exchange.f7") }}</th> <th class="p-l-md p-y-xs fn-left">{{ $t("exchange.f7") }}</th>
<th class="fn-left">{{ $t("exchange.f8") }}</th> <th class="fn-left">{{ $t("exchange.f8") }}</th>
<th class="p-r-md p-y-xs fn-right">{{ $t("exchange.f9") }}</th> <th class="p-r-md p-y-xs fn-right">{{ $t("exchange.f9") }}</th>
</tr> </tr>
</thead> </thead> -->
<thead>
<tr class="fn-sm">
<th class="p-l-md p-y-xs fn-left">{{ $t("exchange.f7") }}</th>
<th class="fn-center">{{ $t("exchange.f8") }}</th>
<th class="p-r-md p-y-xs fn-right">{{ $t("exchange.f9") }}</th>
</tr>
</thead>
<tbody> <tbody>
<tr <tr
class="p-y-md" class="p-y-md"
@ -33,15 +40,28 @@
v-show="isShow(item.pair_name)" v-show="isShow(item.pair_name)"
@click="$emit('check-symbol', item)" @click="$emit('check-symbol', item)"
> >
<td class="p-l-md p-y-md w-40"> <td class="p-l-md w-40" style="height: 50px;display: flex;align-items: center;">
<template v-if="parentItem.isCollect"> <template v-if="parentItem.isCollect">
<img :src="item.coin_icon" width="20" style="margin-right: 2px;" />
<span class="color-light">{{ item.pair_name }}</span> <span class="color-light">{{ item.pair_name }}</span>
</template> </template>
<template v-else> <template v-else>
<span class="color-light">{{ item.coin_name||item.symbol }}/{{ parentItem.coin_name }}</span> <img :src="item.coin_icon" width="20" style="margin-right: 2px;" v-if="heyue==0" />
<view v-for="items in Liste" :key="items.symbol" v-else>
<img :src="items.icon" width="20" style="margin-right: 2px;" v-if="items.symbol==item.symbol" />
</view>
<span class="color-light">{{ item.coin_name||item.symbol }}/{{ parentItem.coin_name }}</span>
</template> </template>
</td> </td>
<td class="w-30 fn-center"> <td class="w-30 fn-center">
<template :class="item.increase < 0 ? 'color-sell' : 'color-buy'">
{{ item.price }}
</template>
</td>
<td :class="item.increase < 0 ? 'color-sell' : 'color-buy'" class="p-r-md p-y-xs fn-right w-30">
{{ item.increaseStr }}
</td>
<!-- <td class="w-30 fn-center">
<template v-if="heyue==0" :class="item.increase < 0 ? 'color-sell' : 'color-buy'"> <template v-if="heyue==0" :class="item.increase < 0 ? 'color-sell' : 'color-buy'">
{{ item.price }} {{ item.price }}
</template> </template>
@ -62,7 +82,7 @@
class="p-r-md p-y-xs fn-right" class="p-r-md p-y-xs fn-right"
> >
{{ item.price }} {{ item.price }}
</td> </td> -->
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -72,6 +92,7 @@
</view> </view>
</template> </template>
<script> <script>
import Contract from "@/api/contract";
export default { export default {
props: { props: {
marketList: { marketList: {
@ -134,6 +155,8 @@ export default {
return { return {
active: 0, active: 0,
filterText: "", filterText: "",
imgList: [],
Liste:[]
}; };
}, },
methods: { methods: {
@ -143,8 +166,28 @@ export default {
-1 -1
); );
}, },
getMarketList() {
Contract.getMarketList().then((res) => {
//
this.imgList = res.data
this.Liste = []
this.marketList[0].marketInfoList.map(item=>{
this.imgList[0].marketInfoList.map(items=>{
if(item.symbol==items.symbol){
this.Liste.push({
pair_name: item.pair_name,
symbol: item.symbol,
icon:items.icon
})
}
})
})
});
},
},
created() {
this.getMarketList()
}, },
created() {},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

6
pages/exchange/trade-list.vue

@ -609,7 +609,7 @@ export default {
}, },
// //
holdPosition() { holdPosition() {
console.log(1) // console.log(1)
var market=this.symbol.split('/')[0] var market=this.symbol.split('/')[0]
let data = { let data = {
symbol: market, symbol: market,
@ -839,13 +839,13 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(1) // console.log(1)
if (this.symbol) { if (this.symbol) {
this.holdPosition() this.holdPosition()
this.getMarketInfo(); this.getMarketInfo();
this.contractAccount(); this.contractAccount();
this.getSymbolDetail(); this.getSymbolDetail();
console.log(4) // console.log(4)
} }
this.socketMessage(); this.socketMessage();
this.dtime = setInterval(() => { this.dtime = setInterval(() => {

2
pages/index/index.vue

@ -64,7 +64,7 @@ export default {
this.test++; this.test++;
}, },
select($ev) { select($ev) {
console.log($ev); // console.log($ev);
}, },
toPing() { toPing() {
let d = new Date(); let d = new Date();

2
pages/purchase/bill.vue

@ -85,7 +85,7 @@ export default {
}, },
}, },
created() { created() {
console.info(this.$route) // console.info(this.$route)
this.issue_price=this.$route.query.issue_price this.issue_price=this.$route.query.issue_price
}, },
}; };

2
pages/wallets/mine.vue

@ -353,7 +353,7 @@ export default {
}, },
filters:{ filters:{
priceDecimals(val){ priceDecimals(val){
console.info(val) // console.info(val)
return (parseFloat(val)).toFixed(2) return (parseFloat(val)).toFixed(2)
} }
}, },

Loading…
Cancel
Save