|
|
@@ -24,25 +24,10 @@ class Product extends AdminControl
|
|
|
$condition['product_type'] = $product_type;
|
|
|
}
|
|
|
$product_list = $model_product->getProductList($condition,'*',10);
|
|
|
- if($product_list){
|
|
|
- for ($i=0; $i < count($product_list); $i++) {
|
|
|
- $where['member_id'] = $product_list[$i]['product_companyid'];
|
|
|
- $gsname_list[] = model('member')->getMemberInfo($where,$field = 'member_name');
|
|
|
- }
|
|
|
- $this->assign('gsname_list',$gsname_list);
|
|
|
- for ($ie=0; $ie < count($product_list); $ie++) {
|
|
|
- $con = $product_list[$ie]['product_content'];
|
|
|
- $pattern="/<[img|IMG].*?src=[\'\"](.*?(?:[\.gif|\.jpg]))[\'|\"].*?[\/]?>/";
|
|
|
- $replacement = '';
|
|
|
- $conlist[] = preg_replace($pattern,$replacement ,$con);
|
|
|
- }
|
|
|
- $this->assign('conlist',$conlist);
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
$allpower = $this->qxhans();
|
|
|
$this->assign('allpower',$allpower);
|
|
|
$this->assign('product_list', $product_list);
|
|
|
- $this->assign('show_page', $model_product->page_info->render());
|
|
|
$this->setAdminCurItem('index');
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
@@ -54,14 +39,12 @@ class Product extends AdminControl
|
|
|
if (request()->isPost()) {
|
|
|
$data = array(
|
|
|
'product_type' => input('post.product_type'),
|
|
|
- 'product_companyid' => input('post.product_companyid'),
|
|
|
'product_title' => input('post.product_title'),
|
|
|
'product_ctitle' => input('post.product_ctitle'),
|
|
|
'product_keywords' => input('post.product_keywords'),
|
|
|
'product_status' => input('post.product_status'),
|
|
|
'product_isjump' => input('post.product_isjump'),
|
|
|
'product_content' => input('post.product_content'),
|
|
|
- 'product_usetime' => input('post.product_usetime'),
|
|
|
);
|
|
|
if (!input('param.product_addtime')) {
|
|
|
$data['product_addtime'] = TIMESTAMP;
|
|
|
@@ -79,15 +62,12 @@ class Product extends AdminControl
|
|
|
'product_isjump' => 0,
|
|
|
'product_status' => 0,
|
|
|
'product_type' => '',
|
|
|
- 'product_usetime' => '',
|
|
|
);
|
|
|
$onlygs = array(
|
|
|
'member_id' => 0,
|
|
|
'member_name' =>"请选择所属公司",
|
|
|
);
|
|
|
$pic_list = model('pic')->getPicList(array('pic_id' => 0));
|
|
|
- $allgs = model('member')->allcompany('');
|
|
|
- $this->assign('allgs',$allgs);//所有开启的公司
|
|
|
$this->assign('product', $product);
|
|
|
$this->assign('onlygs',$onlygs);
|
|
|
$this->assign('product_pic_type', ['pic_type' => 'product']);
|
|
|
@@ -110,11 +90,9 @@ class Product extends AdminControl
|
|
|
if (request()->isPost()) {
|
|
|
$data = array(
|
|
|
'product_type' => input('post.product_type'),
|
|
|
- 'product_companyid' => input('post.product_companyid'),
|
|
|
'product_title' => input('post.product_title'),
|
|
|
'product_ctitle' => input('post.product_ctitle'),
|
|
|
'product_keywords' => input('post.product_keywords'),
|
|
|
- 'product_usetime' => input('post.product_usetime'),
|
|
|
'product_status' => input('post.product_status'),
|
|
|
'product_isjump' => input('post.product_isjump'),
|
|
|
'product_content' => input('post.product_content'),
|
|
|
@@ -134,14 +112,9 @@ class Product extends AdminControl
|
|
|
} else {
|
|
|
$pic_list = model('pic')->getpicList($condition);
|
|
|
$this->assign('pic_list', $pic_list);
|
|
|
-
|
|
|
+ $where = array();
|
|
|
//获取当前帮助中心的内容
|
|
|
$product = model('product')->getOneProduct(['product_id' => $product_id]);
|
|
|
- $allgs = model('member')->allcompany($product['product_companyid']);
|
|
|
- $where['member_id'] = $product['product_companyid'];
|
|
|
- $onlygs = model('member')->getMemberInfo($where,$field = 'member_id,member_name');
|
|
|
- $this->assign('onlygs',$onlygs);//所属公司
|
|
|
- $this->assign('allgs',$allgs);//所有开启的公司
|
|
|
$this->assign('product_pic_type', ['pic_type' => 'product']);
|
|
|
$this->assign('product', $product);
|
|
|
$this->setAdminCurItem('edit');
|