提交 aeae0f3d 编写于 作者: D devil_gong

应用管理优化

上级 570968b3
{ {
"base": { "base":{
"name": "顶部广告", "plugins":"commontopmaxpicture",
"logo": "/static/upload/images/plugins_commontopmaxpicture/2019/02/09/1549671733987654.png", "name":"顶部广告",
"author": "Devil", "logo":"\/static\/upload\/images\/plugins_commontopmaxpicture\/2019\/02\/09\/1549671733987654.png",
"author_url": "https://shopxo.net/", "author":"Devil",
"version": "1.0.0", "author_url":"https:\/\/shopxo.net\/",
"desc": "顶部大图广告,突破视觉", "version":"1.0.0",
"apply_terminal": ["pc"], "desc":"顶部大图广告,突破视觉",
"apply_version": ["1.3.0"], "apply_terminal":[
"is_home": false "pc",
"h5"
],
"apply_version":[
"1.3.0"
],
"is_home":false
}, },
"hook": { "hook":{
"plugins_common_top": ["app\\plugins\\commontopmaxpicture\\Hook"] "plugins_common_top":[
"app\\plugins\\commontopmaxpicture\\Hook"
]
} }
} }
\ No newline at end of file
{ {
"base": { "base":{
"name": "顶部公告", "plugins":"commontopnotice",
"logo": "/static/upload/images/plugins_commontopnotice/2019/02/12/1549671733987652.png", "name":"顶部公告",
"author": "Devil", "logo":"\/static\/upload\/images\/plugins_commontopnotice\/2019\/02\/12\/1549671733987652.png",
"author_url": "https://shopxo.net/", "author":"Devil",
"version": "1.0.0", "author_url":"https:\/\/shopxo.net\/",
"desc": "顶部公告,通知", "version":"1.0.0",
"apply_terminal": ["pc"], "desc":"顶部公告,通知",
"apply_version": ["1.3.0"], "apply_terminal":[
"is_home": false "pc",
"h5"
],
"apply_version":[
"1.3.0"
],
"is_home":false
}, },
"hook": { "hook":{
"plugins_common_top": ["app\\plugins\\commontopnotice\\Hook"] "plugins_common_top":[
"app\\plugins\\commontopnotice\\Hook"
]
} }
} }
\ No newline at end of file
{ {
"base": { "base":{
"name": "用户中心顶部公告", "plugins":"usercentertopnotice",
"logo": "/static/upload/images/plugins_usercentertopnotice/2019/02/12/1549671733967341.png", "name":"用户中心顶部公告",
"author": "Devil", "logo":"\/static\/upload\/images\/plugins_usercentertopnotice\/2019\/02\/12\/1549671733967341.png",
"author_url": "https://shopxo.net/", "author":"Devil",
"version": "1.0.0", "author_url":"https:\/\/shopxo.net\/",
"desc": "用户中心顶部公告,通知", "version":"1.0.0",
"apply_terminal": ["pc"], "desc":"用户中心顶部公告,通知",
"apply_version": ["1.3.0"], "apply_terminal":[
"is_home": false "pc",
"h5"
],
"apply_version":[
"1.3.0"
],
"is_home":false
}, },
"hook": { "hook":{
"plugins_user_center_top": ["app\\plugins\\usercentertopnotice\\Hook"] "plugins_user_center_top":[
"app\\plugins\\usercentertopnotice\\Hook"
]
} }
} }
\ No newline at end of file
...@@ -753,8 +753,15 @@ php; ...@@ -753,8 +753,15 @@ php;
'hook' => (object) $hook, 'hook' => (object) $hook,
]; ];
// 文件存在是否有权限
$config_file = $app_dir.DS.'config.json';
if(file_exists($config_file) && !is_writable($config_file))
{
return DataReturn('应用配置文件没有操作权限'.'['.$config_file.']', -3);
}
// 创建配置文件 // 创建配置文件
if(@file_put_contents($app_dir.DS.'config.json', JsonFormat($data)) === false) if(@file_put_contents($config_file, JsonFormat($data)) === false)
{ {
return DataReturn('应用配置文件创建失败', -10); return DataReturn('应用配置文件创建失败', -10);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册