动态数据列表优化
parent
b55c61723a
commit
a3352e827c
|
|
@ -395,7 +395,7 @@ class Common extends BaseController
|
|||
}
|
||||
|
||||
// 表格列表公共标识
|
||||
MyViewAssign('hook_name_form_list', $current.'_list');
|
||||
MyViewAssign('hook_name_form_grid', $current.'_grid');
|
||||
// 内容外部顶部
|
||||
MyViewAssign('hook_name_content_top', $current.'_content_top');
|
||||
// 内容外部底部
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class Plugins extends Common
|
|||
|
||||
// 调用失败
|
||||
MyViewAssign('msg', $ret['msg']);
|
||||
return MyView();
|
||||
return MyView('public/tips_error');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -120,6 +120,33 @@
|
|||
{{/if}}
|
||||
{{/case}}
|
||||
{{/switch}}
|
||||
|
||||
<!-- 列表格子钩子 -->
|
||||
{{if !empty($t['unique_key']) and $t['view_type'] neq 'operate'}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<div class="plugins-tag">
|
||||
<span>{{$hook_name_form_grid}}_{{$t.unique_key}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_data = MyEventTrigger($hook_name_form_grid.'_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_grid.'_'.$t['unique_key'],
|
||||
'is_backend' => true,
|
||||
'id' => isset($data[$form_table['base']['key_field']]) ? $data[$form_table['base']['key_field']] : 0,
|
||||
'data' => $data,
|
||||
]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -301,14 +301,14 @@
|
|||
|
||||
<!-- 列表格子钩子 -->
|
||||
{{if !empty($t['unique_key']) and $t['view_type'] neq 'operate'}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<div class="plugins-tag">
|
||||
<span>{{$hook_name_form_list}}_grid_{{$t.unique_key}}</span>
|
||||
<span>{{$hook_name_form_grid}}_{{$t.unique_key}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_data = MyEventTrigger($hook_name_form_list.'_grid_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_list.'_grid_'.$t['unique_key'],
|
||||
$hook_data = MyEventTrigger($hook_name_form_grid.'_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_grid.'_'.$t['unique_key'],
|
||||
'is_backend' => true,
|
||||
'id' => isset($data_list[$i][$form_table['base']['key_field']]) ? $data_list[$i][$form_table['base']['key_field']] : 0,
|
||||
'data' => $data_list[$i],
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ class Common extends BaseController
|
|||
}
|
||||
|
||||
// 表格列表公共标识
|
||||
MyViewAssign('hook_name_form_list', $current.'_list');
|
||||
MyViewAssign('hook_name_form_grid', $current.'_grid');
|
||||
// 内容外部顶部
|
||||
MyViewAssign('hook_name_content_top', $current.'_content_top');
|
||||
// 内容外部底部
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class Plugins extends Common
|
|||
|
||||
// 调用失败
|
||||
MyViewAssign('msg', $ret['msg']);
|
||||
return MyView();
|
||||
return MyView('public/tips_error');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -120,6 +120,33 @@
|
|||
{{/if}}
|
||||
{{/case}}
|
||||
{{/switch}}
|
||||
|
||||
<!-- 列表格子钩子 -->
|
||||
{{if !empty($t['unique_key']) and $t['view_type'] neq 'operate'}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<div class="plugins-tag">
|
||||
<span>{{$hook_name_form_grid}}_{{$t.unique_key}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_data = MyEventTrigger($hook_name_form_grid.'_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_grid.'_'.$t['unique_key'],
|
||||
'is_backend' => true,
|
||||
'id' => isset($data[$form_table['base']['key_field']]) ? $data[$form_table['base']['key_field']] : 0,
|
||||
'data' => $data,
|
||||
]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -301,14 +301,14 @@
|
|||
|
||||
<!-- 列表格子钩子 -->
|
||||
{{if !empty($t['unique_key']) and $t['view_type'] neq 'operate'}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<div class="plugins-tag">
|
||||
<span>{{$hook_name_form_list}}_grid_{{$t.unique_key}}</span>
|
||||
<span>{{$hook_name_form_grid}}_{{$t.unique_key}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_data = MyEventTrigger($hook_name_form_list.'_grid_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_list.'_grid_'.$t['unique_key'],
|
||||
$hook_data = MyEventTrigger($hook_name_form_grid.'_'.$t['unique_key'], [
|
||||
'hook_name' => $hook_name_form_grid.'_'.$t['unique_key'],
|
||||
'is_backend' => true,
|
||||
'id' => isset($data_list[$i][$form_table['base']['key_field']]) ? $data_list[$i][$form_table['base']['key_field']] : 0,
|
||||
'data' => $data_list[$i],
|
||||
|
|
|
|||
Loading…
Reference in New Issue