Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
5746143e
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,发现更多精彩内容 >>
提交
5746143e
编写于
12月 20, 2018
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
admin
上级
d548d90f
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
247 addition
and
421 deletion
+247
-421
application/admin/controller/Answer.php
application/admin/controller/Answer.php
+3
-3
application/admin/controller/Brand.php
application/admin/controller/Brand.php
+50
-108
application/admin/controller/BrandCategory.php
application/admin/controller/BrandCategory.php
+0
-1
application/admin/controller/CustomView.php
application/admin/controller/CustomView.php
+8
-8
application/admin/controller/Order.php
application/admin/controller/Order.php
+3
-3
application/admin/controller/Slide.php
application/admin/controller/Slide.php
+8
-8
application/admin/view/default/brand/index.html
application/admin/view/default/brand/index.html
+26
-26
application/index/controller/Index.php
application/index/controller/Index.php
+1
-1
application/index/controller/Message.php
application/index/controller/Message.php
+3
-3
application/index/controller/Order.php
application/index/controller/Order.php
+9
-9
application/index/controller/User.php
application/index/controller/User.php
+9
-9
application/index/controller/UserFavor.php
application/index/controller/UserFavor.php
+3
-3
application/index/controller/UserGoodsBrowse.php
application/index/controller/UserGoodsBrowse.php
+3
-3
application/index/controller/UserIntegral.php
application/index/controller/UserIntegral.php
+3
-3
application/service/AnswerService.php
application/service/AnswerService.php
+4
-32
application/service/BannerService.php
application/service/BannerService.php
+3
-30
application/service/BrandService.php
application/service/BrandService.php
+88
-9
application/service/GoodsService.php
application/service/GoodsService.php
+8
-64
application/service/IntegralService.php
application/service/IntegralService.php
+4
-32
application/service/MessageService.php
application/service/MessageService.php
+4
-32
application/service/OrderService.php
application/service/OrderService.php
+4
-32
application/service/SlideService.php
application/service/SlideService.php
+2
-1
public/core.php
public/core.php
+1
-1
未找到文件。
application/admin/controller/Answer.php
浏览文件 @
5746143e
...
...
@@ -65,9 +65,9 @@ class Answer extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
AnswerService
::
AnswerList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/admin/controller/Brand.php
浏览文件 @
5746143e
<?php
namespace
app\admin\controller
;
use
app\service\BrandService
;
/**
* 品牌管理
* @author Devil
...
...
@@ -39,123 +40,51 @@ class Brand extends Common
*/
public
function
Index
()
{
// 参数
$param
=
array_merge
(
$_POST
,
$_GET
);
// 参数
$param
s
=
input
(
);
//
模型对象
$
m
=
db
(
'Brand'
)
;
//
分页
$
number
=
10
;
// 条件
$where
=
$this
->
GetIndexWhere
();
$where
=
BrandService
::
BrandListListWhere
(
$params
);
// 获取总数
$total
=
BrandService
::
BrandTotal
(
$where
);
// 分页
$number
=
MyC
(
'admin_page_number'
);
$page_param
=
array
(
$page_params
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
'where'
=>
$param
,
'url'
=>
url
(
'Admin/Brand/Index'
),
'total'
=>
$total
,
'where'
=>
$params
,
'page'
=>
isset
(
$params
[
'page'
])
?
intval
(
$params
[
'page'
])
:
1
,
'url'
=>
url
(
'admin/brand/index'
),
);
$page
=
new
\
base\Page
(
$page_param
);
$page
=
new
\
base\Page
(
$page_params
);
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
// 获取列表
$list
=
$this
->
SetDataHandle
(
$m
->
where
(
$where
)
->
limit
(
$page
->
GetPageStarNumber
(),
$number
)
->
order
(
'id desc'
)
->
select
());
// 参数
$this
->
assign
(
'param'
,
$param
);
// 分页
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
$data_params
=
array
(
'm'
=>
$page
->
GetPageStarNumber
(),
'n'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'*'
,
);
$data
=
BrandService
::
BrandList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
// 品牌分类
$brand_category
=
db
(
'BrandCategory'
)
->
where
([
'is_enable'
=>
1
])
->
field
(
'id,name'
)
->
select
(
);
$this
->
assign
(
'brand_category'
,
$brand_category
);
$brand_category
=
BrandService
::
BrandCategoryList
([
'field'
=>
'id,name'
]
);
$this
->
assign
(
'brand_category'
,
$brand_category
[
'data'
]
);
//
数据列表
$this
->
assign
(
'
list'
,
$list
);
$this
->
display
(
'Index'
);
//
参数
$this
->
assign
(
'
params'
,
$params
);
return
$this
->
fetch
(
);
}
/**
* [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_is_enable_tips
=
lang
(
'common_is_enable_tips'
);
foreach
(
$data
as
&
$v
)
{
// 是否启用
$v
[
'is_enable_text'
]
=
$common_is_enable_tips
[
$v
[
'is_enable'
]][
'name'
];
// 分类名称
$v
[
'brand_category_text'
]
=
db
(
'BrandCategory'
)
->
where
([
'id'
=>
$v
[
'brand_category_id'
]])
->
getField
(
'name'
);
// logo
$v
[
'logo'
]
=
empty
(
$v
[
'logo'
])
?
''
:
config
(
'IMAGE_HOST'
)
.
$v
[
'logo'
];
// 添加时间
$v
[
'add_time_text'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
// 更新时间
$v
[
'upd_time_text'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_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'
]))
{
$where
[
'name'
]
=
array
(
'like'
,
'%'
.
I
(
'keyword'
)
.
'%'
);
}
// 是否更多条件
if
(
I
(
'is_more'
,
0
)
==
1
)
{
if
(
I
(
'is_enable'
,
-
1
)
>
-
1
)
{
$where
[
'is_enable'
]
=
intval
(
I
(
'is_enable'
,
0
));
}
if
(
I
(
'brand_category_id'
,
-
1
)
>
-
1
)
{
$where
[
'brand_category_id'
]
=
intval
(
I
(
'brand_category_id'
,
0
));
}
// 表达式
if
(
!
empty
(
$_REQUEST
[
'time_start'
]))
{
$where
[
'add_time'
][]
=
array
(
'gt'
,
strtotime
(
I
(
'time_start'
)));
}
if
(
!
empty
(
$_REQUEST
[
'time_end'
]))
{
$where
[
'add_time'
][]
=
array
(
'lt'
,
strtotime
(
I
(
'time_end'
)));
}
}
return
$where
;
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
...
...
@@ -165,21 +94,34 @@ class Brand extends Common
*/
public
function
SaveInfo
()
{
// 轮播图片信息
$data
=
empty
(
$_REQUEST
[
'id'
])
?
array
()
:
db
(
'Brand'
)
->
find
(
I
(
'id'
));
$this
->
assign
(
'data'
,
$data
);
// 参数
$params
=
input
();
// 数据
if
(
!
empty
(
$params
[
'id'
]))
{
// 获取列表
$data_params
=
array
(
'm'
=>
0
,
'n'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$data
=
BrandService
::
BrandList
(
$data_params
);
$this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
]);
}
// 是否启用
$this
->
assign
(
'common_is_enable_list'
,
lang
(
'common_is_enable_list'
));
// 品牌分类
$brand_category
=
db
(
'BrandCategory'
)
->
where
([
'is_enable'
=>
1
])
->
field
(
'id,name'
)
->
select
(
);
$this
->
assign
(
'brand_category'
,
$brand_category
);
$brand_category
=
BrandService
::
BrandCategoryList
([
'field'
=>
'id,name'
]
);
$this
->
assign
(
'brand_category'
,
$brand_category
[
'data'
]
);
// 参数
$this
->
assign
(
'param
'
,
array_merge
(
$_POST
,
$_GET
)
);
$this
->
assign
(
'param
s'
,
$params
);
$this
->
display
(
'SaveInfo'
);
return
$this
->
fetch
(
);
}
/**
...
...
application/admin/controller/BrandCategory.php
浏览文件 @
5746143e
<?php
namespace
app\admin\controller
;
/**
...
...
application/admin/controller/CustomView.php
浏览文件 @
5746143e
...
...
@@ -65,10 +65,10 @@ class CustomView extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'*'
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'*'
,
);
$data
=
CustomViewService
::
CustomViewList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
@@ -107,10 +107,10 @@ class CustomView extends Common
{
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
'
m'
=>
0
,
'
n'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$data
=
CustomViewService
::
CustomViewList
(
$data_params
);
$this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
]);
...
...
application/admin/controller/Order.php
浏览文件 @
5746143e
...
...
@@ -69,9 +69,9 @@ class Order extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
OrderService
::
OrderList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/admin/controller/Slide.php
浏览文件 @
5746143e
...
...
@@ -65,10 +65,10 @@ class Slide extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'*'
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
'field'
=>
'*'
,
);
$data
=
SlideService
::
SlideList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
@@ -104,10 +104,10 @@ class Slide extends Common
{
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
'
m'
=>
0
,
'
n'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
'field'
=>
'*'
,
);
$data
=
SlideService
::
SlideList
(
$data_params
);
$this
->
assign
(
'data'
,
empty
(
$data
[
'data'
][
0
])
?
[]
:
$data
[
'data'
][
0
]);
...
...
application/admin/view/default/brand/index.html
浏览文件 @
5746143e
...
...
@@ -4,33 +4,33 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- form start -->
<form
class=
"am-form view-list"
action=
"{{:url('
Admin/Brand/I
ndex')}}"
method=
"POST"
>
<form
class=
"am-form view-list"
action=
"{{:url('
admin/brand/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"
class=
"am-radius form-keyword"
placeholder=
"名称"
name=
"keyword
s"
{{
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=
"is_enable"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1
)}}
是否启用</option>
<foreach name="
common_is_enable_list
"
item=
"v"
>
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
['
is_enable
'])
and
$
param
['
is_enable
']
eq
$
v
['
id
']"
>
selected{{/if}}>{{$v.name}}
</option>
<option
value=
"-1
"
>
是否启用
</option>
{{foreach $common_is_enable_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
s
['
is_enable
'])
and
$
params
['
is_enable
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
<select
name=
"brand_category_id"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
""
>
品牌分类
</option>
<foreach
name=
"brand_category"
item=
"v"
>
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
['
brand_category_id
'])
and
$
param
['
brand_category_id
']
eq
$
v
['
id
']"
>
selected{{/if}}>{{$v.name}}
</option>
{{foreach $brand_category as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
param
s
['
brand_category_id
'])
and
$
params
['
brand_category_id
']
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"
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
s
['
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"
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
s
['
time_end
'])}}
value=
"{{$params
.time_end}}"
{{/
if
}}
/>
</div>
</div>
</div>
...
...
@@ -38,13 +38,13 @@
<!-- form end -->
<!-- operation start -->
<div
class=
"am-g m-t-15
)}}
<a href="
{{
:url
('
Admin
/
Brand
/
SaveI
nfo
')}}"
class=
"am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"
>
新增
</a>
<div
class=
"am-g m-t-15
"
>
<a
href=
"{{:url('
admin/brand/savei
nfo')}}"
class=
"am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"
>
新增
</a>
</div>
<!-- operation end -->
<!-- list start -->
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-1
)}}
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-1
0"
>
<thead>
<tr>
<th>
名称
</th>
...
...
@@ -57,9 +57,9 @@
</tr>
</thead>
<tbody>
{{if !empty($list)}}
<foreach
name=
"list"
item=
"v"
>
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
is_enable
']
eq
0
)
}}
class=
"am-active"
{{/
if
}}
>
{{if !empty($
data_
list)}}
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.id}}"
{{
if
$
v
['
is_enable
']
eq
0}}
class=
"am-active"
{{/
if
}}
>
<td>
{{$v.name}}
</td>
<td>
{{if !empty($v['logo'])}}
...
...
@@ -70,7 +70,7 @@
<span
class=
"cr-ddd"
>
暂无图片
</span>
{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.brand_category_
text
}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.brand_category_
name
}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.website_url}}
{{if !empty($v['website_url'])}}
...
...
@@ -80,15 +80,15 @@
{{/if}}
</td>
<td>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1
)}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:url('Admin/Brand/StateUpdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-is-update-status=
"1)}}
</a>
<a
href=
"javascript:;"
class=
"am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1
}}am-success{{else /}}am-default{{/if}}"
data-url=
"{{:url('admin/brand/statusupdate')}}"
data-id=
"{{$v.id}}"
data-state=
"{{$v['is_enable']}}"
data-is-update-status=
"1"
>
</a>
</td>
<td class="
am-hide-sm-only
"
>
{{$v.add_time_t
ext
}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.add_time_t
ime
}}
</td>
<td
class=
"view-operation"
>
<a
href=
"{{:url('
Admin/Brand/SaveI
nfo', array('id'=>$v['id']))}}"
>
<a
href=
"{{:url('
admin/brand/savei
nfo', array('id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
编辑
</button>
</a>
{{if $v['is_enable'] eq 0
)
}}
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:url('
Admin/B
rand/Delete')}}"
data-id=
"{{$v.id}}"
>
删除
</button>
{{if $v['is_enable'] eq 0}}
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:url('
admin/b
rand/Delete')}}"
data-id=
"{{$v.id}}"
>
删除
</button>
{{/if}}
</td>
</tr>
...
...
@@ -101,8 +101,8 @@
<!-- list end -->
<!-- page start -->
{{if !empty($list)}}
{{$page_html}}
{{if !empty($
data_
list)}}
{{$page_html
|raw
}}
{{/if}}
<!-- page end -->
</div>
...
...
application/index/controller/Index.php
浏览文件 @
5746143e
...
...
@@ -51,7 +51,7 @@ class Index extends Common
// 首页轮播
$this
->
assign
(
'banner_list'
,
BannerService
::
PC
());
$this
->
assign
(
'banner_list'
,
BannerService
::
Banner
());
// 楼层数据
$this
->
assign
(
'goods_floor_list'
,
GoodsService
::
HomeFloorList
());
...
...
application/index/controller/Message.php
浏览文件 @
5746143e
...
...
@@ -68,9 +68,9 @@ class Message extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
MessageService
::
MessageList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/index/controller/Order.php
浏览文件 @
5746143e
...
...
@@ -66,9 +66,9 @@ class Order extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
OrderService
::
OrderList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
@@ -110,9 +110,9 @@ class Order extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
1
,
'where'
=>
$where
,
'
m'
=>
0
,
'
n'
=>
1
,
'where'
=>
$where
,
);
$data
=
OrderService
::
OrderList
(
$data_params
);
if
(
!
empty
(
$data
[
'data'
][
0
]))
...
...
@@ -151,9 +151,9 @@ class Order extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
1
,
'where'
=>
$where
,
'
m'
=>
0
,
'
n'
=>
1
,
'where'
=>
$where
,
);
$data
=
OrderService
::
OrderList
(
$data_params
);
if
(
!
empty
(
$data
[
'data'
][
0
]))
...
...
application/index/controller/User.php
浏览文件 @
5746143e
...
...
@@ -91,9 +91,9 @@ class User extends Common
$params
[
'user_type'
]
=
'user'
;
$where
=
OrderService
::
OrderListWhere
(
$params
);
$order_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
3
,
'where'
=>
$where
,
'
m'
=>
0
,
'
n'
=>
3
,
'where'
=>
$where
,
);
$order
=
OrderService
::
OrderList
(
$order_params
);
$this
->
assign
(
'order_list'
,
$order
[
'data'
]);
...
...
@@ -107,9 +107,9 @@ class User extends Common
$params
[
'user'
]
=
$this
->
user
;
$where
=
GoodsService
::
UserGoodsFavorListWhere
(
$params
);
$favor_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
8
,
'where'
=>
$where
,
'
m'
=>
0
,
'
n'
=>
8
,
'where'
=>
$where
,
);
$favor
=
GoodsService
::
GoodsFavorList
(
$favor_params
);
$this
->
assign
(
'goods_favor_list'
,
$favor
[
'data'
]);
...
...
@@ -119,9 +119,9 @@ class User extends Common
$params
[
'user'
]
=
$this
->
user
;
$where
=
GoodsService
::
UserGoodsBrowseListWhere
(
$params
);
$browse_params
=
array
(
'
limit_start'
=>
0
,
'
limit_number'
=>
6
,
'where'
=>
$where
,
'
m'
=>
0
,
'
n'
=>
6
,
'where'
=>
$where
,
);
$data
=
GoodsService
::
GoodsBrowseList
(
$browse_params
);
$this
->
assign
(
'goods_browse_list'
,
$data
[
'data'
]);
...
...
application/index/controller/UserFavor.php
浏览文件 @
5746143e
...
...
@@ -64,9 +64,9 @@ class UserFavor extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
GoodsService
::
GoodsFavorList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/index/controller/UserGoodsBrowse.php
浏览文件 @
5746143e
...
...
@@ -64,9 +64,9 @@ class UserGoodsBrowse extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
GoodsService
::
GoodsBrowseList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/index/controller/UserIntegral.php
浏览文件 @
5746143e
...
...
@@ -64,9 +64,9 @@ class UserIntegral extends Common
// 获取列表
$data_params
=
array
(
'
limit_start'
=>
$page
->
GetPageStarNumber
(),
'
limit_number'
=>
$number
,
'where'
=>
$where
,
'
m'
=>
$page
->
GetPageStarNumber
(),
'
n'
=>
$number
,
'where'
=>
$where
,
);
$data
=
IntegralService
::
UserIntegralLogList
(
$data_params
);
$this
->
assign
(
'data_list'
,
$data
[
'data'
]);
...
...
application/service/AnswerService.php
浏览文件 @
5746143e
...
...
@@ -37,41 +37,13 @@ class AnswerService
*/
public
static
function
AnswerList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'id desc'
:
$params
[
'order_by'
];
// 获取数据列表
$data
=
db
(
'Answer'
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'Answer'
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$common_is_show_list
=
lang
(
'common_is_show_list'
);
...
...
application/service/BannerService.php
浏览文件 @
5746143e
<?php
namespace
app\service
;
/**
...
...
@@ -12,33 +11,7 @@ namespace app\service;
class
BannerService
{
/**
* 获取首页轮播 - PC
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
PC
(
$params
=
[])
{
// 轮播图片
$banner
=
db
(
'Slide'
)
->
field
(
'name,jump_url,images_url,bg_color'
)
->
where
([
'is_enable'
=>
1
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$banner
))
{
$images_host
=
config
(
'IMAGE_HOST'
);
foreach
(
$banner
as
&
$v
)
{
$v
[
'images_url_old'
]
=
$v
[
'images_url'
];
$v
[
'images_url'
]
=
$images_host
.
$v
[
'images_url'
];
$v
[
'jump_url'
]
=
empty
(
$v
[
'jump_url'
])
?
null
:
$v
[
'jump_url'
];
}
}
return
$banner
;
}
/**
* 获取轮播 - APP
* 获取轮播
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -46,9 +19,9 @@ class BannerService
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
App
(
$params
=
[])
public
static
function
Banner
(
$params
=
[])
{
$banner
=
db
(
'
AppSlide'
)
->
field
(
'name,images_url,event_value,event_type
'
)
->
where
([
'platform'
=>
APPLICATION_CLIENT_TYPE
,
'is_enable'
=>
1
])
->
order
(
'sort asc'
)
->
select
();
$banner
=
db
(
'
Slide'
)
->
field
(
'name,images_url,event_value,event_type,bg_color
'
)
->
where
([
'platform'
=>
APPLICATION_CLIENT_TYPE
,
'is_enable'
=>
1
])
->
order
(
'sort asc'
)
->
select
();
if
(
!
empty
(
$banner
))
{
$images_host
=
config
(
'IMAGE_HOST'
);
...
...
application/service/BrandService.php
浏览文件 @
5746143e
...
...
@@ -38,22 +38,38 @@ class BrandService
foreach
(
$data
as
&
$v
)
{
// 是否启用
$v
[
'is_enable_text'
]
=
$common_is_enable_tips
[
$v
[
'is_enable'
]][
'name'
];
if
(
isset
(
$v
[
'is_enable'
]))
{
$v
[
'is_enable_text'
]
=
$common_is_enable_tips
[
$v
[
'is_enable'
]][
'name'
];
}
// 分类名称
$v
[
'brand_category_name'
]
=
db
(
'BrandCategory'
)
->
where
([
'id'
=>
$v
[
'brand_category_id'
]])
->
value
(
'name'
);
if
(
isset
(
$v
[
'brand_category_id'
]))
{
$v
[
'brand_category_name'
]
=
db
(
'BrandCategory'
)
->
where
([
'id'
=>
$v
[
'brand_category_id'
]])
->
value
(
'name'
);
}
// logo
$v
[
'logo'
]
=
empty
(
$v
[
'logo'
])
?
''
:
$images_host
.
$v
[
'logo'
];
if
(
isset
(
$v
[
'logo'
]))
{
$v
[
'logo_old'
]
=
$v
[
'logo'
];
$v
[
'logo'
]
=
empty
(
$v
[
'logo'
])
?
''
:
$images_host
.
$v
[
'logo'
];
}
// 添加时间
$v
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
// 更新时间
$v
[
'upd_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_time'
]);
// 时间
if
(
isset
(
$v
[
'add_time'
]))
{
$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'
]);
}
if
(
isset
(
$v
[
'upd_time'
]))
{
$v
[
'upd_time_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_time'
]);
$v
[
'upd_time_date'
]
=
date
(
'Y-m-d'
,
$v
[
'upd_time'
]);
}
}
}
return
$data
;
return
DataReturn
(
'处理成功'
,
0
,
$data
)
;
}
/**
...
...
@@ -69,6 +85,50 @@ class BrandService
return
(
int
)
db
(
'Brand'
)
->
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
BrandListListWhere
(
$params
=
[])
{
$where
=
[];
if
(
!
empty
(
$params
[
'keywords'
]))
{
$where
[]
=
[
'name'
,
'like'
,
'%'
.
$params
[
'keywords'
]
.
'%'
];
}
// 是否更多条件
if
(
isset
(
$params
[
'is_more'
])
&&
$params
[
'is_more'
]
==
1
)
{
// 等值
if
(
isset
(
$params
[
'is_enable'
])
&&
$params
[
'is_enable'
]
>
-
1
)
{
$where
[]
=
[
'is_enable'
,
'='
,
intval
(
$params
[
'is_enable'
])];
}
if
(
isset
(
$params
[
'brand_category_id'
])
&&
$params
[
'brand_category_id'
]
>
-
1
)
{
$where
[]
=
[
'brand_category_id'
,
'='
,
intval
(
$params
[
'brand_category_id'
])];
}
if
(
!
empty
(
$params
[
'time_start'
]))
{
$where
[]
=
[
'add_time'
,
'>'
,
strtotime
(
$params
[
'time_start'
])];
}
if
(
!
empty
(
$params
[
'time_end'
]))
{
$where
[]
=
[
'add_time'
,
'<'
,
strtotime
(
$params
[
'time_end'
])];
}
}
return
$where
;
}
/**
* 获取所有分类及下面品牌
* @author Devil
...
...
@@ -138,5 +198,24 @@ class BrandService
{
return
empty
(
$brand_id
)
?
null
:
db
(
'Brand'
)
->
where
([
'id'
=>
intval
(
$brand_id
)])
->
value
(
'name'
);
}
/**
* 品牌分类
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-08-29
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
BrandCategoryList
(
$params
=
[])
{
$field
=
empty
(
$params
[
'field'
])
?
'*'
:
$params
[
'field'
];
$order_by
=
empty
(
$params
[
'order_by'
])
?
'sort asc'
:
trim
(
$params
[
'order_by'
]);
$data
=
db
(
'BrandCategory'
)
->
where
([
'is_enable'
=>
1
])
->
field
(
$field
)
->
order
(
$order_by
)
->
select
();
return
DataReturn
(
'处理成功'
,
0
,
$data
);
}
}
?>
\ No newline at end of file
application/service/GoodsService.php
浏览文件 @
5746143e
...
...
@@ -552,42 +552,14 @@ class GoodsService
*/
public
static
function
GoodsFavorList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'f.id desc'
:
$params
[
'order_by'
];
$field
=
'f.*, g.title, g.original_price, g.price, g.images'
;
// 获取数据
$data
=
db
(
'GoodsFavor'
)
->
alias
(
'f'
)
->
join
([
'__GOODS__'
=>
'g'
],
'g.id=f.goods_id'
)
->
field
(
$field
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'GoodsFavor'
)
->
alias
(
'f'
)
->
join
([
'__GOODS__'
=>
'g'
],
'g.id=f.goods_id'
)
->
field
(
$field
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$images_host
=
config
(
'IMAGE_HOST'
);
...
...
@@ -727,42 +699,14 @@ class GoodsService
*/
public
static
function
GoodsBrowseList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'b.id desc'
:
$params
[
'order_by'
];
$field
=
'b.*, g.title, g.original_price, g.price, g.images'
;
// 获取数据
$data
=
db
(
'GoodsBrowse'
)
->
alias
(
'b'
)
->
join
([
'__GOODS__'
=>
'g'
],
'g.id=b.goods_id'
)
->
field
(
$field
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'GoodsBrowse'
)
->
alias
(
'b'
)
->
join
([
'__GOODS__'
=>
'g'
],
'g.id=b.goods_id'
)
->
field
(
$field
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$images_host
=
config
(
'IMAGE_HOST'
);
...
...
application/service/IntegralService.php
浏览文件 @
5746143e
...
...
@@ -120,41 +120,13 @@ class IntegralService
*/
public
static
function
UserIntegralLogList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'id desc'
:
$params
[
'order_by'
];
// 获取数据列表
$data
=
db
(
'UserIntegralLog'
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'UserIntegralLog'
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$common_integral_log_type_list
=
lang
(
'common_integral_log_type_list'
);
...
...
application/service/MessageService.php
浏览文件 @
5746143e
...
...
@@ -162,41 +162,13 @@ class MessageService
*/
public
static
function
MessageList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'id desc'
:
$params
[
'order_by'
];
// 获取数据列表
$data
=
db
(
'Message'
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'Message'
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$common_business_type_list
=
lang
(
'common_business_type_list'
);
...
...
application/service/OrderService.php
浏览文件 @
5746143e
...
...
@@ -525,42 +525,14 @@ class OrderService
*/
public
static
function
OrderList
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件不能为空'
,
],
[
'checked_type'
=>
'is_array'
,
'key_name'
=>
'where'
,
'error_msg'
=>
'条件格式有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_start'
,
'error_msg'
=>
'分页起始值有误'
,
],
[
'checked_type'
=>
'isset'
,
'key_name'
=>
'limit_number'
,
'error_msg'
=>
'分页数量不能为空'
,
],
];
$ret
=
params_checked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
$limit_start
=
max
(
0
,
intval
(
$params
[
'limit_start'
]));
$limit_number
=
max
(
1
,
intval
(
$params
[
'limit_number'
]));
$where
=
empty
(
$params
[
'where'
])
?
[]
:
$params
[
'where'
];
$m
=
isset
(
$params
[
'm'
])
?
intval
(
$params
[
'm'
])
:
0
;
$n
=
isset
(
$params
[
'n'
])
?
intval
(
$params
[
'n'
])
:
10
;
$order_by
=
empty
(
$params
[
'order_by'
])
?
'id desc'
:
$params
[
'order_by'
];
$is_items
=
isset
(
$params
[
'is_items'
])
?
intval
(
$params
[
'is_items'
])
:
1
;
// 获取订单
$data
=
db
(
'Order'
)
->
where
(
$
params
[
'where'
])
->
limit
(
$limit_start
,
$limit_number
)
->
order
(
$order_by
)
->
select
();
$data
=
db
(
'Order'
)
->
where
(
$
where
)
->
limit
(
$m
,
$n
)
->
order
(
$order_by
)
->
select
();
if
(
!
empty
(
$data
))
{
$detail_field
=
'id,goods_id,title,images,original_price,price,spec,buy_number'
;
...
...
application/service/SlideService.php
浏览文件 @
5746143e
...
...
@@ -166,6 +166,7 @@ class SlideService
'checked_type'
=>
'in'
,
'key_name'
=>
'event_type'
,
'checked_data'
=>
array_column
(
lang
(
'common_app_event_type'
),
'value'
),
'is_checked'
=>
2
,
'error_msg'
=>
'事件值类型有误'
,
],
[
...
...
@@ -201,7 +202,7 @@ class SlideService
$data
=
[
'name'
=>
$params
[
'name'
],
'platform'
=>
$params
[
'platform'
],
'event_type'
=>
i
ntval
(
$params
[
'event_type'
])
,
'event_type'
=>
i
sset
(
$params
[
'event_type'
])
?
intval
(
$params
[
'event_type'
])
:
-
1
,
'event_value'
=>
$params
[
'event_value'
],
'images_url'
=>
$attachment
[
'data'
][
'images_url'
],
'bg_color'
=>
isset
(
$params
[
'bg_color'
])
?
$params
[
'bg_color'
]
:
''
,
...
...
public/core.php
浏览文件 @
5746143e
...
...
@@ -62,7 +62,7 @@ define('APPLICATION', empty($_REQUEST['application']) ? 'web' : trim($_REQUEST['
// 请求客户端 [default, ...] 默认default
define
(
'APPLICATION_CLIENT'
,
empty
(
$_REQUEST
[
'application_client'
])
?
'default'
:
trim
(
$_REQUEST
[
'application_client'
]));
// 请求客户端 [pc,
wap/
h5, alipay, wechat, baidu] 默认pc
// 请求客户端 [pc, h5, alipay, wechat, baidu] 默认pc
define
(
'APPLICATION_CLIENT_TYPE'
,
empty
(
$_REQUEST
[
'application_client_type'
])
?
'pc'
:
trim
(
$_REQUEST
[
'application_client_type'
]));
// 是否ajax
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录