Commit 313d3634 authored by zhengke's avatar zhengke

增加四舍五入

parent cea7a3d1
...@@ -305,13 +305,13 @@ ul li { ...@@ -305,13 +305,13 @@ ul li {
<p class="tit yuefen-box"> <span>8月</span> <img src="../../assets/img/viitto/xiajiantou.png" alt=""></p> <p class="tit yuefen-box"> <span>8月</span> <img src="../../assets/img/viitto/xiajiantou.png" alt=""></p>
</div> --> </div> -->
<p class="sb-tit sb-tit-top">今日交易总额</p> <p class="sb-tit sb-tit-top">今日交易总额</p>
<h1 class="big-price"><span>{{dataList.TotalMoney}}</span> <h1 class="big-price"><span>{{getIntegerNum(dataList.TotalMoney,2)}}</span>
<img v-if="dataList.ToDayMoneyChange==1" src="../../assets/img/viitto/lvsedian.png" alt=""> <img v-if="dataList.ToDayMoneyChange==1" src="../../assets/img/viitto/lvsedian.png" alt="">
<img v-if="dataList.ToDayMoneyChange==2" src="../../assets/img/viitto/hongsedian.png" alt=""> <img v-if="dataList.ToDayMoneyChange==2" src="../../assets/img/viitto/hongsedian.png" alt="">
</h1> </h1>
<div class="price-line"></div> <div class="price-line"></div>
<p class="sb-tit sb-tit-top">年度累计交易</p> <p class="sb-tit sb-tit-top">年度累计交易</p>
<h1 class="big-price"><span>{{dataList.YearTotalMoney}}</span> <h1 class="big-price"><span>{{getIntegerNum(dataList.YearTotalMoney,0)}}</span>
<img v-if="dataList.YearMoneyChange==1" src="../../assets/img/viitto/lvsedian.png" alt=""> <img v-if="dataList.YearMoneyChange==1" src="../../assets/img/viitto/lvsedian.png" alt="">
<img v-if="dataList.YearMoneyChange==2" src="../../assets/img/viitto/hongsedian.png" alt=""> <img v-if="dataList.YearMoneyChange==2" src="../../assets/img/viitto/hongsedian.png" alt="">
</h1> </h1>
...@@ -423,77 +423,66 @@ export default { ...@@ -423,77 +423,66 @@ export default {
this.connec(); this.connec();
}, 1000); }, 1000);
setTimeout(() => { setTimeout(() => {
this.exChangeBoard(); this.exChangeBoard();
}, 300000); }, 300000);
},methods:{ },methods:{
//不同进度条不同颜色 init(){
customColorMethod(percentage) { let url='http://47.96.23.199:5000/api/user/get_b2b_data'
// console.log(percentage,'percentage'); let msg={
// if (percentage <= 20) { tdsourcetag:'s_pcqq_aiomsg'
// return '#f56c6c';
// } else if (percentage>20&&percentage <=40) {
// return '#e6a23c';
// } else if(percentage>40&&percentage <= 60){
// return '#5cb87a';
// } else if(percentage>60&&percentage <= 80){
// return '#1989fa'
// } else if(percentage>80&&percentage <= 100){
// return '#6f7ad3'
// }
},
init(){
let url='http://47.96.23.199:5000/api/user/get_b2b_data'
let msg={
tdsourcetag:'s_pcqq_aiomsg'
}
this.apiRequest(url,msg,r=>{
if(r.data.resultCode==1){
this.dataList = r.data.data[0];
//放入hotCity
this.dataArea=[];
this.dataList.CityHot.forEach(x=>{
this.dataArea.push({
name:x.CityName,
value: [x.Lng,x.Lat]
})
})
}else{
this.Error(r.data.message);
} }
}); this.apiRequest(url,msg,r=>{
}, if(r.data.resultCode==1){
connec(){ this.dataList = r.data.data[0];
let _this=this //放入hotCity
let url = 'http://47.96.23.199:5000/data_server' this.dataArea=[];
let userInfo = this.getLocalStorage() this.dataList.CityHot.forEach(x=>{
this.socket = this.$socketio.connect(url) this.dataArea.push({
// 城市登录 name:x.CityName,
this.socket.on('b2b_city_data', function (msg) { value: [x.Lng,x.Lat]
_this.dataList = msg.data[0]; })
_this.$forceUpdate(); })
}); }else{
// 关于同行那一部分的 同行数量、激活总数、沉睡客户数量、app下载数量 this.Error(r.data.message);
this.socket.on('b2b_client_data', function (msg) { }
_this.dataList = msg.data[0]; });
_this.$forceUpdate(); },
}); connec(){
// 今日/年度交易信息/优惠金额、返佣金额、大红包余额 let _this=this
this.socket.on('b2b_trade_data', function (msg) { let url = 'http://47.96.23.199:5000/data_server'
_this.dataList = msg.data[0]; let userInfo = this.getLocalStorage()
_this.$forceUpdate(); this.socket = this.$socketio.connect(url)
}); // 城市登录
// 其他的 现暂时没得 预留的 this.socket.on('b2b_city_data', function (msg) {
this.socket.on('b2b_other_data', function (msg) { _this.dataList = msg.data[0];
_this.dataList = msg.data[0]; _this.$forceUpdate();
_this.$forceUpdate(); });
}); // 关于同行那一部分的 同行数量、激活总数、沉睡客户数量、app下载数量
}, this.socket.on('b2b_client_data', function (msg) {
//切换统计看板 _this.dataList = msg.data[0];
exChangeBoard(){ _this.$forceUpdate();
window.location="http://data.oytour.com/#/viittoData2" });
//window.location="http://192.168.0.112:8081/#/viittoData2"; // 今日/年度交易信息/优惠金额、返佣金额、大红包余额
window.location.reload(); this.socket.on('b2b_trade_data', function (msg) {
} _this.dataList = msg.data[0];
_this.$forceUpdate();
});
// 其他的 现暂时没得 预留的
this.socket.on('b2b_other_data', function (msg) {
_this.dataList = msg.data[0];
_this.$forceUpdate();
});
},
//切换统计看板
exChangeBoard(){
window.location="http://data.oytour.com/#/viittoData2"
//window.location="http://192.168.0.112:8081/#/viittoData2";
window.location.reload();
},
//向上取整
getIntegerNum(num,n){
return num.toFixed(n);
}
} }
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment