提交 004b75ed 编写于 作者: D devil

商品复制出现重复问题修复

上级 a520bdf4
......@@ -173,6 +173,9 @@ class Goods extends Common
// 当前系统设置的站点类型
$this->assign('common_site_type', MyC('common_site_type', 0, true));
// 是否拷贝
$this->assign('is_copy', (isset($params['is_copy']) && $params['is_copy'] == 1) ? 1 : 0);
// 商品编辑页面钩子
$hook_name = 'plugins_view_admin_goods_save';
$this->assign($hook_name.'_data', Hook::listen($hook_name,
......@@ -188,7 +191,7 @@ class Goods extends Common
$this->assign('editor_path_type', 'goods');
// 数据
unset($params['id']);
unset($params['id'], $params['is_copy']);
$this->assign('data', $data);
$this->assign('params', $params);
return $this->fetch();
......
......@@ -540,7 +540,7 @@
</div>
<div class="am-form-group am-form-group-refreshing">
<input type="hidden" name="id" {{if isset($data) and !empty($data['id']) and (!isset($params['is_copy']) or $params['is_copy'] neq 1)}} value="{{$data.id}}"{{/if}} />
<input type="hidden" name="id" {{if isset($data) and !empty($data['id']) and (!isset($is_copy) or $is_copy neq 1)}} value="{{$data.id}}"{{/if}} />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册