Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
bd9119a5
ShopXO
项目概览
starsw001
/
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,体验更适合开发者的 AI 搜索 >>
提交
bd9119a5
编写于
2月 18, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
公共分类编辑图片丢失修复
上级
7ef71ed5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
49 addition
and
23 deletion
+49
-23
application/admin/view/default/express/index.html
application/admin/view/default/express/index.html
+1
-1
application/admin/view/default/goodscategory/index.html
application/admin/view/default/goodscategory/index.html
+1
-1
application/service/ExpressService.php
application/service/ExpressService.php
+27
-6
application/service/GoodsService.php
application/service/GoodsService.php
+10
-11
changelog.txt
changelog.txt
+1
-1
public/static/common/js/common.js
public/static/common/js/common.js
+2
-2
public/static/index/default/js/search.js
public/static/index/default/js/search.js
+7
-1
未找到文件。
application/admin/view/default/express/index.html
浏览文件 @
bd9119a5
...
...
@@ -51,7 +51,7 @@
<!-- save win end -->
<!-- list start -->
<div
id=
"tree"
class=
"am-margin-top-sm"
data-additional=
'[{"field":"icon", "value":"", "type":"input"}, {"field":"icon
_url
", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.express-icon-images-view li img", "style":"src"}]'
data-node-url=
"{{:MyUrl('admin/express/getnodeson')}}"
data-del-url=
"{{:MyUrl('admin/express/delete')}}"
data-popup-tag=
"#data-save-win"
>
<div
id=
"tree"
class=
"am-margin-top-sm"
data-additional=
'[{"field":"icon", "value":"", "type":"input"}, {"field":"icon", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.express-icon-images-view li img", "style":"src"}]'
data-node-url=
"{{:MyUrl('admin/express/getnodeson')}}"
data-del-url=
"{{:MyUrl('admin/express/delete')}}"
data-popup-tag=
"#data-save-win"
>
{{include file="public/loading" /}}
</div>
<!-- list end -->
...
...
application/admin/view/default/goodscategory/index.html
浏览文件 @
bd9119a5
...
...
@@ -112,7 +112,7 @@
<!-- save win end -->
<!-- list start -->
<div
id=
"tree"
class=
"am-margin-top-sm"
data-additional=
'[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon
_url", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images_url
", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}]'
data-node-url=
"{{:MyUrl('admin/goodscategory/getnodeson')}}"
data-del-url=
"{{:MyUrl('admin/goodscategory/delete')}}"
data-popup-tag=
"#data-save-win"
data-rank=
"3"
>
<div
id=
"tree"
class=
"am-margin-top-sm"
data-additional=
'[{"field":"bg_color", "value":"", "type":"input"}, {"field":"bg_color", "value":"", "type":"css", "tag":"button.colorpicker-submit", "style":"background-color"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon
", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-icon-images-view li img", "style":"src"}, {"field":"big_images", "value":"", "type":"input"}, {"field":"big_images
", "value":"{{$attachment_host}}/static/admin/default/images/default-images.jpg", "type":"attr", "tag":"ul.goods-category-big_images-images-view li img", "style":"src"}]'
data-node-url=
"{{:MyUrl('admin/goodscategory/getnodeson')}}"
data-del-url=
"{{:MyUrl('admin/goodscategory/delete')}}"
data-popup-tag=
"#data-save-win"
data-rank=
"3"
>
{{include file="public/loading" /}}
</div>
<!-- list end -->
...
...
application/service/ExpressService.php
浏览文件 @
bd9119a5
...
...
@@ -73,12 +73,31 @@ class ExpressService
$where
[
'is_enable'
]
=
intval
(
$params
[
'is_enable'
]);
}
$data
=
Db
::
name
(
'Express'
)
->
where
(
$where
)
->
field
(
'id,icon,name,sort,is_enable'
)
->
order
(
'sort asc'
)
->
select
();
return
self
::
DataHandle
(
$data
);
}
/**
* 数据处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-06
* @desc description
* @param [array] $data [二维数组]
*/
public
static
function
DataHandle
(
$data
)
{
if
(
!
empty
(
$data
)
&&
is_array
(
$data
))
{
foreach
(
$data
as
&
$v
)
{
$v
[
'icon_old'
]
=
$v
[
'icon'
];
$v
[
'icon'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'icon'
]);
if
(
is_array
(
$v
))
{
if
(
array_key_exists
(
'icon'
,
$v
))
{
$v
[
'icon'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'icon'
]);
}
}
}
}
return
$data
;
...
...
@@ -102,11 +121,11 @@ class ExpressService
$data
=
Db
::
name
(
'Express'
)
->
field
(
$field
)
->
where
([
'pid'
=>
$id
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$data
))
{
$data
=
self
::
DataHandle
(
$data
);
foreach
(
$data
as
&
$v
)
{
$v
[
'is_son'
]
=
(
Db
::
name
(
'Express'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'icon_url'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'icon'
]);
$v
[
'json'
]
=
json_encode
(
$v
);
$v
[
'is_son'
]
=
(
Db
::
name
(
'Express'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'json'
]
=
json_encode
(
$v
);
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
...
...
@@ -173,7 +192,9 @@ class ExpressService
$data
[
'id'
]
=
$params
[
'id'
];
}
}
return
DataReturn
(
'操作成功'
,
0
,
json_encode
(
$data
));
$res
=
self
::
DataHandle
([
$data
]);
return
DataReturn
(
'操作成功'
,
0
,
json_encode
(
$res
[
0
]));
}
/**
...
...
application/service/GoodsService.php
浏览文件 @
bd9119a5
...
...
@@ -46,7 +46,7 @@ class GoodsService
return
null
;
}
$field
=
empty
(
$params
[
'field'
])
?
'id,pid,icon,name,vice_name,describe,bg_color,big_images,sort,is_home_recommended'
:
$params
[
'field'
];
$data
=
self
::
GoodsCategoryData
DealWith
([
Db
::
name
(
'GoodsCategory'
)
->
field
(
$field
)
->
where
([
'is_enable'
=>
1
,
'id'
=>
intval
(
$params
[
'id'
])])
->
find
()]);
$data
=
self
::
GoodsCategoryData
Handle
([
Db
::
name
(
'GoodsCategory'
)
->
field
(
$field
)
->
where
([
'is_enable'
=>
1
,
'id'
=>
intval
(
$params
[
'id'
])])
->
find
()]);
return
empty
(
$data
[
0
])
?
null
:
$data
[
0
];
}
...
...
@@ -144,7 +144,7 @@ class GoodsService
$field
=
empty
(
$params
[
'field'
])
?
'id,pid,icon,name,vice_name,describe,bg_color,big_images,sort,is_home_recommended,seo_title,seo_keywords,seo_desc'
:
$params
[
'field'
];
$data
=
Db
::
name
(
'GoodsCategory'
)
->
field
(
$field
)
->
where
(
$where
)
->
order
(
$order_by
)
->
limit
(
$m
,
$n
)
->
select
();
return
self
::
GoodsCategoryData
DealWith
(
$data
);
return
self
::
GoodsCategoryData
Handle
(
$data
);
}
/**
...
...
@@ -156,7 +156,7 @@ class GoodsService
* @desc description
* @param [array] $data [商品分类数据 二维数组]
*/
public
static
function
GoodsCategoryData
DealWith
(
$data
)
public
static
function
GoodsCategoryData
Handle
(
$data
)
{
if
(
!
empty
(
$data
)
&&
is_array
(
$data
))
{
...
...
@@ -164,13 +164,12 @@ class GoodsService
{
if
(
is_array
(
$v
))
{
if
(
isset
(
$v
[
'icon'
]
))
if
(
array_key_exists
(
'icon'
,
$v
))
{
$v
[
'icon'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'icon'
]);
}
if
(
isset
(
$v
[
'big_images'
]
))
if
(
array_key_exists
(
'big_images'
,
$v
))
{
$v
[
'big_images_old'
]
=
$v
[
'big_images'
];
$v
[
'big_images'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'big_images'
]);
}
}
...
...
@@ -2302,12 +2301,11 @@ class GoodsService
$data
=
Db
::
name
(
'GoodsCategory'
)
->
field
(
$field
)
->
where
([
'pid'
=>
$id
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$data
))
{
$data
=
self
::
GoodsCategoryDataHandle
(
$data
);
foreach
(
$data
as
&
$v
)
{
$v
[
'is_son'
]
=
(
Db
::
name
(
'GoodsCategory'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'icon_url'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'icon'
]);
$v
[
'big_images_url'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$v
[
'big_images'
]);
$v
[
'json'
]
=
json_encode
(
$v
);
$v
[
'is_son'
]
=
(
Db
::
name
(
'GoodsCategory'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'json'
]
=
json_encode
(
$v
);
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
...
...
@@ -2427,7 +2425,8 @@ class GoodsService
// 删除大分类缓存
cache
(
config
(
'shopxo.cache_goods_category_key'
),
null
);
return
DataReturn
(
'操作成功'
,
0
,
json_encode
(
$data
));
$res
=
self
::
GoodsCategoryDataHandle
([
$data
]);
return
DataReturn
(
'操作成功'
,
0
,
json_encode
(
$res
[
0
]));
}
/**
...
...
changelog.txt
浏览文件 @
bd9119a5
...
...
@@ -7,7 +7,7 @@
3. 支付宝支付插件优化
4. 现金支付插件优化、新增自定义支付信息
5. 订单支付状态金额控制开关
6. 搜索页面价格、参数、规格开关控制
6. 搜索页面价格、参数、规格
、品牌
开关控制
web端
1. 编辑器图片、附件、视频多选支持按照顺序选择插入编辑器
...
...
public/static/common/js/common.js
浏览文件 @
bd9119a5
...
...
@@ -668,9 +668,9 @@ function TreeItemHtmlHandle(item, id, level, is_add_node, is_delete_all)
son_css
=
'
padding-left:
'
+
tmp_level
+
'
px;
'
;
}
html
+=
'
<span style="
'
+
son_css
+
'
">
'
;
if
((
item
[
'
icon
_url
'
]
||
null
)
!=
null
)
if
((
item
[
'
icon
'
]
||
null
)
!=
null
)
{
html
+=
'
<a href="
'
+
item
[
'
icon
_url
'
]
+
'
" target="_blank"><img src="
'
+
item
[
'
icon_url
'
]
+
'
" width="20" height="20" class="am-vertical-align-middle am-margin-right-xs" /></a>
'
;
html
+=
'
<a href="
'
+
item
[
'
icon
'
]
+
'
" target="_blank"><img src="
'
+
item
[
'
icon
'
]
+
'
" width="20" height="20" class="am-vertical-align-middle am-margin-right-xs" /></a>
'
;
}
html
+=
'
<span>
'
+
(
item
[
'
name_alias
'
]
||
item
[
'
name
'
])
+
'
</span>
'
;
html
+=
'
</span>
'
;
...
...
public/static/index/default/js/search.js
浏览文件 @
bd9119a5
...
...
@@ -85,7 +85,13 @@ function GetGoodsList(page)
}
else
{
Prompt
(
result
.
msg
);
}
$
(
'
.map-result-count
'
).
text
(
result
.
data
.
total
||
0
);
// 总数处理
var
total
=
result
.
data
.
total
||
0
;
if
(
total
>
0
||
$
(
'
.search-list li
'
).
length
==
0
)
{
$
(
'
.map-result-count
'
).
text
(
total
);
}
},
error
:
function
(
xhr
,
type
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录