'.$ret['data']['title'].'
+- '.$online_service_html.$tel_html.'
+
diff --git a/application/plugins/commononlineservice/Admin.php b/application/plugins/commononlineservice/Admin.php new file mode 100644 index 000000000..8154ebfc2 --- /dev/null +++ b/application/plugins/commononlineservice/Admin.php @@ -0,0 +1,93 @@ +', $ret['data']['online_service']); + + // 数组组装 + $data = [ + 'data' => $ret['data'], + ]; + return DataReturn('处理成功', 0, $data); + } else { + return $ret; + } + } + + /** + * 编辑页面 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-02-07T08:21:54+0800 + * @param [array] $params [输入参数] + */ + public function saveinfo($params = []) + { + $ret = PluginsService::PluginsData('commononlineservice'); + if($ret['code'] == 0) + { + // 是否 + $is_whether_list = [ + 0 => array('id' => 0, 'name' => '否'), + 1 => array('id' => 1, 'name' => '是', 'checked' => true), + ]; + + // 数组组装 + $data = [ + 'is_whether_list' => $is_whether_list, + 'data' => $ret['data'], + ]; + return DataReturn('处理成功', 0, $data); + } else { + return $ret; + } + } + + /** + * 数据保存 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-02-07T08:21:54+0800 + * @param [array] $params [输入参数] + */ + public function save($params = []) + { + return PluginsService::PluginsDataSave(['plugins'=>'commononlineservice', 'data'=>$params]); + } +} +?> \ No newline at end of file diff --git a/application/plugins/commononlineservice/Hook.php b/application/plugins/commononlineservice/Hook.php new file mode 100644 index 000000000..8a2c33dbd --- /dev/null +++ b/application/plugins/commononlineservice/Hook.php @@ -0,0 +1,169 @@ +html($params); + break; + + default : + $ret = ''; + } + return $ret; + } else { + return ''; + } + } + } + + /** + * 视图 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2019-02-06T16:16:34+0800 + * @param [array] $params [输入参数] + */ + public function html($params = []) + { + // 当前模块/控制器/方法 + $module_name = strtolower(request()->module()); + $controller_name = strtolower(request()->controller()); + $action_name = strtolower(request()->action()); + + // 获取应用数据 + $ret = PluginsService::PluginsData('commononlineservice', ['images']); + + // html拼接 + $html = '