Authored by 周少峰

add app_version

... ... @@ -122,9 +122,7 @@ class ShopData
$param['gender'] = $gender;
}
$param['client_secret'] = Sign::getSign($param);
//TODO
// return Yohobuy::get(Yohobuy::API_URL, $param);
return Yohobuy::get('http://192.168.102.218:8080/gateway/', $param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
... ...
... ... @@ -49,6 +49,8 @@ class ShopProcess
self::$shopData['allGoods'] = Helpers::url('', array('shop_id' => self::$shopId, 'title' => '全部商品'), 'search');
//搜索链接
self::$shopData['url'] = Helpers::url('', array('shop_id' => self::$shopId), 'search');
//人气单品的链接
self::$shopData['more_url'] = Helpers::url('', array('shop_id' => self::$shopId, 'order' => 's_n_d', 'title' => '人气'), 'search');
}
/**
... ...
... ... @@ -464,8 +464,11 @@ class IndexController extends AbstractAction
{
$uid = $this->getUid(true);
$data = ListModel::shopData($shopId, $uid);
if (!$this->isApp()) {
$appVersion = $this->get('app_version');
if (empty($appVersion)) {
$this->setNavHeader('', true, SITE_MAIN);
} else {
$data['app_version'] = $appVersion;
}
$this->_view->display('shop', array(
'shopIndex' => $data,
... ... @@ -474,16 +477,6 @@ class IndexController extends AbstractAction
}
/**
* 判断是不是APP
*
* @return bool
*/
public function isApp(){
$appVersion = $this->get('app_version');
return !empty($appVersion);
}
/**
* 店铺收藏
* @author sefon 2016-4-28 23:00:11
*/
... ... @@ -542,7 +535,7 @@ class IndexController extends AbstractAction
'branerImg' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026e96d1b403d28407650c7228bb4ca405.jpg?imageView2/2/w/640/h/200',
'logoImg' => '',
'storeName' => 'Vans专营店',
'collect' => true,
'collect' => false,
'alreadyCollect' => 'product/collect.png',
'notCollect' => '',
'allGoods' => '',
... ...