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
d75689b9
Commit
d75689b9
authored
Jun 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/wx0604' into wx0604
parents
90b541fa
cdd1cf79
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
28 deletions
+119
-28
AppointmentTime.php
application/api/controller/AppointmentTime.php
+12
-14
Register.php
application/api/controller/Register.php
+31
-6
RegisterService.php
application/api/service/RegisterService.php
+13
-1
RegisterValidate.php
application/api/validate/RegisterValidate.php
+2
-0
Index.php
application/app_broker/controller/Index.php
+8
-2
evaluation_list.html
application/index/view/evaluation/evaluation_list.html
+1
-1
OReportModel.php
application/model/OReportModel.php
+44
-3
route.php
application/route.php
+1
-0
watch_template_tpl.html
public/resource/template/watch_template_tpl.html
+7
-1
No files found.
application/api/controller/AppointmentTime.php
View file @
d75689b9
...
@@ -105,15 +105,14 @@ class AppointmentTime extends Basic
...
@@ -105,15 +105,14 @@ class AppointmentTime extends Basic
*/
*/
public
function
getAppointmentSeeShopList
()
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
=
$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"
]))
{
if
(
!
isset
(
$params
[
"status"
]))
{
return
$this
->
response
(
"101"
,
"请求状态不能为空"
);
return
$this
->
response
(
"101"
,
"请求状态不能为空"
);
...
@@ -212,11 +211,11 @@ class AppointmentTime extends Basic
...
@@ -212,11 +211,11 @@ class AppointmentTime extends Basic
*/
*/
public
function
getYetListV2
(
$pageNo
,
$pageSize
,
$params
)
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,
$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.external_title as house_title,d.residue_num as room_num_left"
;
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
// $result = $this->appointmentTimeModel->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_
);
$result
=
$this
->
reportModel
->
getHaveToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
foreach
(
$result
as
$key
=>
$val
)
{
...
@@ -243,9 +242,8 @@ class AppointmentTime extends Basic
...
@@ -243,9 +242,8 @@ class AppointmentTime extends Basic
d.external_title as house_title,d.residue_num as room_num_left"
;
d.external_title as house_title,d.residue_num as room_num_left"
;
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"user_id"
]
=
$params
[
"user_id"
];
$where_
[
"c.id"
]
=
array
(
'EXP'
,
'IS NULL'
);
$result
=
$this
->
reportModel
->
getWaitToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
$result
=
$this
->
reportModel
->
getWaitToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
foreach
(
$result
as
$key
=>
$val
)
{
...
...
application/api/controller/Register.php
View file @
d75689b9
...
@@ -83,7 +83,7 @@ class Register extends Basic
...
@@ -83,7 +83,7 @@ class Register extends Basic
return
$this
->
response
(
"101"
,
"验证码错误"
);
return
$this
->
response
(
"101"
,
"验证码错误"
);
}
}
$phone
=
$params
[
"phone"
];
$phone
=
$params
[
"phone"
];
$wx_union_id
=
!
empty
(
$params
[
"wx_union_id"
])
?
$params
[
"wx_union_id"
]
:
null
;
$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_id
=
!
empty
(
$params
[
"referrer_id"
])
?
$params
[
"referrer_id"
]
:
0
;
$referrer_source
=
!
empty
(
$params
[
"referrer_source"
])
?
$params
[
"referrer_source"
]
:
0
;
$referrer_source
=
!
empty
(
$params
[
"referrer_source"
])
?
$params
[
"referrer_source"
]
:
0
;
$last_login_ip
=
ip2long
(
$this
->
request
->
ip
());
$last_login_ip
=
ip2long
(
$this
->
request
->
ip
());
...
@@ -103,11 +103,11 @@ class Register extends Basic
...
@@ -103,11 +103,11 @@ class Register extends Basic
*/
*/
public
function
removeBinding
()
public
function
removeBinding
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"buyer_id" => 5,
"buyer_id" => 5,
"user_id" => 25983,
"user_id" => 25983,
);*/
);*/
$checkResult
=
$this
->
validate
(
$params
,
"RegisterValidate.removeBind"
);
$checkResult
=
$this
->
validate
(
$params
,
"RegisterValidate.removeBind"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
return
$this
->
response
(
"101"
,
$checkResult
);
...
@@ -120,4 +120,28 @@ class Register extends Basic
...
@@ -120,4 +120,28 @@ class Register extends Basic
return
$this
->
response
(
"101"
,
"解绑失败"
);
return
$this
->
response
(
"101"
,
"解绑失败"
);
}
}
}
}
/**
* 绑定微信
* @return \think\Response
*/
public
function
bindingWx
()
{
$params
=
$this
->
params
;
/* $params = array(
"wx_union_id" => "asdfasfasdf",
"phone" => 25983,
);*/
$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
application/api/service/RegisterService.php
View file @
d75689b9
...
@@ -132,6 +132,18 @@ class RegisterService
...
@@ -132,6 +132,18 @@ class RegisterService
return
$this
->
userModel
->
unbundlingWx
(
$params
);
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
* 组装bin
* @param $user_nick
* @param $user_nick
...
@@ -182,7 +194,7 @@ class RegisterService
...
@@ -182,7 +194,7 @@ class RegisterService
$userParams
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$userParams
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
//分享出去激活的不记录登录时间和ip
//分享出去激活的不记录登录时间和ip
if
(
$referrer_id
==
0
)
{
if
(
$referrer_id
==
0
&&
$last_login_ip
!=
0
)
{
$userParams
[
"last_login_ip"
]
=
$last_login_ip
;
$userParams
[
"last_login_ip"
]
=
$last_login_ip
;
$userParams
[
"last_login_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$userParams
[
"last_login_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
}
}
...
...
application/api/validate/RegisterValidate.php
View file @
d75689b9
...
@@ -39,5 +39,6 @@ class RegisterValidate extends Validate
...
@@ -39,5 +39,6 @@ class RegisterValidate extends Validate
'verify'
=>
[
'phone'
,
'device_id'
],
'verify'
=>
[
'phone'
,
'device_id'
],
'register'
=>
[
'phone'
,
'device_id'
,
'code'
],
'register'
=>
[
'phone'
,
'device_id'
,
'code'
],
'removeBind'
=>
[
'user_id'
,
'buyer_id'
],
'removeBind'
=>
[
'user_id'
,
'buyer_id'
],
'bind'
=>
[
'user_id'
,
'wx_union_id'
],
];
];
}
}
\ No newline at end of file
application/app_broker/controller/Index.php
View file @
d75689b9
...
@@ -31,8 +31,14 @@ class Index
...
@@ -31,8 +31,14 @@ class Index
public
function
index
()
public
function
index
()
{
{
$code
=
empty
(
$_GET
[
'code'
])
?
null
:
$_GET
[
'code'
];
$code
=
empty
(
$_GET
[
'code'
])
?
null
:
$_GET
[
'code'
];
$referrer_id
=
empty
(
$_GET
[
'referrer_id'
])
?
null
:
$_GET
[
'referrer_id'
];
$referrer_id
=
empty
(
$_GET
[
'referrer_id'
])
?
0
:
$_GET
[
'referrer_id'
];
$referrer_source
=
empty
(
$_GET
[
'referrer_source'
])
?
null
:
$_GET
[
'referrer_source'
];
$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
)
{
if
(
!
$code
)
{
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
$this
->
_wxApi
->
getWxCode
(
$this
->
url
);
...
...
application/index/view/evaluation/evaluation_list.html
View file @
d75689b9
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</select>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_name"
placeholder=
"姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_name"
placeholder=
"姓名"
type=
"text"
value=
""
>
<span
class=
"fore-span ld-Marheight"
>
进场平均分数:
</span><span
class=
"fore-span ld-Marheight evaluation-score"
id=
'average_score'
>
空
</span
>
<!-- <span class="fore-span ld-Marheight">进场平均分数:</span><span class="fore-span ld-Marheight evaluation-score" id='average_score'>空</span>--
>
<span
class=
"fore-span ld-Marheight"
>
评价平均分数:
</span><span
class=
"fore-span ld-Marheight evaluation-score"
id=
'average_score_evaluation'
>
空
</span>
<span
class=
"fore-span ld-Marheight"
>
评价平均分数:
</span><span
class=
"fore-span ld-Marheight evaluation-score"
id=
'average_score_evaluation'
>
空
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
...
...
application/model/OReportModel.php
View file @
d75689b9
...
@@ -515,7 +515,7 @@ class OReportModel extends Model
...
@@ -515,7 +515,7 @@ class OReportModel extends Model
*/
*/
public
function
getWaitToSeeList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
public
function
getWaitToSeeList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
{
$data
=
$this
/*
$data = $this
->field($field)
->field($field)
->alias("a")
->alias("a")
->join("o_order b", "b.f_id = a.id", "left")
->join("o_order b", "b.f_id = a.id", "left")
...
@@ -525,8 +525,49 @@ class OReportModel extends Model
...
@@ -525,8 +525,49 @@ class OReportModel extends Model
->order($order_)
->order($order_)
->limit($pageSize)
->limit($pageSize)
->page($pageNo)
->page($pageNo)
->
select
();
->select();*/
//echo $this->getLastSql();
$start_index
=
(
$pageNo
-
1
)
*
$pageSize
;
if
(
isset
(
$params
[
"user_id"
]))
{
$user_id
=
$params
[
"user_id"
];
}
$sql
=
"select * from ((
SELECT
`a`.`id`,
a.user_id,
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
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `b`.`f_id` = `a`.`id`
LEFT JOIN `o_march_in` `c` ON `c`.`report_id` = `b`.`id`
LEFT JOIN `g_houses` `d` ON `d`.`id` = `b`.`house_id`
WHERE
`a`.`user_id` =
$user_id
AND (`c`.`id` IS NULL)
)
UNION
(
SELECT
a.id,
a.agents_id,
a.expect_time,
a.house_id,
a.user_id,
b.external_title AS house_title,
b.residue_num AS room_num_left
FROM
u_appoint_watch_shop a
LEFT JOIN g_houses b ON a.house_id = b.id
WHERE
a.user_id =
$user_id
and a.status in (0,1)
) ) as aaa limit
$start_index
,
$pageSize
"
;
$data
=
$this
->
db
->
query
(
$sql
);
return
$data
;
return
$data
;
}
}
...
...
application/route.php
View file @
d75689b9
...
@@ -317,6 +317,7 @@ Route::group('api', [
...
@@ -317,6 +317,7 @@ Route::group('api', [
'sendCode'
=>
[
'api/Register/registerSendCode'
,
[
'method'
=>
'POST'
]
],
'sendCode'
=>
[
'api/Register/registerSendCode'
,
[
'method'
=>
'POST'
]
],
'userVerify'
=>
[
'api/Register/registerVerify'
,
[
'method'
=>
'POST'
]
],
'userVerify'
=>
[
'api/Register/registerVerify'
,
[
'method'
=>
'POST'
]
],
'removeBind'
=>
[
'api/Register/removeBinding'
,
[
'method'
=>
'POST|GET'
]
],
'removeBind'
=>
[
'api/Register/removeBinding'
,
[
'method'
=>
'POST|GET'
]
],
'bindingWx'
=>
[
'api/Register/bindingWx'
,
[
'method'
=>
'POST'
]
],
//绑定微信
]);
]);
...
...
public/resource/template/watch_template_tpl.html
View file @
d75689b9
...
@@ -6,7 +6,13 @@
...
@@ -6,7 +6,13 @@
<
td
>
[
%=
it
[
item
][
'appellation'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'appellation'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"phone"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"expect_time"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"expect_time"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"other_require"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"other_require"
]
!=
null
)
{
%
]
[
%=
it
[
item
][
'other_require'
]
%
]
[
%
}
%
]
<
/td
>
<!--<
td
>
[
%=
it
[
item
][
"other_require"
]
%
]
<
/td>--
>
<!--
[
%
if
(
it
[
item
][
"dish_name"
]
!=
""
)
{
%
]
[
%=
it
[
item
][
'dish_name'
]
%
]
[
%
}
%
]
-->
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
onclick
=
"alertFollow(this)"
>
跟进
<
/a
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
onclick
=
"alertFollow(this)"
>
跟进
<
/a
>
...
...
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