Commit 0c9c5c76 authored by clone's avatar clone

bug

parent 0bd87f2f
<?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
<?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
......@@ -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'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment