Commit a5b35eb5 authored by zhuwei's avatar zhuwei

编辑权限

parent c79c0068
......@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\LookShopService;
use app\api_broker\service\VerifyService;
use app\api_broker\service\VipService;
use app\index\validate\HouseValidate;
use app\model\AAgents;
use app\model\ACollectHouse;
......@@ -262,10 +263,10 @@ class Shop extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
//"user_id" => 2 //if c端 用户登录后传入user_id
"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$conditions = [];
if (empty($params['id'])) {
......@@ -404,13 +405,16 @@ class Shop extends Basic
if ($params['site_area'] == 3) {
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["user_id"];
$get_params['agents_id'] = $params["user_id"];//实际就是agents_id,前端之前传错了,将错就错
$get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field, $get_params);
if ($res && ($res[0]['status'] == 1)) {//如果存在
$result["is_collect"] = 1;
}
$vip_services = new VipService();
$result['is_can_edit'] = $vip_services->vip($params['user_id'],'index/houseEdit');
}
$result['new_sign_rule'] = "付{$result['payment_month']}{$result['deposit_month']},签订{$result['age_limit']}年";
......
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