提交 7f8ca297 编写于 作者: D devil_gong

订单列表新增钩子,插件优化

上级 0df51814
...@@ -226,7 +226,7 @@ class Common extends Controller ...@@ -226,7 +226,7 @@ class Common extends Controller
$default_theme = strtolower(MyC('common_default_theme', 'default', true)); $default_theme = strtolower(MyC('common_default_theme', 'default', true));
$this->assign('default_theme', $default_theme); $this->assign('default_theme', $default_theme);
// 当前操作名称, 兼容插件模块名称 // 当前操作名称, 兼容插件模块名称
$module_name = strtolower(request()->module()); $module_name = strtolower(request()->module());
$controller_name = strtolower(request()->controller()); $controller_name = strtolower(request()->controller());
$action_name = strtolower(request()->action()); $action_name = strtolower(request()->action());
......
...@@ -218,19 +218,26 @@ ...@@ -218,19 +218,26 @@
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$data.id}}" data-view="jump" data-value="{{:MyUrl('index/order/index')}}"> 删除</button> <button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$data.id}}" data-view="jump" data-value="{{:MyUrl('index/order/index')}}"> 删除</button>
{{/if}} {{/if}}
<!-- 钩子订单操作 --> <!-- 订单详情操作钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag"> <div class="plugins-tag">
<span>plugins_service_order_handle_operation_html</span> <span>plugins_view_index_order_detail_operation</span>
</div> </div>
{{/if}} {{/if}}
{{if !empty($data['plugins_service_order_handle_operation_html']) and is_array($data['plugins_service_order_handle_operation_html'])}} {{php}}
{{foreach $data.plugins_service_order_handle_operation_html as $hook}} $hook_name = 'plugins_view_index_order_detail_operation';
{{if is_string($hook) or is_int($hook)}} $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$data['id'], 'data'=>$data]);
{{$hook|raw}} if(!empty($hook_data) && is_array($hook_data))
{{/if}} {
{{/foreach}} foreach($hook_data as $hook)
{{/if}} {
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</div> </div>
{{if in_array($data['status'], [3,4])}} {{if in_array($data['status'], [3,4])}}
<div class="logistics"> <div class="logistics">
......
...@@ -234,19 +234,26 @@ ...@@ -234,19 +234,26 @@
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-btn-block submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$order.id}}" data-view="reload"> 删除</button> <button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-btn-block submit-delete" data-url="{{:MyUrl('index/order/delete')}}" data-id="{{$order.id}}" data-view="reload"> 删除</button>
{{/if}} {{/if}}
<!-- 钩子订单操作 --> <!-- 订单列表操作钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
<div class="plugins-tag"> <div class="plugins-tag">
<span>plugins_service_order_handle_operation_html</span> <span>plugins_view_index_order_list_operation</span>
</div> </div>
{{/if}} {{/if}}
{{if !empty($order['plugins_service_order_handle_operation_html']) and is_array($order['plugins_service_order_handle_operation_html'])}} {{php}}
{{foreach $order.plugins_service_order_handle_operation_html as $hook}} $hook_name = 'plugins_view_index_order_list_operation';
{{if is_string($hook) or is_int($hook)}} $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$order['id'], 'data'=>$order]);
{{$hook|raw}} if(!empty($hook_data) && is_array($hook_data))
{{/if}} {
{{/foreach}} foreach($hook_data as $hook)
{{/if}} {
if(is_string($hook) || is_int($hook))
{
echo htmlspecialchars_decode($hook);
}
}
}
{{/php}}
</td> </td>
{{/if}} {{/if}}
</tr> </tr>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
return [ return [
// 开发模式 // 开发模式
'is_develop' => false, 'is_develop' => true,
// 默认编码 // 默认编码
'default_charset' => 'utf-8', 'default_charset' => 'utf-8',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册