123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace app\home\controller;
- use think\facade\View;
- use think\facade\Lang;
- /**
-
- *
-
- *
- * ----------------------------------------------------------------------------
- *
-
- * 控制器
- */
- class Sellerlog extends BaseSeller
- {
- public function initialize()
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- Lang::load(base_path() . 'home/lang/' . config('lang.default_lang') . '/sellerlog.lang.php');
- }
- public function log_list()
- {
- $sellerlog_model = model('sellerlog');
- $condition = array();
- $condition[] = array('sellerlog_store_id', '=', session('store_id'));
- $seller_name = input('seller_name');
- $log_content = input('log_content');
- $add_time_from = input('add_time_from');
- $add_time_to = input('add_time_to');
- if (!empty($seller_name)) {
- $condition[] = array('sellerlog_seller_name', 'like', '%' . input('seller_name') . '%');
- }
- if (!empty($log_content)) {
- $condition[] = array('sellerlog_content', 'like', '%' . $log_content . '%');
- }
- if (!empty($add_time_from)) {
- $condition[] = array('sellerlog_time', '>=', strtotime($add_time_from));
- }
- if (!empty($add_time_to)) {
- $condition[] = array('sellerlog_time', '<=', strtotime($add_time_to) + 86399);
- }
- $log_list = $sellerlog_model->getSellerlogList($condition, 10, 'sellerlog_id desc');
- View::assign('log_list', $log_list);
- View::assign('show_page', $sellerlog_model->page_info->render());
- /* 设置卖家当前菜单 */
- $this->setSellerCurMenu('sellerlog');
- /* 设置卖家当前栏目 */
- $this->setSellerCurItem('log_list');
- return View::fetch($this->template_dir . 'seller_log');
- }
- /**
- * 用户中心右边,小导航
- *
- * @param string $menu_key 当前导航
- * @return
- */
- public function getSellerItemList()
- {
- $menu_array = array();
- $menu_array[] = array(
- 'name' => 'log_list',
- 'text' => lang('account_log'),
- 'url' => (string) url('Sellerlog/log_list')
- );
- return $menu_array;
- }
- }
|