mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-08-29 20:59:46 +08:00
[更新]修改商品编辑品牌选择 #100
This commit is contained in:
parent
40cf143a29
commit
739ad7af38
@ -89,7 +89,7 @@ class Product extends BasicAdmin
|
|||||||
*/
|
*/
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
if (!$this->request->isPost()) {
|
if ($this->request->isGet()) {
|
||||||
$this->title = '添加产品';
|
$this->title = '添加产品';
|
||||||
$this->_form_assign();
|
$this->_form_assign();
|
||||||
return $this->_form($this->table, 'form');
|
return $this->_form($this->table, 'form');
|
||||||
|
@ -62,7 +62,7 @@ class ProductService
|
|||||||
// 产品数据组装
|
// 产品数据组装
|
||||||
foreach ($goodsList as $key => $vo) {
|
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']] : [];
|
$goodsList[$key]['brand'] = isset($brandList[$vo['brand_id']]) ? $brandList[$vo['brand_id']] : [];
|
||||||
// 产品分类关联
|
// 产品分类关联
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
{foreach $brands as $brand}
|
{foreach $brands as $brand}
|
||||||
<!--{eq name='$brand.id' value='$vo.brand_id|default=0'}-->
|
<!--{eq name='$brand.id' value='$vo.brand_id|default=0'}-->
|
||||||
<option selected="selected" value="{$brand.id}">{$brand.brand_title}</option>
|
<option selected="selected" value="{$brand.id}">{$brand.brand_title}</option>
|
||||||
<!--{elseif empty($vo.brand_id)}-->
|
<!--{else}-->
|
||||||
<option value="{$brand.id}">{$brand.brand_title}</option>
|
<option value="{$brand.id}">{$brand.brand_title}</option>
|
||||||
<!--{/eq}-->
|
<!--{/eq}-->
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user