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
6a239cea
Commit
6a239cea
authored
Mar 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片路径修改
parent
088c36fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
Shop.php
application/api_broker/controller/Shop.php
+3
-7
No files found.
application/api_broker/controller/Shop.php
View file @
6a239cea
...
@@ -278,21 +278,17 @@ class Shop extends Basic
...
@@ -278,21 +278,17 @@ class Shop extends Basic
$file
=
request
()
->
file
(
'file'
);
$file
=
request
()
->
file
(
'file'
);
if
(
$file
){
if
(
$file
){
$path
=
ROOT_PATH
.
'public'
.
DS
.
'resource'
.
DS
.
'lib'
.
DS
.
'Attachments'
.
DS
.
'images'
.
DS
.
'app_housesFile'
;
$path
=
ROOT_PATH
.
'public'
.
DS
.
'resource'
.
DS
.
'lib'
.
DS
.
'Attachments'
.
DS
.
'images'
;
$info
=
$file
->
validate
([
'size'
=>
1024000
,
'ext'
=>
'jpg,png'
])
->
move
(
$path
);
$info
=
$file
->
validate
([
'size'
=>
1024000
,
'ext'
=>
'jpg,png'
])
->
move
(
$path
);
if
(
$info
){
if
(
$info
){
// if ($this->userId) {
// $user_data = $this->gHousesImgModel->field('img_name')->where('id',$this->agentId)->find();
// @unlink($path.DS.$user_data->user_pic); //删除原来的图片
$img_path
=
$info
->
getSaveName
();
//生成的图片路径
$img_path
=
$info
->
getSaveName
();
//生成的图片路径
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'上传成功'
;
$data
[
'msg'
]
=
'上传成功'
;
$data
[
'data'
]
=
[
$data
[
'data'
]
=
[
'file_name'
=>
CK_IMG_URL
.
'images'
.
DS
.
'app_housesFile
'
.
DS
.
$img_path
,
'file_name'
=>
CK_IMG_URL
.
'images
'
.
DS
.
$img_path
,
'save_path'
=>
'app_housesFile/'
.
$img_path
'save_path'
=>
$img_path
];
];
// }
}
else
{
}
else
{
// 上传失败获取错误信息
// 上传失败获取错误信息
$data
[
'msg'
]
=
$file
->
getError
();
$data
[
'msg'
]
=
$file
->
getError
();
...
...
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