切换导航条
此项目
正在载入...
登录
景龙
/
feipin
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
c4399d18843f0beda0c6ddc893e29b44fd104146
1 个父辈
e680769f
1 个管道 的构建
通过
耗费 1 秒
修改列表倒序排序
变更
13
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
13 个修改的文件
包含
18 行增加
和
0 行删除
application/api/controller/Abouts.php
application/api/controller/Cars.php
application/api/controller/Comments.php
application/api/controller/Gifts.php
application/api/controller/Goods.php
application/api/controller/Gorders.php
application/api/controller/Index.php
application/api/controller/Omessages.php
application/api/controller/Person.php
application/api/controller/Porders.php
application/api/controller/Problems.php
application/api/controller/Smessages.php
application/api/controller/Teams.php
application/api/controller/Abouts.php
查看文件 @
c4399d1
...
...
@@ -40,6 +40,7 @@ class Abouts extends Api
if
(
$this
->
request
->
isGet
()){
$data
=
Db
::
table
(
'gc_about'
)
->
field
(
'id,description,image,lng,lat'
)
->
order
(
'id desc'
)
->
find
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Cars.php
查看文件 @
c4399d1
...
...
@@ -104,6 +104,7 @@ class Cars extends Api
->
join
(
'gc_user u'
,
'p.uid = u.id'
,
'LEFT'
)
->
where
([
'c.uid'
=>
$this
->
user_id
,
'p.status'
=>
$this
->
normal
,
'u.status'
=>
'normal'
])
->
field
(
'c.id,c.p_id,p.title,p.price,c.num,p.images'
)
->
order
(
'c.id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Comments.php
查看文件 @
c4399d1
...
...
@@ -114,6 +114,7 @@ class Comments extends Api
->
where
([
'c.p_id'
=>
$goods_id
,
'u.status'
=>
'normal'
])
->
page
(
$page
,
$limit
)
->
field
(
'c.id,u.nickname,u.avatar,c.content,c.num,c.createtime'
)
->
order
(
'c.id desc'
)
->
select
();
foreach
(
$data
as
&
$value
){
$value
[
'createtime'
]
=
date
(
'Y-m-d'
,
$value
[
'createtime'
]);
...
...
application/api/controller/Gifts.php
查看文件 @
c4399d1
...
...
@@ -68,6 +68,7 @@ class Gifts extends Api
->
where
([
'status'
=>
$this
->
normal
])
->
page
(
$page
,
$limit
)
->
field
(
'id,title,score,images'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
[
'my_score'
=>
$myScore
[
'score'
],
'data'
=>
$data
]);
}
else
{
...
...
application/api/controller/Goods.php
查看文件 @
c4399d1
...
...
@@ -72,6 +72,7 @@ class Goods extends Api
->
where
([
'p.category_id'
=>
$category_id
,
'p.status'
=>
$this
->
normal
,
'u.status'
=>
'normal'
])
->
page
(
$page
,
$limit
)
->
field
(
'p.id,u.type,p.title,u.address,p.pre_time,p.images'
)
->
order
(
'p.id desc'
)
->
select
();
foreach
(
$data
as
&
$value
){
$value
[
'pre_time'
]
=
date
(
'Y-m-d H:i:s'
,
$value
[
'pre_time'
]);
...
...
@@ -171,6 +172,7 @@ class Goods extends Api
$data
=
Db
::
table
(
'gc_search'
)
->
where
([
'uid'
=>
$this
->
user_id
])
->
field
(
'id,keywords'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
@@ -309,6 +311,7 @@ class Goods extends Api
->
where
(
$where
)
->
field
(
'p.id,p.title,p.price,p.images'
)
->
limit
(
20
)
->
order
(
'p.id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Gorders.php
查看文件 @
c4399d1
...
...
@@ -242,6 +242,7 @@ class Gorders extends Api
->
where
([
'o.uid'
=>
$this
->
user_id
,
'g.status'
=>
$this
->
normal
,
'u.status'
=>
'normal'
])
->
page
(
$page
,
$limit
)
->
field
(
'o.id,o.order_sn,u.username,g.title,o.num,o.createtime'
)
->
order
(
'o.id desc'
)
->
select
();
foreach
(
$data
as
&
$value
){
$value
[
'createtime'
]
=
date
(
'Y-m-d'
,
$value
[
'createtime'
]);
...
...
application/api/controller/Index.php
查看文件 @
c4399d1
...
...
@@ -45,6 +45,7 @@ class Index extends Api
$data
=
Db
::
table
(
'gc_category'
)
->
where
([
'status'
=>
'normal'
])
->
field
(
'id,name,image'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
@@ -78,6 +79,7 @@ class Index extends Api
if
(
$this
->
request
->
isGet
()){
$data
=
Db
::
table
(
'gc_banner'
)
->
field
(
'id,image'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
@@ -111,6 +113,7 @@ class Index extends Api
if
(
$this
->
request
->
isGet
()){
$data
=
Db
::
table
(
'gc_gbanner'
)
->
field
(
'id,image'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Omessages.php
查看文件 @
c4399d1
...
...
@@ -68,6 +68,7 @@ class Omessages extends Api
->
where
([
'o.s_uid'
=>
$this
->
user_id
,
'p.status'
=>
$this
->
normal
,
'u.status'
=>
'normal'
])
->
page
(
$page
,
$limit
)
->
field
(
'o.id,o.order_sn,o.status,p.title,u.username,o.is_read'
)
->
order
(
'o.id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Person.php
查看文件 @
c4399d1
...
...
@@ -272,6 +272,7 @@ class Person extends Api
$data
=
Db
::
table
(
'gc_bank'
)
->
where
([
'uid'
=>
$this
->
user_id
])
->
field
(
'id,bank_num,open_bank'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Porders.php
查看文件 @
c4399d1
...
...
@@ -91,6 +91,7 @@ class Porders extends Api
->
where
([
'p.status'
=>
$this
->
normal
,
'u.status'
=>
'normal'
])
->
whereIn
(
'p.id'
,
$p_ids
)
->
field
(
'p.id,p.title,p.price,p.images,u.username,u.mobile,u.address'
)
->
order
(
'p.id desc'
)
->
select
();
$total
=
0
;
foreach
(
$data
as
$key
=>
$value
){
...
...
@@ -248,6 +249,7 @@ class Porders extends Api
->
where
(
$where
)
->
page
(
$page
,
$limit
)
->
field
(
'o.id,o.order_sn,o.status,p.title,o.unit_price,o.num,p.images,o.p_id'
)
->
order
(
'o.id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Problems.php
查看文件 @
c4399d1
...
...
@@ -43,6 +43,7 @@ class Problems extends Api
if
(
$this
->
request
->
isGet
()){
$data
=
Db
::
table
(
'gc_problem'
)
->
field
(
'id,title'
)
->
order
(
'id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Smessages.php
查看文件 @
c4399d1
...
...
@@ -61,6 +61,7 @@ class Smessages extends Api
->
where
([
'a.uid'
=>
$this
->
user_id
,
'a.type'
=>
$withdrawal
])
->
page
(
$page
,
$limit
)
->
field
(
'm.id,m.title,m.type,m.is_read'
)
->
order
(
'm.id desc'
)
->
select
();
$this
->
success
(
'成功'
,
$data
);
}
else
{
...
...
application/api/controller/Teams.php
查看文件 @
c4399d1
...
...
@@ -122,6 +122,7 @@ class Teams extends Api
->
where
([
'l.off_uid'
=>
$off_uid
,
'uid'
=>
$this
->
user_id
,
'u.status'
=>
'normal'
])
->
page
(
$page
,
$limit
)
->
field
(
'u.id uid,u.username,u.avatar,l.type,l.createtime,l.s_score score'
)
->
order
(
'l.id desc'
)
->
select
();
foreach
(
$data
as
&
$value
){
$value
[
'createtime'
]
=
date
(
'Y-m-d'
,
$value
[
'createtime'
]);
...
...
请
注册
或
登录
后发表评论