Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
dac1d434
Commit
dac1d434
authored
Dec 15, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token校验
parent
1dcd11fa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
350 additions
and
27 deletions
+350
-27
Shop.php
application/api/controller/Shop.php
+1
-1
Basic.php
application/api/extend/Basic.php
+1
-3
banner.php
application/index/controller/banner.php
+68
-1
Index.php
application/index/controller/member/Index.php
+30
-15
banner.html
application/index/view/banner/banner.html
+242
-0
route.php
application/route.php
+8
-7
No files found.
application/api/controller/Shop.php
View file @
dac1d434
...
...
@@ -95,7 +95,7 @@ class Shop extends Basic
if
(
isset
(
$params
[
'money_start'
])
&&
isset
(
$params
[
'money_end'
]))
{
//面积
$conditions
[
'price'
]
=
array
(
'between'
,
array
(
$params
[
'money_start'
],
$params
[
'money_end'
]
)
);
}
else
if
(
isset
(
$params
[
'money_start'
])
&&
!
isset
(
$params
[
'money_end'
]))
{
//100米以上不用传结束面积
}
else
if
(
isset
(
$params
[
'money_start'
])
&&
!
isset
(
$params
[
'money_end'
]))
{
$conditions
[
'price'
]
=
array
(
'egt'
,
$params
[
'money_start'
]
);
}
...
...
application/api/extend/Basic.php
View file @
dac1d434
...
...
@@ -65,8 +65,7 @@ class Basic extends Controller
}
elseif
(
strtoupper
(
$this
->
request
->
method
())
===
"POST"
)
{
$this
->
params
=
$this
->
request
->
param
()
!=
null
?
$this
->
request
->
param
()
:
null
;
}
$requestPath
=
$this
->
request
->
path
();
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
$this
->
tokenVerify
();
...
...
@@ -106,7 +105,6 @@ class Basic extends Controller
public
function
verifyUserInfo
()
{
//todo 待完成
$userModel
=
new
Users
();
$userArr
=
$userModel
->
selectUser
(
$this
->
userId
);
if
(
count
(
$userArr
)
>
0
&&
(
$userArr
[
"id"
]
!=
$this
->
userId
||
$userArr
[
"user_phone"
]
!=
$this
->
phone
))
{
...
...
application/index/controller/banner.php
View file @
dac1d434
<?php
namespace
app\index\controller
;
use
app\model\BannerModel
;
use
think\Controller
;
/**
* Created by PhpStorm.
* User : zw
...
...
@@ -8,6 +12,68 @@ namespace app\index\controller;
* Time : 15:12
* Intro:
*/
class
banner
{
class
banner
{
protected
$bannerModel
;
public
function
__construct
()
{
// $this->bannerModel = new BannerModel();
}
public
function
index
(){
echo
1111111111
;
exit
;
}
/**
* 查询banner列表
* @return \think\Response
*/
public
function
getBannerList
()
{
echo
111111111
;
exit
;
return
view
(
"banner/banner"
);
/* $field = "id,title,pic_path,url,sort,is_show,create_time,update_time";
$params['is_show'] = array( "eq", 0 );
$result = $this->bannerModel
->getBannerList(1, 15, "sort desc", $field, $params);
return $this->response("200", "request success", $result);*/
}
/**
* 新增or修改数据
* @return \think\Response
*/
public
function
addOrSave
()
{
/* $params = array(
"id" => 2,
"is_show" => 0
);
$msg = isset($params['id']) ? "修改" : "新增";
$result = $this->bannerModel->addOrUpdate($params);
if ($result['code'] == 200) {
return $this->response("200", $msg . "成功", $result["msg"]);
} else {
return $this->response("101", $msg . $result["msg"]);
}*/
}
/**
* 修改是否显示
* @return \think\Response
*/
public
function
upIsShow
()
{
/* $params = array(
"id" => 1,
"is_show" => 1
);
$result = $this->bannerModel->upIsShow($params);
if ($result['code'] == 200) {
return $this->response("200", "update success", $result["msg"]);
} else {
return $this->response("101", "update error");
}*/
}
}
\ No newline at end of file
application/index/controller/member/Index.php
View file @
dac1d434
<?php
namespace
app\index\controller\member
;
/**
* Created by PhpStorm.
...
...
@@ -7,25 +8,38 @@ namespace app\index\controller\member;
* Time: 下午1:03
*/
class
Index
{
public
function
member
(){
return
view
(
'member/member'
,[
'title'
=>
'thinkphp'
]);
class
Index
{
public
function
member
()
{
return
view
(
'member/member'
,
[
'title'
=>
'thinkphp'
]);
//$this->response('100',array(),'json');
}
public
function
preview_list
(){
return
view
(
'member/preview_list'
);
//$this->response('100',array(),'json');
public
function
preview_list
()
{
return
view
(
'member/preview_list'
);
//$this->response('100',array(),'json');
}
public
function
entrust_list
()
{
return
view
(
'member/entrust_list'
);
//$this->response('100',array(),'json');
}
public
function
entrust_list
(){
return
view
(
'member/entrust_list'
);
//$this->response('100',array(),'json');
public
function
consumer_list
()
{
return
view
(
'member/consumer_list'
);
//$this->response('100',array(),'json');
}
public
function
consumer_list
(){
return
view
(
'member/consumer_list'
);
//$this->response('100',array(),'json');
public
function
diagram_list
()
{
return
view
(
'member/diagram_list'
);
//$this->response('100',array(),'json');
}
public
function
diagram_list
(){
return
view
(
'member/diagram_list'
);
//$this->response('100',array(),'json');
public
function
index
(){
echo
111
;
exit
;
}
}
\ No newline at end of file
application/index/view/banner/banner.html
0 → 100644
View file @
dac1d434
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"banner"
/>
<!--导航star-->
<!-- Sidebar -->
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
首页轮播图
</a></li>
<li
class=
"active"
>
新增广告
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"#modal-add-do"
data-toggle=
"modal"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
新增广告
</a>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover"
>
<thead>
<tr>
<th>
标题
</th>
<th>
图片
</th>
<th>
链接
</th>
<th>
排序
</th>
<th>
点击
</th>
<th>
修改人
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
刘女士
</td>
<td>
<img
src=
"/adsimg/20171117215901.jpg"
class=
"diagram-image"
>
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
Thornton
</td>
<td>
张大大
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-do"
data-toggle=
"modal"
>
编辑
</a>
<a
class=
"btn1 btn-danger "
href=
"#modal-delete"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
删除
</a>
</td>
</tr>
<tr>
<td>
李楠楠
</td>
<td>
Jac12413ob
</td>
<td>
Thornton
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
Thornton
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-do"
data-toggle=
"modal"
>
编辑
</a>
<a
class=
"btn1 btn-danger"
href=
"#modal-delete"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
删除
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"page-cla"
>
<ul
class=
"pagination"
>
<li><a
href=
"#"
>
«
</a></li>
<li><a
href=
"#"
>
1
</a></li>
<li><a
href=
"#"
>
2
</a></li>
<li><a
href=
"#"
>
3
</a></li>
<li><a
href=
"#"
>
4
</a></li>
<li><a
href=
"#"
>
5
</a></li>
<li><a
href=
"#"
>
»
</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- /#wrapper -->
<!-- /#编辑模态框 -->
<div
class=
"modal fade"
id=
"modal-do"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
编辑
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
method=
"post"
onsubmit=
"return check()"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"inputEmail3"
placeholder=
"请输入标题"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
备注:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
placeholder=
"请输入备注"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<div
class=
"col-sm-9"
>
<a
class=
"file-input-wrapper btn"
><input
id=
"img"
name=
"img"
type=
"file"
></a>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
删除
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
确认删除吗?
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#新增广告模态框 -->
<div
class=
"modal fade"
id=
"modal-add-do"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
新增广告
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
method=
"post"
onsubmit=
"return check()"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
placeholder=
"请输入标题"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
备注:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
placeholder=
"请输入备注"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<div
class=
"col-sm-9"
>
<a
class=
"file-input-wrapper btn"
><input
id=
"img1"
name=
"img"
type=
"file"
></a>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
application/route.php
View file @
dac1d434
...
...
@@ -49,11 +49,12 @@ Route::group('app', [
Route
::
group
(
'index'
,
[
'member'
=>
[
'index/member.index/member'
,
[
'method'
=>
'get'
]
],
/*
'member' => [ 'index/member.index/member', [ 'method' => 'get' ] ],
'preview_list' => [ 'index/member.index/preview_list', [ 'method' => 'get' ] ],
'consumer_list' => [ 'index/member.index/consumer_list', [ 'method' => 'get' ] ],
'diagram_list' => [ 'index/member.index/diagram_list', [ 'method' => 'get' ] ],
'entrust_list'
=>
[
'index/member.index/entrust_list'
,
[
'method'
=>
'get'
]
]
'entrust_list' => [ 'index/member.index/entrust_list', [ 'method' => 'get' ] ],*/
'banner'
=>
[
'index/banner/index'
,
[
'method'
=>
'get'
]
],
]);
...
...
@@ -71,11 +72,11 @@ Route::group('api', [
'appraiser'
=>
[
'api/broker/appraiser'
,
[
'method'
=>
'post'
]
],
//评价经纪人
//get member
'logout'
=>
[
'api/member/logout'
,[
'method'
=>
'get'
]
],
'inviteList/:id'
=>
[
'api/member/inviteList'
,
[
'method'
=>
'get'
]
],
//邀请记录
'qrCode'
=>
[
'api/member/qrCode'
,
[
'method'
=>
'get'
]
],
//邀请二维码
'logout'
=>
[
'api/member/logout'
,
[
'method'
=>
'get'
]
],
'inviteList/:id'
=>
[
'api/member/inviteList'
,
[
'method'
=>
'get'
]
],
//邀请记录
'qrCode'
=>
[
'api/member/qrCode'
,
[
'method'
=>
'get'
]
],
//邀请二维码
//post member
'login'
=>
[
'api/member/login'
,
[
'method'
=>
'post'
]
],
//c端登陆
'register'
=>
[
'api/member/register'
,
[
'method'
=>
'post'
]
],
//注册|邀请注册|编辑
...
...
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