Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
9 years ago
Commit
c75113e612deb74ced8d9c5ef362ab1a31df0850
1 parent
547f2799
suggestfacebook
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
1 deletions
library/LibModels/Web/Home/IndexData.php
yohobuy/www.yohobuy.com/application/controllers/Common.php
library/LibModels/Web/Home/IndexData.php
View file @
c75113e
...
...
@@ -32,7 +32,7 @@ class IndexData
* @param string $client_type
* @return array
*/
public
static
function
getResourceData
(
$content_code
,
$client_type
=
'web'
)
public
static
function
getResourceData
(
$content_code
,
$client_type
=
'web'
)
{
// 构建必传参数
$params
=
Yohobuy
::
param
();
...
...
@@ -68,4 +68,33 @@ class IndexData
unset
(
$param
[
'v'
]);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
/**
* 意见反馈
*
* @param int $feedback_id
* @param int $question_id
* @param string $answer
* @param int $solution
* @return array
*/
public
static
function
suggestFeedback
(
$feedback_id
,
$question_id
,
$answer
,
$solution
)
{
//TODO 走老接口
$param
=
Yohobuy
::
param
();
$param
[
'page'
]
=
1
;
$param
[
'open_key'
]
=
'12345'
;
$param
[
'method'
]
=
'open.feedback.submit'
;
$param
[
'feedback_id'
]
=
$feedback_id
;
$param
[
'question_id'
]
=
$question_id
;
$param
[
'answer'
]
=
$answer
;
$param
[
'solution'
]
=
$solution
;
unset
(
$param
[
'app_version'
]);
unset
(
$param
[
'client_type'
]);
unset
(
$param
[
'os_version'
]);
unset
(
$param
[
'screen_size'
]);
unset
(
$param
[
'v'
]);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
}
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/controllers/Common.php
View file @
c75113e
...
...
@@ -139,4 +139,24 @@ class CommonController extends WebAction
return
$this
->
helpJsonCallbackResult
(
$callback
,
403
,
'订阅失败'
,
''
);
}
}
/**
* 意见反馈
*
* @return jsonp
*/
public
function
suggestfeedbackAction
()
{
$callback
=
$this
->
get
(
'callback'
,
''
);
$feedback_id
=
intval
(
$this
->
get
(
'feedback_id'
,
0
));
$question_id
=
intval
(
$this
->
get
(
'question_id'
,
0
));
$answer
=
trim
(
$this
->
get
(
'answer'
));
$solution
=
intval
(
$this
->
get
(
'solution'
,
0
));
if
(
!
empty
(
$feedback_id
)
||
!
empty
(
$question_id
)
||
!
empty
(
$answer
)
||
!
empty
(
$solution
))
{
$data
=
IndexData
::
suggestFeedback
(
$feedback_id
,
$question_id
,
$answer
,
$solution
);
return
$this
->
helpJsonCallbackResult
(
$callback
,
$data
[
'code'
],
$data
[
'message'
],
$data
[
'data'
]);
}
else
{
return
$this
->
helpJsonCallbackResult
(
$callback
,
403
,
'意见反馈失败'
,
''
);
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment