Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
3 changed files
with
55 additions
and
6 deletions
@@ -32,7 +32,7 @@ class IndexData | @@ -32,7 +32,7 @@ class IndexData | ||
32 | * @param string $client_type | 32 | * @param string $client_type |
33 | * @return array | 33 | * @return array |
34 | */ | 34 | */ |
35 | - public static function getResourceData($content_code, $client_type = 'web') | 35 | + public static function getResourceData($content_code, $client_type = 'web') |
36 | { | 36 | { |
37 | // 构建必传参数 | 37 | // 构建必传参数 |
38 | $params = Yohobuy::param(); | 38 | $params = Yohobuy::param(); |
@@ -68,4 +68,33 @@ class IndexData | @@ -68,4 +68,33 @@ class IndexData | ||
68 | unset($param['v']); | 68 | unset($param['v']); |
69 | return Yohobuy::get(Yohobuy::API_URL, $param); | 69 | return Yohobuy::get(Yohobuy::API_URL, $param); |
70 | } | 70 | } |
71 | + | ||
72 | + /** | ||
73 | + * 意见反馈 | ||
74 | + * | ||
75 | + * @param int $feedback_id | ||
76 | + * @param int $question_id | ||
77 | + * @param string $answer | ||
78 | + * @param int $solution | ||
79 | + * @return array | ||
80 | + */ | ||
81 | + public static function suggestFeedback($feedback_id, $question_id, $answer, $solution) | ||
82 | + { | ||
83 | + //TODO 走老接口 | ||
84 | + $param = Yohobuy::param(); | ||
85 | + $param['page'] = 1; | ||
86 | + $param['open_key'] = '12345'; | ||
87 | + $param['method'] = 'open.feedback.submit'; | ||
88 | + $param['feedback_id'] = $feedback_id; | ||
89 | + $param['question_id'] = $question_id; | ||
90 | + $param['answer'] = $answer; | ||
91 | + $param['solution'] = $solution; | ||
92 | + unset($param['app_version']); | ||
93 | + unset($param['client_type']); | ||
94 | + unset($param['os_version']); | ||
95 | + unset($param['screen_size']); | ||
96 | + unset($param['v']); | ||
97 | + return Yohobuy::get(Yohobuy::API_URL, $param); | ||
98 | + } | ||
99 | + | ||
71 | } | 100 | } |
@@ -345,28 +345,28 @@ class HomeModel | @@ -345,28 +345,28 @@ class HomeModel | ||
345 | $build = array(); | 345 | $build = array(); |
346 | switch (intval($value['channel_id'])) { | 346 | switch (intval($value['channel_id'])) { |
347 | case 1: | 347 | case 1: |
348 | - $build['href'] = Helpers::getFilterUrl($value['url']); | 348 | + $build['href'] = '/boys'; |
349 | $build['title'] = '男生'; | 349 | $build['title'] = '男生'; |
350 | $build['entitle'] = 'BOYS'; | 350 | $build['entitle'] = 'BOYS'; |
351 | break; | 351 | break; |
352 | case 2: | 352 | case 2: |
353 | - $build['href'] = Helpers::getFilterUrl($value['url']); | 353 | + $build['href'] = '/girls'; |
354 | $build['title'] = '女生'; | 354 | $build['title'] = '女生'; |
355 | $build['entitle'] = 'GIRLS'; | 355 | $build['entitle'] = 'GIRLS'; |
356 | break; | 356 | break; |
357 | case 3: | 357 | case 3: |
358 | - $build['href'] = Helpers::getFilterUrl($value['url']); | 358 | + $build['href'] = '/kids'; |
359 | $build['title'] = '潮童'; | 359 | $build['title'] = '潮童'; |
360 | $build['entitle'] = 'KIDS'; | 360 | $build['entitle'] = 'KIDS'; |
361 | break; | 361 | break; |
362 | case 4: | 362 | case 4: |
363 | - $build['href'] = Helpers::getFilterUrl($value['url']); | 363 | + $build['href'] = '/lifestyle'; |
364 | $build['title'] = '创意生活'; | 364 | $build['title'] = '创意生活'; |
365 | $build['entitle'] = 'LIFESTYLE'; | 365 | $build['entitle'] = 'LIFESTYLE'; |
366 | break; | 366 | break; |
367 | case 5: | 367 | case 5: |
368 | $result['showYohood'] = true; | 368 | $result['showYohood'] = true; |
369 | - $result['yohoodHref'] = Helpers::getFilterUrl($value['url']); | 369 | + $result['yohoodHref'] = 'http://yohood.cn'; |
370 | break; | 370 | break; |
371 | default: | 371 | default: |
372 | continue; | 372 | continue; |
@@ -139,4 +139,24 @@ class CommonController extends WebAction | @@ -139,4 +139,24 @@ class CommonController extends WebAction | ||
139 | return $this->helpJsonCallbackResult($callback, 403, '订阅失败', ''); | 139 | return $this->helpJsonCallbackResult($callback, 403, '订阅失败', ''); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | + | ||
143 | + /** | ||
144 | + * 意见反馈 | ||
145 | + * | ||
146 | + * @return jsonp | ||
147 | + */ | ||
148 | + public function suggestfeedbackAction() | ||
149 | + { | ||
150 | + $callback = $this->get('callback', ''); | ||
151 | + $feedback_id = intval($this->get('feedback_id', 0)); | ||
152 | + $question_id = intval($this->get('question_id', 0)); | ||
153 | + $answer = trim($this->get('answer')); | ||
154 | + $solution = intval($this->get('solution', 0)); | ||
155 | + if(!empty($feedback_id) || !empty($question_id) || !empty($answer) || !empty($solution)) { | ||
156 | + $data = IndexData::suggestFeedback($feedback_id, $question_id, $answer, $solution); | ||
157 | + return $this->helpJsonCallbackResult($callback, $data['code'], $data['message'], $data['data']); | ||
158 | + } else { | ||
159 | + return $this->helpJsonCallbackResult($callback, 403, '意见反馈失败', ''); | ||
160 | + } | ||
161 | + } | ||
142 | } | 162 | } |
-
Please register or login to post a comment