Commit 5ff07a57 authored by clone's avatar clone

Merge branch 'test'

parents fc230bd0 a8392cd9
......@@ -71,7 +71,7 @@ class AppointmentTime extends Basic
return $this->response("101", "楼盘信息不能为空");
}
//todo 参数校验
if (!isset($params["phone"]) || !preg_match('/^1[345678]\d{9}$/', $params["phone"])) {
if (!isset($params["phone"]) || !preg_match('/^1[3456789]\d{9}$/', $params["phone"])) {
return $this->response("101", "手机号为空或手机号无效");
}
......@@ -105,15 +105,14 @@ class AppointmentTime extends Basic
*/
public function getAppointmentSeeShopList()
{
/* $params = array(
"status" => 2, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "11142",//对应u_users表
"phone" => "13661753534",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
$params = $this->params;
/* $params = array(
"status" => 1, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "11142",//对应u_users表
"phone" => "13661753534",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
if (!isset($params["status"])) {
return $this->response("101", "请求状态不能为空");
......@@ -212,11 +211,11 @@ class AppointmentTime extends Basic
*/
public function getYetListV2($pageNo, $pageSize, $params)
{
$field = "a.id,a.report_agent_phone as phone,a.report_agent_id as agents_id,a.predict_see_time as expect_time,b.house_id,
d.external_title as house_title,d.residue_num as room_num_left";
$field = "a.id,a.report_agent_phone as phone,a.report_agent_id as agents_id,a.predict_see_time as expect_time,b.house_id,
d.external_title as house_title,d.residue_num as room_num_left, d.is_show,d.status";
$where_["a.user_id"] = $params["user_id"];
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result = $this->reportModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result = $this->reportModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
//获取图片信息
foreach ($result as $key => $val) {
......@@ -243,9 +242,8 @@ class AppointmentTime extends Basic
d.external_title as house_title,d.residue_num as room_num_left";
$where_["a.user_id"] = $params["user_id"];
$where_["c.id"] = array('EXP','IS NULL');
$result = $this->reportModel->getWaitToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$where_["user_id"] = $params["user_id"];
$result = $this->reportModel->getWaitToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
//获取图片信息
foreach ($result as $key => $val) {
......
This diff is collapsed.
......@@ -399,29 +399,38 @@ class Member extends Basic
* @throws \think\exception\DbException
*/
public function inviteList() {
// $id = $this->params['id'];
// if (empty($id)) {
//$id = $this->params['id'];
//if (empty($id)) {
$id = $this->userId;
// }
//$id = 5741;
//}
$data['status'] = 101;
$data['data'] = array();
$data['msg'] = '';
if ($id) {
$result = $this->user->field('id,user_nick,user_phone,create_time')
$params = $this->params;
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$result = $this->user->field('id,user_nick,user_phone,create_time,user_pic,other_pic')
->where('referrer_id',$id)
->where('status',0)
->order('create_time desc')
->limit($pageSize)
->page($pageNo)
->select();
$data_arr = [];
foreach ($result as $k=>$v) {
$arr = $v->getData();
$data_arr[$k]['user_nick'] = $arr['user_nick'];
$data_arr[$k]['user_phone'] = hide_customer_phone($arr['user_phone']);
$data_arr[$k]['create_time'] = date('Y-m-d', strtotime($arr['create_time']));
$data_arr[$k]['user_nick'] = $arr['user_nick'];
$data_arr[$k]['user_pic'] = !empty($v['user_pic']) ? HEADERIMGURL.$v['user_pic'] : $v['other_pic'] ;
$data_arr[$k]['user_phone'] = hide_customer_phone($arr['user_phone']);
$data_arr[$k]['create_time'] = date('Y-m-d', strtotime($arr['create_time']));
}
$data['data'] = $data_arr;
$data['status'] = 200;
} else {
$data['msg'] = 'id is null';
}
......@@ -433,6 +442,8 @@ class Member extends Basic
* 生成邀请二维码
*
* @return \think\Response
* @throws \Endroid\QrCode\Exception\InvalidPathException
* @throws \Endroid\QrCode\Exception\InvalidWriterException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
......@@ -449,7 +460,7 @@ class Member extends Basic
if ($result) {
$code = new \app\api\untils\GenerateCodeUntils();
$url = $this->request->domain().'/app.php/app/share_register?referrer_source=10&id='.$result->id;
$url = $this->request->domain().'/app_broker/index?referrer_source=10&referrer_id='.$result->id;
$path = $code->getCode($url, $result->id);
$data['data'] = ['path' => $this->request->domain().'/'.$path];
$data['status'] = 200;
......@@ -472,16 +483,33 @@ class Member extends Basic
*/
public function getUserInfo() {
$data['status'] = 200;
$data['data'] = '';
if ($this->params['AuthToken']) {
$fields = 'id,user_pswd,user_nick,user_phone,user_pic,referrer_id,referrer_source,integral,create_time,update_time,last_login_time,last_login_ip';
$data['data'] = $this->user->selectUser($this->userId, $fields);
$data['data']['AuthToken'] = $this->params['AuthToken'];
$params = $this->params;
/* $params = array(
"user_id" => 1
);*/
$fields = "a.id,a.buyer_id,b.buyer_nick,a.user_nick,a.user_phone,a.user_pic,a.other_pic";
$result = $this->user->getUserInfoById($params, $fields);
$data = [];
if(count($result) > 0){
$jwt_data['id'] = $result[0]["id"];
$jwt_data['userNick'] = $result[0]["user_nick"];
$jwt_data['phone'] = $result[0]["user_phone"];
$jwt = new JwtUntils();
$AuthToken = $jwt->createToken($jwt_data);
$data["id"] = $result[0]["id"];
$data["buyer_id"] = $result[0]["buyer_id"];
$data["buyer_nick"] = $result[0]["buyer_nick"];
$data["user_nick"] = $result[0]["user_nick"];
$data["user_phone"] = $result[0]["user_phone"];
$data["user_pic"] = !empty($result[0]["user_pic"]) ? HEADERIMGURL . $result[0]["user_pic"] : $result[0]["other_pic"];
$data["AuthToken"] = $AuthToken;
}else{
return $this->response("101", "数据查询失败");
}
$data['msg'] = '';
return $this->response($data['status'], $data['msg'], $data['data']);
return $this->response("200","请求成功",$data);
}
/**
......
......@@ -4,6 +4,7 @@ namespace app\api\controller;
use app\extra\RedisExt;
use think\cache\driver\Redis;
use think\queue\Job;
/**
* Created by PhpStorm.
......
<?php
namespace app\api\controller;
use app\api\extend\Basic;
use app\api\service\RegisterService;
use app\api\untils\MessageUntils;
use app\extra\RedisExt;
use app\model\Users;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/12
* Time : 18:38
* Intro:
*/
class Register extends Basic
{
private $messageUntil;
private $userModel;
private $service_;
function __construct($request = null)
{
parent::__construct($request);
$this->messageUntil = new MessageUntils();
$this->userModel = new Users();
$this->service_ = new RegisterService();
}
/**
* 发送验证码
* @return \think\Response
*/
public function registerSendCode()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"phone" => "13817616471",
"device_id" => "86280603569236"
);*/
if (!isset($params["phone"])) {
return $this->response("101", "手机号为必填字段");
}
$checkResult = $this->validate($params, "RegisterValidate.verify");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$result = $this->messageUntil->sendCheckCodeV2($params['device_id'], $params['phone']);
if ($result == 'true') {
return $this->response("200", "短信发送成功", $result);
} else {
return $this->response("101", $result);
}
}
/**
* 邀请登录or app微信授权登录
* @return \think\Response
*/
public function registerVerify()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"phone" => "16617616471",
"device_id" => "1111",
"code" => 1231,
"wx_union_id" => "oNOSMwfDsUAXGdq0B-NzNYSep_xw", //false
"referrer_id" => 1, //邀请人id 经纪人or客户 也用于判断是否是分享出去的请求
"referrer_source" => 20, //false
);*/
$checkResult = $this->validate($params, "RegisterValidate.register");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$is_eq = $this->messageUntil->verifyCode($params["device_id"], $params["code"]);
if (!$is_eq) {
return $this->response("101", "验证码错误");
}
$phone = $params["phone"];
$wx_union_id = !empty($params["wx_union_id"]) ? trim($params["wx_union_id"]) : null;
$referrer_id = !empty($params["referrer_id"]) ? $params["referrer_id"] : 0;
$referrer_source = !empty($params["referrer_source"]) ? $params["referrer_source"] : 0;
$last_login_ip = ip2long($this->request->ip());
$msg = $this->service_->userRegister($phone, $referrer_id, $referrer_source, $wx_union_id, $last_login_ip);
if ($msg["code"] == 101) {
return $this->response("101", $msg["data"]);
} else {
return $this->response("200", "request success", $msg["data"]);
}
}
/**
* 解绑微信
* @return \think\Response
*/
public function removeBinding()
{
$params = $this->params;
/* $params = array(
"buyer_id" => 5,
"user_id" => 25983,
);*/
$checkResult = $this->validate($params, "RegisterValidate.removeBind");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$is_up = $this->service_->unbundling($params["buyer_id"], $params["user_id"]);
if ($is_up > 0) {
return $this->response("200", "解绑成功");
} else {
return $this->response("101", "解绑失败");
}
}
/**
* 绑定微信
* @return \think\Response
*/
public function bindingWx()
{
$params = $this->params;
/* $params = array(
"wx_union_id" => "asdfasfasdf",
"phone" => 25983,
);*/
if (!isset($params["phone"])) {
return $this->response("101", "手机号为必填字段");
}
$checkResult = $this->validate($params, "RegisterValidate.bind");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$msg = $this->service_->binding($params["wx_union_id"], $params["phone"]);
if ($msg["code"] == 101) {
return $this->response("101", $msg["data"]);
} else {
return $this->response("200", "绑定成功", $msg["data"]);
}
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ namespace app\api\controller;
*/
use app\api\extend\Basic;
use app\model\SubletModel;
use think\Exception;
use think\Request;
class Sublet extends Basic
......@@ -23,25 +24,63 @@ class Sublet extends Basic
$this->subletMode = new SubletModel();
}
/**
* 委托转铺列表
* @return \think\Response
*/
public function subletList()
{
$params = $this->params;
/* $params = array(
"user_id" => 13,
"page_no" => 1,
"page_size" => 15
);*/
$user_id = $params["user_id"];
if (!$user_id) {
return $this->response("101", "用户id不能为空");
}
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$select_["a.user_id"] = $user_id;
$fields = 'a.id,a.manage_type,a.address_detail,FORMAT(a.expected_rent/100,2) as expected_rent,a.create_time,
if(b.status=2,"3",a.status) as status,a.house_id';
try {
$result = $this->subletMode->getSublet($pageNo, $pageSize, "id desc", $fields, $select_);
if (count($result) > 0) {
return $this->response("200", "success", $result);
} else {
return $this->response("200", "request null");
}
} catch (Exception $exception) {
return $this->response("101", "请求异常,请稍后再试,".$exception);
}
}
public function addSublet()
{
$params = $this->params;
/* $params = array(
"user_id" => 47,
"manage_type" => 美食,
"address_detail" => "泗泾",
"province" => "上海",
"city" => "长沙市",
"district" => "芙蓉区",
"expected_rent" => 2000,
"appellation" => "zhangsan",
"tel" => 13817616162,
"AuthToken" => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo0NywidXNlck5pY2siOm51bGwsInBob25lIjoiMTgyMDU2MjUwMjAifSwidGltZVN0YW1wXyI6MTUxMzU3MzMwMH0.-_tpSDeucA6_V8glS1hfoNBpZU8lRk6J8On3-_Rdf_I',
);*/
/* $params = array(
"user_id" => 47,
"manage_type" => 美食,
"address_detail" => "泗泾",
"province" => "上海",
"city" => "长沙市",
"district" => "芙蓉区",
"expected_rent" => 2000,
"appellation" => "zhangsan",
"tel" => 13817616162,
"AuthToken" => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo0NywidXNlck5pY2siOm51bGwsInBob25lIjoiMTgyMDU2MjUwMjAifSwidGltZVN0YW1wXyI6MTUxMzU3MzMwMH0.-_tpSDeucA6_V8glS1hfoNBpZU8lRk6J8On3-_Rdf_I',
);*/
if (!isset($params["manage_type"])) {
return $this->response("101", "经营业态不能为空");
return $this->response("101", "经营业态不能为空");
}
if (!isset($params["address_detail"])) {
......@@ -59,15 +98,15 @@ class Sublet extends Basic
if (!isset($params["expected_rent"])) {
return $this->response("101", "期望租金不能为空");
}else{
$params["expected_rent"] = $params["expected_rent"] * 100;
} else {
$params["expected_rent"] = $params["expected_rent"] * 100;
}
if (!isset($params["appellation"])) {
return $this->response("101", "称呼不能为空");
}
if (!isset($params["tel"]) || !preg_match('/1[345678]\d{9}/', $params["tel"])) {
if (!isset($params["tel"]) || !preg_match('/1[3456789]\d{9}/', $params["tel"])) {
return $this->response("101", "手机号检验错误");
}
$params["create_time"] = date("Y-m-d H:i:s", time());
......
<?php
namespace app\api\controller;
/**
* 微信jsSdk
* Created by zw.
* User: zw
* email 452436132@qq.com
* Date: 2018/06/04
* Time: 21:30
*/
use app\api\extend\Basic;
use app\api\untils\JwtUntils;
use app\model\Users;
use app\model\UWxInfo;
use think\Exception;
class WxSdk extends Basic
{
private $wxInfoModel;
private $userModel;
public function __construct($request = null)
{
parent::__construct($request);
$this->wxInfoModel = new UWxInfo();
$this->userModel = new Users();
}
/**
* wx授权拉取数据
* @return \think\Response
*/
public function saveWxInfo()
{
$params = $this->params;
/* $params = array(
"wx_open_id" => "123132123123123",
"wx_union_id" => "123132123123123",
"buyer_nick" => "222222222",
"buyer_img" => "123123123",
"sex" => 1,
"province" => "123123123",
"city" => "123123123",
"source" => 1,// 0:h5邀请 1安卓 2苹果',
);*/
$checkResult = $this->validate($params, "UWxInfoValidate.add");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$wx_union_id = $params["wx_union_id"];
$buyer_nick = $params["buyer_nick"];
// 验证open_id是否已经存在,存在则更新
$wxInfoObj = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id);
try {
if ($wxInfoObj && count($wxInfoObj) > 0) {
$params["id"] = $wxInfoObj[0]["id"];
$id = $this->wxInfoModel->updateWxInfo($params);
} else {
$id = $this->wxInfoModel->addWxInfo($params);
}
} catch (Exception $exception) {
return $this->response("101", "request error:" . $exception);
}
$conditions["buyer_id"] = $id;
$fields = "id,user_nick,user_phone,user_pic,other_pic";
$user_info = $this->userModel->getUserByWhere($conditions, $fields);
//如果绑定了直接返回用户数据,无需帐号验证码登录
if ($id > 0 && count($user_info) > 0) {
$user_id = $user_info[0]['id'];
$user_nick = $user_info[0]['user_nick'];
$user_phone = $user_info[0]['user_phone'];
$user_pic = $user_info[0]["user_pic"];
$other_pic = $user_info[0]["other_pic"];
$jwt_data['id'] = $user_id;
$jwt_data['userNick'] = $user_nick;
$jwt_data['phone'] = $user_phone;
$jwt = new JwtUntils();
$data["id"] = $user_id;
$data["user_nick"] = $user_nick;
$data["buyer_id"] = $id;
$data["buyer_nick"] = $buyer_nick;
$data["user_phone"] = $user_phone;
$data["user_pic"] = !empty($user_pic) ? HEADERIMGURL . $user_pic : $other_pic;
$data["AuthToken"] = $jwt->createToken($jwt_data);;
return $this->response("200", "request success", $data);
} elseif ($id > 0 && count($user_info) <= 0) {
return $this->response("200", "request success");
} else {
return $this->response("101", "request exception");
}
}
/**
* 绑定用户 记录最后一次绑定 废弃
* @return \think\Response
*/
public function bindUserId()
{
$params = $this->params;
/* $params = array(
"wx_open_id" => "123132123123123",
"user_id" => 2
);*/
$checkResult = $this->validate($params, "UWxInfoValidate.bind");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$wx_open_id = $params["wx_open_id"];
// 验证open_id是否已经存在,存在则更新
$wxInfoObj = $this->wxInfoModel->getWxInfoByOpenId($wx_open_id);
if ($wxInfoObj && count($wxInfoObj) > 0) {
$params["id"] = $wxInfoObj[0]["id"];
try {
$id = $this->wxInfoModel->updateWxInfo($params);
if ($id > 0) {
return $this->response("200", "request success", [ "id" => $id ]);
} else {
return $this->response("101", "绑定失败");
}
} catch (Exception $exception) {
return $this->response("101", "request error:" . $exception);
}
} else {
return $this->response("101", "没有找到用户对应微信记录");
}
}
}
......@@ -39,6 +39,9 @@ class Basic extends Controller
protected $filterVerify = array(
"api/shopDetail",
"api/sendSms",
"api/sendCode",
"api/userVerify",
"api/saveWxInfo",
"api/logout",
"api/login",
"api/register",
......@@ -95,7 +98,7 @@ class Basic extends Controller
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) {
///$this->tokenVerify();
$this->tokenVerify();
}
}
......
<?php
namespace app\api\service;
use app\api\untils\JwtUntils;
use app\api_broker\service\PushMessageService;
use app\model\Users;
use app\model\UWxInfo;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/13
* Time : 17:10
* Intro:
*/
class RegisterService
{
private $userModel;
private $wxInfoModel;
public function __construct()
{
$this->userModel = new Users();
$this->wxInfoModel = new UWxInfo();
}
/**
* 处理邀请or登陆逻辑
* @param $phone
* @param $referrer_id
* @param $referrer_source
* @param $wx_union_id
* @param $last_login_ip
* @return array
*/
public function userRegister($phone, $referrer_id, $referrer_source, $wx_union_id, $last_login_ip)
{
//todo 1.判断是否有此用户,包涵未激活或者冻结, 2.无此用户则注册,返回AuthToken ,3有则登录返回AuthToken
//判断用户是否注册
$conditions["user_phone"] = $phone;
$fields = "id,buyer_id,user_nick,user_pic,other_pic,sex,agent_id,referrer_id,referrer_source,user_phone,status";
$user_info = $this->userModel->getUserByWhere($conditions, $fields);
$buyer_id = $sex = $id = $status = $agent_id = 0;
$buyer_nick = $user_nick = $other_pic = "";
if (count($user_info) > 0) {
switch ((int)$user_info[0]["status"]) {
case -1://激活
$status = 0;
break;
case 0: //正常
if ($referrer_id > 0)
return [ "code" => 101, "data" => "该账号已注册激活" ];
break;
case 1:
return [ "code" => 101, "data" => "该账号已被冻结" ];
case 2://删除的账号该状态
$status = 0;
break;
default:
return [ "code" => 101, "data" => "该帐号异常" ];
}
$user_nick = $user_info[0]["user_nick"];
$buyer_id = $user_info[0]["buyer_id"];
$sex = $user_info[0]["sex"];
$agent_id = $user_info[0]["agent_id"];
$id = $user_info[0]["id"];
$other_pic = $user_info[0]["other_pic"];
}
// 验证union_id是否已经存在,
$wxInfoArr = [];
if ($wx_union_id) {
$field = "id,wx_union_id,buyer_nick,buyer_img,sex";
$wxInfoArr = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id, $field);
if (count($wxInfoArr) > 0) {
$buyer_id = $wxInfoArr[0]["id"];
$buyer_nick = $wxInfoArr[0]["buyer_nick"];
$user_nick = !empty($user_nick) ? $user_nick : $wxInfoArr[0]["buyer_nick"];
$sex = !empty($sex) ? $sex : $wxInfoArr[0]["sex"];
$other_pic = $wxInfoArr[0]["buyer_img"];
} else {
return [ "code" => 101, "data" => "没有找到授权信息" ];
}
//todo 此处有个关系,解绑上一个的id
$this->userModel->unbundlingWx([ "buyer_id" => $buyer_id ]);
}
//判断邀请关系 if邀请人是用户的话则此客户的盘方修改为邀请人的盘方
if ($agent_id == 0) {
$agent_id = $this->inviteRelationship($referrer_id, $referrer_source);
}
$userArr = $this->userBin($user_nick, $sex, $id, $buyer_id, $status, $agent_id, $phone, $referrer_id, $referrer_source, $last_login_ip, $other_pic);
//保存数据
$id = $this->userModel->saveUser($userArr);
if ($id <= 0)
return [ "code" => 101, "data" => "用户更新失败" ];
$jwt_data['id'] = $id;
$jwt_data['userNick'] = $user_nick;
$jwt_data['phone'] = $phone;
$jwt = new JwtUntils();
$AuthToken = $jwt->createToken($jwt_data);
$data["id"] = $id;
$data["buyer_id"] = $buyer_id;
$data["buyer_nick"] = $buyer_nick;
$data["user_nick"] = $user_nick;
$data["user_phone"] = $phone;
$data["user_pic"] = !empty($user_info[0]["user_pic"]) ? HEADERIMGURL . $user_info[0]["user_pic"] : $other_pic;
$data["AuthToken"] = $AuthToken;
return [ "code" => 200, "data" => $data ];
}
/**
* @param $buyer_id
* @param $user_id
* @return int
*/
public function unbundling($buyer_id, $user_id)
{
$params["buyer_id"] = $buyer_id;
$params["user_id"] = $user_id;
return $this->userModel->unbundlingWx($params);
}
/**
* 绑定微信
* @param $wx_union_id
* @param $phone
* @return array
*/
public function binding($wx_union_id, $phone)
{
return $this->userRegister($phone, 0, 0, $wx_union_id, 0);
}
/**
* 组装bin
* @param $user_nick
* @param $sex
* @param $id
* @param $buyer_id
* @param $status
* @param $agent_id
* @param $phone
* @param $referrer_id
* @param $referrer_source
* @param $last_login_ip
* @param $other_pic
* @return mixed
*/
public function userBin($user_nick, $sex, $id, $buyer_id, $status, $agent_id, $phone, $referrer_id, $referrer_source, $last_login_ip, $other_pic)
{
if ($id > 0) {
$userParams["id"] = $id;
} else {
$userParams["registration_time"] = date("Y-m-d H:i:s", time());
if ($referrer_id == 0) {
$userParams["first_login_time"] = date("Y-m-d H:i:s", time()); //记录第一次登录时间排除邀请注册
$push = new PushMessageService();
$content = '你邀请的客户' . $user_nick . '-' . $phone . '手机号成功下载登录App';
$push->pushMessageById($referrer_id, '邀请注册', $content);
}
}
$userParams["buyer_id"] = $buyer_id;
$userParams["user_phone"] = $phone;
$userParams["user_nick"] = $user_nick;
$userParams["sex"] = $sex;
$userParams["status"] = $status;
if ($other_pic) {
$userParams["other_pic"] = $other_pic;
}
if ($agent_id > 0) {
$userParams["agent_id"] = $agent_id;
}
if ($referrer_id > 0) {
$userParams["referrer_id"] = $referrer_id;
}
if ($referrer_source > 0) {
$userParams["referrer_source"] = $referrer_source;
}
$userParams["update_time"] = date("Y-m-d H:i:s", time());
//分享出去激活的不记录登录时间和ip
if ($referrer_id == 0 && $last_login_ip != 0) {
$userParams["last_login_ip"] = $last_login_ip;
$userParams["last_login_time"] = date("Y-m-d H:i:s", time());
}
return $userParams;
}
/**
* 判断邀请状态,返回客方id
* @param $referrer_id
* @param $referrer_source
* @return int|string
*/
private function inviteRelationship($referrer_id, $referrer_source)
{
$agent_id = 0;
if ($referrer_source == 10) { //会员邀请
//查找邀请人的信息
$field_referrer = 'id,agent_id,referrer_id,referrer_source';
$referrerArr = $this->userModel->getUserByWhere([ "id" => $referrer_id ], $field_referrer);
if (count($referrerArr) <= 0)
return '邀请人不存在';
//邀请人是经纪人直接邀请的,并且客方==邀请人
if ($referrerArr[0]['referrer_source'] == 20 && $referrerArr[0]['agent_id'] == $referrerArr[0]['referrer_id'])
$agent_id = $referrerArr[0]['referrer_id'];
} elseif ($referrer_source == 20) {
$agent_id = $referrer_id;
}
return $agent_id;
}
}
\ No newline at end of file
<?php
namespace app\api\service;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/7
* Time : 14:06
* Intro:
*/
class WxSdkService{
}
\ No newline at end of file
......@@ -138,15 +138,15 @@ class GeTuiUntils {
/**
* 对某个人推送消息-公共
*
* 2017-11-07 10:31:27
* @author zhuwei
* @param $id
* @param $device_id
* @param $title
* @param $content
* @return array|void
* @param string $type
* @param $user_id
* @return array
*/
function public_push_message_for_one($id, $device_id, $title, $content)
function public_push_message_for_one($id, $device_id, $title, $content, $type = 'other', $user_id)
{
$home_url = $this->http_host();
$data['agent_id'] = $id;
......@@ -156,10 +156,10 @@ class GeTuiUntils {
$data['touchuan'] = json_encode(array(
'title' => $title,
'content' => $content,
'type' => 'other',
'type' => $type,
'url' => '',
'name' => $title,
'id' => '69',
'id' => $user_id,
'imageUrl' => $home_url .'notice_android_logo.png'));
return $this->push_message_for_one($data);
}
......
......@@ -4,19 +4,23 @@
* User : hj
* Date : 2017.12.6
* Time : 16:14
* Intro:
* Intro:
*/
namespace app\api\untils;
use app\extra\RedisExt;
use app\model\NoteLog;
use think\Session;
class MessageUntils
{
public function __construct()
{
class MessageUntils {
public function __construct() {
}
/**
* 短信验证码
* 容云通讯
......@@ -26,7 +30,8 @@ class MessageUntils {
* @param string $tempId
* @return SimpleXMLElement[]
*/
public function sendCCPSMS($to, $datas, $tempId = '214759') {
public function sendCCPSMS($to, $datas, $tempId = '214759')
{
import('CCPRestSDK', EXTEND_PATH, '.php');
$accountSid = '8a48b55153eae51101540e763d3b3888';
$accountToken = '26b220de299d4a56a6f54dd5792a30e4';
......@@ -47,18 +52,18 @@ class MessageUntils {
$result['dateCreated'] = '';
$result['smsMessageSid'] = '';
$result['statusMsg'] = '';
$result = (array)$rest->sendTemplateSMS($to, $datas, $tempId);
if($result == NULL ) {
$result = (array)$rest->sendTemplateSMS($to, $datas, $tempId);
if ($result == NULL) {
$data['statusMsg'] = '短信接口无返回';
$data['statusCode'] = -1;
}
if($result['statusCode'] != 0) {
if ($result['statusCode'] != 0) {
$data['statusCode'] = $result['statusCode'];
$data['statusMsg'] = $result['statusMsg'];
}else{
$data['statusCode'] = $result['statusCode'];
$data['TemplateSMS'] = $result['TemplateSMS'];
} else {
$data['statusCode'] = $result['statusCode'];
$data['TemplateSMS'] = $result['TemplateSMS'];
}
return $data;
......@@ -73,24 +78,25 @@ class MessageUntils {
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function sendCheckCode($phone) {
public function sendCheckCode($phone)
{
$result_data['msg'] = '';
$result_data['status'] = true;
$noteLog = new NoteLog();
$send_time = $noteLog->field('send_time')->where('phone', $phone)
->where('is_success',1)
->where('send_time','between time',[date('Y-m-d').' 00:00:00',date('Y-m-d').' 23:59:59'])
$noteLog = new NoteLog();
$send_time = $noteLog->field('send_time')->where('phone', $phone)
->where('is_success', 1)
->where('send_time', 'between time', [ date('Y-m-d') . ' 00:00:00', date('Y-m-d') . ' 23:59:59' ])
->select();
$num = count($send_time); //发送数量
$num = count($send_time); //发送数量
if (!empty($send_time[$num-1]) && (time() - strtotime($send_time[$num-1]->send_time) < 58) && $num != 0) {
if (!empty($send_time[$num - 1]) && (time() - strtotime($send_time[$num - 1]->send_time) < 58) && $num != 0) {
$result_data['msg'] = '1分钟内不能再次获取验证码';
$result_data['status'] = false;
return $result_data;
}
if ($num > 7){
if ($num > 7) {
$result_data['msg'] = '短信发送超过上限';
$result_data['status'] = false;
return $result_data;
......@@ -98,28 +104,96 @@ class MessageUntils {
$message = new MessageUntils();
$_code = mt_rand(1000, 9999) . '';
$result = $message->sendCCPSMS($phone, array($_code, '5分钟'), 214759);
$result = $message->sendCCPSMS($phone, array( $_code, '5分钟' ), 214759);
$noteLog->phone = $phone;
$noteLog->template_msg = '【同联商业】您的验证码为'.$_code.',请于5分钟内正确输入,如非本人操作,请忽略此短信。';
$noteLog->template_msg = '【同联商业】您的验证码为' . $_code . ',请于5分钟内正确输入,如非本人操作,请忽略此短信。';
$noteLog->code = $_code;
$noteLog->send_time = date('Y-m-d H:i:s');
$result['statusCode'] = 0;
$result['statusCode'] = 0;
if ($result['statusCode'] == "000000") {
$jwt = new JwtUntils();
$jwt = new JwtUntils();
$noteLog->is_success = 1;
$jwt_data['phone'] = $phone;
$jwt_data['code'] = $_code;
$result_data['sms_code'] = $_code;
$result_data['token'] = $jwt->createToken($jwt_data);
$result_data['status'] = true;
$result_data['sms_code'] = $_code;
$result_data['token'] = $jwt->createToken($jwt_data);
$result_data['status'] = true;
} else {
$noteLog->is_success = 2;
$noteLog->is_success = 2;
$result_data['status'] = false;
}
$noteLog->save();
return $result_data;
}
/**
* @param $device_id
* @param $phone
* @return mixed
*/
public function sendCheckCodeV2($device_id, $phone)
{
$noteLog = new NoteLog();
$send_time = $noteLog->field('send_time')->where('phone', $phone)
->where('is_success', 1)
->where('send_time', 'between time', [ date('Y-m-d') . ' 00:00:00', date('Y-m-d') . ' 23:59:59' ])
->select();
$num = count($send_time); //发送数量
if (!empty($send_time[$num - 1]) && (time() - strtotime($send_time[$num - 1]->send_time) < 58) && $num != 0) {
return '1分钟内不能再次获取验证码';
}
if ($num > 7) {
return '短信发送超过上限';
}
$message = new MessageUntils();
$_code = mt_rand(1000, 9999) . '';
$result = $message->sendCCPSMS($phone, array( $_code, '5分钟' ), 214759);
$noteLog->phone = $phone;
$noteLog->template_msg = '【同联商业】您的验证码为' . $_code . ',请于5分钟内正确输入,如非本人操作,请忽略此短信。';
$noteLog->code = $_code;
$noteLog->send_time = date('Y-m-d H:i:s');
$result['statusCode'] = 0;
if ($result['statusCode'] == "000000") {
$noteLog->is_success = 1;
$noteLog->save();
//todo 存code
$redis_ = RedisExt::getRedis();
$redis_->set($device_id, $_code, 300);
return "true";
} else {
$noteLog->is_success = 2;
$noteLog->save();
return '发送异常,请联系管理员';
}
}
/**
* 验证code
* @param $device_id
* @param $code
* @return bool
*/
public function verifyCode(string $device_id, int $code): bool
{
$redis_ = RedisExt::getRedis();
$service_code = 0;
if ($redis_)
$service_code = $redis_->get($device_id);
if ($code == $service_code) {
$redis_->delete($device_id);
return true;
} else {
return false;
}
}
}
<?php
namespace app\api\untils;
/**
* 微信接口api
* Created by zw.
* User: zw
* email 452436132@qq.com
* Date: 2018/06/04
* Time: 21:30
*/
class WxCallbackUntils
{
private $redis;
private $appId;
private $appSecret;
public function __construct()
{
$this->appId = "wxbbeb8cd2f4b72aea";
$this->appSecret = "9ac6d1680553f4b554f3b46d263fbfb3";
}
/**
* 跳授权页
* @param $redirect_url "http://www.zhuwei.site/index.php/Home/Index/getList";
*/
public function getWxCode($redirect_url)
{
$redirect_url = urlencode($redirect_url);
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" . $this->appId . "&redirect_uri="
. $redirect_url . "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
header("Location:" . $url);
}
/**
* 获取access_token
* @param $code
* @return mixed
*/
public function getAccessTokenByCode($code)
{
$oauth = 'https://api.weixin.qq.com/sns/oauth2/access_token';
$params['appid'] = $this->appId;
$params['secret'] = $this->appSecret;
$params['code'] = $code;
$params['grant_type'] = 'authorization_code';
$result = $this->curl($oauth, $params);
return $result;
}
/**
* 获取用户信息
* @param $code
* @return array
*/
public function getUserInfoByAccessToken($code)
{
$access_token_info = $this->getAccessTokenByCode($code);
$access_token_info = json_decode($access_token_info);
$access_token = $access_token_info->access_token;
$open_id = $access_token_info->openid;
session("access_token", $access_token);
session("openid", $open_id);
$user_info_url = 'https://api.weixin.qq.com/sns/userinfo';
$params['access_token'] = $access_token;
$params['openid'] = $open_id;
$params['lang'] = 'zh_CN';
$user_info = $this->curl($user_info_url, $params);
$user_info = json_decode($user_info);
$data = array(
'wx_open_id' => $open_id,
'buyer_nick' => $user_info->nickname,
'sex' => $user_info->sex,
'province' => $user_info->province,
'city' => $user_info->city,
'buyer_img' => $user_info->headimgurl,
'wx_union_id' => $user_info->unionid,
);
session("userInfo", $data);
return $data;
}
public function curl($url, $data = [])
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, []);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, null);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$content = curl_exec($ch);
return $content;
}
}
<?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 = [
'user_id' => 'require|number',
'buyer_id' => 'require|number',
'wx_union_id' => 'require|length:10,50',
'code' => 'require|number',
'device_id' => 'require',
'phone' => [ 'regex' => '/^((13[0-9])|(14[0-9])|(15[0-9])|(18[0-9])|(16[0-9])|(17[0-9])|(19[0-9]))\\d{8}$/i' ],
];
protected $message = [
'user_id.require' => 'user_id为必填字段',
'user_id.number' => 'user_id只能为数字',
'buyer_id.require' => 'buyer_id为必填字段',
'buyer_id.number' => 'buyer_id只能为数字',
'wx_union_id.require' => '微信union_id不能为空',
'wx_union_id.length:10,50' => '微信union_id错误',
'phone.regex' => '手机号格式不正确',
'device_id.require' => '设备id不能为空',
'code.require' => 'code为必填字段',
'code.number' => 'code只能为数字'
];
protected $scene = [
'verify' => [ 'phone', 'device_id' ],
'register' => [ 'phone', 'device_id', 'code' ],
'removeBind' => [ 'user_id', 'buyer_id' ],
'bind' => [ 'wx_union_id','phone' ],
];
}
\ No newline at end of file
<?php
namespace app\api\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/6
* Time : 17:35
* Intro:
*/
class UWxInfoValidate extends Validate
{
protected $rule = [
'wx_open_id' => 'require|length:10,50',
'wx_union_id' => 'require|length:10,50',
'sex' => 'require|number',
'source' => 'require|number',
'user_id' => 'require|number|gt:0',
];
protected $message = [
'wx_open_id.require' => '微信open_id不能为空',
'wx_open_id.length:10,50' => '微信open_id错误',
'wx_union_id.require' => '微信union_id不能为空',
'wx_union_id.length:10,50' => '微信union_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 = [
'add' => [ 'wx_open_id','wx_union_id', 'sex', 'source' ],
'select' => [ 'wx_open_id' ],
'bind' => [ 'wx_open_id', 'user_id' ],
];
}
\ No newline at end of file
......@@ -557,7 +557,7 @@ class Broker extends Basic
}
$code = new GenerateCodeUntils();
$url = $this->request->domain() . '/app/share_register?referrer_source=20&id=' . $this->agentId;
$url = $this->request->domain() . '/app_broker/index?referrer_source=20&referrer_id=' . $this->agentId;
$path = $code->getCode($url, $this->agentId, 2);
$data['data'] = [ 'path' => $this->request->domain() . '/' . $path ];
$data['status'] = 200;
......
......@@ -68,7 +68,7 @@ class Client extends Basic
$ccr_agent_data = $agent->getAgentInfo('name,phone', $this->params['ccr_id']);
$content = "【{$ccr_agent_data['name']}-{$ccr_agent_data['phone']}修改了{$user_agent_id['user_name']}(id:{$user_agent_id['id']})客方】";
// $content = "【你的客户客方被修改为{$agent_data['name']}-{$agent_data['phone']}】";
$push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content);
$push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content, 'user_info', $user_agent_id['id']);
$this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']);
}
} else {
......@@ -369,15 +369,17 @@ class Client extends Basic
if (empty($this->agentId)) {
return $this->response($data['status'],'id is null');
}
$params = $this->params;
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$where['status'] = 0;
$where['referrer_id'] = $this->agentId;
$where['referrer_source'] = 20;
$fields = 'user_nick,user_phone,user_pic,create_time';
$data['data'] = $this->user->getUserByWhere($where, $fields);
$fields = 'user_nick,user_phone,user_pic,other_pic,create_time';
$data['data'] = $this->user->getUserForInviteList($pageNo, $pageSize,$where, $fields);
foreach ($data['data'] as $k=>$v) {
$data['data'][$k]['user_pic'] = HEADERIMGURL.$v['user_pic'];
$data['data'][$k]['user_pic'] = !empty($v['user_pic']) ? HEADERIMGURL.$v['user_pic'] : $v['other_pic'] ;
$data['data'][$k]['user_phone'] = hide_customer_phone($v['user_phone']);
$data['data'][$k]['create_time'] = date('Y-m-d', strtotime($v['create_time']));
}
......
......@@ -25,24 +25,40 @@ class Feed extends Basic
public function feedList() {
$push = new PushFeed();
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$field = 'id,house_id,title,content,link,house_title,create_time';
$where = [];
$where['status'] = 0;
// if (!empty($this->agentId)) {
// $where[0] = ['EXP','find_in_set('.$this->agentId.',agent_id) or agent_id = -1'];
// }
$data = $push->getList($pageNo, $pageSize, 'id DESC', $field, $where);
foreach ($data as $k => $v) {
$data[$k]['icon'] = CURRENT_URL . "resource/image/notice_xibaotl.png";
$data[$k]['content'] = "恭喜{$v['content']}成交{$v['house_title']}商铺一套";
$field = 'id,house_id,title,content,link,house_title,create_time,type';
if (isset($this->params['home']) && $this->params['home'] == 1) {
//首页
$where_0['status'] = 0;
$where_0['type'] = 1;
$where_1['status'] = 0;
$where_1['type'] = 0;
$data[] = $push->getFeedInfo($field, $where_0, 'id desc');
$data[] = $push->getFeedInfo($field, $where_1, 'id desc');
} else {
//列表页
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = [];
$where['status'] = 0;
if (empty($this->params['type'])) {
$where['type'] = 0;
} else {
$where['type'] = 1;
}
$data = $push->getList($pageNo, $pageSize, 'id DESC', $field, $where);
foreach ($data as $k => $v) {
if ($v['type'] == 0) {
$data[$k]['icon'] = CURRENT_URL . "resource/image/notice_xibaotl.png";
$data[$k]['content'] = "恭喜{$v['content']}成交{$v['house_title']}商铺一套";
}
}
}
return $this->response(200, "", $data);
}
......@@ -100,7 +116,7 @@ class Feed extends Basic
header('Access-Control-Allow-Origin:*');
$push = new PushFeed();
$field = 'id,create_time,house_title,click_num,content,type';
$field = 'id,create_time,house_title,click_num,content,type,title';
if (empty($this->params['id'])) {
return $this->response(101, "Id is null!");
......@@ -110,9 +126,13 @@ class Feed extends Basic
$where['status'] = 0;
$data = $push->getFeedInfo($field, $where);
if ($data['type'] == 0) {
if ($this->params['type'] == 0) {
$data['type_string'] = '成功下定';
}
if ($data['type'] == 1) {
$data['type_string'] = '公告';
}
return $this->response(200, "", $data);
}
}
\ No newline at end of file
......@@ -37,14 +37,14 @@ class HomePageLog extends Basic
public function userFollowUpList()
{
$params = $this->params;
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话 经纪人
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话 经纪人
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
if (empty($params['start_time']) || empty($params['end_time'])) {
return $this->response("101", '请选择时间');
......@@ -53,14 +53,14 @@ class HomePageLog extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = "f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.user_status,a.name,a.img,b.store_name";
$field = "f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.user_status,a.name,a.img,b.store_name";
$where_ = [];
if (!empty($params["search_content"])) {
$where_["f.content"] = array( "like", "%" . trim($params['search_content']) . "%" );
}
if (!empty($params["start_time"]) && !empty($params["end_time"])) {
$start_time = date("Y-m-d H:i:s",$params["start_time"]);
$end_time = date("Y-m-d H:i:s",$params["end_time"]);
$start_time = date("Y-m-d H:i:s", $params["start_time"]);
$end_time = date("Y-m-d H:i:s", $params["end_time"]);
$where_["f.create_time"] = array( 'between', array( $start_time, $end_time ) );
}
if (!empty($params["name_or_phone"])) {
......@@ -74,9 +74,11 @@ class HomePageLog extends Basic
];
$order = "f.id desc";
$result = $this->uPhoneFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, $join, $where_, "");
$count = $this->uPhoneFollowUpModel->getSearchCount($join, $where_);
if (count($result) > 0) {
$list["result"] = $result;
$list["img_path"] = AGENTHEADERIMGURL;
$list["total"] = $count;
return $this->response("200", "request success", $list);
} else {
return $this->response("200", "request null");
......@@ -95,20 +97,22 @@ class HomePageLog extends Basic
public function houseFollowUpList()
{
$params = $this->params;
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
if (empty($params['start_time']) || empty($params['end_time'])) {
return $this->response("101", '请选择时间');
}
$where_ = [];
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
......@@ -118,8 +122,8 @@ class HomePageLog extends Basic
$where_["f.follow_up_info"] = array( "like", "%" . trim($params['search_content']) . "%" );
}
if (!empty($params["start_time"]) && !empty($params["end_time"])) {
$start_time = date("Y-m-d H:i:s",$params["start_time"]);
$end_time = date("Y-m-d H:i:s",$params["end_time"]);
$start_time = date("Y-m-d H:i:s", $params["start_time"]);
$end_time = date("Y-m-d H:i:s", $params["end_time"]);
$where_["f.create_time"] = array( 'between', array( $start_time, $end_time ) );
}
if (!empty($params["name_or_phone"])) {
......@@ -132,9 +136,11 @@ class HomePageLog extends Basic
];
$order = "f.id desc";
$result = $this->gHouseFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, $join, $where_, "");
$count = $this->gHouseFollowUpModel->getSearchCount($join, $where_);
if (count($result) > 0) {
$list["result"] = $result;
$list["img_path"] = AGENTHEADERIMGURL;
$list["total"] = $count;
return $this->response("200", "request success", $list);
} else {
return $this->response("200", "request null");
......
......@@ -46,7 +46,7 @@ class Shop extends Basic
public function getShopList()
{
/*$params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title
"house_id" => 4,
"is_carefully_chosen" => 0, //精选商铺--0否1是
......@@ -60,6 +60,7 @@ class Shop extends Basic
"rent_price_end" => 10000,//租金
"shop_sign" => "临近地铁,临近地铁2",
"agent_id" => 630, //添加经纪人id
"status" => 1, //1上架or2下架
"start_time" => "2018-05-25",
"end_time" => "2018-05-30",
"pageNo" => 1,
......@@ -105,8 +106,8 @@ class Shop extends Basic
}
if (isset($params['start_time']) && isset($params['end_time'])) {
$start_time = date('Y-m-d H:i:s',$params['start_time']);
$end_time = date('Y-m-d H:i:s',$params['end_time']);
$start_time = date('Y-m-d H:i:s', $params['start_time']);
$end_time = date('Y-m-d H:i:s', $params['end_time']);
$conditions['create_time'] = array( 'between', array( $start_time, $end_time ) );
}
......@@ -123,6 +124,7 @@ class Shop extends Basic
break;
case 2:
case 4:
case 5:
if (isset($params['disc'])) { //区域
$conditions['disc'] = array( 'eq', trim($params['disc']) );
}
......@@ -177,13 +179,16 @@ 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'])) {
$conditions['status'] = array( 'in', "1,2" ); //只显示上架或下架的
//$conditions['status'] = array( 'in', "1,2" ); //只显示上架或下架的
$conditions['status'] = $params['status']; //只显示上架或下架的
}
$result = $this->gHousesModel->getHousesList($pageNo, $pageSize, $order_, $field, $conditions, $spTagArr);
//获取图片信息
......@@ -219,11 +224,12 @@ class Shop extends Basic
public function getShopDetail()
{
header('Access-Control-Allow-Origin:*');
/* $params = array(
"id" => 4,
"site_area" => 3, //1.c端 3.b端
//"user_id" => 2 //if c端 用户登录后传入user_id
);*/
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端
"site_area" => 1, //1.c端 3.b端
//"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$params = $this->params;
$conditions = [];
......@@ -236,23 +242,23 @@ class Shop extends Basic
if ($params['site_area'] == 1) {
$field = "a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
$field = "a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,
b.enter_num,b.external_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule";
$conditions['a.status'] = array( "eq", 1 );
$conditions['a.is_show'] = array( 'eq', 0 ); //c端只显示公开楼盘
} else {
$field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status,
$field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,
b.enter_num,b.internal_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,a.upload_id,b.fee_rule,b.landlord_remark,a.create_time";
b.auditorium,b.tiny_brochure_url,b.start_business_date,a.upload_id,b.fee_rule,b.landlord_remark,a.create_time,b.landlord_phone";
$conditions['a.status'] = array( "neq", 3 );
}
$conditions['a.id'] = array( "eq", $params["id"] );
$conditions['a.status'] = array( "neq", 3 );
$result = $this->gHousesModel->getHouseDetailById($field, $conditions);
......@@ -276,12 +282,13 @@ class Shop extends Basic
$result["api_path"] = CK_IMG_URL . 'images/';
$param["house_id"] = $params['id'];
//todo 这里的是否要更改成b端后台上传的类型
$param["img_type"] = 2;
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
// $result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);
$result["plan_images"] = [];
// $result['landlord_phone'] = json_decode ($result['landlord_phone'], true);
$param["img_type"] = 2;
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);
$result["plan_images"] = [];
$result['landlord_phone'] = json_decode($result['landlord_phone'], true);
$result['create_time'] = date('Y-m-d', strtotime($result['create_time']));
if ($result['status'] == 0) {
return $this->response("101", '此楼盘已下架');
......@@ -297,9 +304,9 @@ class Shop extends Basic
}
//todo 查询成交报告中的提交的业态拼接到已入驻中
$bargainModel = new OBargainModel();
$str = $bargainModel->selectBargainListByHouseId($params["id"]);
$result["enter_num"] .= $str;
$bargainModel = new OBargainModel();
$str = $bargainModel->selectBargainListByHouseId($params["id"]);
$result["enter_num"] .= $str;
$verify = new VerifyService();
$agentId = $verify->getPanpartyAgentsByHouseId($params["id"]);
......@@ -419,8 +426,8 @@ class Shop extends Basic
$img = new GHousesImgs();
$id = $img->getHouseImagesInfo('id', [
'house_id' => $this->params['house_id'],
'img_name' => $this->params['save_path'],
'house_id' => $this->params['house_id'],
'img_name' => $this->params['save_path'],
'img_status' => 0
]);
......
......@@ -96,7 +96,7 @@ class Basic extends Controller
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) {
$this->tokenVerify();
$this->tokenVerify();
// $this->userAuth(trim($requestPath));
}
unset($this->params["AuthToken"]);
......
......@@ -138,23 +138,41 @@ class PushMessageService
return ;
}
/**
* 推送全部人员,带跳转。
*
* @param string $title
* @param string $content
* @param string $url
*/
public function pushAll(string $title = '', string $content = '', string $url = '') {
$url = $this->push->http_host(). '/'. $url;
$this->push->push_message_for_all($title, $content, $url);
return ;
}
/**
* 普通消息推送
*
* @param $id
* @param $title
* @param $content
* @return array|void
* @param string $type
* @param string $user_id
* @return array|bool
*/
public function pushMessageById($id, $title,$content) {
public function pushMessageById($id, $title,$content, $type = 'other' ,$user_id = '') {
if (empty($id)) {
return false;
}
$result = [];
$agent = new AAgents();
$device_id = $agent->getAgentsById($id, 'device_id');
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content);
if (!empty($device_id)) {
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
}
return $result;
}
......
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/6/22
* Time: 16:21
*/
namespace app\api_broker\service;
use think\File;
class UploadFileService
{
/**
* 文件上传
*
* @param $_upload_file
* @param $type
* @param int $size
* @param array $ext
* @return array
*/
public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg' ])
{
$check = $this->checkUploadFile($_upload_file, $size, $ext);
if ($check['code'] == 101) {
return $check;
}
$data = [];
$valid_date['size'] = $size;
$path = ROOT_PATH . 'public/';
switch ($type) {
case 'user_header' :
$path .= 'static/user_header/';
break;
case 'agent_header' :
$path .= 'static/head_portrait/';
break;
case 'house_img':
$path .= 'resource/lib/Attachments/images/';
default :
$path .= 'static/';
}
$path .= date('Ymd');
$name_str = date('YmdHis') . mt_rand(1000);
if (is_array($_upload_file['tmp_name'])) {
foreach ($_upload_file['tmp_name'] as $k => $v) {
$name_str .= $k;
$_file = new File($v);
$file_info = pathinfo($_upload_file['name'][$k]);
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) {
$data[$k]['code'] = 200;
$data[$k]['img_path'] = $info->getSaveName(); //生成的图片路径
$data[$k]['img_ext'] = $info->getExtension();
} else {
$data[$k]['code'] = 101;
$data[$k]['error'] = $_file->getError();
}
}
} else {
$_file = new File($_upload_file['tmp_name']);
$file_info = pathinfo($_upload_file['name']);
$info = $_file->validate($valid_date)->move($path, $name_str . '.' . $file_info['extension']);
if ($info) {
$data['code'] = 200;
$data['img_path'] = $info->getSaveName(); //生成的图片路径
$data['img_ext'] = $info->getExtension();
} else {
$data['code'] = 101;
$data['error'] = $_file->getError();
}
}
return $data;
}
/**
* 检查文件大小事
*
* @param $_upload_file
* @param $size
* @param $ext
* @return array
*/
public function checkUploadFile($_upload_file, $size, $ext)
{
$data = [];
if (is_array($_upload_file['tmp_name'])) {
foreach ($_upload_file['tmp_name'] as $k => $v) {
$file_info = pathinfo($_upload_file['name'][$k]);
if (filesize($v) > $size) {
$data['code'] = 101;
$data['error'] = '文件太大无法上传';
break;
}
if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101;
$data['error'] = '文件类型不符无法上传';
break;
}
}
} else {
if (filesize($_upload_file['tmp_name']) > $size) {
$data['code'] = 101;
$data['error'] = '文件太大无法上传';
}
$file_info = pathinfo($_upload_file['name']);
if (!in_array($file_info['extension'], $ext)) {
$data['code'] = 101;
$data['error'] = '文件类型不符无法上传';
}
}
return $data;
}
}
\ No newline at end of file
<?php
namespace app\api_broker\service;
use app\extra\RedisExt;
/**
......@@ -9,38 +11,45 @@ use app\extra\RedisExt;
* Time : 10:28
* Intro:
*/
class VerifyRepetitionService {
class VerifyRepetitionService
{
private $redis_;
const MARCH_IN_KEY = "_march_in_";
const TIME_OUT = 60; // 超时时间1分钟
const CALL_NUMBER = "_call_number_";
const TIME_OUT = 120; // 超时时间1分钟
public function __construct()
{
$this->redis_ = RedisExt::getRedis();
}
public function verifyStart(int $type,int $agent_id,int $order_id) : bool {
public function verifyStart(int $type, int $agent_id, int $order_id): bool
{
if(!$this->redis_){
if (!$this->redis_) {
return true;
}
$key = "";
switch ($type){
$key = "";
$time = 60;
switch ($type) {
case 1: //进场
$key = self::MARCH_IN_KEY;
$key = self::MARCH_IN_KEY;
$time = self::TIME_OUT;
break;
case 2:
$key = self::CALL_NUMBER;
$time = strtotime(date('Y-m-d') . ' 23:59:59') - time();
break;
case 3:
break;
default:
}
if($this->redis_->get($agent_id.$key.$order_id)){
if ($this->redis_->get($agent_id . $key . $order_id)) {
return false;
}else{
$this->redis_->set($agent_id.$key.$order_id,1,self::TIME_OUT);
} else {
$this->redis_->set($agent_id . $key . $order_id, 1, $time);
return true;
}
......
......@@ -80,7 +80,7 @@ class PlsDemo
* @param string $phoneNoX 中间号码
* @return mixed|\SimpleXMLElement
*/
public static function bindAxb($phoneA, $phoneB, $time, $isRecordingEnabled=false, $phoneNoX = '17091955105') {
public static function bindAxb($phoneA, $phoneB, $time, $isRecordingEnabled=false, $phoneNoX = '') {
//组装请求对象-具体描述见控制台-文档部分内容
$request = new BindAxbRequest();
......
<?php
namespace app\api_broker\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/6/19
* Time : 18:41
* Intro:
*/
class PerformanceValidate extends Validate
{
protected $rule = [
'type' => 'require|number',
'agent_id' => 'require|number',
];
protected $message = [
'type.require' => 'type为必填字段',
'type.number' => 'type只能为数字',
'agent_id.require' => 'agent_id为必填字段',
'agent_id.number' => 'agent_id只能为数字',
];
protected $scene = [
'verify' => [ 'type', 'agent_id' ],
'verifyOther' => [ 'agent_id' ],
];
}
\ No newline at end of file
......@@ -38,7 +38,7 @@
<script>
window.onload = function() {
$('#app_ban').attr('src','/app/images/bg_download.png');
$('#app_ban').attr('src','/app/images/bg_download_c@2x.png');
$('title').html('下载');
$('.xiazai-p-fuju').show();
//0是c端,2是b端
......@@ -52,7 +52,15 @@
},
beforeSend: function() {},
success: function(data) {
$('#android_link').attr('href',data.data.app_path);
$(document).on('click','#android_link',function(e){
e.preventDefault();
e.stopPropagation();
if(~navigator.userAgent.indexOf('MicroMessenger')){
$("#footer_and").show();
}else{
location.href = data.data.app_path;
}
});
},
error: function() {
alert("暂无最新app链接")
......@@ -71,9 +79,6 @@
// alert(u);
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { //安卓手机
//alert("安卓手机");
if (u.indexOf('MicroMessenger') > -1) {
$("#footer_and").show();
}
$(".img_a").css("top", "9rem").show();
//alert(123);
} else if (u.indexOf('iPhone') > -1) { //苹果手机
......
......@@ -2,127 +2,207 @@
namespace app\app_broker\controller;
use app\api\untils\WxCallbackUntils;
use app\model\AppVersion;
use app\model\HouseImgs;
use app\model\HouseInfos;
use app\model\Users;
use app\model\UWxInfo;
use think\Controller;
use think\Exception;
use think\Log;
use think\Response;
class Index
{
public function achieve_fork()
private $url = CURRENT_URL . "/app_broker/index";
private $_wxApi;
private $wxInfoModel;
private $userModel;
public function __construct()
{
$this->_wxApi = new WxCallbackUntils();
$this->wxInfoModel = new UWxInfo();
$this->userModel = new Users();
}
public function index()
{
$code = empty($_GET['code']) ? null : $_GET['code'];
$referrer_id = empty($_GET['referrer_id']) ? 0 : $_GET['referrer_id'];
$referrer_source = empty($_GET['referrer_source']) ? 0 : $_GET['referrer_source'];
if($referrer_id == 0 || $referrer_source == 0){
return ["code"=>101,"msg"=>"邀请链接已失效"];
}
$this->url .= "?referrer_id=$referrer_id&referrer_source=$referrer_source";
Log::record("session referrer_id -----------------" . $referrer_id, "info");
Log::record("session referrer_source -----------------" . $referrer_source, "info");
if (!$code) {
$this->_wxApi->getWxCode($this->url);
} else {
$userInfo = $this->_wxApi->getUserInfoByAccessToken($code);
Log::record("session wx -----------------" . json_encode($userInfo), "info");
if (!$userInfo) {
$this->_wxApi->getWxCode($this->url);
} else {
$userInfo["source"] = 0;
$wx_union_id = $userInfo["wx_union_id"];
// 验证open_id是否已经存在,存在则更新
$wxInfoObj = $this->wxInfoModel->getWxInfoByOpenId($wx_union_id);
$id = 0;
try {
if ($wxInfoObj && count($wxInfoObj) > 0) {
$userInfo["id"] = $wxInfoObj[0]["id"];
$id = $this->wxInfoModel->updateWxInfo($userInfo);
} else {
$id = $this->wxInfoModel->addWxInfo($userInfo);
}
} catch (Exception $exception) {
Log::record("wx authorization error,msg:" . $exception);
}
$conditions["buyer_id"] = $id;
$fields = "id,user_nick,user_phone,user_pic,other_pic";
$user_info = $this->userModel->getUserByWhere($conditions, $fields);
Log::record("session wx -----------------" . json_encode($user_info), "info");
if (count($user_info) > 0) {
//下载页
header("Location:" . CURRENT_URL . "app/download_c");
die();
} else {
//绑定页
$url = "referrer_id=$referrer_id&referrer_source=$referrer_source&wx_union_id= $wx_union_id&device_id=" . $this->createOrderNumber();
header("Location:" . CURRENT_URL . "app/dist/index.html#/inviteRegister?" . $url);
die();
}
}
}
}
/**
* 随机数
* @return string
*/
private function createOrderNumber()
{
return time() . mt_rand(10000, 99999);
}
public function achieve_fork()
{
return view('index/achieve_fork');
}
public function achieve_ywy()
{
return view('index/achieve_ywy');
}
public function achieve_region()
{
return view('index/achieve_region');
}
public function cs_0328()
{
return view('index/cs_0328');
}
public function weekly()
public function weekly()
{
return view('index/weekly');
}
public function customerinfo_genjin()
{
return view('index/customerinfo_genjin');
}
public function weekly_my()
{
return view('index/weekly_my');
}
public function weekly_image()
{
return view('index/weekly_image');
}
public function weekly_achieve_dz()
{
return view('index/weekly_achieve_dz');
}
public function weekly_achieve_mdzj()
{
return view('index/weekly_achieve_mdzj');
}
public function daily()
{
return view('index/daily');
}
public function daily_my()
{
return view('index/daily_my');
}
public function daily_achieve_mdzj()
{
return view('index/daily_achieve_mdzj');
}
public function daily_achieve_dz()
{
return view('index/daily_achieve_dz');
}
public function daily_achieve_ywy()
{
return view('index/daily_achieve_ywy');
}
public function timeline_pc()
{
return view('index/timeline_pc');
}
public function bargaininfo_detail_pc()
{
return view('index/bargaininfo_detail_pc');
}
public function customerinfo_details_new()
{
return view('index/customerinfo_details_new');
}
public function customerinfo_customer_add()
{
return view('index/customerinfo_customer_add');
}
public function imagebody()
{
return view('index/imagebody');
}
public function download_b()
{
return view('index/download_b');
}
public function __construct()
{
}
public function index()
{
return view('index/index');
}
/* public function index()
{
return view('index/index');
}*/
}
......@@ -187,10 +187,10 @@
<table border="0" cellspacing="0" cellpadding="0" class="table-type9">
<tr class="table-tr-single">
<td colspan="6">同联六项管理、自我考核评分标准(每项1-10分)</td>
<td colspan="5">同联五项管理、自我考核评分标准(每项1-10分)</td>
</tr>
<tr>
<td>项管理</td>
<td>项管理</td>
<td>分数</td>
<td>提高方法</td>
</tr>
......@@ -229,13 +229,6 @@
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
<tr class="">
<td>动力管理</td>
<td><input type="number" placeholder="填写" /></td>
<td>
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
</table>
</section>
......
......@@ -83,10 +83,10 @@
<table border="0" cellspacing="0" cellpadding="0" class="table-type9">
<tr class="table-tr-single">
<td colspan="6">同联六项管理、自我考核评分标准(每项1-10分)</td>
<td colspan="5">同联五项管理、自我考核评分标准(每项1-10分)</td>
</tr>
<tr>
<td>项管理</td>
<td>项管理</td>
<td>分数</td>
<td>提高方法</td>
</tr>
......@@ -125,13 +125,6 @@
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
<tr class="">
<td>动力管理</td>
<td><input type="number" placeholder="填写" /></td>
<td>
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
</table>
</section>
......
......@@ -134,10 +134,10 @@
<table border="0" cellspacing="0" cellpadding="0" class="table-type9">
<tr class="table-tr-single">
<td colspan="6">同联六项管理、自我考核评分标准(每项1-10分)</td>
<td colspan="5">同联五项管理、自我考核评分标准(每项1-10分)</td>
</tr>
<tr>
<td>项管理</td>
<td>项管理</td>
<td>分数</td>
<td>提高方法</td>
</tr>
......@@ -176,13 +176,6 @@
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
<tr class="">
<td>动力管理</td>
<td><input type="number" placeholder="填写" /></td>
<td>
<div class="div-textarea" contenteditable="true">点击填写</div>
</td>
</tr>
</table>
</section>
......
......@@ -36,7 +36,7 @@
<script>
window.onload = function() {
$('#app_ban').attr('src','/app/images/bg_download.png');
$('#app_ban').attr('src','/app/images/bg_download_b@2x.png');
$('title').html('下载');
$('.xiazai-p-fuju').show();
//0是c端,2是b端
......@@ -50,7 +50,16 @@
},
beforeSend: function() {},
success: function(data) {
$('#android_link').attr('href',data.data.app_path);
$(document).on('click','#android_link',function(e){
e.preventDefault();
e.stopPropagation();
if(~navigator.userAgent.indexOf('MicroMessenger')){
$("#footer_and").show();
}else{
location.href = data.data.app_path;
}
});
},
error: function() {
......@@ -69,9 +78,6 @@
// alert(u);
if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { //安卓手机
//alert("安卓手机");
if (u.indexOf('MicroMessenger') > -1) {
$("#footer_and").show();
}
$(".img_a").css("top", "9rem").show();
//alert(123);
} else if (u.indexOf('iPhone') > -1) { //苹果手机
......
11111111111111111
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>同联商业</title><script type=text/javascript src=/app/dist/vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=/app/dist/static/css/app.750242cf94fc6a1c837832b2967fa5df.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/app/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=/app/dist/static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=/app/dist/static/js/app.7f39005f105af47b007a.js></script></body></html>
......@@ -20,7 +20,7 @@
<div class="right-area">
<div class="right-area-top">
<h6>{{switchTitle(item.step_name)}}</h6>
<p v-if="item.step_name==='report'">{{item.store_name}}</p>
<p v-if="item.step_name==='report'">{{item.house_title}}</p>
<p v-if="item.step_name==='report'">客户:<span>{{item.user_name}}</span></p>
<p v-if="item.step_name==='report'">客户电话:<span>{{hideTel(item.user_phone)}}</span></p>
<p v-if="item.step_name==='report'">约带看人:<span>{{item.report_agent_name}}</span></p>
......@@ -37,11 +37,11 @@
<p v-if="item.step_name==='pay_log'">入账金额:<span class="span-active">{{item.money}}元</span></p>
<p v-if="item.step_name==='pay_log'">商铺号:<span class="span-active">{{item.house_number}}</span></p>
<p v-if="item.step_name==='pay_log'">业态/品牌:<span>{{item.industry_type}}</span></p>
<p v-if="item.step_name==='refund'">退款金额:<span class="span-active">{{}}元</span></p>
<p v-if="item.step_name==='refund'">退款金额:<span class="span-active">{{item.refund_money}}元</span></p>
<p v-if="item.step_name==='refund'" class="yinhangka-info">退款银行卡信息</p>
<p v-if="item.step_name==='refund'">姓名:<span>{{}}</span></p>
<p v-if="item.step_name==='refund'">银行及支行:<span>{{}}</span></p>
<p v-if="item.step_name==='refund'">卡号:<span>{{}}</span></p>
<p v-if="item.step_name==='refund'">姓名:<span>{{item.agent_name}}</span></p>
<p v-if="item.step_name==='refund'">银行及支行:<span>{{item.bank}}</span></p>
<p v-if="item.step_name==='refund'">卡号:<span>{{item.card_no}}</span></p>
<p v-if="item.step_name==='bargain'">成交类型:<span>{{switchTradeType(item.trade_type)}}</span></p>
<p v-if="item.step_name==='bargain'">成交价:<span class="span-active">{{item.price}}元</span></p>
<p v-if="item.step_name==='bargain'">应收佣金:<span class="span-active">{{item.commission}}元</span></p>
......
......@@ -18,10 +18,11 @@ define('CURRENT_URL', 'https://'.$_SERVER['HTTP_HOST'].'/'); //取当前域名
define('HEADERIMGURL', CURRENT_URL . 'static'. DS . 'head_portrait/'); //头像地址
define('AGENTHEADERIMGURL', CURRENT_URL . 'static'. DS . 'user_header/'); //头像地址
define('CHAT_IMG_URL', CURRENT_URL . 'static'. DS . 'chat_image/'); //聊天图片地址
define('CK_IMG_URL', CURRENT_URL . '/resource/lib/Attachments/'); //ck 资源文件
define('CK_IMG_URL', CURRENT_URL . 'resource/lib/Attachments/'); //ck 资源文件
define('_POOLKEY','FC100000022056027');//隐私号码
define('_TLSYPoolKey','FC100000022056027');//隐私号码池
define('WEEK_WORK_IMG', CURRENT_URL . 'static'. DS . 'week_work_img/'); //周报日报目录
define('PHONE_VOICE', ROOT_PATH.'public'.DS.'static'.DS.'voice'); //录音绝对路径
return [
// +----------------------------------------------------------------------
// | 应用设置
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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