Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Conflicts: yohobuy/m.yohobuy.com/application/controllers/Home.php
Showing
8 changed files
with
48 additions
and
44 deletions
@@ -329,11 +329,12 @@ class UserData | @@ -329,11 +329,12 @@ class UserData | ||
329 | * @param int $suggest_type 意见类型 | 329 | * @param int $suggest_type 意见类型 |
330 | * @return array 意见反馈接口返回的数据 | 330 | * @return array 意见反馈接口返回的数据 |
331 | */ | 331 | */ |
332 | - public static function savesuggestData($uid, $content, $suggest_type, $limit = 30) | 332 | + public static function savesuggestData($uid, $content, $suggest_type) |
333 | { | 333 | { |
334 | $param = Yohobuy::param(); | 334 | $param = Yohobuy::param(); |
335 | $param['uid'] = $uid; | 335 | $param['uid'] = $uid; |
336 | $param['content'] = $content; | 336 | $param['content'] = $content; |
337 | + $param['suggest_type'] = $suggest_type; | ||
337 | $param['client_secret'] = Sign::getSign($param); | 338 | $param['client_secret'] = Sign::getSign($param); |
338 | 339 | ||
339 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param); | 340 | return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param); |
@@ -24,9 +24,6 @@ class Images | @@ -24,9 +24,6 @@ class Images | ||
24 | ), | 24 | ), |
25 | 'yhb-head' => 'head.static.yhbimg.com' | 25 | 'yhb-head' => 'head.static.yhbimg.com' |
26 | ); | 26 | ); |
27 | - private static $staticDomain = array( | ||
28 | - 'bucket' => '' | ||
29 | - ); | ||
30 | private static $qiniuDomain = 'yhfair.qiniudn.com'; | 27 | private static $qiniuDomain = 'yhfair.qiniudn.com'; |
31 | 28 | ||
32 | /** | 29 | /** |
@@ -171,7 +168,7 @@ class Images | @@ -171,7 +168,7 @@ class Images | ||
171 | $stream .= $twoHyphens.$boundary.$end; | 168 | $stream .= $twoHyphens.$boundary.$end; |
172 | $stream .="Content-Disposition: form-data; "."name=\"project\"".$end; | 169 | $stream .="Content-Disposition: form-data; "."name=\"project\"".$end; |
173 | $stream .= $end; | 170 | $stream .= $end; |
174 | - $stream .= "sns";//project sns | 171 | + $stream .= "suggest";//project sns |
175 | $stream .= $end; | 172 | $stream .= $end; |
176 | $stream .= $twoHyphens .$boundary .$twoHyphens .$end; | 173 | $stream .= $twoHyphens .$boundary .$twoHyphens .$end; |
177 | $opts = array( | 174 | $opts = array( |
@@ -185,7 +182,18 @@ class Images | @@ -185,7 +182,18 @@ class Images | ||
185 | $result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true); | 182 | $result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true); |
186 | if(!empty($result['data']['imagesList'])) | 183 | if(!empty($result['data']['imagesList'])) |
187 | { | 184 | { |
188 | - return count($file) == 1 || !is_array($file) ? current($result['data']['imagesList']) : $result['data']['imagesList'] ; | 185 | + if(count($file) == 1 || !is_array($file)) |
186 | + { | ||
187 | + return self::getSourceUrl(current($result['data']['imagesList']), 'suggest'); | ||
188 | + } | ||
189 | + else | ||
190 | + { | ||
191 | + foreach ($result['data']['imagesList'] as &$val) { | ||
192 | + $val = self::getSourceUrl($val, 'suggest'); | ||
193 | + } | ||
194 | + | ||
195 | + return $result['data']['imagesList']; | ||
196 | + } | ||
189 | } | 197 | } |
190 | else | 198 | else |
191 | { | 199 | { |
@@ -79,19 +79,4 @@ | @@ -79,19 +79,4 @@ | ||
79 | .info-list.hide { | 79 | .info-list.hide { |
80 | display: none; | 80 | display: none; |
81 | } | 81 | } |
82 | - | ||
83 | - .load-more-info { | ||
84 | - width: 100%; | ||
85 | - height: 70rem / $pxConvertRem; | ||
86 | - line-height: 70rem / $pxConvertRem; | ||
87 | - text-align: center; | ||
88 | - font-size: 14px; | ||
89 | - overflow: hidden; | ||
90 | - | ||
91 | - .status { | ||
92 | - &.hide { | ||
93 | - display: none; | ||
94 | - } | ||
95 | - } | ||
96 | - } | ||
97 | } | 82 | } |
@@ -51,20 +51,6 @@ | @@ -51,20 +51,6 @@ | ||
51 | color: #000; | 51 | color: #000; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | - .load-more-info { | ||
55 | - width: 100%; | ||
56 | - height: 70rem / $pxConvertRem; | ||
57 | - line-height: 70rem / $pxConvertRem; | ||
58 | - text-align: center; | ||
59 | - font-size: 14px; | ||
60 | - overflow: hidden; | ||
61 | - | ||
62 | - .status { | ||
63 | - &.hide { | ||
64 | - display: none; | ||
65 | - } | ||
66 | - } | ||
67 | - } | ||
68 | } | 54 | } |
69 | 55 | ||
70 | .load-more-img { | 56 | .load-more-img { |
@@ -108,6 +108,21 @@ a { | @@ -108,6 +108,21 @@ a { | ||
108 | @include border-radius(10px); | 108 | @include border-radius(10px); |
109 | } | 109 | } |
110 | 110 | ||
111 | +.load-more-info { | ||
112 | + width: 100%; | ||
113 | + height: 70rem / $pxConvertRem; | ||
114 | + line-height: 70rem / $pxConvertRem; | ||
115 | + text-align: center; | ||
116 | + font-size: 14px; | ||
117 | + overflow: hidden; | ||
118 | + | ||
119 | + .status { | ||
120 | + &.hide { | ||
121 | + display: none; | ||
122 | + } | ||
123 | + } | ||
124 | +} | ||
125 | + | ||
111 | /*px转化rem*/ | 126 | /*px转化rem*/ |
112 | @function pxToRem($px) { | 127 | @function pxToRem($px) { |
113 | $pxConvertRem: 40px; | 128 | $pxConvertRem: 40px; |
@@ -5,6 +5,12 @@ | @@ -5,6 +5,12 @@ | ||
5 | <div id="info-list" class="info-list"> | 5 | <div id="info-list" class="info-list"> |
6 | {{> me/my-guang/infos}} | 6 | {{> me/my-guang/infos}} |
7 | </div> | 7 | </div> |
8 | + <div id="load-more-info" class="load-more-info"> | ||
9 | + <div class="loading status hide"> | ||
10 | + 正在加载... | ||
11 | + </div> | ||
12 | + <span class="no-more status">没有更多啦</span> | ||
13 | + </div> | ||
8 | {{^}} | 14 | {{^}} |
9 | <div class="null"> | 15 | <div class="null"> |
10 | <div class="icon-null"></div> | 16 | <div class="icon-null"></div> |
@@ -76,7 +76,6 @@ class HomeController extends AbstractAction | @@ -76,7 +76,6 @@ class HomeController extends AbstractAction | ||
76 | $favProducts = \Index\UserModel::getFavProductData($uid); | 76 | $favProducts = \Index\UserModel::getFavProductData($uid); |
77 | $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); | 77 | $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); |
78 | 78 | ||
79 | - //print_r($favProducts); | ||
80 | $data = array( | 79 | $data = array( |
81 | 'favPage' => true, //加载js | 80 | 'favPage' => true, //加载js |
82 | 'pageFooter' => true, | 81 | 'pageFooter' => true, |
@@ -329,6 +328,7 @@ class HomeController extends AbstractAction | @@ -329,6 +328,7 @@ class HomeController extends AbstractAction | ||
329 | $page = $this->get('page', 1); | 328 | $page = $this->get('page', 1); |
330 | $limit = $this->get('limit', 10); | 329 | $limit = $this->get('limit', 10); |
331 | $uid = $this->getUid(); | 330 | $uid = $this->getUid(); |
331 | + $uid=5687179; | ||
332 | $gender = Helpers::getGenderByCookie(); | 332 | $gender = Helpers::getGenderByCookie(); |
333 | $yh_channel = Helpers::getChannelByCookie(); | 333 | $yh_channel = Helpers::getChannelByCookie(); |
334 | $guangInfo = \home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit); | 334 | $guangInfo = \home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit); |
@@ -346,7 +346,7 @@ class HomeController extends AbstractAction | @@ -346,7 +346,7 @@ class HomeController extends AbstractAction | ||
346 | } | 346 | } |
347 | else if ($page > 1 && $page>$totalPage) | 347 | else if ($page > 1 && $page>$totalPage) |
348 | { | 348 | { |
349 | - echo '';//退出循环 | 349 | + echo ' ';//退出循环 |
350 | } | 350 | } |
351 | } | 351 | } |
352 | 352 | ||
@@ -382,10 +382,6 @@ class HomeController extends AbstractAction | @@ -382,10 +382,6 @@ class HomeController extends AbstractAction | ||
382 | // 设置网站标题 | 382 | // 设置网站标题 |
383 | $this->setTitle('反馈问题'); | 383 | $this->setTitle('反馈问题'); |
384 | 384 | ||
385 | - $param = \Api\Yohobuy::param(); | ||
386 | - unset($param['private_key']); | ||
387 | - $param['project'] = 'suggest'; | ||
388 | - $param['client_secret'] = 'e7807a9522ab99af8b8fd926e1ebbd9a'; | ||
389 | $data = array( | 385 | $data = array( |
390 | 'suggestPage' => true, //加载js | 386 | 'suggestPage' => true, //加载js |
391 | 'pageHeader' => array( | 387 | 'pageHeader' => array( |
@@ -393,11 +389,9 @@ class HomeController extends AbstractAction | @@ -393,11 +389,9 @@ class HomeController extends AbstractAction | ||
393 | 'navTitle' => '反馈问题', | 389 | 'navTitle' => '反馈问题', |
394 | 'navBtn' => '提交' | 390 | 'navBtn' => '提交' |
395 | ), | 391 | ), |
396 | - 'param' => $param, | ||
397 | 'suggestSub' => true, | 392 | 'suggestSub' => true, |
398 | 'pageFooter' => true | 393 | 'pageFooter' => true |
399 | ); | 394 | ); |
400 | - //print_r($data); | ||
401 | 395 | ||
402 | $this->_view->display('suggest_sub', $data); | 396 | $this->_view->display('suggest_sub', $data); |
403 | } | 397 | } |
@@ -472,8 +472,17 @@ class UserModel | @@ -472,8 +472,17 @@ class UserModel | ||
472 | */ | 472 | */ |
473 | public static function saveSuggestData($uid, $content, $suggest_type) | 473 | public static function saveSuggestData($uid, $content, $suggest_type) |
474 | { | 474 | { |
475 | + $result = array('code' => 400, 'message' => '保存出错'); | ||
476 | + | ||
475 | // 调用接口保存意见反馈数据 | 477 | // 调用接口保存意见反馈数据 |
476 | - return UserData::savesuggestData($uid, $content, $suggest_type); | 478 | + $save = UserData::savesuggestData($uid, $content, $suggest_type); |
479 | + | ||
480 | + if (isset($save['code']) && $save['code'] == 200) { | ||
481 | + $result['code'] = 200; | ||
482 | + $result['message'] = '谢谢您的反馈'; | ||
483 | + } | ||
484 | + | ||
485 | + return $result; | ||
477 | } | 486 | } |
478 | 487 | ||
479 | /** | 488 | /** |
-
Please register or login to post a comment