<?php namespace Phpcmf\Controllers\Admin;

class Api extends \Phpcmf\Common
{

    // 后台首页统计
    public function count_total() {

        $this->_json(1, 'ok', [
            'member' => \Phpcmf\Service::M()->table('member')->counts(),
            'goods' => \Phpcmf\Service::M()->table(SITE_ID.'_goods_index')->where('status', 9)->counts(),
            'order' => \Phpcmf\Service::M()->table(SITE_ID.'_order')->counts(),
            'mall' => \Phpcmf\Service::M()->table(SITE_ID.'_mall_index')->where('status', 9)->counts(),
        ]);
    }


}
