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
06fc668c
Commit
06fc668c
authored
Jun 20, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增-监督执行 ,监督执行-上传图片
parent
e67b3eea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
9 deletions
+84
-9
.DS_Store
.DS_Store
+0
-0
Supervise.php
application/api_broker/controller/Supervise.php
+66
-0
ASuperviseModel.php
application/model/ASuperviseModel.php
+14
-0
route.php
application/route.php
+4
-9
No files found.
.DS_Store
deleted
100644 → 0
View file @
e67b3eea
File deleted
application/api_broker/controller/Supervise.php
View file @
06fc668c
...
...
@@ -185,6 +185,72 @@ class Supervise extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 新增-监督执行-上传图片
* @return \think\Response
*/
public
function
superviseUploadImg
()
{
header
(
'Access-Control-Allow-Origin:*'
);
set_time_limit
(
0
);
$file
=
request
()
->
file
(
'image'
);
$data
=
[];
if
(
$file
)
{
$path
=
'./resource'
.
DS
.
'lib'
.
DS
.
'Attachments'
.
DS
.
'images'
.
DS
.
'supervise'
;
$info
=
$file
->
validate
([
'size'
=>
10240000
,
'ext'
=>
'jpg,png'
])
//限制100m
->
move
(
$path
);
if
(
$info
)
{
$img_path
=
$info
->
getSaveName
();
//生成的图片路径
$static_path
=
$path
.
DS
.
$img_path
;
//生成图片的绝对路径
$image
=
\think\Image
::
open
(
$static_path
);
$image
->
thumb
(
500
,
500
)
->
save
(
$static_path
);
//生成缩略图
$data
=
[
'name'
=>
$img_path
,
'path'
=>
CK_IMG_URL
.
'images/supervise/'
.
$img_path
];
}
else
{
// 上传失败获取错误信息
return
$this
->
response
(
"101"
,
$file
->
getError
());
}
}
else
{
return
$this
->
response
(
"101"
,
"没有该文件"
);
}
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
/**
* 新增-监督执行
* User: 朱伟
* Date: 2018/6/20
* Time: 13:10:33
*/
public
function
addSupervise
(){
$params
=
$this
->
params
;
/*
$params['agent_id']=78;//上传人
$params['agent_name']='C罗1';//经纪人名
$params['remark']='暂无';//备注
$params['img']='999999';//agent表id-当前登录用户id
$params['address']='地址';//地址
*/
if
(
!
isset
(
$params
[
'agent_id'
])
||
!
isset
(
$params
[
'agent_name'
])
||
!
isset
(
$params
[
'remark'
])
||
!
isset
(
$params
[
'img'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
}
$res
=
$this
->
aSuperviseModel
->
saveSupervise
(
$params
[
'agent_id'
],
$params
[
'agent_name'
],
$params
[
'remark'
],
$params
[
'img'
],
$params
[
'address'
]);
//dump($UPhoneFollowPp->id);exit;
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$this
->
aSuperviseModel
->
id
);
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
}
}
/**
* 监督执行列表
* User: 朱伟
...
...
application/model/ASuperviseModel.php
View file @
06fc668c
...
...
@@ -22,6 +22,20 @@ class ASuperviseModel extends Model
$this
->
db_model
=
Db
::
name
(
$this
->
table
);
}
public
function
saveSupervise
(
$agent_id
,
$agent_name
,
$remark
,
$img
,
$address
)
{
$this
->
agent_id
=
$agent_id
;
$this
->
agent_name
=
$agent_name
;
$this
->
remark
=
$remark
;
$this
->
img
=
$img
;
$this
->
address
=
$address
;
$this
->
create_time
=
date
(
"Y-m-d h:i:sa"
,
time
());
$this
->
update_time
=
date
(
"Y-m-d h:i:sa"
,
time
());
$this
->
save
();
return
$this
->
id
;
}
public
function
findSuperviseList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
=
''
)
{
$result
=
$this
...
...
application/route.php
View file @
06fc668c
...
...
@@ -465,18 +465,13 @@ Route::group('broker', [
//user
'returnSearchCondition'
=>
[
'api_broker/User/returnSearchCondition'
,
[
'method'
=>
'get'
]
],
//客户搜索条件
'searchUser'
=>
[
'api_broker/User/searchUser'
,
[
'method'
=>
'get|post'
]
],
//客户搜索
'searchUser'
=>
[
'api_broker/User/searchUser'
,
[
'method'
=>
'get|post'
]
],
//客户搜索
'superviseList'
=>
[
'api_broker/Supervise/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行列表 朱伟 2018-06-15
'addSupervise'
=>
[
'api_broker/Supervise/addSupervise'
,
[
'method'
=>
'POST|GET'
]
],
//新增-监督执行 朱伟 2018-06-20
'superviseUploadImg'
=>
[
'api_broker/Supervise/superviseUploadImg'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行-上传图片 朱伟 2018-06-20
'superviseList'
=>
[
'api_broker/Supervise/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行列表 朱伟 2018-06-15
'housingResource'
=>
[
'api_broker/Performance/housingResource'
,
[
'method'
=>
'POST|GET'
]
],
//获取房源list
'userResource'
=>
[
'api_broker/Performance/userResource'
,
[
'method'
=>
'POST|GET'
]
],
//获取客源list
'followList'
=>
[
'api_broker/Performance/followList'
,
[
'method'
=>
'POST|GET'
]
],
//报备list
'marchInList'
=>
[
'api_broker/Performance/marchInList'
,
[
'method'
=>
'POST|GET'
]
],
//进场list
'paylogList'
=>
[
'api_broker/Performance/paylogList'
,
[
'method'
=>
'POST|GET'
]
],
//收款list
'performanceList'
=>
[
'api_broker/Performance/performanceList'
,
[
'method'
=>
'POST|GET'
]
],
//业绩list
]);
...
...
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