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
6feaf643
Commit
6feaf643
authored
Dec 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
34f7a909
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
Shop.php
application/api_broker/controller/Shop.php
+21
-17
No files found.
application/api_broker/controller/Shop.php
View file @
6feaf643
...
@@ -1012,17 +1012,12 @@ class Shop extends Basic
...
@@ -1012,17 +1012,12 @@ class Shop extends Basic
public
function
getExclusive
()
public
function
getExclusive
()
{
{
if
(
$this
->
params
[
'houses_id'
])
{
if
(
$this
->
params
[
'houses_id'
])
{
if
(
$this
->
params
[
'is_exclusive_type'
]
==
1
)
{
$res
=
$this
->
gHousesModel
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
$res
=
$this
->
gHousesModel
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
// dump($res);
// dump($res);
foreach
(
$res
[
'exclusive_img'
]
as
$key
=>
$val
)
{
foreach
(
$res
[
'exclusive_img'
]
as
$key
=>
$val
)
{
$res
[
'exclusive_img'
][
$key
][
'file_name'
]
=
CURRENT_URL
.
'resource/lib/Attachments/images/'
.
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'file_name'
]
=
CURRENT_URL
.
'resource/lib/Attachments/images/'
.
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'save_path'
]
=
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'save_path'
]
=
$val
[
'img_name'
];
}
}
else
{
$res
=
$this
->
gHousesModel
->
editData
([
'is_exclusive_type'
=>
0
],
$this
->
params
[
'houses_id'
]);
}
}
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"houses_id is null"
);
return
$this
->
response
(
"101"
,
"houses_id is null"
);
}
}
...
@@ -1035,14 +1030,23 @@ class Shop extends Basic
...
@@ -1035,14 +1030,23 @@ class Shop extends Basic
public
function
editExclusive
()
public
function
editExclusive
()
{
{
// $res = $this->gHousesModel->exclusive($this->params, $this->params['houses_id'], $this->agentId, $this->siteId);
// $res = $this->gHousesModel->exclusive($this->params, $this->params['houses_id'], $this->agentId, $this->siteId);
$code
=
200
;
if
(
empty
(
$this
->
params
[
'houses_id'
]))
{
$msg
=
""
;
return
$this
->
response
(
101
,
'参数错误'
);
$house
=
new
HouseService
();
$result
=
$house
->
addHouse
(
$this
->
params
,
$this
->
agentId
,
1
,
0
,
'exclusive'
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
}
if
(
$this
->
params
[
'is_exclusive_type'
]
==
1
)
{
$code
=
200
;
$msg
=
""
;
$house
=
new
HouseService
();
$result
=
$house
->
addHouse
(
$this
->
params
,
$this
->
agentId
,
1
,
0
,
'exclusive'
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
}
else
{
$res
=
$this
->
gHousesModel
->
editData
([
'is_exclusive_type'
=>
0
],
$this
->
params
[
'houses_id'
]);
}
return
$this
->
response
(
$code
,
$msg
);
return
$this
->
response
(
$code
,
$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