Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
9fe07ee8
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9fe07ee8
编写于
9月 25, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
session/cache支持后台配置
上级
d6d31945
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
406 addition
and
177 deletion
+406
-177
application/admin/controller/Admin.php
application/admin/controller/Admin.php
+1
-1
application/admin/controller/Cache.php
application/admin/controller/Cache.php
+4
-0
application/admin/controller/Site.php
application/admin/controller/Site.php
+12
-0
application/admin/view/default/site/base.html
application/admin/view/default/site/base.html
+110
-72
application/admin/view/default/site/beian.html
application/admin/view/default/site/beian.html
+0
-38
application/admin/view/default/site/cache.html
application/admin/view/default/site/cache.html
+84
-0
application/admin/view/default/site/nav.html
application/admin/view/default/site/nav.html
+6
-6
application/index/controller/Common.php
application/index/controller/Common.php
+0
-5
application/service/BaseConfigHandleService.php
application/service/BaseConfigHandleService.php
+185
-0
config/.gitignore
config/.gitignore
+3
-1
config/cache.php
config/cache.php
+0
-26
config/session.php
config/session.php
+0
-27
public/static/common/css/common.css
public/static/common/css/common.css
+1
-1
未找到文件。
application/admin/controller/Admin.php
浏览文件 @
9fe07ee8
...
...
@@ -290,7 +290,7 @@ class Admin extends Common
*/
public
function
Logout
()
{
session
_destroy
(
);
session
(
'admin'
,
null
);
return
redirect
(
MyUrl
(
'admin/admin/logininfo'
));
}
}
...
...
application/admin/controller/Cache.php
浏览文件 @
9fe07ee8
...
...
@@ -69,6 +69,10 @@ class Cache extends Common
\
base\FileUtil
::
UnlinkDir
(
ROOT
.
'runtime'
.
DS
.
'cache'
);
\
base\FileUtil
::
UnlinkDir
(
ROOT
.
'runtime'
.
DS
.
'temp'
);
\
base\FileUtil
::
UnlinkDir
(
ROOT
.
'runtime'
.
DS
.
'data'
);
// 缓存操作清除
\
think\facade\Cache
::
clear
();
return
$this
->
success
(
'更新成功'
);
}
...
...
application/admin/controller/Site.php
浏览文件 @
9fe07ee8
...
...
@@ -12,6 +12,7 @@ namespace app\admin\controller;
use
app\service\ConfigService
;
use
app\service\GoodsService
;
use
app\service\BaseConfigHandleService
;
/**
* 站点设置
...
...
@@ -223,12 +224,23 @@ class Site extends Common
{
switch
(
$nav_type
)
{
// 登录
case
'login'
:
cache
(
config
(
'shopxo.cache_user_login_left_key'
),
null
);
// 密码找回
case
'forgetpwd'
:
cache
(
config
(
'shopxo.cache_user_forgetpwd_left_key'
),
null
);
break
;
// 缓存
case
'cache'
:
$res
=
BaseConfigHandleService
::
Run
();
if
(
$res
[
'code'
]
!=
0
)
{
return
$res
;
}
break
;
}
}
...
...
application/admin/view/default/site/base.html
浏览文件 @
9fe07ee8
...
...
@@ -9,88 +9,126 @@
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/site/save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:MyUrl('admin/site/index')}}"
enctype=
"multipart/form-data"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_name.name}}
</label>
<input
type=
"text"
name=
"{{$data.home_site_name.only_tag}}"
minlength=
"1"
placeholder=
"{{$data.home_site_name.name}}"
data-validation-message=
"{{$data.home_site_name.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_name.value}}"
{{/
if
}}
required
/>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_logo.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_logo.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_logo-images-view"
data-form-name=
"home_site_logo"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_logo']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_logo"
value=
"{{$data.home_site_logo.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_logo.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_logo-images-view"
>
+选择logo
</div>
</div>
<!-- 基础配置 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
基础配置
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_name.name}}
</label>
<input
type=
"text"
name=
"{{$data.home_site_name.only_tag}}"
minlength=
"1"
placeholder=
"{{$data.home_site_name.name}}"
data-validation-message=
"{{$data.home_site_name.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_name.value}}"
{{/
if
}}
required
/>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_logo.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_logo.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_logo-images-view"
data-form-name=
"home_site_logo"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_logo']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_logo"
value=
"{{$data.home_site_logo.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_logo.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_logo-images-view"
>
+选择logo
</div>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_logo_wap.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_logo_wap.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_logo_wap-images-view"
data-form-name=
"home_site_logo_wap"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_logo_wap']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_logo_wap"
value=
"{{$data.home_site_logo_wap.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_logo_wap.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_logo_wap-images-view"
>
+选择logo
</div>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_logo_wap.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_logo_wap.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_logo_wap-images-view"
data-form-name=
"home_site_logo_wap"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_logo_wap']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_logo_wap"
value=
"{{$data.home_site_logo_wap.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_logo_wap.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_logo_wap-images-view"
>
+选择logo
</div>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_desktop_icon.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_desktop_icon.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_desktop_icon-images-view"
data-form-name=
"home_site_desktop_icon"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_desktop_icon']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_desktop_icon"
value=
"{{$data.home_site_desktop_icon.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_desktop_icon.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_desktop_icon-images-view"
>
+选择logo
</div>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{$data.home_site_desktop_icon.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_desktop_icon.describe}}
</span></label>
<ul
class=
"plug-file-upload-view home_site_desktop_icon-images-view"
data-form-name=
"home_site_desktop_icon"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
{{if !empty($data['home_site_desktop_icon']['value'])}}
<li>
<input
type=
"text"
name=
"home_site_desktop_icon"
value=
"{{$data.home_site_desktop_icon.value}}"
/>
<img
src=
"{{:AttachmentPathViewHandle($data.home_site_desktop_icon.value)}}"
/>
</li>
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.home_site_desktop_icon-images-view"
>
+选择logo
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_timezone.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_timezone.describe}}
</span></label>
<select
name=
"{{$data.common_timezone.only_tag}}"
class=
"am-radius chosen-select"
data-placeholder=
"{{$data.common_timezone.name}}"
data-validation-message=
"{{$data.common_timezone.error_tips}}"
required
>
{{foreach $site_timezone_list as $k=>$v}}
<option
value=
"{{$k}}"
{{
if
isset
($
data
['
common_timezone
']['
value
'])
and
$
data
['
common_timezone
']['
value
']
eq
$
k
}}
selected
{{/
if
}}
>
{{$v}}
</option>
{{/foreach}}
</select>
<div
class=
"am-form-group"
>
<label>
{{$data.common_timezone.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_timezone.describe}}
</span></label>
<select
name=
"{{$data.common_timezone.only_tag}}"
class=
"am-radius chosen-select"
data-placeholder=
"{{$data.common_timezone.name}}"
data-validation-message=
"{{$data.common_timezone.error_tips}}"
required
>
{{foreach $site_timezone_list as $k=>$v}}
<option
value=
"{{$k}}"
{{
if
isset
($
data
['
common_timezone
']['
value
'])
and
$
data
['
common_timezone
']['
value
']
eq
$
k
}}
selected
{{/
if
}}
>
{{$v}}
</option>
{{/foreach}}
</select>
</div>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_state.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_state.describe}}
</span></label>
<select
name=
"{{$data.home_site_state.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.home_site_state.error_tips}}"
required
>
{{foreach $site_site_state_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
home_site_state
']['
value
'])
and
$
data
['
home_site_state
']['
value
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_close_reason.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_close_reason.describe}}
</span></label>
<textarea
rows=
"3"
name=
"{{$data.home_site_close_reason.only_tag}}"
class=
"am-radius"
placeholder=
"{{$data.home_site_close_reason.name}}"
data-validation-message=
"{{$data.home_site_close_reason.error_tips}}"
>
{{if !empty($data)}}{{$data.home_site_close_reason.value}}{{/if}}
</textarea>
<!-- 站点状态 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
站点状态
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_state.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_state.describe}}
</span></label>
<select
name=
"{{$data.home_site_state.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.home_site_state.error_tips}}"
required
>
{{foreach $site_site_state_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
home_site_state
']['
value
'])
and
$
data
['
home_site_state
']['
value
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_close_reason.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_close_reason.describe}}
</span></label>
<textarea
rows=
"3"
name=
"{{$data.home_site_close_reason.only_tag}}"
class=
"am-radius"
placeholder=
"{{$data.home_site_close_reason.name}}"
data-validation-message=
"{{$data.home_site_close_reason.error_tips}}"
>
{{if !empty($data)}}{{$data.home_site_close_reason.value}}{{/if}}
</textarea>
</div>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_content_max_width.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_content_max_width.describe}}
</span></label>
<div
class=
"am-input-group am-input-group-sm"
>
<input
type=
"number"
min=
"0"
name=
"{{$data.home_content_max_width.only_tag}}"
placeholder=
"{{$data.home_content_max_width.name}}"
data-validation-message=
"{{$data.home_content_max_width.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_content_max_width.value}}"
{{/
if
}}
/>
<span
class=
"am-input-group-btn"
>
<button
class=
"am-btn am-btn-default"
type=
"button"
>
px
</button>
</span>
<!-- 备案信息 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
备案信息
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_icp.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_icp.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_icp.only_tag}}"
placeholder=
"{{$data.home_site_icp.describe}}"
data-validation-message=
"{{$data.home_site_icp.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_icp.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_security_record_name.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_security_record_name.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_security_record_name.only_tag}}"
placeholder=
"{{$data.home_site_security_record_name.describe}}"
data-validation-message=
"{{$data.home_site_security_record_name.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_security_record_name.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_security_record_url.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_security_record_url.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_security_record_url.only_tag}}"
placeholder=
"{{$data.home_site_security_record_url.describe}}"
data-validation-message=
"{{$data.home_site_security_record_url.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_security_record_url.value}}"
{{/
if
}}
/>
</div>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_static_cache_version.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_static_cache_version.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_static_cache_version.only_tag}}"
placeholder=
"{{$data.home_static_cache_version.describe}}"
data-validation-message=
"{{$data.home_static_cache_version.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_static_cache_version.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_footer_info.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_footer_info.describe}}
</span></label>
<textarea
rows=
"6"
name=
"{{$data.home_footer_info.only_tag}}"
class=
"am-radius"
placeholder=
"{{$data.home_footer_info.name}}"
data-validation-message=
"{{$data.home_footer_info.error_tips}}"
>
{{if !empty($data)}}{{$data.home_footer_info.value}}{{/if}}
</textarea>
<!-- 其它 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
其它
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_static_cache_version.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_static_cache_version.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_static_cache_version.only_tag}}"
placeholder=
"{{$data.home_static_cache_version.describe}}"
data-validation-message=
"{{$data.home_static_cache_version.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_static_cache_version.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_footer_info.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_footer_info.describe}}
</span></label>
<textarea
rows=
"6"
name=
"{{$data.home_footer_info.only_tag}}"
class=
"am-radius"
placeholder=
"{{$data.home_footer_info.name}}"
data-validation-message=
"{{$data.home_footer_info.error_tips}}"
>
{{if !empty($data)}}{{$data.home_footer_info.value}}{{/if}}
</textarea>
</div>
</div>
</div>
<div
class=
"am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0"
>
<input
type=
"hidden"
name=
"nav_type"
value=
"{{$nav_type}}"
/>
<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>
...
...
application/admin/view/default/site/beian.html
已删除
100644 → 0
浏览文件 @
d6d31945
{{include file="public/header" /}}
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- table nav start -->
{{include file="site/nav" /}}
<!-- table nav end -->
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/site/save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:MyUrl('admin/site/index', ['nav_type'=>'beian'])}}"
enctype=
"multipart/form-data"
>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_icp.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_icp.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_icp.only_tag}}"
placeholder=
"{{$data.home_site_icp.describe}}"
data-validation-message=
"{{$data.home_site_icp.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_icp.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_security_record_name.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_security_record_name.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_security_record_name.only_tag}}"
placeholder=
"{{$data.home_site_security_record_name.describe}}"
data-validation-message=
"{{$data.home_site_security_record_name.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_security_record_name.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_site_security_record_url.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_site_security_record_url.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.home_site_security_record_url.only_tag}}"
placeholder=
"{{$data.home_site_security_record_url.describe}}"
data-validation-message=
"{{$data.home_site_security_record_url.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.home_site_security_record_url.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0"
>
<input
type=
"hidden"
name=
"nav_type"
value=
"{{$nav_type}}"
/>
<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>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/admin/view/default/site/cache.html
0 → 100644
浏览文件 @
9fe07ee8
{{include file="public/header" /}}
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- table nav start -->
{{include file="site/nav" /}}
<!-- table nav end -->
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:MyUrl('admin/site/save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:MyUrl('admin/site/index', ['nav_type'=>'cache'])}}"
enctype=
"multipart/form-data"
>
<!-- 基础配置 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
基础配置
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.common_session_is_use_cache.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_session_is_use_cache.describe}}
</span></label>
<select
name=
"{{$data.common_session_is_use_cache.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.common_session_is_use_cache.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
common_session_is_use_cache
']['
value
'])
and
$
data
['
common_session_is_use_cache
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_data_is_use_cache.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_data_is_use_cache.describe}}
</span></label>
<select
name=
"{{$data.common_data_is_use_cache.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.common_data_is_use_cache.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
common_data_is_use_cache
']['
value
'])
and
$
data
['
common_data_is_use_cache
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
</div>
</div>
<!-- Redis配置 -->
<div
class=
"am-panel am-panel-default"
>
<div
class=
"am-panel-hd"
>
<h3
class=
"am-panel-title"
>
Redis配置
</h3>
</div>
<div
class=
"am-panel-bd"
>
<div
class=
"am-form-group"
>
<label>
{{$data.common_cache_redis_host.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_cache_redis_host.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.common_cache_redis_host.only_tag}}"
placeholder=
"{{$data.common_cache_redis_host.describe}}"
data-validation-message=
"{{$data.common_cache_redis_host.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_cache_redis_host.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_cache_redis_port.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_cache_redis_port.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.common_cache_redis_port.only_tag}}"
placeholder=
"{{$data.common_cache_redis_port.describe}}"
data-validation-message=
"{{$data.common_cache_redis_port.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_cache_redis_port.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_cache_redis_password.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_cache_redis_password.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.common_cache_redis_password.only_tag}}"
placeholder=
"{{$data.common_cache_redis_password.describe}}"
data-validation-message=
"{{$data.common_cache_redis_password.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_cache_redis_password.value}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_cache_redis_expire.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_cache_redis_expire.describe}}
</span></label>
<div
class=
"am-input-group am-input-group-sm"
>
<input
type=
"number"
min=
"0"
name=
"{{$data.common_cache_redis_expire.only_tag}}"
placeholder=
"{{$data.common_cache_redis_expire.name}}"
data-validation-message=
"{{$data.common_cache_redis_expire.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_cache_redis_expire.value}}"
{{/
if
}}
/>
<span
class=
"am-input-group-btn"
>
<button
class=
"am-btn am-btn-default"
type=
"button"
>
秒
</button>
</span>
</div>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_cache_redis_prefix.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.common_cache_redis_prefix.describe}}
</span></label>
<input
type=
"text"
name=
"{{$data.common_cache_redis_prefix.only_tag}}"
placeholder=
"{{$data.common_cache_redis_prefix.describe}}"
data-validation-message=
"{{$data.common_cache_redis_prefix.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.common_cache_redis_prefix.value}}"
{{/
if
}}
/>
</div>
</div>
</div>
<div
class=
"am-form-group am-form-group-refreshing am-margin-top-lg am-padding-left-0"
>
<input
type=
"hidden"
name=
"nav_type"
value=
"{{$nav_type}}"
/>
<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>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/admin/view/default/site/nav.html
浏览文件 @
9fe07ee8
...
...
@@ -5,9 +5,6 @@
<li
{{
if
$
nav_type
eq
'
siteset
'}}
class=
"am-active"
{{/
if
}}
data-type=
"siteset"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'siteset'])}}"
>
网站设置
</a>
</li>
<li
{{
if
$
nav_type
eq
'
beian
'}}
class=
"am-active"
{{/
if
}}
data-type=
"beian"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'beian'])}}"
>
备案信息
</a>
</li>
<li
{{
if
$
nav_type
eq
'
sitetype
'}}
class=
"am-active"
{{/
if
}}
data-type=
"sitetype"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'sitetype'])}}"
>
站点类型
</a>
</li>
...
...
@@ -20,15 +17,18 @@
<li
{{
if
$
nav_type
eq
'
forgetpwd
'}}
class=
"am-active"
{{/
if
}}
data-type=
"forgetpwd"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'forgetpwd'])}}"
>
密码找回
</a>
</li>
<li
{{
if
$
nav_type
eq
'
attachment
'}}
class=
"am-active"
{{/
if
}}
data-type=
"attachment"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'attachment'])}}"
>
附件
</a>
</li>
<li
{{
if
$
nav_type
eq
'
verify
'}}
class=
"am-active"
{{/
if
}}
data-type=
"verify"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'verify'])}}"
>
验证码
</a>
</li>
<li
{{
if
$
nav_type
eq
'
orderaftersale
'}}
class=
"am-active"
{{/
if
}}
data-type=
"orderaftersale"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'orderaftersale'])}}"
>
订单售后
</a>
</li>
<li
{{
if
$
nav_type
eq
'
attachment
'}}
class=
"am-active"
{{/
if
}}
data-type=
"attachment"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'attachment'])}}"
>
附件
</a>
</li>
<li
{{
if
$
nav_type
eq
'
cache
'}}
class=
"am-active"
{{/
if
}}
data-type=
"cache"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'cache'])}}"
>
缓存
</a>
</li>
<li
{{
if
$
nav_type
eq
'
extends
'}}
class=
"am-active"
{{/
if
}}
data-type=
"extends"
>
<a
href=
"{{:MyUrl('admin/site/index', ['nav_type'=>'extends'])}}"
>
扩展项
</a>
</li>
...
...
application/index/controller/Common.php
浏览文件 @
9fe07ee8
...
...
@@ -350,11 +350,6 @@ class Common extends Controller
$this
->
assign
(
'home_seo_site_keywords'
,
MyC
(
'home_seo_site_keywords'
));
$this
->
assign
(
'home_seo_site_description'
,
MyC
(
'home_seo_site_description'
));
// 页面最大宽度
$max_width
=
MyC
(
'home_content_max_width'
,
0
,
true
);
$max_width_style
=
(
$max_width
==
0
)
?
''
:
'max-width:'
.
$max_width
.
'px;'
;
$this
->
assign
(
'max_width_style'
,
$max_width_style
);
// 用户数据
$this
->
assign
(
'user'
,
$this
->
user
);
...
...
application/service/BaseConfigHandleService.php
0 → 100644
浏览文件 @
9fe07ee8
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace
app\service
;
/**
* 基础配置处理服务层
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-25
* @desc description
*/
class
BaseConfigHandleService
{
/**
* 运行入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-25
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
Run
(
$params
=
[])
{
// session配置
$ret
=
self
::
SessionHandle
(
$params
);
if
(
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
}
// cache配置
$ret
=
self
::
CacheHandle
(
$params
);
if
(
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
}
}
/**
* session配置处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-25
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
SessionHandle
(
$params
=
[])
{
if
(
MyC
(
'common_session_is_use_cache'
)
==
1
)
{
$config
=
[
// 使用redis
'type'
=>
'redis'
,
// 连接地址
'host'
=>
MyC
(
'common_cache_redis_host'
,
'127.0.0.1'
,
true
),
// 端口号
'port'
=>
MyC
(
'common_cache_redis_port'
,
6379
,
true
),
// 密码
'password'
=>
MyC
(
'common_cache_redis_password'
,
''
,
true
),
// 全局缓存有效期、默认3600秒
'expire'
=>
MyC
(
'common_cache_redis_expire'
,
3600
,
true
),
// 缓存前缀
'prefix'
=>
MyC
(
'common_cache_redis_prefix'
,
'shopxo'
,
true
),
];
}
else
{
$config
=
[
// session_id
'id'
=>
''
,
// SESSION_ID的提交变量,解决flash上传跨域
'var_session_id'
=>
''
,
// SESSION 前缀
'prefix'
=>
'shopxo'
,
// 驱动方式 支持redis memcache memcached
'type'
=>
''
,
// 是否自动开启 SESSION
'auto_start'
=>
true
,
];
}
// 配置文件
$config_file
=
ROOT
.
'config'
.
DS
.
'session.php'
;
// 保存文件
return
self
::
ConfigFileSave
(
$config_file
,
$config
,
'Session配置'
);
}
/**
* cache配置处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-25
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
CacheHandle
(
$params
=
[])
{
// 是否使用缓存
if
(
MyC
(
'common_data_is_use_cache'
)
==
1
)
{
$config
=
[
// 使用redis
'type'
=>
'redis'
,
// 连接地址
'host'
=>
MyC
(
'common_cache_redis_host'
,
'127.0.0.1'
,
true
),
// 端口号
'port'
=>
MyC
(
'common_cache_redis_port'
,
6379
,
true
),
// 密码
'password'
=>
MyC
(
'common_cache_redis_password'
,
''
,
true
),
// 全局缓存有效期(0为永久有效)
'expire'
=>
MyC
(
'common_cache_redis_expire'
,
0
,
true
),
// 缓存前缀
'prefix'
=>
MyC
(
'common_cache_redis_prefix'
,
'shopxo'
,
true
),
];
}
else
{
$config
=
[
// 驱动方式
'type'
=>
'File'
,
// 缓存保存目录
'path'
=>
''
,
// 缓存前缀
'prefix'
=>
'shopxo'
,
// 缓存有效期 0表示永久缓存
'expire'
=>
0
,
];
}
// 配置文件
$config_file
=
ROOT
.
'config'
.
DS
.
'cache.php'
;
// 保存文件
return
self
::
ConfigFileSave
(
$config_file
,
$config
,
'缓存配置'
);
}
/**
* 配置文件保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-25
* @desc description
* @param [string] $config_file [文件路径]
* @param [array] $config [配置信息]
* @param [string] $name [描述名称]
*/
private
static
function
ConfigFileSave
(
$config_file
,
$config
,
$name
)
{
// 是否有写权限
if
(
file_exists
(
$config_file
)
&&
!
is_writable
(
$config_file
))
{
return
DataReturn
(
'缓存配置文件没有操作权限'
.
'['
.
$config_file
.
']'
,
-
3
);
}
// 生成配置文件
$ret
=
@
file_put_contents
(
$config_file
,
"<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
//
{
$name
}
\n
return "
.
var_export
(
$config
,
true
)
.
";
\n
?>"
);
if
(
$ret
===
false
)
{
return
DataReturn
(
$name
.
'处理失败['
.
$config_file
.
']'
,
-
10
);
}
return
DataReturn
(
'处理成功'
,
0
);
}
}
?>
\ No newline at end of file
config/.gitignore
浏览文件 @
9fe07ee8
database.php
\ No newline at end of file
database.php
cache.php
session.php
\ No newline at end of file
config/cache.php
已删除
100755 → 0
浏览文件 @
d6d31945
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
return
[
// 驱动方式
'type'
=>
'File'
,
// 缓存保存目录
'path'
=>
''
,
// 缓存前缀
'prefix'
=>
''
,
// 缓存有效期 0表示永久缓存
'expire'
=>
0
,
];
?>
\ No newline at end of file
config/session.php
已删除
100755 → 0
浏览文件 @
d6d31945
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | 会话设置
// +----------------------------------------------------------------------
return
[
'id'
=>
''
,
// SESSION_ID的提交变量,解决flash上传跨域
'var_session_id'
=>
''
,
// SESSION 前缀
'prefix'
=>
'shopxo'
,
// 驱动方式 支持redis memcache memcached
'type'
=>
''
,
// 是否自动开启 SESSION
'auto_start'
=>
true
,
];
?>
\ No newline at end of file
public/static/common/css/common.css
浏览文件 @
9fe07ee8
...
...
@@ -54,7 +54,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom:
/**
* 公共提示信息
*/
#common-prompt
{
position
:
fixed
;
top
:
20px
;
left
:
0
;
right
:
0
;
text-align
:
center
;
padding
:
10px
15px
;
font-size
:
14px
;
z-index
:
10000
;
border-radius
:
2px
;
width
:
260px
;
margin
:
0
auto
;}
#common-prompt
{
position
:
fixed
;
top
:
20px
;
left
:
0
;
right
:
0
;
text-align
:
center
;
padding
:
10px
15px
;
font-size
:
14px
;
z-index
:
10000
;
border-radius
:
2px
;
width
:
260px
;
margin
:
0
auto
;
word-break
:
break-all
;
}
#common-prompt
.am-alert-danger
{
background-color
:
#fef0f0
;
border-color
:
#f9d4d4
;
color
:
#f56c6c
;
box-shadow
:
0
2px
4px
#fef0f0
,
0
0
6px
rgba
(
0
,
0
,
0
,
0
);
}
#common-prompt
.am-alert-warning
{
background-color
:
#ffe7d5
;
border-color
:
#fbceac
;
color
:
#f37b1d
;
box-shadow
:
0
2px
4px
#ffe7d5
,
0
0
6px
rgba
(
0
,
0
,
0
,
0
);
}
#common-prompt
.am-alert-success
{
background-color
:
#e3fbd6
;
border-color
:
#bbe8a3
;
color
:
#67c23a
;
box-shadow
:
0
2px
4px
#e3fbd6
,
0
0
6px
rgba
(
0
,
0
,
0
,
0
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录