diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 7fa55a551..1df1b0eaa 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -130,6 +130,7 @@ class PromoteController extends BaseController } $today=total(1); + $yesterdays = total(5); $week=total(2); $mounth=total(3); //计算今日的统计数据 @@ -168,7 +169,7 @@ class PromoteController extends BaseController $yesterdayData = M('User','tab_') ->field('promote_account,promote_id,date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(tab_user.id) as count, IF(tab_promote.grand_id>0,tab_promote.grand_id,IF(tab_promote.grand_id=0 and tab_promote.parent_id >0,tab_promote.parent_id,promote_id)) as promote_id1 , - count(IF(register_time '.$today.',1,null)) as today, + count(IF(register_time '.$yesterdays.',1,null)) as today, count(IF(register_time '.$week.',1,null)) as week, count(IF(register_time '.$mounth.',1,null)) as mounth') ->join('tab_promote on promote_id = tab_promote.id','left') diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index d06f51924..bd5a9aece 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -11,7 +11,7 @@
当月新增用户充值
¥{$mounthAddSpendData.mounth}昨日注册用户
{$yesterdayData.count}昨日注册用户
{$yesterdayData.today}昨日充值金额
¥{$yesterdaySpendData.count}今日注册用户
{$data.today}今日充值金额
¥{$spendData.today}