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
35d606af
Commit
35d606af
authored
Dec 25, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送报备信息
parent
3907f317
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
GeTuiUntils.php
application/api/untils/GeTuiUntils.php
+0
-0
WatchShop.php
application/index/controller/WatchShop.php
+18
-4
watch_shop.js
public/resource/js/watch_shop.js
+11
-2
No files found.
application/api/untils/GeTuiUntils.php
View file @
35d606af
This diff is collapsed.
Click to expand it.
application/index/controller/WatchShop.php
View file @
35d606af
...
...
@@ -11,6 +11,7 @@ namespace app\index\controller;
use
app\api\untils\GeTuiUntils
;
use
app\index\extend\Basic
;
use
app\model\Agents
;
use
app\model\Applies
;
use
app\model\AppointWatchShop
;
use
app\model\HouseInfos
;
...
...
@@ -70,7 +71,7 @@ class WatchShop extends Basic
$appoint_watch
=
new
AppointWatchShop
();
$appoint_watch
->
startTrans
();
$apponit_data
=
$appoint_watch
->
get
(
$params
[
'watch_id'
])
->
lock
();
$apponit_data
=
$appoint_watch
->
lock
(
true
)
->
where
(
'id'
,
$params
[
'watch_id'
])
->
find
();
if
(
$apponit_data
[
'id'
])
{
$apples
=
new
Applies
();
...
...
@@ -91,7 +92,7 @@ class WatchShop extends Basic
'apply_id'
=>
$apples
->
id
,
'shopuser_id'
=>
$params
[
'agents_id'
],
'shop_id'
=>
$params
[
'shop_id'
],
'house_id'
=>
$
params
[
'house_id'
],
'house_id'
=>
$
apponit_data
[
'house_id'
],
'transaction_status'
=>
0
,
'created'
=>
date
(
"Y-m-d H:i:s"
)
])
->
save
();
...
...
@@ -103,8 +104,16 @@ class WatchShop extends Basic
if
(
$apples
->
id
&&
$remark
->
id
)
{
$appoint_watch
->
commit
();
//推送报备信息
$agent
=
new
Agents
();
$agentData
=
$agent
->
field
(
'id,device_id,realname,agentshopname,sub_shopname'
)
->
where
(
'id'
,
$params
[
'agents_id'
])
->
find
();
$title
=
'报备提醒'
;
$content
=
'【'
.
$agentData
[
'agentshopname'
]
.
$agentData
[
'sub_shopname'
]
.
'-'
.
$agentData
[
'realname'
]
.
'】报备了【'
.
$apponit_data
[
'house_title'
]
.
'】'
;
$get
=
new
GeTuiUntils
();
$req
=
$get
->
public_push_message_for_one
(
$params
[
'agents_id'
],
$agentData
[
'device_id'
],
$title
,
$content
);
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'报备成功
'
;
$data
[
'msg'
]
=
$req
[
'result'
]
==
'ok'
?
'报备成功并通知经纪人'
:
'报备成功,请通知经纪人
'
;
}
else
{
$appoint_watch
->
rollback
();
$data
[
'status'
]
=
101
;
...
...
@@ -122,7 +131,11 @@ class WatchShop extends Basic
}
public
function
test
(){
$agent
=
new
Agents
();
$agent
->
$get
=
new
GeTuiUntils
();
$get
->
pushMessageToApp
();
$title
=
'报备提醒'
;
dump
(
$get
->
public_push_message_for_one
(
8
,
'hello world'
,
'测试'
));
die
;
}
}
\ No newline at end of file
public/resource/js/watch_shop.js
View file @
35d606af
...
...
@@ -110,9 +110,14 @@ define (['doT', 'text!temp/watch_template_tpl.html', 'css!style/home.css',"datet
$
(
document
).
delegate
(
".add_applies"
,
"click"
,
function
()
{
user
.
watch_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
"input[name='phone']"
).
val
(
''
);
});
$
(
document
).
delegate
(
"#submit_applies"
,
"click"
,
function
()
{
if
(
$
(
'input[name="phone"]'
).
val
()
==
''
)
{
alert
(
'报备人信息不能为空'
);
return
;
}
var
params
=
{};
params
.
shop_id
=
user
.
father_id
;
params
.
agents_id
=
user
.
agents_id
;
...
...
@@ -124,9 +129,13 @@ define (['doT', 'text!temp/watch_template_tpl.html', 'css!style/home.css',"datet
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
$
(
"#modal-watch"
).
modal
(
'hide'
);
user
.
getList
(
1
);
}
else
{
alert
(
data
.
msg
);
}
}
});
});
...
...
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