Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
584ed8a0
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,发现更多精彩内容 >>
提交
584ed8a0
编写于
12月 24, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
快递,积分,地区
上级
cf6738ab
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
630 addition
and
443 deletion
+630
-443
application/admin/controller/Admin.php
application/admin/controller/Admin.php
+1
-1
application/admin/controller/AlipayLifeMenu.php
application/admin/controller/AlipayLifeMenu.php
+1
-1
application/admin/controller/AlipayLifeMessage.php
application/admin/controller/AlipayLifeMessage.php
+1
-1
application/admin/controller/AlipayLifeStatus.php
application/admin/controller/AlipayLifeStatus.php
+1
-1
application/admin/controller/AlipayLifeUser.php
application/admin/controller/AlipayLifeUser.php
+1
-1
application/admin/controller/Coupon.php
application/admin/controller/Coupon.php
+2
-2
application/admin/controller/Express.php
application/admin/controller/Express.php
+20
-82
application/admin/controller/Goods.php
application/admin/controller/Goods.php
+1
-1
application/admin/controller/IntegralLog.php
application/admin/controller/IntegralLog.php
+88
-0
application/admin/controller/Message.php
application/admin/controller/Message.php
+0
-3
application/admin/controller/Region.php
application/admin/controller/Region.php
+17
-92
application/admin/controller/User.php
application/admin/controller/User.php
+1
-1
application/admin/controller/UserIntegralLog.php
application/admin/controller/UserIntegralLog.php
+0
-163
application/admin/view/default/express/index.html
application/admin/view/default/express/index.html
+13
-12
application/admin/view/default/integrallog/index.html
application/admin/view/default/integrallog/index.html
+19
-19
application/admin/view/default/region/index.html
application/admin/view/default/region/index.html
+5
-5
application/service/ArticleService.php
application/service/ArticleService.php
+1
-1
application/service/BrandService.php
application/service/BrandService.php
+1
-1
application/service/ExpressService.php
application/service/ExpressService.php
+130
-0
application/service/GoodsService.php
application/service/GoodsService.php
+1
-1
application/service/IntegralService.php
application/service/IntegralService.php
+98
-0
application/service/RegionService.php
application/service/RegionService.php
+126
-0
application/service/ScreeningPriceService.php
application/service/ScreeningPriceService.php
+1
-1
public/install/shopxo_tp5.sql
public/install/shopxo_tp5.sql
+100
-26
public/static/admin/default/css/express.css
public/static/admin/default/css/express.css
+1
-0
public/static/admin/default/css/integrallog.css
public/static/admin/default/css/integrallog.css
+0
-0
public/static/admin/default/js/admin.js
public/static/admin/default/js/admin.js
+0
-4
public/static/admin/default/js/article.js
public/static/admin/default/js/article.js
+0
-4
public/static/admin/default/js/customview.js
public/static/admin/default/js/customview.js
+0
-0
public/static/admin/default/js/message.js
public/static/admin/default/js/message.js
+0
-4
public/static/admin/default/js/paylog.js
public/static/admin/default/js/paylog.js
+0
-4
public/static/admin/default/js/slide.js
public/static/admin/default/js/slide.js
+0
-4
public/static/admin/default/js/user.js
public/static/admin/default/js/user.js
+0
-4
public/static/admin/default/js/userintegrallog.js
public/static/admin/default/js/userintegrallog.js
+0
-4
public/static/upload/images/express/2018/08/20180807143522649704.jpeg
...c/upload/images/express/2018/08/20180807143522649704.jpeg
+0
-0
未找到文件。
application/admin/controller/Admin.php
浏览文件 @
584ed8a0
...
...
@@ -50,7 +50,7 @@ class Admin extends Common
$total
=
AdminService
::
AdminTotal
(
$where
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_params
=
array
(
'number'
=>
$number
,
'total'
=>
$total
,
...
...
application/admin/controller/AlipayLifeMenu.php
浏览文件 @
584ed8a0
...
...
@@ -51,7 +51,7 @@ class AlipayLifeMenu extends Common
$where
=
$this
->
GetIndexWhere
();
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
...
...
application/admin/controller/AlipayLifeMessage.php
浏览文件 @
584ed8a0
...
...
@@ -51,7 +51,7 @@ class AlipayLifeMessage extends Common
$where
=
$this
->
GetIndexWhere
();
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
...
...
application/admin/controller/AlipayLifeStatus.php
浏览文件 @
584ed8a0
...
...
@@ -51,7 +51,7 @@ class AlipayLifeStatus extends Common
$where
=
$this
->
GetIndexWhere
();
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
...
...
application/admin/controller/AlipayLifeUser.php
浏览文件 @
584ed8a0
...
...
@@ -49,7 +49,7 @@ class AlipayLifeUser extends Common
$m
=
db
(
'AlipayLifeUser'
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
alias
(
'au'
)
->
where
(
$where
)
->
join
(
'INNER JOIN __USER__ AS u ON u.id=au.user_id'
)
->
count
(),
...
...
application/admin/controller/Coupon.php
浏览文件 @
584ed8a0
...
...
@@ -49,7 +49,7 @@ class Coupon extends Common
$where
=
$this
->
GetIndexWhere
();
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
...
...
@@ -480,7 +480,7 @@ class Coupon extends Common
$where
=
$this
->
GetUserWhere
(
$param
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
alias
(
'uc'
)
->
join
(
'__USER__ AS u ON u.id=uc.user_id'
)
->
where
(
$where
)
->
count
(),
...
...
application/admin/controller/Express.php
浏览文件 @
584ed8a0
<?php
namespace
app\admin\controller
;
use
app\service\ExpressService
;
/**
* 快递管理
* @author Devil
...
...
@@ -41,7 +42,11 @@ class Express extends Common
{
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
$this
->
display
(
'Index'
);
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'express'
);
return
$this
->
fetch
();
}
/**
...
...
@@ -59,23 +64,9 @@ class Express extends Common
$this
->
error
(
'非法访问'
);
}
// 获取数据
$field
=
array
(
'id'
,
'icon'
,
'name'
,
'sort'
,
'is_enable'
);
$data
=
db
(
'Express'
)
->
field
(
$field
)
->
select
();
if
(
!
empty
(
$data
))
{
$image_host
=
config
(
'IMAGE_HOST'
);
foreach
(
$data
as
&
$v
)
{
$v
[
'is_son'
]
=
'no'
;
$v
[
'ajax_url'
]
=
url
(
'Admin/Express/GetNodeSon'
,
array
(
'id'
=>
$v
[
'id'
]));
$v
[
'delete_url'
]
=
url
(
'Admin/Express/Delete'
);
$v
[
'icon_url'
]
=
empty
(
$v
[
'icon'
])
?
''
:
$image_host
.
$v
[
'icon'
];
$v
[
'json'
]
=
json_encode
(
$v
);
}
}
$msg
=
empty
(
$data
)
?
'没有相关数据'
:
'操作成功'
;
$this
->
ajaxReturn
(
$msg
,
0
,
$data
);
// 开始操作
$ret
=
ExpressService
::
ExpressNodeSon
(
input
());
return
json
(
$ret
);
}
/**
...
...
@@ -93,53 +84,9 @@ class Express extends Common
$this
->
error
(
'非法访问'
);
}
// 图片
$this
->
FileSave
(
'icon'
,
'file_icon'
,
'express'
);
// id为空则表示是新增
$m
=
D
(
'Express'
);
// 公共额外数据处理
$m
->
sort
=
intval
(
I
(
'sort'
));
// 添加
if
(
empty
(
$_POST
[
'id'
]))
{
if
(
$m
->
create
(
$_POST
,
1
))
{
// 额外数据处理
$m
->
add_time
=
time
();
$m
->
name
=
I
(
'name'
);
// 写入数据库
if
(
$m
->
add
())
{
$this
->
ajaxReturn
(
'新增成功'
);
}
else
{
$this
->
ajaxReturn
(
'新增失败'
,
-
100
);
}
}
}
else
{
// 编辑
if
(
$m
->
create
(
$_POST
,
2
))
{
// 额外数据处理
$m
->
name
=
I
(
'name'
);
$m
->
upd_time
=
time
();
// 移除 id
unset
(
$m
->
id
);
// 更新数据库
if
(
$m
->
where
(
array
(
'id'
=>
I
(
'id'
)))
->
save
())
{
$this
->
ajaxReturn
(
'编辑成功'
);
}
else
{
$this
->
ajaxReturn
(
'编辑失败或数据未改变'
,
-
100
);
}
}
}
$this
->
ajaxReturn
(
$m
->
getError
(),
-
1
);
// 开始操作
$ret
=
ExpressService
::
ExpressSave
(
input
());
return
json
(
$ret
);
}
/**
...
...
@@ -151,26 +98,17 @@ class Express extends Common
*/
public
function
Delete
()
{
// 是否ajax
if
(
!
IS_AJAX
)
{
$this
->
error
(
'非法访问'
);
return
$this
->
error
(
'非法访问'
);
}
$m
=
D
(
'Express'
);
if
(
$m
->
create
(
$_POST
,
5
))
{
$id
=
I
(
'id'
);
// 删除
if
(
$m
->
delete
(
$id
))
{
$this
->
ajaxReturn
(
'删除成功'
);
}
else
{
$this
->
ajaxReturn
(
'删除失败或资源不存在'
,
-
100
);
}
}
else
{
$this
->
ajaxReturn
(
$m
->
getError
(),
-
1
);
}
// 开始操作
$params
=
input
(
'post.'
);
$params
[
'admin'
]
=
$this
->
admin
;
$ret
=
ExpressService
::
ExpressDelete
(
$params
);
return
json
(
$ret
);
}
}
?>
\ No newline at end of file
application/admin/controller/Goods.php
浏览文件 @
584ed8a0
...
...
@@ -53,7 +53,7 @@ class Goods extends Common
$total
=
GoodsService
::
GoodsTotal
(
$where
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_params
=
array
(
'number'
=>
$number
,
'total'
=>
$total
,
...
...
application/admin/controller/IntegralLog.php
0 → 100755
浏览文件 @
584ed8a0
<?php
namespace
app\admin\controller
;
use
app\service\IntegralService
;
/**
* 用户积分日志管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
IntegralLog
extends
Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public
function
__construct
()
{
// 调用父类前置方法
parent
::
__construct
();
// 登录校验
$this
->
Is_Login
();
// 权限校验
$this
->
Is_Power
();
}
/**
* [Index 用户积分日志列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public
function
Index
()
{
// 参数
$params
=
input
();
$params
[
'user'
]
=
$this
->
admin
;
$params
[
'user_type'
]
=
'admin'
;
// 分页
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
// 条件
$where
=
IntegralService
::
AdminIntegralListWhere
(
$params
);
// 获取总数
$total
=
IntegralService
::
AdminIntegralTotal
(
$where
);
// 分页
$page_params
=
array
(
'number'
=>
$number
,
'total'
=>
$total
,
'where'
=>
$params
,
'page'
=>
isset
(
$params
[
'page'
])
?
intval
(
$params
[
'page'
])
:
1
,
'url'
=>
url
(
'admin/integrallog/index'
),
);
$page
=
new
\
base\Page
(
$page_params
);
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
// 获取列表
$data_params
=
array
(
'm'
=>
$page
->
GetPageStarNumber
(),
'n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
IntegralService
::
AdminIntegralList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
// 性别
$this
->
assign
(
'common_gender_list'
,
lang
(
'common_gender_list'
));
// 操作类型
$this
->
assign
(
'common_integral_log_type_list'
,
lang
(
'common_integral_log_type_list'
));
// 参数
$this
->
assign
(
'params'
,
$params
);
return
$this
->
fetch
();
}
}
?>
\ No newline at end of file
application/admin/controller/Message.php
浏览文件 @
584ed8a0
...
...
@@ -45,9 +45,6 @@ class Message extends Common
$params
[
'user'
]
=
$this
->
admin
;
$params
[
'user_type'
]
=
'admin'
;
// 消息更新未已读
MessageService
::
MessageRead
(
$params
);
// 分页
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
...
...
application/admin/controller/Region.php
浏览文件 @
584ed8a0
<?php
namespace
app\admin\controller
;
use
app\service\RegionService
;
/**
* 地区管理
* @author Devil
...
...
@@ -41,7 +42,8 @@ class Region extends Common
{
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
$this
->
display
(
'Index'
);
return
$this
->
fetch
();
}
/**
...
...
@@ -59,39 +61,9 @@ class Region extends Common
$this
->
error
(
'非法访问'
);
}
// 获取数据
$field
=
array
(
'id'
,
'pid'
,
'name'
,
'sort'
,
'is_enable'
);
$data
=
db
(
'Region'
)
->
field
(
$field
)
->
where
(
array
(
'pid'
=>
intval
(
I
(
'id'
,
0
))))
->
select
();
if
(
!
empty
(
$data
))
{
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'is_son'
]
=
$this
->
IsExistSon
(
$v
[
'id'
]);
$data
[
$k
][
'ajax_url'
]
=
url
(
'Admin/Region/GetNodeSon'
,
array
(
'id'
=>
$v
[
'id'
]));
$data
[
$k
][
'delete_url'
]
=
url
(
'Admin/Region/Delete'
);
$data
[
$k
][
'json'
]
=
json_encode
(
$v
);
}
}
$msg
=
empty
(
$data
)
?
'没有相关数据'
:
'操作成功'
;
$this
->
ajaxReturn
(
$msg
,
0
,
$data
);
}
/**
* [IsExistSon 节点是否存在子数据]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:22:47+0800
* @param [int] $id [节点id]
* @return [string] [有数据ok, 则no]
*/
private
function
IsExistSon
(
$id
)
{
if
(
!
empty
(
$id
))
{
return
(
db
(
'Region'
)
->
where
(
array
(
'pid'
=>
$id
))
->
count
()
>
0
)
?
'ok'
:
'no'
;
}
return
'no'
;
// 开始操作
$ret
=
RegionService
::
RegionNodeSon
(
input
());
return
json
(
$ret
);
}
/**
...
...
@@ -109,50 +81,9 @@ class Region extends Common
$this
->
error
(
'非法访问'
);
}
// id为空则表示是新增
$m
=
D
(
'Region'
);
// 公共额外数据处理
$m
->
sort
=
intval
(
I
(
'sort'
));
// 添加
if
(
empty
(
$_POST
[
'id'
]))
{
if
(
$m
->
create
(
$_POST
,
1
))
{
// 额外数据处理
$m
->
add_time
=
time
();
$m
->
name
=
I
(
'name'
);
// 写入数据库
if
(
$m
->
add
())
{
$this
->
ajaxReturn
(
'新增成功'
);
}
else
{
$this
->
ajaxReturn
(
'新增失败'
,
-
100
);
}
}
}
else
{
// 编辑
if
(
$m
->
create
(
$_POST
,
2
))
{
// 额外数据处理
$m
->
name
=
I
(
'name'
);
$m
->
upd_time
=
time
();
// 移除 id
unset
(
$m
->
id
,
$m
->
pid
);
// 更新数据库
if
(
$m
->
where
(
array
(
'id'
=>
I
(
'id'
)))
->
save
())
{
$this
->
ajaxReturn
(
'编辑成功'
);
}
else
{
$this
->
ajaxReturn
(
'编辑失败或数据未改变'
,
-
100
);
}
}
}
$this
->
ajaxReturn
(
$m
->
getError
(),
-
1
);
// 开始操作
$ret
=
RegionService
::
RegionSave
(
input
());
return
json
(
$ret
);
}
/**
...
...
@@ -164,23 +95,17 @@ class Region extends Common
*/
public
function
Delete
()
{
// 是否ajax
if
(
!
IS_AJAX
)
{
$this
->
error
(
'非法访问'
);
return
$this
->
error
(
'非法访问'
);
}
$m
=
D
(
'Region'
);
if
(
$m
->
create
(
$_POST
,
5
))
{
if
(
$m
->
delete
(
I
(
'id'
)))
{
$this
->
ajaxReturn
(
'删除成功'
);
}
else
{
$this
->
ajaxReturn
(
'删除失败或资源不存在'
,
-
100
);
}
}
else
{
$this
->
ajaxReturn
(
$m
->
getError
(),
-
1
);
}
// 开始操作
$params
=
input
(
'post.'
);
$params
[
'admin'
]
=
$this
->
admin
;
$ret
=
RegionService
::
RegionDelete
(
$params
);
return
json
(
$ret
);
}
}
?>
\ No newline at end of file
application/admin/controller/User.php
浏览文件 @
584ed8a0
...
...
@@ -51,7 +51,7 @@ class User extends Common
$total
=
UserService
::
UserTotal
(
$where
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$number
=
MyC
(
'admin_page_number'
,
10
,
true
);
$page_params
=
array
(
'number'
=>
$number
,
'total'
=>
$total
,
...
...
application/admin/controller/UserIntegralLog.php
已删除
100755 → 0
浏览文件 @
cf6738ab
<?php
namespace
app\admin\controller
;
/**
* 用户积分日志管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
UserIntegralLog
extends
Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public
function
__construct
()
{
// 调用父类前置方法
parent
::
__construct
();
// 登录校验
$this
->
Is_Login
();
// 权限校验
$this
->
Is_Power
();
}
/**
* [Index 用户积分日志列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public
function
Index
()
{
// 参数
$param
=
array_merge
(
$_POST
,
$_GET
);
// 条件
$where
=
$this
->
GetIndexWhere
();
// 模型
$m
=
db
(
'UserIntegralLog'
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
alias
(
'ui'
)
->
join
(
'__USER__ AS u ON u.id=ui.user_id'
)
->
where
(
$where
)
->
count
(),
'where'
=>
$param
,
'url'
=>
url
(
'Admin/UserIntegralLog/Index'
),
);
$page
=
new
\
base\Page
(
$page_param
);
// 获取列表
$field
=
'ui.*,u.username,u.nickname,u.mobile,u.gender'
;
$list
=
$this
->
SetDataHandle
(
$m
->
alias
(
'ui'
)
->
join
(
'__USER__ AS u ON u.id=ui.user_id'
)
->
field
(
$field
)
->
where
(
$where
)
->
limit
(
$page
->
GetPageStarNumber
(),
$number
)
->
order
(
'ui.id desc'
)
->
select
());
// 性别
$this
->
assign
(
'common_gender_list'
,
lang
(
'common_gender_list'
));
// 操作类型
$this
->
assign
(
'common_integral_log_type_list'
,
lang
(
'common_integral_log_type_list'
));
// 参数
$this
->
assign
(
'param'
,
$param
);
// 分页
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
// 数据列表
$this
->
assign
(
'list'
,
$list
);
$this
->
display
(
'Index'
);
}
/**
* [SetDataHandle 数据处理]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-29T21:27:15+0800
* @param [array] $data [用户积分日志数据]
* @return [array] [处理好的数据]
*/
private
function
SetDataHandle
(
$data
)
{
if
(
!
empty
(
$data
))
{
$common_gender_list
=
lang
(
'common_gender_list'
);
$common_integral_log_type_list
=
lang
(
'common_integral_log_type_list'
);
foreach
(
$data
as
&
$v
)
{
// 操作类型
$v
[
'type_text'
]
=
$common_integral_log_type_list
[
$v
[
'type'
]][
'name'
];
// 性别
$v
[
'gender_text'
]
=
$common_gender_list
[
$v
[
'gender'
]][
'name'
];
// 添加时间
$v
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
}
}
return
$data
;
}
/**
* [GetIndexWhere 用户积分日志列表条件]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-10T22:16:29+0800
*/
private
function
GetIndexWhere
()
{
$where
=
array
();
// 模糊
if
(
!
empty
(
$_REQUEST
[
'keyword'
]))
{
$like_keyword
=
array
(
'like'
,
'%'
.
I
(
'keyword'
)
.
'%'
);
$where
[]
=
array
(
'u.username'
=>
$like_keyword
,
'u.nickname'
=>
$like_keyword
,
'u.mobile'
=>
$like_keyword
,
'ui.msg'
=>
$like_keyword
,
'_logic'
=>
'or'
,
);
}
// 是否更多条件
if
(
I
(
'is_more'
,
0
)
==
1
)
{
// 等值
if
(
I
(
'type'
,
-
1
)
>
-
1
)
{
$where
[
'ui.type'
]
=
intval
(
I
(
'type'
,
0
));
}
if
(
I
(
'gender'
,
-
1
)
>
-
1
)
{
$where
[
'u.gender'
]
=
intval
(
I
(
'gender'
,
0
));
}
// 表达式
if
(
!
empty
(
$_REQUEST
[
'time_start'
]))
{
$where
[
'ui.add_time'
][]
=
array
(
'gt'
,
strtotime
(
I
(
'time_start'
)));
}
if
(
!
empty
(
$_REQUEST
[
'time_end'
]))
{
$where
[
'ui.add_time'
][]
=
array
(
'lt'
,
strtotime
(
I
(
'time_end'
)));
}
}
return
$where
;
}
}
?>
\ No newline at end of file
application/admin/view/default/express/index.html
浏览文件 @
584ed8a0
...
...
@@ -18,16 +18,17 @@
</div>
<div
class=
"am-popup-bd"
>
<!-- form start -->
<form
class=
"am-form form-validation admin-save"
action=
"{{:url('
Admin/Express/S
ave')}}"
method=
"POST"
request-type=
"ajax-reload"
request-value=
""
>
<form
class=
"am-form form-validation admin-save"
action=
"{{:url('
admin/express/s
ave')}}"
method=
"POST"
request-type=
"ajax-reload"
request-value=
""
>
<div
class=
"am-form-group am-form-file"
>
<label
class=
"block"
>
icon图标
</label>
<button
type=
"button"
class=
"am-btn am-btn-default am-btn-sm am-radius"
>
<i
class=
"am-icon-cloud-upload"
></i>
选择图片
</button>
<input
type=
"text"
name=
"icon"
class=
"am-radius js-choice-one original-images-url original-icon-images-url"
data-choice-one-to=
'input[name="file_icon"]'
<
notempty
name=
"data"
>
value="{{$data.images_url}}"{{/if}}" data-validation-message="请选择需要上传的图片" readonly="readonly" />
<i
class=
"am-icon-trash-o am-icon-sm original-images-url-delete"
data-input-tag=
"input.original-icon-images-url"
data-image-tag=
"#form-img-icon"
data-tips-tag=
"#form-icon-tips"
data-file-tag=
"input.file_icon-tag"
></i>
<input
type=
"file"
name=
"file_icon"
multiple
data-validation-message=
"请选择需要上传的图片"
accept=
"image/gif,image/jpeg,image/jpg,image/png"
class=
"js-choice-one images-file-event file_icon-tag"
data-choice-one-to=
".original-icon-images-url"
data-tips-tag=
"#form-icon-tips"
data-image-tag=
"#form-img-icon"
/>
<div
id=
"form-icon-tips"
class=
"m-t-5)}}</div>
<img src="
{{$
image_host
}}/
Public
/
Admin
/
Default
/
Images
/
default-images.png
"
id=
"form-img-icon"
class=
"block m-t-5 am-img-thumbnail am-radius"
width=
"50"
height=
"50"
data-default=
"{{$image_host}}/Public/Admin/Default/Images/default-images.png"
/>
<ul
class=
"plug-file-upload-view express-icon-images-view"
data-form-name=
"icon"
data-max-number=
"1"
data-dialog-type=
"images"
>
<li>
<input
type=
"hidden"
name=
"icon"
value=
""
/>
<img
src=
"{{$image_host}}/static/admin/default/images/default-images.png"
/>
<i>
×
</i>
</li>
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.express-icon-images-view"
>
+上传图片
</div>
</div>
<div
class=
"am-form-group"
>
<label>
名称
</label>
...
...
@@ -37,7 +38,7 @@
<label>
顺序
</label>
<input
type=
"number"
placeholder=
"顺序"
name=
"sort"
min=
"0"
max=
"255"
data-validation-message=
"顺序 0~255 之间的数值"
class=
"am-radius"
value=
"0"
required
/>
</div>
<include
file=
"Lib/Enable"
/>
{{include file="lib/enable" /}}
<div
class=
"am-form-group"
>
<input
type=
"hidden"
name=
"id"
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100"
data-am-loading=
"{loadingText:'处理中...'}"
>
保存
</button>
...
...
@@ -50,9 +51,9 @@
<!-- save win end -->
<!-- list start -->
<div
id=
"tree"
class=
"m-t-15"
data-additional=
'[{"field":"
file_icon", "value":"", "type":"file", "tag":"input.file_icon-tag"}, {"field":"icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$image_host}}/Public/Admin/Default/Images/default-images.png", "type":"attr", "tag":"#form-img-icon", "style":"src"}, {"value":"", "type":"html", "tag":"#form-icon-tips
"}]'
>
<div
id=
"tree"
class=
"m-t-15"
data-additional=
'[{"field":"
icon", "value":"", "type":"input"}, {"field":"icon_url", "value":"{{$image_host}}/static/admin/default/images/default-images.png", "type":"attr", "tag":"ul.express-icon-images-view li img", "style":"src
"}]'
>
<div
class=
"m-t-30 t-c"
>
<img
src=
"
__PUBLIC__/Common/I
mages/loading.gif"
/>
<img
src=
"
{{$image_host}}/static/common/i
mages/loading.gif"
/>
<p>
处理中...
</p>
</div>
</div>
...
...
@@ -65,5 +66,5 @@
{{include file="public/footer" /}}
<!-- footer end -->
<script>
Tree
(
0
,
"
{{:url('
Admin/Express/GetNodeS
on')}}
"
,
0
);
Tree
(
0
,
"
{{:url('
admin/express/getnodes
on')}}
"
,
0
);
</script>
\ No newline at end of file
application/admin/view/default/
userI
ntegrallog/index.html
→
application/admin/view/default/
i
ntegrallog/index.html
浏览文件 @
584ed8a0
...
...
@@ -4,33 +4,33 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- form start -->
<form
class=
"am-form view-list"
action=
"{{:url('
Admin/UserIntegralLog/I
ndex')}}"
method=
"POST"
>
<form
class=
"am-form view-list"
action=
"{{:url('
admin/integrallog/i
ndex')}}"
method=
"POST"
>
<div
class=
"am-g"
>
<input
type=
"text"
class=
"am-radius form-keyword"
placeholder=
"姓名/手机/昵称/原因"
name=
"keyword"
<
present
name=
"param['keyword']"
>
value="{{$param.keyword
}}"{{/if}} />
<input
type=
"text"
autocomplete=
"off"
class=
"am-radius form-keyword"
placeholder=
"姓名/手机/昵称/原因"
name=
"keywords"
{{
if
!
empty
($
params
['
keywords
'])}}
value=
"{{$params.keywords
}}"
{{/
if
}}
/>
<button
type=
"submit"
class=
"am-btn am-btn-secondary am-btn-sm am-radius form-submit"
>
查询
</button>
<label
class=
"fs-12 m-l-5 c-p fw-100 more-submit"
>
更多筛选
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
id=
"is_more"
{{
if
isset
($
param
['
is_more
'])
and
$
param
['
is_more
']
eq
1)
}}
checked
{{/
if
}}
/>
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
id=
"is_more"
{{
if
isset
($
param
s
['
is_more
'])
and
$
params
['
is_more
']
eq
1
}}
checked
{{/
if
}}
/>
<i
class=
"am-icon-angle-down"
></i>
</label>
<div
class=
"more-where {{if !isset($param
['is_more']) or $param['is_more'] neq 1)
}}none{{/if}}"
>
<div
class=
"more-where {{if !isset($param
s['is_more']) or $params['is_more'] neq 1
}}none{{/if}}"
>
<select
name=
"gender"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1
)}}
性别</option>
<foreach name="
common_gender_list
"
item=
"v"
>
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
['
gender
'])
and
$
param
['
gender
']
eq
$
v
['
id
']"
>
selected{{/if}}>{{$v.name}}
</option>
<option
value=
"-1
"
>
性别
</option>
{{foreach $common_gender_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
s
['
gender
'])
and
$
params
['
gender
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
<select
name=
"type"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1
)}}
操作类型</option>
<foreach name="
common_integral_log_type_list
"
item=
"v"
>
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
['
type
'])
and
$
param
['
type
']
eq
$
v
['
id
']"
>
selected{{/if}}>{{$v.name}}
</option>
<option
value=
"-1
"
>
操作类型
</option>
{{foreach $common_integral_log_type_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
s
['
type
'])
and
$
params
['
type
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
<div
class=
"param-date param-where m-l-5
)}}
<input type="
text
"
name=
"time_start"
class=
"Wdate am-radius m-t-10"
placeholder=
"起始时间"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{{
if
isset
($
param
['
time_start
'])}}
value=
"{{$param
.time_start}}"
{{/
if
}}
/>
<div
class=
"param-date param-where m-l-5
"
>
<input
type=
"text"
autocomplete=
"off"
name=
"time_start"
class=
"Wdate am-radius m-t-10"
placeholder=
"起始时间"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{{
if
isset
($
params
['
time_start
'])}}
value=
"{{$params
.time_start}}"
{{/
if
}}
/>
<span>
~
</span>
<input
type=
"text"
class=
"Wdate am-radius m-t-10"
placeholder=
"结束时间"
name=
"time_end"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{{
if
isset
($
param
['
time_end
'])}}
value=
"{{$param
.time_end}}"
{{/
if
}}
/>
<input
type=
"text"
autocomplete=
"off"
class=
"Wdate am-radius m-t-10"
placeholder=
"结束时间"
name=
"time_end"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{{
if
isset
($
params
['
time_end
'])}}
value=
"{{$params
.time_end}}"
{{/
if
}}
/>
</div>
</div>
</div>
...
...
@@ -38,7 +38,7 @@
<!-- form end -->
<!-- list start -->
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-10 m-l-5
)}}
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-10 m-l-5
"
>
<thead>
<tr>
<th>
用户信息
</th>
...
...
@@ -50,8 +50,8 @@
</tr>
</thead>
<tbody>
{{if !empty($list)}}
<foreach
name=
"list"
item=
"v"
>
{{if !empty($
data_
list)}}
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.id}}"
>
<td>
{{if !empty($v['username'])}}
...
...
@@ -75,7 +75,7 @@
{{if empty($v['msg'])}}
<span
class=
"cr-ddd"
>
未填写
</span>
{{else /}}{{$v.msg}}{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
{{if empty($v['add_time
'])}}
<span
class=
"cr-ddd"
>
未设置
</span>
{{else /}}{{$v.add
_time}}{{/if}}
{{if empty($v['add_time
_time'])}}
<span
class=
"cr-ddd"
>
未设置
</span>
{{else /}}{{$v.add_time
_time}}{{/if}}
</td>
</tr>
{{/foreach}}
...
...
@@ -87,8 +87,8 @@
<!-- list end -->
<!-- page start -->
{{if !empty($list)}}
{{$page_html}}
{{if !empty($
data_
list)}}
{{$page_html
|raw
}}
{{/if}}
<!-- page end -->
</div>
...
...
application/admin/view/default/region/index.html
浏览文件 @
584ed8a0
...
...
@@ -18,7 +18,7 @@
</div>
<div
class=
"am-popup-bd"
>
<!-- form start -->
<form
class=
"am-form form-validation admin-save"
action=
"{{:url('
Admin/Region/S
ave')}}"
method=
"POST"
request-type=
"ajax-reload"
request-value=
""
>
<form
class=
"am-form form-validation admin-save"
action=
"{{:url('
admin/region/s
ave')}}"
method=
"POST"
request-type=
"ajax-reload"
request-value=
""
>
<div
class=
"am-form-group"
>
<label>
名称
</label>
<input
type=
"text"
placeholder=
"名称"
name=
"name"
minlength=
"2"
maxlength=
"16"
data-validation-message=
"名称格式 2~16 个字符"
class=
"am-radius"
required
/>
...
...
@@ -27,7 +27,7 @@
<label>
顺序
</label>
<input
type=
"number"
placeholder=
"顺序"
name=
"sort"
min=
"0"
max=
"255"
data-validation-message=
"顺序 0~255 之间的数值"
class=
"am-radius"
value=
"0"
required
/>
</div>
<include
file=
"Lib/Enable"
/>
{{include file="lib/enable" /}}
<div
class=
"am-form-group"
>
<input
type=
"hidden"
name=
"id"
/>
<input
type=
"hidden"
name=
"pid"
value=
"0"
/>
...
...
@@ -41,9 +41,9 @@
<!-- save win end -->
<!-- list start -->
<div
id=
"tree"
class=
"m-t-15
)}}
<div
id=
"tree"
class=
"m-t-15
"
>
<div
class=
"m-t-30 t-c"
>
<img
src=
"
__PUBLIC__/Common/I
mages/loading.gif"
/>
<img
src=
"
{{$image_host}}/static/common/i
mages/loading.gif"
/>
<p>
处理中...
</p>
</div>
</div>
...
...
@@ -56,5 +56,5 @@
{{include file="public/footer" /}}
<!-- footer end -->
<script>
Tree
(
0
,
"
{{:url('
Admin/Region/GetNodeS
on')}}
"
,
0
,
1
);
Tree
(
0
,
"
{{:url('
admin/region/getnodes
on')}}
"
,
0
,
1
);
</script>
\ No newline at end of file
application/service/ArticleService.php
浏览文件 @
584ed8a0
...
...
@@ -489,7 +489,7 @@ class ArticleService
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
0
);
return
DataReturn
(
'删除失败'
,
-
10
0
);
}
}
?>
\ No newline at end of file
application/service/BrandService.php
浏览文件 @
584ed8a0
...
...
@@ -484,7 +484,7 @@ class BrandService
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
0
);
return
DataReturn
(
'删除失败'
,
-
10
0
);
}
}
?>
\ No newline at end of file
application/service/ExpressService.php
浏览文件 @
584ed8a0
...
...
@@ -54,5 +54,135 @@ class ExpressService
}
return
$data
;
}
/**
* 获取快递节点数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-16T23:54:46+0800
* @param [array] $params [输入参数]
*/
public
static
function
ExpressNodeSon
(
$params
=
[])
{
// id
$id
=
isset
(
$params
[
'id'
])
?
intval
(
$params
[
'id'
])
:
0
;
// 获取数据
$field
=
'id,pid,icon,name,sort,is_enable'
;
$data
=
Db
::
name
(
'Express'
)
->
field
(
$field
)
->
where
([
'pid'
=>
$id
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$data
))
{
$image_host
=
config
(
'IMAGE_HOST'
);
foreach
(
$data
as
&
$v
)
{
$v
[
'is_son'
]
=
(
Db
::
name
(
'Express'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'ajax_url'
]
=
url
(
'admin/express/getnodeson'
,
array
(
'id'
=>
$v
[
'id'
]));
$v
[
'delete_url'
]
=
url
(
'admin/express/delete'
);
$v
[
'icon_url'
]
=
empty
(
$v
[
'icon'
])
?
''
:
$image_host
.
$v
[
'icon'
];
$v
[
'json'
]
=
json_encode
(
$v
);
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
return
DataReturn
(
'没有相关数据'
,
-
100
);
}
/**
* 快递保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-17T01:04:03+0800
* @param [array] $params [输入参数]
*/
public
static
function
ExpressSave
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'length'
,
'key_name'
=>
'name'
,
'checked_data'
=>
'2,16'
,
'error_msg'
=>
'名称格式 2~16 个字符'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 其它附件
$data_fields
=
[
'icon'
];
$attachment
=
ResourcesService
::
AttachmentParams
(
$params
,
$data_fields
);
if
(
$attachment
[
'code'
]
!=
0
)
{
return
$attachment
;
}
// 数据
$data
=
[
'name'
=>
$params
[
'name'
],
'pid'
=>
isset
(
$params
[
'pid'
])
?
intval
(
$params
[
'pid'
])
:
0
,
'sort'
=>
isset
(
$params
[
'sort'
])
?
intval
(
$params
[
'sort'
])
:
0
,
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
'icon'
=>
$attachment
[
'data'
][
'icon'
],
];
// 添加
if
(
empty
(
$params
[
'id'
]))
{
$data
[
'add_time'
]
=
time
();
if
(
Db
::
name
(
'Express'
)
->
insertGetId
(
$data
)
>
0
)
{
return
DataReturn
(
'添加成功'
,
0
);
}
return
DataReturn
(
'添加失败'
,
-
100
);
}
else
{
$data
[
'upd_time'
]
=
time
();
if
(
Db
::
name
(
'Express'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
update
(
$data
))
{
return
DataReturn
(
'编辑成功'
,
0
);
}
return
DataReturn
(
'编辑失败'
,
-
100
);
}
}
/**
* 快递删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-17T02:40:29+0800
* @param [array] $params [输入参数]
*/
public
static
function
ExpressDelete
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'删除数据id有误'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'admin'
,
'error_msg'
=>
'用户信息有误'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 开始删除
if
(
Db
::
name
(
'Express'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
delete
())
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
-
100
);
}
}
?>
\ No newline at end of file
application/service/GoodsService.php
浏览文件 @
584ed8a0
...
...
@@ -1916,7 +1916,7 @@ class GoodsService
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
0
);
return
DataReturn
(
'删除失败'
,
-
10
0
);
}
}
?>
\ No newline at end of file
application/service/IntegralService.php
浏览文件 @
584ed8a0
...
...
@@ -210,5 +210,103 @@ class IntegralService
}
return
DataReturn
(
'没有需要操作的数据'
,
0
);
}
/**
* 后台管理员列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
AdminIntegralList
(
$params
=
[])
{
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$field
=
'ui.*,u.username,u.nickname,u.mobile,u.gender'
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'ui.id desc'
:
$params
[
'order_by'
];
// 获取数据列表
$data
=
Db
::
name
(
'UserIntegralLog'
)
->
alias
(
'ui'
)
->
join
([
'__USER__'
=>
'u'
],
'u.id=ui.user_id'
)
->
where
(
$where
)
->
field
(
$field
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$common_integral_log_type_list
=
lang
(
'common_integral_log_type_list'
);
$common_gender_list
=
lang
(
'common_gender_list'
);
foreach
(
$data
as
&
$v
)
{
// 操作类型
$v
[
'type_text'
]
=
$common_integral_log_type_list
[
$v
[
'type'
]][
'name'
];
// 性别
$v
[
'gender_text'
]
=
$common_gender_list
[
$v
[
'gender'
]][
'name'
];
// 时间
$v
[
'add_time_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
$v
[
'add_time_date'
]
=
date
(
'Y-m-d'
,
$v
[
'add_time'
]);
}
}
return
DataReturn
(
'处理成功'
,
0
,
$data
);
}
/**
* 后台积分总数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $where [条件]
*/
public
static
function
AdminIntegralTotal
(
$where
=
[])
{
return
(
int
)
Db
::
name
(
'UserIntegralLog'
)
->
alias
(
'ui'
)
->
join
([
'__USER__'
=>
'u'
],
'u.id=ui.user_id'
)
->
where
(
$where
)
->
count
();
}
/**
* 后台积分列表条件
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
AdminIntegralListWhere
(
$params
=
[])
{
$where
=
[];
// 关键字
if
(
!
empty
(
$params
[
'keywords'
]))
{
$where
[]
=
[
'ui.msg|u.username|u.nickname|u.mobile'
,
'like'
,
'%'
.
$params
[
'keywords'
]
.
'%'
];
}
// 是否更多条件
if
(
isset
(
$params
[
'is_more'
])
&&
$params
[
'is_more'
]
==
1
)
{
// 等值
if
(
isset
(
$params
[
'type'
])
&&
$params
[
'type'
]
>
-
1
)
{
$where
[]
=
[
'ui.type'
,
'='
,
intval
(
$params
[
'type'
])];
}
if
(
isset
(
$params
[
'gender'
])
&&
$params
[
'gender'
]
>
-
1
)
{
$where
[]
=
[
'u.gender'
,
'='
,
intval
(
$params
[
'gender'
])];
}
if
(
!
empty
(
$params
[
'time_start'
]))
{
$where
[]
=
[
'ui.add_time'
,
'>'
,
strtotime
(
$params
[
'time_start'
])];
}
if
(
!
empty
(
$params
[
'time_end'
]))
{
$where
[]
=
[
'ui.add_time'
,
'<'
,
strtotime
(
$params
[
'time_end'
])];
}
}
return
$where
;
}
}
?>
\ No newline at end of file
application/service/RegionService.php
浏览文件 @
584ed8a0
...
...
@@ -57,5 +57,131 @@ class RegionService
return
Db
::
name
(
'Region'
)
->
where
(
$where
)
->
field
(
$field
)
->
order
(
'id asc, sort asc'
)
->
select
();
}
/**
* 获取地区节点数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-16T23:54:46+0800
* @param [array] $params [输入参数]
*/
public
static
function
RegionNodeSon
(
$params
=
[])
{
// id
$id
=
isset
(
$params
[
'id'
])
?
intval
(
$params
[
'id'
])
:
0
;
// 获取数据
$field
=
'id,pid,name,sort,is_enable'
;
$data
=
Db
::
name
(
'Region'
)
->
field
(
$field
)
->
where
([
'pid'
=>
$id
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$data
))
{
foreach
(
$data
as
&
$v
)
{
$v
[
'is_son'
]
=
(
Db
::
name
(
'Region'
)
->
where
([
'pid'
=>
$v
[
'id'
]])
->
count
()
>
0
)
?
'ok'
:
'no'
;
$v
[
'ajax_url'
]
=
url
(
'admin/region/getnodeson'
,
array
(
'id'
=>
$v
[
'id'
]));
$v
[
'delete_url'
]
=
url
(
'admin/region/delete'
);
$v
[
'json'
]
=
json_encode
(
$v
);
}
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
return
DataReturn
(
'没有相关数据'
,
-
100
);
}
/**
* 地区保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-17T01:04:03+0800
* @param [array] $params [输入参数]
*/
public
static
function
RegionSave
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'length'
,
'key_name'
=>
'name'
,
'checked_data'
=>
'2,16'
,
'error_msg'
=>
'名称格式 2~16 个字符'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 数据
$data
=
[
'name'
=>
$params
[
'name'
],
'pid'
=>
isset
(
$params
[
'pid'
])
?
intval
(
$params
[
'pid'
])
:
0
,
'sort'
=>
isset
(
$params
[
'sort'
])
?
intval
(
$params
[
'sort'
])
:
0
,
'is_enable'
=>
isset
(
$params
[
'is_enable'
])
?
intval
(
$params
[
'is_enable'
])
:
0
,
];
// 添加
if
(
empty
(
$params
[
'id'
]))
{
$data
[
'add_time'
]
=
time
();
if
(
Db
::
name
(
'Region'
)
->
insertGetId
(
$data
)
>
0
)
{
return
DataReturn
(
'添加成功'
,
0
);
}
return
DataReturn
(
'添加失败'
,
-
100
);
}
else
{
$data
[
'upd_time'
]
=
time
();
if
(
Db
::
name
(
'Region'
)
->
where
([
'id'
=>
intval
(
$params
[
'id'
])])
->
update
(
$data
))
{
return
DataReturn
(
'编辑成功'
,
0
);
}
return
DataReturn
(
'编辑失败'
,
-
100
);
}
}
/**
* 地区删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-17T02:40:29+0800
* @param [array] $params [输入参数]
*/
public
static
function
RegionDelete
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'删除数据id有误'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'admin'
,
'error_msg'
=>
'用户信息有误'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 是否还有子数据
$temp_count
=
Db
::
name
(
'Region'
)
->
where
([
'pid'
=>
$params
[
'id'
]])
->
count
();
if
(
$temp_count
>
0
)
{
return
DataReturn
(
'请先删除子数据'
,
-
10
);
}
// 开始删除
if
(
Db
::
name
(
'Region'
)
->
where
([
'id'
=>
$params
[
'id'
]])
->
delete
())
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
-
100
);
}
}
?>
\ No newline at end of file
application/service/ScreeningPriceService.php
浏览文件 @
584ed8a0
...
...
@@ -139,7 +139,7 @@ class ScreeningPriceService
{
return
DataReturn
(
'删除成功'
,
0
);
}
return
DataReturn
(
'删除失败'
,
0
);
return
DataReturn
(
'删除失败'
,
-
10
0
);
}
}
?>
\ No newline at end of file
public/install/shopxo_tp5.sql
浏览文件 @
584ed8a0
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
public/static/admin/default/css/express.css
0 → 100644
浏览文件 @
584ed8a0
ul
.plug-file-upload-view
li
{
width
:
56px
;
height
:
56px
;
}
\ No newline at end of file
public/static/admin/default/css/
user
integrallog.css
→
public/static/admin/default/css/integrallog.css
浏览文件 @
584ed8a0
文件已移动
public/static/admin/default/js/admin.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/article.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/customview.js
已删除
100755 → 0
浏览文件 @
cf6738ab
public/static/admin/default/js/message.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/paylog.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/slide.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/user.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/admin/default/js/userintegrallog.js
已删除
100755 → 0
浏览文件 @
cf6738ab
$
(
function
()
{
});
\ No newline at end of file
public/static/upload/images/express/2018/08/20180807143522649704.jpeg
已删除
100755 → 0
浏览文件 @
cf6738ab
824.3 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录