Merge branch 'master' into develop
commit
a30bbfff51
|
|
@ -41,6 +41,15 @@ ThinkPHP是一个快速、简单的基于MVC和面向对象的轻量级PHP开发
|
|||
##### 轻量级,高性能
|
||||
Amaze UI 面向 HTML5 开发,使用 CSS3 来做动画交互,平滑、高效,更适合移动设备,让 Web 应用更快速载入。
|
||||
|
||||
# 小程序图片展示(微信、支付宝)
|
||||

|
||||
|
||||
# PC端图片展示
|
||||

|
||||
|
||||
# 后台管理图片展示
|
||||

|
||||
|
||||
# 项目结构
|
||||
```
|
||||
shopxo
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ return [
|
|||
'imageUrlPrefix' => '',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'imagePathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'imagePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
|
||||
// 涂鸦图片上传配置项
|
||||
|
|
@ -70,7 +70,7 @@ return [
|
|||
'scrawlFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'scrawlPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'scrawlPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 上传大小限制,单位B
|
||||
'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true),
|
||||
|
|
@ -87,7 +87,7 @@ return [
|
|||
'snapscreenActionName' => 'uploadimage',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'snapscreenPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'snapscreenPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 图片访问路径前缀
|
||||
'snapscreenUrlPrefix' => '',
|
||||
|
|
@ -107,7 +107,7 @@ return [
|
|||
'catcherFieldName' => 'source',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'catcherPathFormat' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'catcherPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 图片访问路径前缀
|
||||
'catcherUrlPrefix' => '',
|
||||
|
|
@ -127,7 +127,7 @@ return [
|
|||
'videoFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'videoPathFormat' => __MY_ROOT__.'static/upload/video/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'videoPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/video/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 视频访问路径前缀
|
||||
'videoUrlPrefix' => '',
|
||||
|
|
@ -147,7 +147,7 @@ return [
|
|||
'fileFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'filePathFormat' => __MY_ROOT__.'static/upload/file/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'filePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/file/'.input('path_type', 'other').'/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 文件访问路径前缀
|
||||
'fileUrlPrefix' => '',
|
||||
|
|
@ -164,7 +164,7 @@ return [
|
|||
'imageManagerActionName'=> 'listimage',
|
||||
|
||||
// 指定要列出图片的目录
|
||||
'imageManagerListPath' => __MY_ROOT__.'static/upload/images/'.input('path_type', 'other').'/',
|
||||
'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.input('path_type', 'other').'/',
|
||||
|
||||
// 每次列出文件数量
|
||||
'imageManagerListSize' => 20,
|
||||
|
|
@ -184,7 +184,7 @@ return [
|
|||
'fileManagerActionName' => 'listfile',
|
||||
|
||||
// 指定要列出文件的目录
|
||||
'fileManagerListPath' => __MY_ROOT__.'static/upload/file/'.input('path_type', 'other').'/',
|
||||
'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.input('path_type', 'other').'/',
|
||||
|
||||
// 文件访问路径前缀
|
||||
'fileManagerUrlPrefix' => '',
|
||||
|
|
@ -199,7 +199,7 @@ return [
|
|||
'videoManagerActionName' => 'listvideo',
|
||||
|
||||
// 指定要列出文件的目录
|
||||
'videoManagerListPath' => __MY_ROOT__.'static/upload/video/'.input('path_type', 'other').'/',
|
||||
'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.input('path_type', 'other').'/',
|
||||
|
||||
// 文件访问路径前缀
|
||||
'videoManagerUrlPrefix' => '',
|
||||
|
|
|
|||
|
|
@ -76,7 +76,17 @@ class AppMiniAlipayList extends Common
|
|||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 配置内容
|
||||
$app_mini_title = MyC('common_app_mini_alipay_title');
|
||||
$app_mini_describe = MyC('common_app_mini_alipay_describe');
|
||||
if(empty($app_mini_title) || empty($app_mini_describe))
|
||||
{
|
||||
return DataReturn('配置信息不能为空', -1);
|
||||
}
|
||||
|
||||
// 开始操作
|
||||
$this->params['app_mini_title'] = $app_mini_title;
|
||||
$this->params['app_mini_describe'] = $app_mini_describe;
|
||||
return AppMiniService::Created($this->params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,17 @@ class AppMiniWeixinList extends Common
|
|||
$this->error('非法访问');
|
||||
}
|
||||
|
||||
// 配置内容
|
||||
$app_mini_title = MyC('common_app_mini_weixin_title');
|
||||
$app_mini_describe = MyC('common_app_mini_weixin_describe');
|
||||
if(empty($app_mini_title) || empty($app_mini_describe))
|
||||
{
|
||||
return DataReturn('配置信息不能为空', -1);
|
||||
}
|
||||
|
||||
// 开始操作
|
||||
$this->params['app_mini_title'] = $app_mini_title;
|
||||
$this->params['app_mini_describe'] = $app_mini_describe;
|
||||
return AppMiniService::Created($this->params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class Common extends Controller
|
|||
ConfigService::ConfigInit();
|
||||
|
||||
// url模式,后端采用兼容模式
|
||||
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
|
||||
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class Ueditor extends Common
|
|||
$path = input('path');
|
||||
if(!empty($path))
|
||||
{
|
||||
$path = (__MY_ROOT__ == '/') ? substr(ROOT_PATH, 0, -1).$path : str_replace(__MY_ROOT__, ROOT_PATH, $path);
|
||||
$path = (__MY_ROOT_PUBLIC__ == '/') ? substr(ROOT_PATH, 0, -1).$path : str_replace(__MY_ROOT_PUBLIC__, ROOT_PATH, $path);
|
||||
if(file_exists($path))
|
||||
{
|
||||
if(is_writable($path))
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
<option value="">请选择...</option>
|
||||
{{foreach $article_list as $v}}
|
||||
<optgroup label="{{$v.name}}">
|
||||
<notempty name="v.items">
|
||||
{{if !empty($v['items'])}}
|
||||
{{foreach $v.items as $vs}}
|
||||
<option value="{{$vs.id}}">{{$vs.title}}</option>
|
||||
{{/foreach}}
|
||||
|
|
@ -254,9 +254,11 @@
|
|||
{{if !empty($v['items'])}}
|
||||
{{foreach $v.items as $vs}}
|
||||
<option style="padding-left: 30px;" value="{{$vs.id}}" {{if !empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])}}selected{{/if}}>二级 - {{$vs.name}}</option>
|
||||
{{foreach $vs.items as $vss}}
|
||||
<option style="padding-left: 60px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>三级 - {{$vss.name}}</option>
|
||||
{{/foreach}}
|
||||
{{if !empty($vs['items'])}}
|
||||
{{foreach $vs.items as $vss}}
|
||||
<option style="padding-left: 60px;" value="{{$vss.id}}" {{if !empty($data['category_ids']) and in_array($vss['id'], $data['category_ids'])}}selected{{/if}}>三级 - {{$vss.name}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
|
|
|||
|
|
@ -6,29 +6,29 @@
|
|||
</html>
|
||||
|
||||
<!-- 类库 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/echarts/echarts.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/echarts/echarts.min.js"></script>
|
||||
|
||||
<!-- ueditor 编辑器 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.config.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.all.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.config.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.all.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js"></script>
|
||||
|
||||
<!-- 颜色选择器 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/colorpicker/jquery.colorpicker.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/colorpicker/jquery.colorpicker.js"></script>
|
||||
|
||||
<!-- 元素拖拽排序插件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/dragsort/jquery.dragsort-0.5.2.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/dragsort/jquery.dragsort-0.5.2.min.js"></script>
|
||||
|
||||
<!-- amazeui插件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.min.js"></script>
|
||||
|
||||
<!-- 日期组件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
|
||||
|
||||
<!-- 隐藏编辑器初始化 -->
|
||||
<script type="text/javascript">
|
||||
|
|
@ -46,9 +46,9 @@
|
|||
</script>
|
||||
|
||||
<!-- 项目公共 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js"></script>
|
||||
|
||||
<!-- 控制器 -->
|
||||
{{if !empty($module_js)}}
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/{{$module_js}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}"></script>
|
||||
{{/if}}
|
||||
|
|
@ -5,15 +5,15 @@
|
|||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1" />
|
||||
<title>ShopXO后台管理系统</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/admin/{{$default_theme}}/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/admin/{{$default_theme}}/css/iconfontmenu.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/admin/{{$default_theme}}/css/iconfontmenu.css" />
|
||||
{{if !empty($module_css)}}
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/{{$module_css}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}" />
|
||||
{{/if}}
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Common extends Controller
|
|||
ConfigService::ConfigInit();
|
||||
|
||||
// url模式,后端采用兼容模式
|
||||
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
|
||||
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class Common extends Controller
|
|||
// url模式
|
||||
if(MyC('home_seo_url_model', 0) == 0)
|
||||
{
|
||||
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
|
||||
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,36 +12,36 @@
|
|||
</html>
|
||||
|
||||
<!-- 类库 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/imagezoom/jquery.imagezoom.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/imagezoom/jquery.imagezoom.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- amazeui插件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-dialog/amazeui.dialog.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 图像裁剪插件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- ueditor 编辑器 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 颜色选择器 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 日期组件 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/My97DatePicker/WdatePicker.js"></script>
|
||||
|
||||
<!-- 项目公共 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 控制器 -->
|
||||
{{if !empty($module_js)}}
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_js}}?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
{{/if}}
|
||||
{{:MyC('home_footer_info')}}
|
||||
|
|
@ -17,20 +17,20 @@
|
|||
<link rel="apple-touch-icon" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
<link rel="apple-touch-icon-precomposed" href="{{$images_host}}{{:MyC('home_site_desktop_icon')}}">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/index/{{$default_theme}}/css/common.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/css/common.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
{{if !empty($module_css)}}
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/{{$module_css}}?v={{:MyC('home_static_cache_version')}}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/{{$module_css}}?v={{:MyC('home_static_cache_version')}}" />
|
||||
{{/if}}
|
||||
<script type="text/javascript">
|
||||
var __root__ = '{{$Think.__MY_ROOT__}}';
|
||||
var __root__ = '{{$Think.__MY_ROOT_PUBLIC__}}';
|
||||
var __my_url__ = '{{:__MY_URL__}}';
|
||||
var __public__ = '{{$Think.__MY_ROOT__}}';
|
||||
var __public__ = '{{$Think.__MY_ROOT_PUBLIC__}}';
|
||||
var __default_theme__ = '{{$default_theme}}';
|
||||
var __modal_login_url__ = '{{:Url("index/user/modallogininfo")}}';
|
||||
var __images_host__ = '{{$images_host}}';
|
||||
|
|
@ -41,9 +41,9 @@
|
|||
|
||||
<!-- 商城公告 -->
|
||||
{{if MyC('home_site_state') == 1 and (!isset($is_header) or $is_header eq 1)}}
|
||||
<notempty name="common_shop_notice">
|
||||
{{if !empty($common_shop_notice)}}
|
||||
<div class="am-alert am-alert-warning am-radius common-shop-notice" data-am-alert>
|
||||
<div class="am-container">{{$common_shop_notice}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
@ -15,13 +15,13 @@
|
|||
<form action="{{:MyUrl('index/search/index')}}" method="POST">
|
||||
<input id="search-input" name="keywords" type="text" placeholder="其实搜索很简单^_^ !" value="{{if !empty($params['keywords'])}}{{$params.keywords}}{{/if}}" autocomplete="off" />
|
||||
<input id="ai-topsearch" class="submit am-btn" placeholder="其实搜索很简单^_^ !" index="1" type="submit" value="搜索" />
|
||||
<notempty name="home_search_keywords">
|
||||
{{if !empty($home_search_keywords)}}
|
||||
<ul class="search-hot-keywords">
|
||||
{{foreach $home_search_keywords as $v}}
|
||||
<li><a href="{{:MyUrl('index/search/index', ['keywords'=>$v])}}" target="_blank">{{$v}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</notempty>
|
||||
{{/if}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Common extends Controller
|
|||
parent::__construct();
|
||||
|
||||
// url模式
|
||||
\think\facade\Url::root(__MY_ROOT__.'index.php?s=');
|
||||
\think\facade\Url::root(__MY_ROOT_PUBLIC__.'index.php?s=');
|
||||
|
||||
// 当前方法
|
||||
$this->assign('action', strtolower(request()->action()));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</html>
|
||||
|
||||
<!-- 类库 -->
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/lib/assets/js/amazeui.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/common/js/common.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT__}}static/install/js/index.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/jquery/jquery-2.1.0.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/js/amazeui.min.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js"></script>
|
||||
<script type='text/javascript' src="{{$Think.__MY_ROOT_PUBLIC__}}static/install/js/index.js"></script>
|
||||
|
|
@ -12,11 +12,11 @@
|
|||
<link rel="shortcut icon" type="image/x-icon" href="{{:__MY_URL__}}favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/assets/css/amazeui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/lib/cropper/cropper.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/assets/css/amazeui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-switch/amazeui.switch.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/amazeui-chosen/amazeui.chosen.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/cropper/cropper.min.css" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/common/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT__}}static/install/css/index.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/common/css/common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{$Think.__MY_ROOT_PUBLIC__}}static/install/css/index.css" />
|
||||
<body>
|
||||
|
|
@ -104,9 +104,7 @@ class AppMiniService
|
|||
self::Init($params);
|
||||
|
||||
// 配置内容
|
||||
$app_mini_alipay_title = MyC('common_app_mini_alipay_title');
|
||||
$app_mini_alipay_describe = MyC('common_app_mini_alipay_describe');
|
||||
if(empty($app_mini_alipay_title) || empty($app_mini_alipay_describe))
|
||||
if(empty($params['app_mini_title']) || empty($params['app_mini_describe']))
|
||||
{
|
||||
return DataReturn('配置信息不能为空', -1);
|
||||
}
|
||||
|
|
@ -141,14 +139,14 @@ class AppMiniService
|
|||
|
||||
// 替换内容
|
||||
// app.js
|
||||
$status = file_put_contents($new_dir.DS.'app.js', str_replace(['{{request_url}}', '{{application_title}}', '{{application_describe}}'], [__MY_URL__, $app_mini_alipay_title, $app_mini_alipay_describe], file_get_contents($new_dir.DS.'app.js')));
|
||||
$status = file_put_contents($new_dir.DS.'app.js', str_replace(['{{request_url}}', '{{application_title}}', '{{application_describe}}'], [__MY_URL__, $params['app_mini_title'], $params['app_mini_describe']], file_get_contents($new_dir.DS.'app.js')));
|
||||
if($status === false)
|
||||
{
|
||||
return DataReturn('基础配置替换失败', -4);
|
||||
}
|
||||
|
||||
// app.json
|
||||
$status = file_put_contents($new_dir.DS.'app.json', str_replace(['{{application_title}}'], [$app_mini_alipay_title], file_get_contents($new_dir.DS.'app.json')));
|
||||
$status = file_put_contents($new_dir.DS.'app.json', str_replace(['{{application_title}}'], [$params['app_mini_title']], file_get_contents($new_dir.DS.'app.json')));
|
||||
if($status === false)
|
||||
{
|
||||
return DataReturn('基础配置替换失败', -4);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class ResourcesService
|
|||
|
||||
// 内容写入
|
||||
case 'add':
|
||||
return str_replace(array(__MY_PUBLIC_URL__.'static/', __MY_ROOT__.'static/'), '/static/', $content);
|
||||
return str_replace(array(__MY_PUBLIC_URL__.'static/', __MY_ROOT_PUBLIC__.'static/'), '/static/', $content);
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ class ResourcesService
|
|||
*/
|
||||
public static function AttachmentPathHandle($value)
|
||||
{
|
||||
return empty($value) ? '' : str_replace([__MY_PUBLIC_URL__, __MY_ROOT__], DS, $value);
|
||||
return empty($value) ? '' : str_replace([__MY_PUBLIC_URL__, __MY_ROOT_PUBLIC__], DS, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -42,9 +42,14 @@ class ThemeService
|
|||
{
|
||||
if($dh = opendir($dir))
|
||||
{
|
||||
$default_preview = __MY_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg';
|
||||
$default_preview = __MY_PUBLIC_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg';
|
||||
while(($temp_file = readdir($dh)) !== false)
|
||||
{
|
||||
if(in_array($temp_file, ['.', '..', 'index.html']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$config = $dir.$temp_file.DS.'config.json';
|
||||
if(!file_exists($config))
|
||||
{
|
||||
|
|
@ -66,7 +71,7 @@ class ThemeService
|
|||
'ver' => str_replace(array(',',','), ', ', htmlentities($data['ver'])),
|
||||
'author' => htmlentities($data['author']),
|
||||
'home' => isset($data['home']) ? $data['home'] : '',
|
||||
'preview' => file_exists($preview) ? __MY_URL__.'static'.DS.'index'.DS.$temp_file.DS.'images'.DS.'preview.jpg' : $default_preview,
|
||||
'preview' => file_exists($preview) ? __MY_PUBLIC_URL__.'static'.DS.'index'.DS.$temp_file.DS.'images'.DS.'preview.jpg' : $default_preview,
|
||||
'is_delete' => ($temp_file == 'default') ? 0 : 1,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,14 +45,18 @@ class FileUtil
|
|||
*/
|
||||
public static function CreateDir($aim_url)
|
||||
{
|
||||
// 根目录前不参与,避免虚拟机没有权限
|
||||
$aim_dir = ROOT;
|
||||
$aim_url = str_replace($aim_dir, '', $aim_url);
|
||||
|
||||
// 空转成目录
|
||||
$aim_url = str_replace('', '/', $aim_url);
|
||||
$aim_dir = '';
|
||||
$arr = explode('/', $aim_url);
|
||||
$result = true;
|
||||
foreach($arr as $str)
|
||||
{
|
||||
$aim_dir .= $str . '/';
|
||||
if(!file_exists($aim_dir))
|
||||
if($aim_dir != '/' && !is_dir($aim_dir))
|
||||
{
|
||||
$result = mkdir($aim_dir);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,39 +9,39 @@
|
|||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 检测PHP环境
|
||||
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
|
||||
|
||||
// 开启缓冲区
|
||||
ob_start();
|
||||
|
||||
// 检测PHP环境
|
||||
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
|
||||
|
||||
// HTTP类型
|
||||
define('__MY_HTTP__', (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? 'http' : 'https');
|
||||
|
||||
// 根目录
|
||||
$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')+1);
|
||||
|
||||
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root.'public/' : $my_root);
|
||||
|
||||
// 项目HOST
|
||||
define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']);
|
||||
|
||||
// 项目URL地址
|
||||
define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.$my_root);
|
||||
|
||||
// 项目public目录URL地址
|
||||
define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT__);
|
||||
|
||||
// 当前页面url地址
|
||||
$request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
|
||||
define('__MY_VIEW_URL__', substr(__MY_URL__, 0, -1).$request_url);
|
||||
|
||||
// 系统版本
|
||||
define('APPLICATION_VERSION', 'v1.2.0');
|
||||
|
||||
// 定义系统目录分隔符
|
||||
define('DS', '/');
|
||||
|
||||
// HTTP类型
|
||||
define('__MY_HTTP__', (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? 'http' : 'https');
|
||||
|
||||
// 根目录
|
||||
$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 1, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
||||
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root : str_replace('public'.DS, '', $my_root));
|
||||
define('__MY_ROOT_PUBLIC__', defined('IS_ROOT_ACCESS') ? DS.$my_root.'public'.DS : DS.$my_root);
|
||||
|
||||
// 项目HOST
|
||||
define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']);
|
||||
|
||||
// 项目URL地址
|
||||
define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.DS.$my_root);
|
||||
|
||||
// 项目public目录URL地址
|
||||
define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT_PUBLIC__);
|
||||
|
||||
// 当前页面url地址
|
||||
$request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
|
||||
define('__MY_VIEW_URL__', substr(__MY_URL__, 0, -1).$request_url);
|
||||
|
||||
// 系统根目录
|
||||
define('ROOT_PATH', dirname(__FILE__).DS);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue