mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-07 06:15:29 +08:00
商品复制出现重复问题修复
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user