作者 SHW\戥岁。。

活动商品页

... ... @@ -2,6 +2,7 @@
namespace app\admin\controller\activity_goods;
use app\admin\model\Activity;
use app\admin\model\litestore\Litestoregoodsspec;
use app\common\controller\Backend;
use app\admin\model\litestore\Litestorespec as SpecModel;
... ... @@ -29,14 +30,14 @@ class ImportGoods extends Backend
*/
protected $model = null;
protected $spec_model = null;
// protected $searchFields = 'category.name';
protected $activity = null;
public function _initialize()
{
parent::_initialize();
$this->SpecModel = new SpecModel;
$this->SpecValueModel = new SpecValueModel;
$this->activity = new Activity();
$this->model = new \app\admin\model\litestore\Litestoregoods;
$this->spec_model = new \app\admin\model\litestore\Litestoregoodsspec();
$this->view->assign("specTypeList", $this->model->getSpecTypeList());
... ... @@ -99,8 +100,16 @@ class ImportGoods extends Backend
return json($result);
}
$category_name1 = $this->activity
->where('id', 1)->value('name');
$category_name2 = $this->activity
->where('id', 2)->value('name');
$category_name3 = $this->activity
->where('id', 3)->value('name');
$this->assign('template', $this->request->domain() . '/static/template/商品导入模板.xlsx');
$this->assign('name1', $category_name1);
$this->assign('name2', $category_name2);
$this->assign('name3', $category_name3);
return $this->view->fetch();
}
... ...
... ... @@ -2,6 +2,7 @@
namespace app\admin\controller\activity_goods;
use app\admin\model\Activity;
use app\admin\model\litestore\Litestoregoodsspec;
use app\common\controller\Backend;
use app\admin\model\litestore\Litestorespec as SpecModel;
... ... @@ -29,14 +30,14 @@ class NewGoods extends Backend
*/
protected $model = null;
protected $spec_model = null;
// protected $searchFields = 'category.name';
protected $activity = null;
public function _initialize()
{
parent::_initialize();
$this->SpecModel = new SpecModel;
$this->SpecValueModel = new SpecValueModel;
$this->activity = new Activity();
$this->model = new \app\admin\model\litestore\Litestoregoods;
$this->spec_model = new \app\admin\model\litestore\Litestoregoodsspec();
$this->view->assign("specTypeList", $this->model->getSpecTypeList());
... ... @@ -99,8 +100,16 @@ class NewGoods extends Backend
return json($result);
}
$category_name1 = $this->activity
->where('id', 1)->value('name');
$category_name2 = $this->activity
->where('id', 2)->value('name');
$category_name3 = $this->activity
->where('id', 3)->value('name');
$this->assign('template', $this->request->domain() . '/static/template/商品导入模板.xlsx');
$this->assign('name1', $category_name1);
$this->assign('name2', $category_name2);
$this->assign('name3', $category_name3);
return $this->view->fetch();
}
... ...
... ... @@ -2,6 +2,7 @@
namespace app\admin\controller\activity_goods;
use app\admin\model\Activity;
use app\admin\model\litestore\Litestoregoodsspec;
use app\common\controller\Backend;
use app\admin\model\litestore\Litestorespec as SpecModel;
... ... @@ -30,14 +31,14 @@ class SeckillGoods extends Backend
protected $model = null;
protected $spec_model = null;
// protected $searchFields = 'category.name';
protected $activity = null;
public function _initialize()
{
parent::_initialize();
$this->SpecModel = new SpecModel;
$this->SpecValueModel = new SpecValueModel;
$this->activity = new Activity();
$this->model = new \app\admin\model\litestore\Litestoregoods;
$this->spec_model = new \app\admin\model\litestore\Litestoregoodsspec();
$this->view->assign("specTypeList", $this->model->getSpecTypeList());
... ... @@ -100,8 +101,16 @@ class SeckillGoods extends Backend
return json($result);
}
$category_name1 = $this->activity
->where('id', 1)->value('name');
$category_name2 = $this->activity
->where('id', 2)->value('name');
$category_name3 = $this->activity
->where('id', 3)->value('name');
$this->assign('template', $this->request->domain() . '/static/template/商品导入模板.xlsx');
$this->assign('name1', $category_name1);
$this->assign('name2', $category_name2);
$this->assign('name3', $category_name3);
return $this->view->fetch();
}
... ...
... ... @@ -20,9 +20,9 @@
<div class="dropdown btn-group {:$auth->check('litestore/litestoregoods/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-check-square-o"></i> {:__('批量添加活动商品')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {:__('新人用户')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {:__('限时秒杀')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {:__('进口商品')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {$name1}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {$name2}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {$name3}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=0"><i class="fa fa-eye-slash"></i> {:__('不参与活动')}</a></li>
</ul>
</div>
... ...
... ... @@ -20,9 +20,9 @@
<div class="dropdown btn-group {:$auth->check('litestore/litestoregoods/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-check-square-o"></i> {:__('批量添加活动商品')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {:__('新人用户')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {:__('限时秒杀')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {:__('进口商品')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {$name1}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {$name2}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {$name3}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=0"><i class="fa fa-eye-slash"></i> {:__('不参与活动')}</a></li>
</ul>
</div>
... ...
... ... @@ -20,9 +20,9 @@
<div class="dropdown btn-group {:$auth->check('litestore/litestoregoods/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-check-square-o"></i> {:__('批量添加活动商品')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {:__('新人用户')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {:__('限时秒杀')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {:__('进口商品')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=1"><i class="fa fa-free-code-camp"></i> {$name1}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=2"><i class="fa fa-clock-o"></i> {$name2}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=3"><i class="fa fa-location-arrow"></i> {$name3}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="activity_id=0"><i class="fa fa-eye-slash"></i> {:__('不参与活动')}</a></li>
</ul>
</div>
... ...