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
0c9c5c76
Commit
0c9c5c76
authored
Jun 13, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
0bd87f2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
2 deletions
+74
-2
Register.php
application/api/controller/Register.php
+31
-0
RegisterValidate.php
application/api/validate/RegisterValidate.php
+39
-0
Shop.php
application/api_broker/controller/Shop.php
+4
-2
No files found.
application/api/controller/Register.php
0 → 100644
View file @
0c9c5c76
<?php
namespace
app\api\controller
;
use
app\api\extend\Basic
;
use
think\Request
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/12
* Time : 18:38
* Intro:
*/
class
Register
extends
Basic
{
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
}
public
function
registerVerify
(){
$params
=
$this
->
params
;
$params
=
array
(
"phone"
=>
"13817616471"
);
$checkResult
=
$this
->
validate
(
$params
,
"04.verify"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
//^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$
}
}
\ No newline at end of file
application/api/validate/RegisterValidate.php
0 → 100644
View file @
0c9c5c76
<?php
namespace
app\api\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/12
* Time : 18:41
* Intro:
*/
class
RegisterValidate
extends
Validate
{
protected
$rule
=
[
'phone'
=>
'require|length:11|number'
,
'code'
=>
'require|number'
,
];
protected
$message
=
[
'wx_open_id.require'
=>
'微信open_id不能为空'
,
'wx_open_id.length:10,50'
=>
'微信open_id错误'
,
'sex.require'
=>
'性别为必须字段'
,
'sex.number'
=>
'性别必须是数字'
,
'source.require'
=>
'来源为必须字段'
,
'source.number'
=>
'来源必须是数字'
,
'user_id.require'
=>
'user_id为必须字段'
,
'user_id.number'
=>
'user_id必须是数字'
,
'user_id.gt'
=>
'user_id必须大于0'
,
];
protected
$scene
=
[
'verify'
=>
[
'phone'
],
'select'
=>
[
'wx_open_id'
],
'bind'
=>
[
'wx_open_id'
,
'user_id'
],
];
}
\ No newline at end of file
application/api_broker/controller/Shop.php
View file @
0c9c5c76
...
...
@@ -177,9 +177,11 @@ class Shop extends Basic
}
if
(
!
empty
(
$conditions
))
{
$conditions
[
'status'
]
=
array
(
'eq'
,
1
);
//只显示上架
if
(
$params
[
'site_area'
]
==
1
||
$params
[
'site_area'
]
==
2
)
if
(
$params
[
'site_area'
]
==
1
||
$params
[
'site_area'
]
==
2
)
{
$conditions
[
'is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示可显示的楼盘
}
elseif
(
$params
[
"site_area"
]
==
4
){
$conditions
[
'status'
]
=
array
(
'in'
,
"1,2"
);
//b端搜索显示上架下架的
}
}
//如果有传经纪人id则代表我的商铺不区分状态
if
(
isset
(
$params
[
'agent_id'
]))
{
...
...
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