Authored by lore-w

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

Conflicts:
	yohobuy/m.yohobuy.com/application/controllers/Home.php
... ... @@ -329,11 +329,12 @@ class UserData
* @param int $suggest_type 意见类型
* @return array 意见反馈接口返回的数据
*/
public static function savesuggestData($uid, $content, $suggest_type, $limit = 30)
public static function savesuggestData($uid, $content, $suggest_type)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['content'] = $content;
$param['suggest_type'] = $suggest_type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param);
... ...
... ... @@ -24,9 +24,6 @@ class Images
),
'yhb-head' => 'head.static.yhbimg.com'
);
private static $staticDomain = array(
'bucket' => ''
);
private static $qiniuDomain = 'yhfair.qiniudn.com';
/**
... ... @@ -171,7 +168,7 @@ class Images
$stream .= $twoHyphens.$boundary.$end;
$stream .="Content-Disposition: form-data; "."name=\"project\"".$end;
$stream .= $end;
$stream .= "sns";//project sns
$stream .= "suggest";//project sns
$stream .= $end;
$stream .= $twoHyphens .$boundary .$twoHyphens .$end;
$opts = array(
... ... @@ -185,7 +182,18 @@ class Images
$result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true);
if(!empty($result['data']['imagesList']))
{
return count($file) == 1 || !is_array($file) ? current($result['data']['imagesList']) : $result['data']['imagesList'] ;
if(count($file) == 1 || !is_array($file))
{
return self::getSourceUrl(current($result['data']['imagesList']), 'suggest');
}
else
{
foreach ($result['data']['imagesList'] as &$val) {
$val = self::getSourceUrl($val, 'suggest');
}
return $result['data']['imagesList'];
}
}
else
{
... ...
... ... @@ -79,19 +79,4 @@
.info-list.hide {
display: none;
}
.load-more-info {
width: 100%;
height: 70rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -51,20 +51,6 @@
color: #000;
}
}
.load-more-info {
width: 100%;
height: 70rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
}
.load-more-img {
... ...
... ... @@ -108,6 +108,21 @@ a {
@include border-radius(10px);
}
.load-more-info {
width: 100%;
height: 70rem / $pxConvertRem;
line-height: 70rem / $pxConvertRem;
text-align: center;
font-size: 14px;
overflow: hidden;
.status {
&.hide {
display: none;
}
}
}
/*px转化rem*/
@function pxToRem($px) {
$pxConvertRem: 40px;
... ...
... ... @@ -5,6 +5,12 @@
<div id="info-list" class="info-list">
{{> me/my-guang/infos}}
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status">没有更多啦</span>
</div>
{{^}}
<div class="null">
<div class="icon-null"></div>
... ...
... ... @@ -76,7 +76,6 @@ class HomeController extends AbstractAction
$favProducts = \Index\UserModel::getFavProductData($uid);
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
//print_r($favProducts);
$data = array(
'favPage' => true, //加载js
'pageFooter' => true,
... ... @@ -329,6 +328,7 @@ class HomeController extends AbstractAction
$page = $this->get('page', 1);
$limit = $this->get('limit', 10);
$uid = $this->getUid();
$uid=5687179;
$gender = Helpers::getGenderByCookie();
$yh_channel = Helpers::getChannelByCookie();
$guangInfo = \home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
... ... @@ -346,7 +346,7 @@ class HomeController extends AbstractAction
}
else if ($page > 1 && $page>$totalPage)
{
echo '';//退出循环
echo ' ';//退出循环
}
}
... ... @@ -382,10 +382,6 @@ class HomeController extends AbstractAction
// 设置网站标题
$this->setTitle('反馈问题');
$param = \Api\Yohobuy::param();
unset($param['private_key']);
$param['project'] = 'suggest';
$param['client_secret'] = 'e7807a9522ab99af8b8fd926e1ebbd9a';
$data = array(
'suggestPage' => true, //加载js
'pageHeader' => array(
... ... @@ -393,11 +389,9 @@ class HomeController extends AbstractAction
'navTitle' => '反馈问题',
'navBtn' => '提交'
),
'param' => $param,
'suggestSub' => true,
'pageFooter' => true
);
//print_r($data);
$this->_view->display('suggest_sub', $data);
}
... ...
... ... @@ -472,8 +472,17 @@ class UserModel
*/
public static function saveSuggestData($uid, $content, $suggest_type)
{
$result = array('code' => 400, 'message' => '保存出错');
// 调用接口保存意见反馈数据
return UserData::savesuggestData($uid, $content, $suggest_type);
$save = UserData::savesuggestData($uid, $content, $suggest_type);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '谢谢您的反馈';
}
return $result;
}
/**
... ...