多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
#### 1.视图展示 文件路径:\shop\views\default\Seller\IndexCtl\index.php ~~~ <div class="m white-panel"> <div class="pannel_div"> <div class="mt"> <h3 class="bbc_seller_border"><?=__('单品销售排名')?></h3> <h5><?=__('掌握30日内最热销的商品及时补充货源')?></h5> </div> <div class="mc rank"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50"><?=__('排名')?></td> <td colspan="2" class="tl"><?=__('商品信息')?></td> <td width="70"><?=__('销量')?></td> </tr> <?php if(!empty($shop_top_rows)) { foreach ($shop_top_rows as $key => $shop_top_row) { ?> <tr> <td><?= $key + 1 ?></td> <td class="tl" width="40"><a target="_blank" href="<?= Yf_Registry::get('index_page') ?>?ctl=Goods_Goods&met=goods&type=goods&gid=<?= $shop_top_row['goods_id'] ?>"><img width="32" src="<?= image_thumb($shop_top_row['goods_image'], 60, 60) ?>"/></a> </td> <td class="tl"><a target="_blank" href="<?= Yf_Registry::get('index_page') ?>?ctl=Goods_Goods&met=goods&type=goods&gid=<?= $shop_top_row['goods_id'] ?>"><?= $shop_top_row['goods_name'] ?></a> </td> <td><?= $shop_top_row['goods_num'] ?></td> </tr> <?php } } ?> </table> </div> </div> </div> ~~~ #### 2.数据获取 接口地址:index.php?ctl=Seller_Index&met=index&typ=e 接口文件:\shop\controllers\Seller\IndexCtl.php 控制器:Seller_IndexCtl 方法:index() ~~~ $start_date = date("Y-m-d", strtotime("-30 days")); //单品销量 $shop_top_rows = $Analysis_ShopGeneralModel->getShopGoodsTop(Perm::$shopId, $start_date); ~~~