...
|
...
|
@@ -3,6 +3,7 @@ |
|
|
namespace Home;
|
|
|
|
|
|
use Home\UserModel;
|
|
|
use LibModels\Web\Home\UserData;
|
|
|
use LibModels\Web\Product\BrandData;
|
|
|
use WebPlugin\Helpers;
|
|
|
use WebPlugin\HelperHome;
|
...
|
...
|
@@ -75,6 +76,25 @@ class IndexModel |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @param $channel
|
|
|
* @param $uid
|
|
|
* @param $udid
|
|
|
* @param $recPos
|
|
|
* @param $limit
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function preferenceData($channel, $uid, $udid, $recPos, $limit)
|
|
|
{
|
|
|
$response = UserData::newPreference($channel, $uid, $udid, $recPos, $limit);
|
|
|
|
|
|
if ($response['code'] === 200) {
|
|
|
return HelperHome::formatNew($response['data']['product_list']);
|
|
|
} else {
|
|
|
return array();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 底部banner
|
|
|
* @param string $code
|
|
|
* @return mixed
|
...
|
...
|
@@ -82,7 +102,7 @@ class IndexModel |
|
|
public static function getFooterBanner($code = '20110609-152143')
|
|
|
{
|
|
|
|
|
|
$banner = BrandData::getByNodeContent($code);
|
|
|
$banner = BrandData::getByNodeContent($code);
|
|
|
if (isset($banner['code']) && !empty($banner['data'])) {
|
|
|
return $banner['data'];
|
|
|
}
|
...
|
...
|
|