Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
3001fa16
ShopXO
项目概览
飞鱼0526
/
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,发现更多精彩内容 >>
提交
3001fa16
编写于
6月 22, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传附件组件开关优化、拖拽设计优化
上级
20c867cc
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
69 addition
and
19 deletion
+69
-19
application/admin/controller/Common.php
application/admin/controller/Common.php
+3
-0
application/admin/view/default/public/footer.html
application/admin/view/default/public/footer.html
+1
-1
application/index/controller/Common.php
application/index/controller/Common.php
+4
-0
application/index/view/default/public/footer.html
application/index/view/default/public/footer.html
+1
-1
application/layout/service/BaseLayout.php
application/layout/service/BaseLayout.php
+32
-2
application/layout/view/public/offcanvas/offcanvas_module_config_images.html
...view/public/offcanvas/offcanvas_module_config_images.html
+2
-2
application/layout/view/public/offcanvas/offcanvas_module_config_many_images.html
...public/offcanvas/offcanvas_module_config_many_images.html
+1
-1
application/layout/view/public/offcanvas/offcanvas_module_config_video.html
.../view/public/offcanvas/offcanvas_module_config_video.html
+1
-1
application/layout/view/public/popup/popup_module_goods_search.html
...n/layout/view/public/popup/popup_module_goods_search.html
+5
-1
public/static/common/css/layout.admin.css
public/static/common/css/layout.admin.css
+14
-0
public/static/common/images/module-default-images.png
public/static/common/images/module-default-images.png
+0
-0
public/static/common/js/layout.admin.js
public/static/common/js/layout.admin.js
+5
-10
未找到文件。
application/admin/controller/Common.php
浏览文件 @
3001fa16
...
...
@@ -268,6 +268,9 @@ class Common extends Controller
// 默认不加载百度地图api
$this
->
assign
(
'is_load_baidu_map_api'
,
0
);
// 是否加载附件组件
$this
->
assign
(
'is_load_upload_editor'
,
!
empty
(
$this
->
admin
)
?
1
:
0
);
// 站点名称
$this
->
assign
(
'admin_theme_site_name'
,
MyC
(
'admin_theme_site_name'
,
'ShopXO'
,
true
));
...
...
application/admin/view/default/public/footer.html
浏览文件 @
3001fa16
...
...
@@ -51,7 +51,7 @@
</div>
<!-- commom html -->
<textarea
id=
"upload-editor-view"
data-url=
"{{
:MyUrl('admin/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])
}}"
style=
"display: none;"
></textarea>
<textarea
id=
"upload-editor-view"
data-url=
"{{
if isset($is_load_upload_editor) and $is_load_upload_editor eq 1}}{{:MyUrl('admin/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if
}}"
style=
"display: none;"
></textarea>
<!-- 公共底部钩子 -->
{{if !empty($plugins_admin_view_common_bottom_data) and is_array($plugins_admin_view_common_bottom_data) and (!isset($is_footer) or $is_footer eq 1)}}
...
...
application/index/controller/Common.php
浏览文件 @
3001fa16
...
...
@@ -24,6 +24,7 @@ use app\service\SearchService;
use
app\service\ConfigService
;
use
app\service\LinkService
;
use
app\service\UserService
;
use
app\service\AdminService
;
use
app\service\QuickNavService
;
/**
...
...
@@ -427,6 +428,9 @@ class Common extends Controller
// 默认不加载百度地图api
$this
->
assign
(
'is_load_baidu_map_api'
,
0
);
// 是否加载附件组件
$this
->
assign
(
'is_load_upload_editor'
,
(
!
empty
(
$this
->
user
)
||
AdminService
::
LoginInfo
())
?
1
:
0
);
// 存在地图事件则载入
if
(
in_array
(
3
,
array_column
(
$this
->
nav_quick
,
'event_type'
)))
{
...
...
application/index/view/default/public/footer.html
浏览文件 @
3001fa16
<!-- commom html -->
<textarea
id=
"upload-editor-view"
data-url=
"{{if
!empty($user)
}}{{:MyUrl('index/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if}}"
style=
"display: none;"
></textarea>
<textarea
id=
"upload-editor-view"
data-url=
"{{if
isset($is_load_upload_editor) and $is_load_upload_editor eq 1
}}{{:MyUrl('index/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}{{/if}}"
style=
"display: none;"
></textarea>
<!-- footer start -->
{{if !isset($is_footer) or $is_footer eq 1}}
...
...
application/layout/service/BaseLayout.php
浏览文件 @
3001fa16
...
...
@@ -431,13 +431,43 @@ class BaseLayout
case
'goods'
:
if
(
!
empty
(
$value
)
&&
$value
[
'id'
])
{
$url
=
MyUrl
(
'index/goods/index'
,
[
'id'
=>
$value
[
'id'
]])
;
$url
=
(
$client_type
==
'pc'
)
?
MyUrl
(
'index/goods/index'
,
[
'id'
=>
$value
[
'id'
]])
:
'/pages/goods-detail/goods-detail?goods_id='
.
$value
[
'id'
]
;
}
break
;
// 商品分类
case
'goods_search'
:
$url
=
'goods_search'
;
$gsp
=
[];
if
(
!
empty
(
$value
))
{
if
(
!
is_array
(
$value
))
{
$value
=
json_decode
(
urldecode
(
$value
),
true
);
}
if
(
!
empty
(
$value
)
&&
!
empty
(
$value
[
'type'
])
&&
!
empty
(
$value
[
'value'
]))
{
switch
(
$value
[
'type'
])
{
// 关键字
case
'keywords'
:
$gsp
=
(
$client_type
==
'pc'
)
?
[
'wd'
=>
StrToAscii
(
$value
[
'value'
])]
:
'?keywords='
.
$value
[
'value'
];
break
;
// 分类
case
'category'
:
$category_id
=
$value
[
'value'
][
count
(
$value
[
'value'
])
-
1
][
'id'
];
$gsp
=
(
$client_type
==
'pc'
)
?
[
'category_id'
=>
$category_id
]
:
'?category_id='
.
$category_id
;
break
;
// 品牌
case
'brand'
:
$gsp
=
(
$client_type
==
'pc'
)
?
[
'brand_id'
=>
$value
[
'value'
][
'id'
]]
:
'?brand_id='
.
$value
[
'value'
][
'id'
];
break
;
}
}
}
// 默认搜索页面、无条件
$url
=
(
$client_type
==
'pc'
)
?
MyUrl
(
'index/search/index'
,
$gsp
)
:
'/pages/goods-search/goods-search'
.
(
empty
(
$gsp
)
?
''
:
$gsp
);
break
;
}
}
...
...
application/layout/view/public/offcanvas/offcanvas_module_config_images.html
浏览文件 @
3001fa16
<!-- 侧边栏 - 模块配置 - 图片 -->
<div
id=
"offcanvas-module-config-images"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
plugins/images/shop/renovation
/module-default-images.png"
>
<div
id=
"offcanvas-module-config-images"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
common/images
/module-default-images.png"
>
<div
class=
"am-offcanvas-bar"
>
<div
class=
"am-offcanvas-content am-padding-0"
>
<form
class=
"am-form form-validation-module-offcanvas-images"
request-type=
"sync"
request-value=
"FormBackModuleConfigImages"
>
...
...
@@ -11,7 +11,7 @@
<ul
class=
"plug-file-upload-view module-images-type-images-view"
data-form-name=
"content_images"
data-max-number=
"1"
data-delete=
"0"
data-dialog-type=
"images"
>
<li>
<input
type=
"text"
name=
"content_images"
data-validation-message=
"请上传图片"
value=
""
required
/>
<img
src=
"{{$attachment_host}}/static/
plugins/images/shop/renovation
/module-default-images.png"
/>
<img
src=
"{{$attachment_host}}/static/
common/images
/module-default-images.png"
/>
</li>
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.module-images-type-images-view"
>
+上传图片
</div>
...
...
application/layout/view/public/offcanvas/offcanvas_module_config_many_images.html
浏览文件 @
3001fa16
<!-- 侧边栏 - 模块配置 - 多图 -->
<div
id=
"offcanvas-module-config-many-images"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
plugins/images/shop/renovation
/module-default-images.png"
>
<div
id=
"offcanvas-module-config-many-images"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
common/images
/module-default-images.png"
>
<div
class=
"am-offcanvas-bar"
>
<div
class=
"am-offcanvas-content am-padding-0"
>
<form
class=
"am-form form-validation-module-offcanvas-many-images"
request-type=
"sync"
request-value=
"FormBackModuleConfigManyImages"
>
...
...
application/layout/view/public/offcanvas/offcanvas_module_config_video.html
浏览文件 @
3001fa16
<!-- 侧边栏 - 模块配置 - 视频 -->
<div
id=
"offcanvas-module-config-video"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
plugins/images/shop/renovation
/module-default-images.png"
>
<div
id=
"offcanvas-module-config-video"
class=
"am-offcanvas module-offcanvas-container"
data-default-images=
"{{$attachment_host}}/static/
common/images
/module-default-images.png"
>
<div
class=
"am-offcanvas-bar"
>
<div
class=
"am-offcanvas-content am-padding-0"
>
<form
class=
"am-form form-validation-module-offcanvas-video"
request-type=
"sync"
request-value=
"FormBackModuleConfigVideo"
>
...
...
application/layout/view/public/popup/popup_module_goods_search.html
浏览文件 @
3001fa16
...
...
@@ -3,12 +3,13 @@
<div
class=
"am-popup-inner"
>
<span
data-am-modal-close
class=
"am-close am-close-alt am-icon-times"
></span>
<div
class=
"am-popup-bd am-padding-0"
>
<form
class=
"am-form form-validation-module-popup-goods-search"
request-type=
"sync"
request-value=
"FormBackModulePopupGoodsSearch"
>
<form
class=
"am-form form-validation-module-popup-goods-search
layout-forth-selection-container
"
request-type=
"sync"
request-value=
"FormBackModulePopupGoodsSearch"
>
<div
data-am-widget=
"tabs"
class=
"am-tabs am-tabs-d2"
>
<ul
class=
"am-tabs-nav am-cf"
>
<li
class=
"am-active"
><a
href=
"[data-tab-panel-0]"
data-value=
"category"
>
商品分类
</a></li>
<li><a
href=
"[data-tab-panel-1]"
data-value=
"brand"
>
品牌
</a></li>
<li><a
href=
"[data-tab-panel-2]"
data-value=
"keywords"
>
关键字
</a></li>
<li><a
href=
"[data-tab-panel-3]"
data-value=
"other"
>
无需条件
</a></li>
</ul>
<div
class=
"am-tabs-bd"
>
<div
data-tab-panel-0
class=
"am-tab-panel am-active"
>
...
...
@@ -45,6 +46,9 @@
</div>
</div>
</div>
<div
data-tab-panel-3
class=
"am-tab-panel"
>
<p
class=
"am-margin-top-lg am-padding-top-lg am-text-warning am-text-center"
>
无需搜索条件、直接进入搜索页面
</p>
</div>
</div>
</div>
...
...
public/static/common/css/layout.admin.css
浏览文件 @
3001fa16
...
...
@@ -579,4 +579,18 @@
.layout-category-choice
.form-container-category
.goods-category-choice-content
ul
.am-margin-left-lg
{
margin-left
:
20px
;
}
}
/**
* 商品搜索弹窗
*/
#popup-module-goods-search
.am-tabs-bd
{
padding-bottom
:
50px
;
}
.ss
{
position
:
absolute
;
left
:
25px
;
bottom
:
25px
;
width
:
calc
(
100%
-
50px
);
background
:
#f8f8f8
;
}
\ No newline at end of file
public/static/common/images/module-default-images.png
0 → 100644
浏览文件 @
3001fa16
767 字节
public/static/common/js/layout.admin.js
浏览文件 @
3001fa16
...
...
@@ -1293,17 +1293,12 @@ function FormBackModulePopupGoodsSearchHandle(data)
// 输入关键字去除引号
params
[
'
value
'
]
=
value
.
replace
(
new
RegExp
(
'
"
'
,
'
g
'
),
''
).
replace
(
new
RegExp
(
"
'
"
,
'
g
'
),
''
);
break
;
// 默认
default
:
Prompt
(
'
类型未处理[
'
+
type
+
'
]
'
);
return
false
;
}
// 数据赋值并关闭弹窗
var
show_name
=
ModuleConfigGoodsSearchPageShowName
(
params
);
var
$page
=
$modal_pages_select
.
find
(
'
.am-tabs-bd ul li.page-goods_search a
'
);
$page
.
find
(
'
span
'
).
text
(
$page
.
data
(
'
name
'
)
+
'
(
'
+
show_name
+
'
)
'
);
$page
.
find
(
'
span
'
).
text
(
$page
.
data
(
'
name
'
)
+
show_name
);
$page
.
attr
(
'
data-json
'
,
encodeURIComponent
(
JSON
.
stringify
(
params
)));
$popup_goods_search
.
modal
(
'
close
'
);
}
...
...
@@ -1529,7 +1524,7 @@ function ModuleConfigGoodsSearchPageShowName(data)
break
;
}
}
return
name
;
return
(
name
||
null
)
==
null
?
''
:
'
(
'
+
name
+
'
)
'
;
}
/**
...
...
@@ -2335,10 +2330,10 @@ $(function()
var
index
=
0
;
var
type
=
'
category
'
;
var
value
=
null
;
if
(
json
!=
null
&&
(
json
.
type
||
null
)
!=
null
&&
(
json
.
value
||
null
)
!=
null
)
if
(
json
!=
null
&&
(
json
.
type
||
null
)
!=
null
)
{
// 基础参数
var
arr
=
[
'
category
'
,
'
brand
'
,
'
keywords
'
];
var
arr
=
[
'
category
'
,
'
brand
'
,
'
keywords
'
,
'
other
'
];
index
=
arr
.
indexOf
(
json
.
type
);
type
=
json
.
type
;
value
=
json
.
value
||
null
;
...
...
@@ -2452,7 +2447,7 @@ $(function()
}
// 显示名称
to_name
+=
'
(
'
+
ModuleConfigGoodsSearchPageShowName
(
json
)
+
'
)
'
;
to_name
+=
ModuleConfigGoodsSearchPageShowName
(
json
)
;
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录