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
433b1270
Commit
433b1270
authored
Aug 15, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into test-0814-bug
# Conflicts: # application/index/controller/Remark.php
parents
1635938e
c2dff300
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
13 deletions
+41
-13
Shop.php
application/api/controller/Shop.php
+0
-0
Basic.php
application/api/extend/Basic.php
+29
-1
User.php
application/api_broker/controller/User.php
+5
-5
users_list.html
application/index/view/member/users_list.html
+5
-5
route.php
application/route.php
+2
-2
No files found.
application/api/controller/Shop.php
View file @
433b1270
This diff is collapsed.
Click to expand it.
application/api/extend/Basic.php
View file @
433b1270
...
...
@@ -9,8 +9,11 @@ namespace app\api\extend;
* Time: 9:35
* 基类
*/
use
app\extra\RedisExt
;
use
app\model\Users
;
use
think\Controller
;
use
think\Exception
;
use
Think\Log
;
use
think\Request
;
use
think\Response
;
use
Qiniu
;
...
...
@@ -27,6 +30,8 @@ class Basic extends Controller
public
$params
;
public
$user_city
;
protected
$authToken
;
/**
...
...
@@ -37,7 +42,7 @@ class Basic extends Controller
protected
$phone
;
protected
$timeStamp_
;
protected
$filterVerify
=
array
(
"api/
shopDetail
"
,
"api/
getShopList
"
,
"api/sendSms"
,
"api/sendCode"
,
"api/userVerify"
,
...
...
@@ -98,6 +103,8 @@ class Basic extends Controller
$this
->
timeStamp_
=
$result
->
timeStamp_
;
}
//$this->getCity($this->userId);
$requestPath
=
$this
->
request
->
routeInfo
()[
"rule"
][
0
]
.
"/"
.
$this
->
request
->
routeInfo
()[
"rule"
][
1
];
//过滤掉不需要验证token的接口
if
(
!
in_array
(
trim
(
$requestPath
),
$this
->
filterVerify
))
{
...
...
@@ -105,6 +112,27 @@ class Basic extends Controller
}
}
/**
* 默认城市选择
* @param $userId
*/
public
function
getCity
(
$userId
)
{
try
{
$redis_
=
RedisExt
::
getRedis
();
if
(
$redis_
)
{
$city
=
$redis_
->
get
(
"user_city_"
.
$userId
);
$this
->
user_city
=
empty
(
$city
)
?
"上海市"
:
$city
;
}
else
{
$this
->
user_city
=
"上海市"
;
}
Log
::
record
(
"-------basic-------"
.
$redis_
->
get
(
"user_city_"
.
$userId
),
"info"
);
}
catch
(
Exception
$exception
)
{
$this
->
user_city
=
"上海市"
;
}
}
/**
* token 验证
*/
...
...
application/api_broker/controller/User.php
View file @
433b1270
...
...
@@ -182,9 +182,9 @@ class User extends Basic
$params
=
$this
->
params
;
/*$params = array(
"user_id" =>
3
,
"user_id" =>
59089
,
"agent_id" => 9,
"type" =>"
las
t",
"type" =>"
nex
t",
);*/
$checkResult
=
$this
->
validate
(
$params
,
"UserGetLastOrNextUserIdValidate.verifyStatus"
);
...
...
@@ -193,7 +193,7 @@ class User extends Basic
}
// 判断是 杭州还是上海
$where
[
'city'
]
=
trim
(
$this
->
city
);
$where
[
'city'
]
=
trim
(
$this
->
city
)
?
trim
(
$this
->
city
)
:
'上海市'
;
if
(
$params
[
'type'
]
==
'last'
)
{
$where
[
'id'
]
=
[
'gt'
,
$params
[
'user_id'
]
];
$order
=
'id asc'
;
...
...
@@ -202,7 +202,6 @@ class User extends Basic
$where
[
'id'
]
=
[
'lt'
,
$params
[
'user_id'
]
];
$order
=
'id desc'
;
}
//dump($where);
$field
=
'id,user_nick,agent_id,vip'
;
$user
=
new
Users
();
$user_res
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
1
,
$order
);
...
...
@@ -212,7 +211,8 @@ class User extends Basic
// 判断是否vip客户,如果是 只有是当前经纪人自己的客户才能查看
//vip客户 0:否 1:是
if
((
$user_res
[
'vip'
]
==
1
)
&&
(
$user_res
[
'agent_id'
]
!=
$params
[
'agent_id'
]))
{
if
((
$user_res
[
0
][
'vip'
]
==
1
)
&&
(
$user_res
[
0
][
'agent_id'
]
!=
$params
[
'agent_id'
]))
{
return
$this
->
response
(
"201"
,
"vip 非客方"
,
[
'user_id'
=>
$user_res
[
0
][
'id'
]]);
}
...
...
application/index/view/member/users_list.html
View file @
433b1270
...
...
@@ -348,11 +348,11 @@
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"registration_end"
name=
"registration_end"
type=
"date"
>
<
span
class=
"fore-span ld-Marheight"
>
最后跟进时间:
</span
>
<
input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"follow_start"
name=
"follow_start"
type=
"date"
>
<
span
class=
"fore-span ld-Marheight"
>
-
</span
>
<
input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"follow_end"
name=
"follow_end"
type=
"date"
>
<
div
class=
"row"
></div
>
<
!--<span class="fore-span ld-Marheight">最后跟进时间:</span>--
>
<
!--<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="follow_start" name="follow_start" type="date">--
>
<
!--<span class="fore-span ld-Marheight">-</span>--
>
<
!--<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="follow_end" name="follow_end" type="date">--
>
<
!--<div class="row"></div>--
>
<!-- <span class="fore-span ld-Marheight">第一次登录时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="login_start" name="login_start" type="date">
<span class="fore-span ld-Marheight">-</span>
...
...
application/route.php
View file @
433b1270
...
...
@@ -318,9 +318,9 @@ Route::group('api', [
'uploadHeadImg'
=>
[
'api/member/uploadHeadImg'
,
[
'method'
=>
'post'
]
],
//头像上传
// shop
'
shopList'
=>
[
'api/shop/getShopList'
,
[
'method'
=>
'
post'
]
],
'
getShopList'
=>
[
'api/shop/getShopList'
,
[
'method'
=>
'get|
post'
]
],
'filtrateCondition'
=>
[
'api/shop/filtrateCondition'
,
[
'method'
=>
'get | post'
]
],
'
shopDetail'
=>
[
'api/shop/getShopDetail'
,
[
'method'
=>
'ge
t'
]
],
'
getShopDetail'
=>
[
'api/shop/getShopDetail'
,
[
'method'
=>
'get|pos
t'
]
],
'getMarchInList'
=>
[
'api/shop/getMarchInList'
,
[
'method'
=>
'get|post'
]
],
//get banner
...
...
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