更新代码
This commit is contained in:
@@ -147,8 +147,9 @@ export default {
|
|||||||
{ label: ()=> '今日登录', icon: require('../../assets/icons/img.png'), model: this.loginModel },
|
{ label: ()=> '今日登录', icon: require('../../assets/icons/img.png'), model: this.loginModel },
|
||||||
{ label: ()=> '主播数', icon: require('../../assets/icons/img_1.png'), model: this.topUpModel },
|
{ label: ()=> '主播数', icon: require('../../assets/icons/img_1.png'), model: this.topUpModel },
|
||||||
{ label: ()=> `今日充值(${this.withdrawDepositModel.money})`, icon: require('../../assets/icons/img_2.png'), model: this.withdrawDepositModel },
|
{ label: ()=> `今日充值(${this.withdrawDepositModel.money})`, icon: require('../../assets/icons/img_2.png'), model: this.withdrawDepositModel },
|
||||||
{ label: ()=> `今日登录(${this.anchorModel.money})`, icon: require('../../assets/icons/img_3.png'), model: this.anchorModel }
|
{ label: ()=> `今日提现(${this.anchorModel.money})`, icon: require('../../assets/icons/img_3.png'), model: this.anchorModel }
|
||||||
];
|
];
|
||||||
|
this.getTodayStatistics();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChartTimeChange(val) {
|
handleChartTimeChange(val) {
|
||||||
@@ -156,6 +157,43 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDropdownClick({ label, key }) {
|
handleDropdownClick({ label, key }) {
|
||||||
this.refreshTimeModel = label;
|
this.refreshTimeModel = label;
|
||||||
|
},
|
||||||
|
getTodayStatistics() {
|
||||||
|
// todo fetch
|
||||||
|
const {
|
||||||
|
todayLoginNum,
|
||||||
|
todayLoginDiffLast,
|
||||||
|
anchorNum,
|
||||||
|
todayRechargeAmountNum,
|
||||||
|
todayRechargeNum,
|
||||||
|
todayRechargeAmountDiffLast,
|
||||||
|
todayWithdrawAmount,
|
||||||
|
todayWithdrawNum,
|
||||||
|
todayWithdrawAmountDiffLast
|
||||||
|
} = {
|
||||||
|
todayLoginNum: 100,
|
||||||
|
todayLoginDiffLast: 8.6,
|
||||||
|
anchorNum: 58,
|
||||||
|
todayRechargeAmountNum: 200,
|
||||||
|
todayRechargeNum: 10,
|
||||||
|
todayRechargeAmountDiffLast: 5.6,
|
||||||
|
todayWithdrawAmount: 500,
|
||||||
|
todayWithdrawNum: 1,
|
||||||
|
todayWithdrawAmountDiffLast: 5.9
|
||||||
|
};
|
||||||
|
this.loginModel.count = todayLoginNum;
|
||||||
|
this.loginModel.trendDirection = 1; // 增加还是减少
|
||||||
|
this.loginModel.trendNum = todayLoginDiffLast;
|
||||||
|
|
||||||
|
this.topUpModel.count = anchorNum; // 主播人数
|
||||||
|
|
||||||
|
this.withdrawDepositModel.count = todayRechargeAmountNum; // 充值金额
|
||||||
|
this.withdrawDepositModel.money = todayRechargeNum;
|
||||||
|
this.withdrawDepositModel.trendNum = todayRechargeAmountDiffLast; // 与昨日相比
|
||||||
|
|
||||||
|
this.anchorModel.count = todayWithdrawAmount;
|
||||||
|
this.anchorModel.money = todayWithdrawNum;
|
||||||
|
this.anchorModel.trendNum = todayWithdrawAmountDiffLast;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user