[更新]修改商品编辑品牌选择 #100

This commit is contained in:
Anyon 2018-04-21 16:55:47 +08:00
parent 40cf143a29
commit 739ad7af38
3 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ class Product extends BasicAdmin
*/
public function add()
{
if (!$this->request->isPost()) {
if ($this->request->isGet()) {
$this->title = '添加产品';
$this->_form_assign();
return $this->_form($this->table, 'form');

View File

@ -62,7 +62,7 @@ class ProductService
// 产品数据组装
foreach ($goodsList as $key => $vo) {
// 产品内容处理
$goodsList[$key]['goods_content'] = htmlspecialchars_decode($vo['goods_content']);
$goodsList[$key]['goods_content'] = $vo['goods_content'];
// 产品品牌处理
$goodsList[$key]['brand'] = isset($brandList[$vo['brand_id']]) ? $brandList[$vo['brand_id']] : [];
// 产品分类关联

View File

@ -11,7 +11,7 @@
{foreach $brands as $brand}
<!--{eq name='$brand.id' value='$vo.brand_id|default=0'}-->
<option selected="selected" value="{$brand.id}">{$brand.brand_title}</option>
<!--{elseif empty($vo.brand_id)}-->
<!--{else}-->
<option value="{$brand.id}">{$brand.brand_title}</option>
<!--{/eq}-->
{/foreach}