Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
7537b585
Commit
7537b585
authored
Oct 30, 2018
by
LiuJunYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改图片BUG/新增用户手机号搜索
parent
58c9fc51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
application/admin/controller/Project.php
+1
-1
application/admin/controller/User.php
+5
-1
application/admin/view/user/index.html
+3
-0
application/common/model/Project.php
+5
-0
No files found.
application/admin/controller/Project.php
View file @
7537b585
...
@@ -11,6 +11,7 @@ namespace app\admin\controller;
...
@@ -11,6 +11,7 @@ namespace app\admin\controller;
use
app\admin\controller\AuthBase
;
use
app\admin\controller\AuthBase
;
use
app\common\model\Admin
as
AdminModel
;
use
app\common\model\Admin
as
AdminModel
;
use
app\admin\controller\Upload
;
use
app\admin\controller\Upload
;
use
app\common\model\Project
as
ProjectModel
;
class
Project
extends
AuthBase
class
Project
extends
AuthBase
{
{
...
@@ -33,7 +34,6 @@ class Project extends AuthBase
...
@@ -33,7 +34,6 @@ class Project extends AuthBase
//活动列表
//活动列表
public
function
index
()
public
function
index
()
{
{
$title
=
input
(
'get.title'
);
$title
=
input
(
'get.title'
);
$type
=
input
(
'get.type'
);
$type
=
input
(
'get.type'
);
$catalog_id
=
input
(
'get.catalog_id'
);
$catalog_id
=
input
(
'get.catalog_id'
);
...
...
application/admin/controller/User.php
View file @
7537b585
...
@@ -21,6 +21,7 @@ class User extends AuthBase
...
@@ -21,6 +21,7 @@ class User extends AuthBase
$is_vip
=
input
(
'get.is_vip'
);
$is_vip
=
input
(
'get.is_vip'
);
$start_time
=
input
(
'get.start_time'
);
$start_time
=
input
(
'get.start_time'
);
$end_time
=
input
(
'get.end_time'
);
$end_time
=
input
(
'get.end_time'
);
$phone
=
input
(
'get.phone'
);
$condition
=
[];
$condition
=
[];
if
(
$nickname
){
if
(
$nickname
){
$condition
[
'nickname'
]
=
[
'like'
,
'%'
.
$nickname
.
'%'
];
$condition
[
'nickname'
]
=
[
'like'
,
'%'
.
$nickname
.
'%'
];
...
@@ -28,6 +29,9 @@ class User extends AuthBase
...
@@ -28,6 +29,9 @@ class User extends AuthBase
if
(
$is_vip
){
if
(
$is_vip
){
$condition
[
'is_vip'
]
=
$is_vip
;
$condition
[
'is_vip'
]
=
$is_vip
;
}
}
if
(
$phone
){
$condition
[
'phone'
]
=
$phone
;
}
if
(
$start_time
&&
$end_time
){
if
(
$start_time
&&
$end_time
){
$condition
[
'created_at'
]
=
[
'between'
,[
$start_time
.
' 00:00:00'
,
$end_time
.
' 00:00:00'
]];
$condition
[
'created_at'
]
=
[
'between'
,[
$start_time
.
' 00:00:00'
,
$end_time
.
' 00:00:00'
]];
}
else
{
}
else
{
...
@@ -40,7 +44,7 @@ class User extends AuthBase
...
@@ -40,7 +44,7 @@ class User extends AuthBase
$user_model
=
model
(
'user'
);
$user_model
=
model
(
'user'
);
$user_list
=
$user_model
->
where
(
$condition
)
->
order
(
'created_at desc'
)
$user_list
=
$user_model
->
where
(
$condition
)
->
order
(
'created_at desc'
)
->
paginate
(
10
,[
'query'
=>
[
'nickname'
=>
$nickname
,
'is_vip'
=>
$is_vip
,
'start_time'
=>
$start_time
,
'end_time'
=>
$end_time
]]);
->
paginate
(
10
,[
'query'
=>
[
'nickname'
=>
$nickname
,
'is_vip'
=>
$is_vip
,
'start_time'
=>
$start_time
,
'end_time'
=>
$end_time
,
'phone'
=>
$phone
]]);
$this
->
assign
(
'user_list'
,
$user_list
);
$this
->
assign
(
'user_list'
,
$user_list
);
return
$this
->
fetch
();
return
$this
->
fetch
();
...
...
application/admin/view/user/index.html
View file @
7537b585
...
@@ -9,6 +9,9 @@
...
@@ -9,6 +9,9 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<form
class=
"form-inline pull-left"
method=
"GET"
action=
"{:url('admin/user/index')}"
>
<form
class=
"form-inline pull-left"
method=
"GET"
action=
"{:url('admin/user/index')}"
>
<div
class=
"form-group margin-right"
>
<div
class=
"form-group margin-right"
>
<input
class=
"form-control"
type=
"text"
name=
"phone"
id=
"phone"
value=
"{:input('phone')}"
placeholder=
"手机号"
/>
</div>
<div
class=
"form-group margin-right"
>
<input
class=
"form-control"
type=
"text"
name=
"nickname"
id=
"nickname"
value=
"{:input('nickname')}"
placeholder=
"昵称"
/>
<input
class=
"form-control"
type=
"text"
name=
"nickname"
id=
"nickname"
value=
"{:input('nickname')}"
placeholder=
"昵称"
/>
</div>
</div>
<div
class=
"form-group margin-right"
>
<div
class=
"form-group margin-right"
>
...
...
application/common/model/Project.php
View file @
7537b585
...
@@ -79,4 +79,9 @@ class Project extends BaseModel
...
@@ -79,4 +79,9 @@ class Project extends BaseModel
public
function
getBannersNativeAttr
(
$value
,
$data
){
public
function
getBannersNativeAttr
(
$value
,
$data
){
return
$data
[
'banners'
];
return
$data
[
'banners'
];
}
}
// public function setDescriptionAttr($value)
// {
// return str_replace('&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1','',$value);
// }
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment