Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
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
zhangjun
User
Commits
df0f92f9
Commit
df0f92f9
authored
Dec 15, 2023
by
zhangjun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-fangliyan'
parents
955cb1a0
4d688148
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
308 additions
and
64 deletions
+308
-64
.gitignore
.gitignore
+2
-0
esf_center_api.php
center/controllers/esf_center_api.php
+62
-6
esf_center_api_zhang.php
center/controllers/esf_center_api_zhang.php
+13
-13
findpassword.php
center/controllers/findpassword.php
+2
-0
login.php
center/controllers/login.php
+1
-1
user.php
center/controllers/user.php
+0
-0
user_fang.php
center/controllers/user_fang.php
+0
-0
user_wang.php
center/controllers/user_wang.php
+6
-2
left.php
center/views/left.php
+2
-2
myask.php
center/views/myask.php
+2
-2
zero_yuan_pay.php
center/views/zero_yuan_pay.php
+23
-0
constants.php
esf_core/config/constants.php
+8
-0
MY_Model.php
esf_core/core/MY_Model.php
+2
-2
function_helper.php
esf_core/helpers/function_helper.php
+31
-1
user_helper.php
esf_core/helpers/user_helper.php
+25
-25
package_model.php
esf_core/models/package_model.php
+72
-0
user_model.php
esf_core/models/user_model.php
+50
-3
user_xue_model.php
esf_core/models/user_xue_model.php
+2
-2
user_zhou_model.php
esf_core/models/user_zhou_model.php
+5
-5
No files found.
.gitignore
View file @
df0f92f9
# Created by .ignore support plugin (hsz.mobi)
# Created by .ignore support plugin (hsz.mobi)
.idea
.idea
\ No newline at end of file
center/controllers/esf_center_api.php
View file @
df0f92f9
...
@@ -1372,6 +1372,11 @@ class Esf_center_api extends MY_Controller {
...
@@ -1372,6 +1372,11 @@ class Esf_center_api extends MY_Controller {
*/
*/
public
function
api_adduser_mobile
()
public
function
api_adduser_mobile
()
{
{
$result
=
1
;
$msg
=
'停用'
;
$return_array
=
array
(
'result'
=>
$result
,
'msg'
=>
$msg
);
echo
serialize
(
$return_array
);
die
();
$telno
=
$this
->
input
->
get
(
'telno'
);
$telno
=
$this
->
input
->
get
(
'telno'
);
$paasword
=
$this
->
input
->
get
(
'paasword'
);
$paasword
=
$this
->
input
->
get
(
'paasword'
);
$city
=
$this
->
input
->
get
(
'city'
);
$city
=
$this
->
input
->
get
(
'city'
);
...
@@ -2914,12 +2919,13 @@ class Esf_center_api extends MY_Controller {
...
@@ -2914,12 +2919,13 @@ class Esf_center_api extends MY_Controller {
public
function
notify
(){
public
function
notify
(){
$data
=
$_POST
;
$data
=
$_POST
;
$msg
=
"************************************************
\n
"
;
$this
->
user_model
->
addLog
(
"微信支付回调参数数据2:"
,
json_encode
(
$data
)
);
$msg
.=
date
(
'Y-m-d H:i:s'
)
.
var_export
(
$_POST
,
true
)
.
"
\n
"
;
// $msg = "************************************************ \n";
$log
=
dirname
(
__FILE__
)
.
"/notify"
;
// $msg .= date('Y-m-d H:i:s').var_export($_POST,true)." \n";
file_put_contents
(
$log
,
$msg
,
FILE_APPEND
);
// $log = dirname(__FILE__)."/notify";
$log2
=
dirname
(
__FILE__
)
.
"/notifylog2.txt"
;
// file_put_contents($log,$msg,FILE_APPEND );
file_put_contents
(
$log2
,
$msg
,
FILE_APPEND
);
// $log2 = dirname(__FILE__ ) . "/notifylog2.txt";
// file_put_contents( $log2, $msg,FILE_APPEND );
$result
[
'status'
]
=
'FAIL'
;
$result
[
'status'
]
=
'FAIL'
;
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
$result
[
'msg'
]
=
'city error'
;
$result
[
'msg'
]
=
'city error'
;
...
@@ -2986,6 +2992,56 @@ class Esf_center_api extends MY_Controller {
...
@@ -2986,6 +2992,56 @@ class Esf_center_api extends MY_Controller {
}
}
}
}
/**
* 0元支付回调
*/
public
function
zeroNotify
()
{
$result
[
'status'
]
=
0
;
$data
=
$_POST
;
$transactionId
=
isset
(
$data
[
'transaction_id'
]
)
?
$data
[
'transaction_id'
]
:
''
;
// 订单数据
$orderInfo
=
$this
->
package_model
->
getOrderInfoByTransactionId
(
$transactionId
);
if
(
empty
(
$orderInfo
)
)
{
$result
[
'msg'
]
=
'订单数据不存在'
;
echo
json_encode
(
$result
);
exit
;
}
//判断订单状态
if
(
$orderInfo
[
'order_status'
]
!=
1
){
$result
[
'msg'
]
=
'订单已关闭'
;
echo
json_encode
(
$result
);
exit
;
}
if
(
$orderInfo
[
'pay_status'
]
!=
0
){
$result
[
'msg'
]
=
'订单已失效'
;
echo
json_encode
(
$result
);
exit
;
}
$payTransactionId
=
isset
(
$data
[
'pay_transaction_id'
]
)
?
$data
[
'pay_transaction_id'
]
:
''
;
if
(
empty
(
$payTransactionId
)
)
{
$result
[
'msg'
]
=
'支付凭证不能为空'
;
echo
json_encode
(
$result
);
exit
;
}
//支付成功后的操作
$res
=
$this
->
package_model
->
payFinish
(
$orderInfo
,
array
(
'transaction_id'
=>
$payTransactionId
)
);
if
(
!
$res
)
{
$result
[
'msg'
]
=
'生成推广相关数据失败'
;
echo
json_encode
(
$result
);
exit
;
}
// 发送短信
if
(
GB_CITY
==
'nj'
)
{
$this
->
sendMsg
(
$orderInfo
);
}
$result
[
'status'
]
=
1
;
$result
[
'msg'
]
=
'成功'
;
echo
json_encode
(
$result
);
exit
;
}
// 支付回调修复数据 20200605
// 支付回调修复数据 20200605
public
function
notify_modify_data
(){
public
function
notify_modify_data
(){
$data
=
$_POST
;
$data
=
$_POST
;
...
...
center/controllers/esf_center_api_zhang.php
View file @
df0f92f9
...
@@ -570,19 +570,19 @@ class Esf_center_api_zhang extends MY_Controller {
...
@@ -570,19 +570,19 @@ class Esf_center_api_zhang extends MY_Controller {
//登陆成功需要把sso_token以cookie形式种到浏览器中
//登陆成功需要把sso_token以cookie形式种到浏览器中
protected
function
register_tf_ucenter_cookie
(
$passport_uid
){
protected
function
register_tf_ucenter_cookie
(
$passport_uid
){
setcookie
(
'PHPSESSID'
,
''
,
time
()
-
1
,
'/'
,
'house365.com'
);
//
setcookie('PHPSESSID','',time()-1,'/','house365.com');
$url
=
"http://api.house365.com/passport/passport_gettoken_byuid.php?passport_uid="
.
$passport_uid
;
//
$url = "http://api.house365.com/passport/passport_gettoken_byuid.php?passport_uid=".$passport_uid;
if
(
isset
(
$_COOKIE
[
'utm_source'
])
&&
isset
(
$_COOKIE
[
'utm_medium'
])
&&
isset
(
$_COOKIE
[
'utm_campaign'
])){
//
if(isset($_COOKIE['utm_source']) && isset($_COOKIE['utm_medium']) && isset($_COOKIE['utm_campaign'])){
$url
.=
"&utm_source=
{
$_COOKIE
[
'utm_source'
]
}
&utm_medium=
{
$_COOKIE
[
'utm_medium'
]
}
&utm_campaign=
{
$_COOKIE
[
'utm_campaign'
]
}
"
;
//
$url.= "&utm_source={$_COOKIE['utm_source']}&utm_medium={$_COOKIE['utm_medium']}&utm_campaign={$_COOKIE['utm_campaign']}";
}
//
}
if
(
isset
(
$_COOKIE
[
'crm_scene'
])){
//
if(isset($_COOKIE['crm_scene'])){
$url
.=
"®ister_client=PC®ister_application=
{
$_COOKIE
[
'crm_scene'
]
}
"
;
//
$url.= "®ister_client=PC®ister_application={$_COOKIE['crm_scene']}";
}
//
}
$api_res
=
json_decode
(
$this
->
get_api
(
$url
),
true
);
//
$api_res = json_decode($this->get_api($url), true);
//
if
(
isset
(
$api_res
[
'result'
])
&&
$api_res
[
'result'
]
==
1
){
//
if(isset($api_res['result']) && $api_res['result']==1){
setcookie
(
'sso_token'
,
$api_res
[
'data'
],
time
()
+
3600
*
24
*
180
,
'/'
,
'house365.com'
);
//
setcookie('sso_token',$api_res['data'],time()+3600*24*180,'/','house365.com');
}
//
}
}
}
...
...
center/controllers/findpassword.php
View file @
df0f92f9
...
@@ -17,6 +17,8 @@ class Findpassword extends MY_Controller {
...
@@ -17,6 +17,8 @@ class Findpassword extends MY_Controller {
*/
*/
public
function
index
()
public
function
index
()
{
{
header
(
'Location:http://passport.house365.com/index/forgetPwd'
);
die
();
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'title'
]
=
'用户找回密码'
;
$data
[
'title'
]
=
'用户找回密码'
;
...
...
center/controllers/login.php
View file @
df0f92f9
...
@@ -17,7 +17,7 @@ class Login extends MY_Controller
...
@@ -17,7 +17,7 @@ class Login extends MY_Controller
function
index
()
function
index
()
{
{
Header
(
"HTTP/1.1 301 Moved Permanently"
);
Header
(
"HTTP/1.1 301 Moved Permanently"
);
Header
(
"Location: http://
newrent.house365.com/user/login
"
);
Header
(
"Location: http://
passport.house365.com/index/login?others_returnback=http://newrent.house365.com/user-center/index
"
);
exit
;
exit
;
//IM 埋点
//IM 埋点
if
(
$_GET
[
'from'
]
==
'im'
){
if
(
$_GET
[
'from'
]
==
'im'
){
...
...
center/controllers/user.php
View file @
df0f92f9
This diff is collapsed.
Click to expand it.
center/controllers/user_fang.php
0 → 100644
View file @
df0f92f9
This diff is collapsed.
Click to expand it.
center/controllers/user_wang.php
View file @
df0f92f9
...
@@ -6,7 +6,9 @@ class User_Wang extends MY_Controller
...
@@ -6,7 +6,9 @@ class User_Wang extends MY_Controller
function
__construct
()
function
__construct
()
{
{
parent
::
__construct
();
parent
::
__construct
();
if
(
$_GET
[
'test'
]){
echo
'ddddd'
;
exit
;
}
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"broker_model"
);
$this
->
load
->
model
(
"broker_model"
);
...
@@ -20,7 +22,9 @@ class User_Wang extends MY_Controller
...
@@ -20,7 +22,9 @@ class User_Wang extends MY_Controller
$this
->
load
->
library
(
"user_class"
);
$this
->
load
->
library
(
"user_class"
);
$this
->
load
->
library
(
"apply_class"
);
$this
->
load
->
library
(
"apply_class"
);
$this
->
user_id
=
checklogin
();
$this
->
user_id
=
checklogin
();
if
(
$_GET
[
'test'
]){
echo
'ffff'
;
exit
;
}
if
(
$this
->
user_id
<=
0
)
if
(
$this
->
user_id
<=
0
)
{
{
jumpto
(
USER_CENTER
.
'login'
);
jumpto
(
USER_CENTER
.
'login'
);
...
...
center/views/left.php
View file @
df0f92f9
...
@@ -70,8 +70,8 @@
...
@@ -70,8 +70,8 @@
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'edit_profile'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/edit_profile'
;
?>
"
class=
"innerLink"
>
修改资料
</a>
</div>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'edit_profile'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/edit_profile'
;
?>
"
class=
"innerLink"
>
修改资料
</a>
</div>
<!-- <div class="user-nav-mod -->
<?php
//if($conf_where=='edit_password') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_password';?><!--" class="innerLink">修改密码</a> </div>-->
<!-- <div class="user-nav-mod -->
<?php
//if($conf_where=='edit_password') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_password';?><!--" class="innerLink">修改密码</a> </div>-->
<!--
<
div
class
="
user
-
nav
-
mod
user
-
nav
-
mod
-
last
--><?
php
//if($conf_where=='edit_telno') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_telno';?><!--" class="innerLink">修改手机号码</a> </div>-->
<!--
<
div
class
="
user
-
nav
-
mod
user
-
nav
-
mod
-
last
--><?
php
//if($conf_where=='edit_telno') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_telno';?><!--" class="innerLink">修改手机号码</a> </div>-->
<
div
class
="
user
-
nav
-
mod
<?
php
if
(
$conf_where
==
'edit_password'
)
echo
'on'
;
?>
">
<a
href=
"
<?php
echo
GB_EDIT_P
HONE
_URL
;
?>
"
class=
"innerLink"
>
修改密码
</a>
</div>
<
div
class
="
user
-
nav
-
mod
<?
php
if
(
$conf_where
==
'edit_password'
)
echo
'on'
;
?>
">
<a
href=
"
<?php
echo
GB_EDIT_P
WD
_URL
;
?>
"
class=
"innerLink"
>
修改密码
</a>
</div>
<div
class=
"user-nav-mod user-nav-mod-last
<?php
if
(
$conf_where
==
'edit_telno'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
GB_EDIT_P
WD
_URL
;
?>
"
class=
"innerLink"
>
修改手机号码
</a>
</div>
<div
class=
"user-nav-mod user-nav-mod-last
<?php
if
(
$conf_where
==
'edit_telno'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
GB_EDIT_P
HONE
_URL
;
?>
"
class=
"innerLink"
>
修改手机号码
</a>
</div>
</div>
</div>
</div>
</div>
...
...
center/views/myask.php
View file @
df0f92f9
...
@@ -82,12 +82,12 @@
...
@@ -82,12 +82,12 @@
<script>
<script>
function
buyListGuidePop
(){
function
buyListGuidePop
(){
$
(
"#myAskGuidePop"
).
css
({
$
(
"#myAskGuidePop"
).
css
({
"display"
:
"block"
,
//
"display":"block",
"width"
:
$
(
window
).
width
()
<
960
?
960
:
$
(
window
).
width
()
+
"px"
,
"width"
:
$
(
window
).
width
()
<
960
?
960
:
$
(
window
).
width
()
+
"px"
,
"height"
:
$
(
document
).
height
()
+
"px"
"height"
:
$
(
document
).
height
()
+
"px"
});
});
$
(
"#myAskGuide"
).
css
({
$
(
"#myAskGuide"
).
css
({
"display"
:
"block"
,
//
"display":"block",
"left"
:
$
(
".mod-list"
).
offset
().
left
-
25
+
"px"
,
"left"
:
$
(
".mod-list"
).
offset
().
left
-
25
+
"px"
,
"top"
:
$
(
".mod-list"
).
offset
().
top
-
74
+
"px"
"top"
:
$
(
".mod-list"
).
offset
().
top
-
74
+
"px"
});
});
...
...
center/views/zero_yuan_pay.php
0 → 100644
View file @
df0f92f9
<?php
require
APPPATH_MVC
.
'views/header.php'
;
?>
<div
class=
"paysuc popw"
>
<div
class=
"release-failBack"
>
</div>
<div
class=
"release-fail yz-pop"
>
<div
class=
"tit"
>
<span>
支付成功
</span>
<div
class=
"closes"
></div>
</div>
<div
class=
"poplist"
>
<div
class=
"pstit"
>
支付成功
</div>
<div
class=
"f16 c3 mt20"
>
前往
<a
href=
"
<?php
echo
USER_CENTER
;
?>
"
class=
"orange"
>
个人中心>>
</a></div>
<div
class=
"f14 c3 mt10"
>
支付金额:
<span
class=
"bold red"
>
<?=
$orderData
[
'price'
]
?>
元
</span>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/orderInvoice/'
.
$orderData
[
'id'
]
?>
"
>
<span
class=
"f14 oranget hand"
>
我要开发票
</span>
</a>
</div>
</div>
<p>
重要提醒:不点陌生链接、不泄露银行卡和验证码信息,谨防诈骗!
</p>
</div>
</div>
<!--2017-11-28 end-->
<?php
require
APPPATH_MVC
.
'views/footer.php'
;
?>
esf_core/config/constants.php
View file @
df0f92f9
...
@@ -413,6 +413,14 @@ define('GB_UCENTER_LOGIN_URL', 'https://ucenter.house365.com/index/login');
...
@@ -413,6 +413,14 @@ define('GB_UCENTER_LOGIN_URL', 'https://ucenter.house365.com/index/login');
define
(
'GB_NEWRENT_INDEX_URL'
,
'http://newrent.house365.com/sell/index'
);
define
(
'GB_NEWRENT_INDEX_URL'
,
'http://newrent.house365.com/sell/index'
);
// 退出地址
// 退出地址
define
(
'GB_LOGOUT_URL'
,
'http://passport.house365.com/index/logout'
);
define
(
'GB_LOGOUT_URL'
,
'http://passport.house365.com/index/logout'
);
// 验证优惠券
define
(
'GB_CHECK_COUPON_URL'
,
'http://newrent.house365.com/api/tf-app/check-coupon-personal'
);
// 使用优惠券
define
(
'GB_USE_COUPON_URL'
,
'http://newrent.house365.com/api/tf-app/use-coupon'
);
// 更新状态接口地址
define
(
'GB_UPDATE_COUPON_URL'
,
'http://newrent.house365.com/api/tf-app/update-coupon-status'
);
// 添加日志
define
(
'GB_ADD_LOG_URL'
,
'http://newrent.house365.com/api/tf-app/add-log'
);
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
if
(
$_SERVER
[
'SERVER_ADDR'
]
==
'192.168.105.106'
)
{
{
...
...
esf_core/core/MY_Model.php
View file @
df0f92f9
...
@@ -248,11 +248,11 @@ class MY_Model extends CI_Model
...
@@ -248,11 +248,11 @@ class MY_Model extends CI_Model
{
{
if
(
strlen
(
$data
[
'limit'
])
&&
is_numeric
(
$data
[
'limit'
]))
if
(
strlen
(
$data
[
'limit'
])
&&
is_numeric
(
$data
[
'limit'
]))
{
{
(
$data
[
'limit'
]
>
0
)
?
$this
->
db
->
limit
(
$data
[
'offset'
],
$data
[
'limit'
])
:
$this
->
db
->
limit
(
$data
[
'offset'
]
);
(
$data
[
'limit'
]
>
0
)
?
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
$data
[
'limit'
])
:
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
20
);
}
}
else
else
{
{
$this
->
db
->
limit
(
$data
[
'offset'
]
);
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
20
);
}
}
}
}
else
else
...
...
esf_core/helpers/function_helper.php
View file @
df0f92f9
...
@@ -210,6 +210,17 @@ if ( ! function_exists('get_upload_tblname'))
...
@@ -210,6 +210,17 @@ if ( ! function_exists('get_upload_tblname'))
{
{
function
get_upload_tblname
(
$tbl
,
$id
){
function
get_upload_tblname
(
$tbl
,
$id
){
if
(
GB_CITY
==
'wh'
){
if
(
$tbl
==
'sell'
&&
$id
<
10310000
)
return
'upload'
;
if
(
$tbl
==
'rent'
&&
$id
<
1577000
)
return
'upload'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
10310000
&&
$id
<
15591000
))
return
'upload1'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
1577000
&&
$id
<
1809000
))
return
'upload1'
;
return
'upload2'
;
}
if
(
GB_CITY
!=
'nj'
)
return
'upload'
;
if
(
GB_CITY
!=
'nj'
)
return
'upload'
;
if
(
$tbl
==
'sell'
&&
$id
<
23972101
)
return
'upload0'
;
if
(
$tbl
==
'sell'
&&
$id
<
23972101
)
return
'upload0'
;
...
@@ -349,7 +360,26 @@ if ( ! function_exists('get_upload_tblname'))
...
@@ -349,7 +360,26 @@ if ( ! function_exists('get_upload_tblname'))
if
(
$tbl
==
'rent'
&&
(
$id
>=
63483875
&&
$id
<
84955643
))
return
'upload29'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
63483875
&&
$id
<
84955643
))
return
'upload29'
;
return
'upload30'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
264744742
&&
$id
<
271465540
))
return
'upload30'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
84955643
&&
$id
<
86646071
))
return
'upload30'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
271465540
&&
$id
<
282952050
))
return
'upload31'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
86646071
&&
$id
<
89874731
))
return
'upload31'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
282952050
&&
$id
<
288033939
))
return
'upload32'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
89874731
&&
$id
<
91709557
))
return
'upload32'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
288033939
&&
$id
<
289572177
))
return
'upload33'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
91709557
&&
$id
<
92295581
))
return
'upload33'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
289572177
&&
$id
<
332826911
))
return
'upload34'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
92295581
&&
$id
<
105588509
))
return
'upload34'
;
return
'upload35'
;
}
}
}
}
...
...
esf_core/helpers/user_helper.php
View file @
df0f92f9
...
@@ -40,31 +40,31 @@
...
@@ -40,31 +40,31 @@
function
getLoginInfoBySSO
(){
function
getLoginInfoBySSO
(){
if
(
empty
(
$_COOKIE
[
'sso_token'
])){
//
if(empty($_COOKIE['sso_token'])){
return
false
;
//
return false;
}
//
}
$ci
=
&
get_instance
();
//
$ci = & get_instance();
if
(
empty
(
$_COOKIE
[
'esfuserid'
])
||
empty
(
$_COOKIE
[
'esfpassword'
])){
//
if(empty($_COOKIE['esfuserid']) || empty($_COOKIE['esfpassword'])){
$url
=
'http://api.house365.com/passport/check_login_bytoken.php?sso_token='
.
$_COOKIE
[
'sso_token'
];
//
$url = 'http://api.house365.com/passport/check_login_bytoken.php?sso_token='.$_COOKIE['sso_token'];
$info
=
json_decode
(
curl_get_contents
(
$url
),
1
);
//
$info = json_decode(curl_get_contents($url),1);
if
(
is_array
(
$info
)){
//
if(is_array($info)){
if
(
isset
(
$info
[
'data'
][
'passport_uid'
])
&&
$info
[
'data'
][
'passport_uid'
])
{
//
if (isset($info['data']['passport_uid']) && $info['data']['passport_uid']) {
$passport_uid
=
$info
[
'data'
][
'passport_uid'
];
//
$passport_uid = $info['data']['passport_uid'];
$ci
->
load
->
model
(
'user_model'
);
//
$ci->load->model('user_model');
$user
=
$ci
->
user_model
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'where'
=>
array
(
'passport_uid'
=>
$passport_uid
),
'select'
=>
array
(
'id'
,
'telno'
,
'password'
)),
'esfbak'
);
//
$user = $ci->user_model->get_data(array('form_name' => 'personal_user','where'=>array('passport_uid'=>$passport_uid),'select'=>array('id','telno','password')),'esfbak');
if
(
$user
){
//
if($user){
$esfuserid
=
$user
[
0
][
'id'
];
//
$esfuserid = $user[0]['id'];
$esfpassword
=
$user
[
0
][
'password'
];
//
$esfpassword = $user[0]['password'];
setcookie
(
'esfuserid'
,
$esfuserid
,
time
()
+
3600
*
24
*
7
,
'/'
,
'.house365.com'
);
//
setcookie('esfuserid',$esfuserid,time() + 3600 * 24 * 7,'/','.house365.com');
setcookie
(
'esfpassword'
,
$esfpassword
,
time
()
+
3600
*
24
*
7
,
'/'
,
'.house365.com'
);
//
setcookie('esfpassword',$esfpassword,time() + 3600 * 24 * 7,'/','.house365.com');
}
//
}
}
//
}
}
else
{
//
}else{
return
false
;
//
return false;
}
//
}
}
//
}
//
return
$info
;
//
return $info;
}
}
function
getLoginInfoBySSOUcenter
(){
function
getLoginInfoBySSOUcenter
(){
...
...
esf_core/models/package_model.php
View file @
df0f92f9
...
@@ -58,6 +58,22 @@ class Package_model extends MY_Model
...
@@ -58,6 +58,22 @@ class Package_model extends MY_Model
return
time
()
.
$formatType
.
$randValue
;
return
time
()
.
$formatType
.
$randValue
;
}
}
/**
* 获取某个产品的0元支付交易号
* @param int $type 产品类型 1代表首页推荐,2代表列表页推荐,3代表智能刷新,4代表普通刷新
* @return string
*/
public
function
getPaymentTransactionId
(
$type
)
{
//防止订单ID与租售宝重复,$type 定义为从50开始
$type
=
50
+
$type
;
$formatType
=
self
::
formatValue
(
$type
,
2
);
//随机数
$randValue
=
self
::
formatValue
(
self
::
randValue
(),
4
);
//订单号
return
'zeropay-'
.
time
()
.
$formatType
.
$randValue
;
}
/**
/**
* 获取套餐详情
* 获取套餐详情
* @param int $id 套餐ID
* @param int $id 套餐ID
...
@@ -552,6 +568,11 @@ class Package_model extends MY_Model
...
@@ -552,6 +568,11 @@ class Package_model extends MY_Model
//订单状态更新成功,设置缓存5分钟内不再允许更新
//订单状态更新成功,设置缓存5分钟内不再允许更新
$this
->
memcached_class
->
add
(
$cacheKey
,
1
,
300
);
$this
->
memcached_class
->
add
(
$cacheKey
,
1
,
300
);
//更新优惠券
if
(
GB_CITY
==
'nj'
&&
(
int
)
$orderInfo
[
'coupon_id'
]
>
0
)
{
$this
->
updateCouponStatus
(
$orderInfo
[
'user_id'
],
$orderInfo
[
'coupon_id'
]
);
}
$data
=
array
();
$data
=
array
();
$tableArray
=
array
(
1
=>
'sell'
,
2
=>
'rent'
);
$tableArray
=
array
(
1
=>
'sell'
,
2
=>
'rent'
);
$tbl
=
$tableArray
[
$orderInfo
[
'house_type'
]];
$tbl
=
$tableArray
[
$orderInfo
[
'house_type'
]];
...
@@ -947,6 +968,18 @@ class Package_model extends MY_Model
...
@@ -947,6 +968,18 @@ class Package_model extends MY_Model
}
}
/**
* 验证优惠券
* @param $user_id
* @param $coupon_id
*/
public
function
updateCouponStatus
(
$user_id
,
$coupon_id
)
{
$url
=
GB_UPDATE_COUPON_URL
.
'?uid='
.
$user_id
.
'&coupon_id='
.
$coupon_id
;
$couponRes
=
curl_get_contents
(
$url
);
$couponRes
=
!
empty
(
$couponRes
)
?
json_decode
(
$couponRes
,
1
)
:
array
();
return
$couponRes
;
}
/**
/**
* 远程获取
* 远程获取
* @author zj
* @author zj
...
@@ -968,4 +1001,42 @@ class Package_model extends MY_Model
...
@@ -968,4 +1001,42 @@ class Package_model extends MY_Model
curl_close
(
$ch
);
curl_close
(
$ch
);
return
$str
;
return
$str
;
}
}
/**
* 发送消息
* @author zj
* @date 2020-09-08
*
* @param array $orderInfo 订单数据
* @return bool
*/
public
function
sendMsg
(
$orderInfo
)
{
$message
=
''
;
$this
->
load
->
library
(
"apply_class"
);
if
(
$orderInfo
[
'package_type'
]
==
1
)
{
$message
=
"您已成功购买
{
$orderInfo
[
'package_days'
]
}
天的首页推荐套餐,购买的套餐可以在个人中心-我的订单进行查看。"
;
}
else
if
(
$orderInfo
[
'package_type'
]
==
2
)
{
$message
=
"您已成功购买
{
$orderInfo
[
'package_days'
]
}
天的列表页推荐套餐,购买的套餐可以在个人中心-我的订单进行查看。"
;
}
else
if
(
$orderInfo
[
'package_type'
]
==
3
)
{
$message
=
"您已成功购买
{
$orderInfo
[
'package_days'
]
}
天的智能刷新套餐,购买的套餐可以在个人中心-我的订单进行查看。"
;
}
else
if
(
$orderInfo
[
'package_type'
]
==
6
)
{
$message
=
"您已成功购买24小时
{
$orderInfo
[
'refresh_num'
]
}
次刷新,您可以选择手动去刷新或者设置时间预约刷新,购买的套餐可以在个人中心-我的订单进行查看哦"
;
}
if
(
!
$message
)
{
return
false
;
}
//发送用户中心消息
$subject
=
'购买套餐成功。'
;
$this
->
apply_class
->
send_systemmsg
(
$orderInfo
[
'user_id'
],
$subject
,
$message
,
7
,
GB_CITY
);
//发送短信
$telno
=
isset
(
$orderInfo
[
'house_tel'
]
)
?
$orderInfo
[
'house_tel'
]
:
''
;
if
(
$telno
)
{
sendsms
(
$telno
,
$message
,
'sx'
);
}
return
true
;
}
}
}
\ No newline at end of file
esf_core/models/user_model.php
View file @
df0f92f9
...
@@ -2579,9 +2579,9 @@ if($searcharr['infotype']==4){
...
@@ -2579,9 +2579,9 @@ if($searcharr['infotype']==4){
function
get_buy_by_uid
(
$uid
,
$offset
=
0
,
$pagesize
=
0
,
$sendtime
=
''
)
function
get_buy_by_uid
(
$uid
,
$offset
=
0
,
$pagesize
=
0
,
$sendtime
=
''
)
{
{
if
(
!
empty
(
$sendtime
)){
if
(
!
empty
(
$sendtime
)){
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
,
'creattime >'
=>
$sendtime
),
'limit'
=>
$
offset
,
'offset'
=>
$pagesize
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
,
'creattime >'
=>
$sendtime
),
'limit'
=>
$
pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
}
else
{
}
else
{
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
),
'limit'
=>
$
offset
,
'offset'
=>
$pagesize
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
),
'limit'
=>
$
pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
}
}
if
(
is_array
(
$buy_array
)
&&
!
empty
(
$buy_array
)
&&
GB_CITY
==
'nj'
)
if
(
is_array
(
$buy_array
)
&&
!
empty
(
$buy_array
)
&&
GB_CITY
==
'nj'
)
{
{
...
@@ -5818,7 +5818,7 @@ if($searcharr['infotype']==4){
...
@@ -5818,7 +5818,7 @@ if($searcharr['infotype']==4){
$passport_info
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'id'
=>
$uid
),
'select'
=>
array
(
'passport_uid'
)),
'esfbak'
);
$passport_info
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'id'
=>
$uid
),
'select'
=>
array
(
'passport_uid'
)),
'esfbak'
);
if
(
$passport_info
)
{
if
(
$passport_info
)
{
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$url
=
"http://api.house365.com/passport/passport_changephone.php?come_from=1&passport_uid="
.
$passport_uid
.
"&phoneold="
.
$oldPhone
.
"&phone="
.
$newPhone
;
//
$url ="http://api.house365.com/passport/passport_changephone.php?come_from=1&passport_uid=".$passport_uid."&phoneold=".$oldPhone."&phone=".$newPhone;
// get_api($url);
// get_api($url);
}
}
}
}
...
@@ -6119,6 +6119,53 @@ if($searcharr['infotype']==4){
...
@@ -6119,6 +6119,53 @@ if($searcharr['infotype']==4){
return
$collect_array
;
return
$collect_array
;
}
}
/**
* 验证优惠券
* @param $user_id
* @param $coupon_id
* @param $price
* @param $packageType
*/
public
function
checkCoupon
(
$user_id
,
$coupon_id
,
$price
,
$packageType
)
{
$url
=
GB_CHECK_COUPON_URL
.
'?uid='
.
$user_id
.
'&coupon_id='
.
$coupon_id
.
'&price='
.
$price
.
'&package_type='
.
$packageType
;
$couponRes
=
curl_get_contents
(
$url
);
$couponRes
=
!
empty
(
$couponRes
)
?
json_decode
(
$couponRes
,
1
)
:
array
();
return
$couponRes
;
}
/**
* 验证优惠券
* @param $order_code
* @param $user_id
* @param $coupon_id
* @param $price
* @param $packageType
*/
public
function
useCoupon
(
$order_code
,
$user_id
,
$coupon_id
,
$price
,
$packageType
)
{
$params
=
array
(
'order_code'
=>
$order_code
,
'coupon_id'
=>
$coupon_id
,
'price'
=>
$price
,
'uid'
=>
$user_id
,
'package_type'
=>
$packageType
,
);
$url
=
GB_USE_COUPON_URL
;
$couonRes
=
$this
->
request_post
(
$url
,
$params
);
$couonRes
=
!
empty
(
$couonRes
)
?
json_decode
(
$couonRes
,
1
)
:
array
();
return
$couonRes
;
}
/**
* 记录日志
* @param $params
*/
public
function
addLog
(
$msg
,
$content
)
{
$url
=
GB_ADD_LOG_URL
;
$res
=
$this
->
request_post
(
$url
,
array
(
'msg'
=>
iconv
(
'gbk'
,
'utf-8'
,
$msg
),
'content'
=>
$content
)
);
return
$res
;
}
function
request_post
(
$url
=
''
,
$param
=
''
)
{
function
request_post
(
$url
=
''
,
$param
=
''
)
{
if
(
empty
(
$url
)
||
empty
(
$param
))
{
if
(
empty
(
$url
)
||
empty
(
$param
))
{
return
false
;
return
false
;
...
...
esf_core/models/user_xue_model.php
View file @
df0f92f9
...
@@ -5694,8 +5694,8 @@ class User_Xue_model extends MY_Model
...
@@ -5694,8 +5694,8 @@ class User_Xue_model extends MY_Model
$passport_info
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'id'
=>
$uid
),
'select'
=>
array
(
'passport_uid'
)),
'esfbak'
);
$passport_info
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_user'
,
'limit'
=>
1
,
'where'
=>
array
(
'id'
=>
$uid
),
'select'
=>
array
(
'passport_uid'
)),
'esfbak'
);
if
(
$passport_info
)
{
if
(
$passport_info
)
{
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$url
=
"http://api.house365.com/passport/passport_changephone.php?come_from=1&passport_uid="
.
$passport_uid
.
"&phoneold="
.
$oldPhone
.
"&phone="
.
$newPhone
;
//
$url ="http://api.house365.com/passport/passport_changephone.php?come_from=1&passport_uid=".$passport_uid."&phoneold=".$oldPhone."&phone=".$newPhone;
get_api
(
$url
);
//
get_api($url);
}
}
}
}
...
...
esf_core/models/user_zhou_model.php
View file @
df0f92f9
...
@@ -409,10 +409,10 @@ class User_Zhou_model extends MY_Model
...
@@ -409,10 +409,10 @@ class User_Zhou_model extends MY_Model
{
{
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$url
=
"http://api.house365.com/passport/passport_changepwd.php?passport_uid="
.
$passport_uid
.
"&passport_pwd="
.
$passport_pwd
.
"&passport_new_pwd="
.
$passport_new_pwd
;
//
$url ="http://api.house365.com/passport/passport_changepwd.php?passport_uid=".$passport_uid."&passport_pwd=".$passport_pwd."&passport_new_pwd=".$passport_new_pwd;
//echo $url;die;
//echo $url;die;
get_api
(
$url
);
//
get_api($url);
}
}
}
}
...
@@ -432,9 +432,9 @@ class User_Zhou_model extends MY_Model
...
@@ -432,9 +432,9 @@ class User_Zhou_model extends MY_Model
{
{
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$passport_uid
=
$passport_info
[
'0'
][
'passport_uid'
];
$url
=
"http://api.house365.com/passport/passport_changepwd.php?passport_uid="
.
$passport_uid
.
"&phoneold="
.
$phoneold
.
"&phone="
.
$phone
;
//
$url ="http://api.house365.com/passport/passport_changepwd.php?passport_uid=".$passport_uid."&phoneold=".$phoneold."&phone=".$phone;
//
get_api
(
$url
);
//
get_api($url);
}
}
}
}
...
...
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