Authored by biao

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -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
... ...
... ... @@ -345,28 +345,28 @@ class HomeModel
$build = array();
switch (intval($value['channel_id'])) {
case 1:
$build['href'] = Helpers::getFilterUrl($value['url']);
$build['href'] = '/boys';
$build['title'] = '男生';
$build['entitle'] = 'BOYS';
break;
case 2:
$build['href'] = Helpers::getFilterUrl($value['url']);
$build['href'] = '/girls';
$build['title'] = '女生';
$build['entitle'] = 'GIRLS';
break;
case 3:
$build['href'] = Helpers::getFilterUrl($value['url']);
$build['href'] = '/kids';
$build['title'] = '潮童';
$build['entitle'] = 'KIDS';
break;
case 4:
$build['href'] = Helpers::getFilterUrl($value['url']);
$build['href'] = '/lifestyle';
$build['title'] = '创意生活';
$build['entitle'] = 'LIFESTYLE';
break;
case 5:
$result['showYohood'] = true;
$result['yohoodHref'] = Helpers::getFilterUrl($value['url']);
$result['yohoodHref'] = 'http://yohood.cn';
break;
default:
continue;
... ...
... ... @@ -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
... ...