Authored by yyq

Merge branch 'release/4.4' of http://git.dev.yoho.cn/web/yohobuywap into release/4.4

... ... @@ -74,14 +74,16 @@ class NewsaleData
* @param integer $limit 查询返回的最大限制数, 默认为50
* @param integer $page 分页第几页, 默认第1页
* @param string $order 排序方式,默认s_t_desc表示按照时间倒序排列
*
* @param string $shop 店铺
*
* @return array 根据指定条件筛选出来的商品
*/
public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc')
public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc', $shop)
{
$selectItems = array(
'gender' => $gender,
'brand' => $brand,
'shop_id' => $shop,
'sort' => $sort,
'color' => $color,
'size' => $size,
... ...
... ... @@ -39,7 +39,7 @@ class SearchData
return 'http://testing.yohoops.org/yohosearch/search.json';
case 'developer':
default:
return 'http://192.168.102.216:8080/yohosearch/search.json';
return 'http://searchyohoops.yohobuy.com/yohosearch/search.json';
}
}
... ...
... ... @@ -62,7 +62,7 @@ class ShopProcess
//人气单品的链接
self::$shopData['more_url'] = Helpers::url('', array('shop_id' => self::$shopId, 'order' => 's_n_d', 'title' => '人气单品',), 'search');
if (self::$appVersion) {
self::$shopData['more_url'] .= '&yohobuy={"action":"go.list","params":{"shop_id":"'.self::$shopId.'","title":"人气单品"}}';
self::$shopData['more_url'] = 'openby:yohobuy={"action":"go.list","params":{"shop_id":"'.self::$shopId.'","title":"人气单品"}}';
}
}
... ... @@ -173,7 +173,6 @@ class ShopProcess
}
self::$shopData['hotCategory']['list'][] = array('url' => $cate['url'], 'img' => $cate['src']);
}
return $data;
}
/**
... ...
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -25,8 +25,9 @@
</div>
</div>
<div class="bottom">
<span>运费: </span>
<span>¥{{expressCost}} </span>
{{#if expressCost}}
<span>运费:¥{{expressCost}} </span>
{{/if}}
{{#if discount}}
<span>(已优惠¥{{discount}})</span>
{{/if}}
... ...
... ... @@ -7,8 +7,8 @@ use Action\AbstractAction;
* @name HfController
* @package
* @copyright yoho.inc
* @version 1.0 (2016-2-3 11:34:40)
* @author fei.hong <fei.hong@yoho.cn>
* @version 1.1 (2016-5-23 9:57:40) 增加android接口
* @author CL
*/
class HfController extends AbstractAction
{
... ... @@ -20,57 +20,92 @@ class HfController extends AbstractAction
*
* 参数列表
* -------------------------------------------------------------------------
* 字段 描述 类型 示例
* app_version 当前版本号 string 3.8.0
* uid 用户ID string 13423331
* client_type 用户手机系统:Android,IOS string Android
* screen_size 屏幕尺寸 string 1080x1920
* udid 设备唯一码 string 1d123sadao3
* os_version 设备版本号 string 1d123sadao3
* patchv 补丁版本号,如果本地没有补丁,传空 string 100
* 字段 描述 类型 示例
* app_version 当前版本号 string 3.8.0
* uid 用户ID string 13423331
* client_type 用户手机系统:Android,IOS string Android
* screen_size 屏幕尺寸 string 1080x1920
* udid 设备唯一码 string 1d123sadao3
* os_version 设备版本号 string 1d123sadao3
* patchv 补丁版本号,如果本地没有补丁,传空 string 100
*
* 返回列表
* -------------------------------------------------------------------------
* 字段 描述 类型 示例
* code 返回的code,200,304等,具体的服务器定义 int 200
* message 信息 string "Config Success"
* md5 当前请求的唯一码 string "1234567890123456"
* data 配置参数数据,参考data列表 object
* 字段 描述 类型 示例
* code 返回的code,200,304等,具体的服务器定义 int 200
* message 信息 string "Config Success"
* md5 当前请求的唯一码 string "1234567890123456"
* data 配置参数数据,参考data列表 object
* [
* url 补丁url地址,没有传空 string http://yohocdn.com/fpath/fpkk.js
* patchv 当前补丁的版本号,没有就传空 string "100"
* filecode md5(md5(文件内容) + "yohopatch2016") string "1233321121212332"
* url 补丁url地址,没有传空 string http://yohocdn.com/fpath/fpkk.js
* patchv 当前补丁的版本号,没有就传空 string "100"
* filecode md5(md5(文件内容) + "yohopatch2016") string "1233321121212332"
* ]
* echo md5(file_get_contents('http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.1/main-4.js')); exit;
*/
public function v1Action()
public function v1Action()
{
$result = array('code' => 200, 'message' => 'Config Success', 'md5' => '', 'data' => array());
// 根据版本号返回补丁文件信息
$clienttype = $this->post('client_type');
$version = $this->post('app_version');
switch ($version) {
// case '4.0.1': // 版本
// $result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.1/main-4.js';
// $result['data']['patchv'] = '103';
// $result['data']['filecode'] = md5('f9c03ec39cfb2686d2b778e444fb2306' . 'yohopatch2016');
// $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// break;
case '4.0.0': // 版本
$result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.0/main2.js';
$result['data']['patchv'] = '102';
$result['data']['filecode'] = md5('dddd71eed2754a53ad843a78587dc1f5' . 'yohopatch2016');
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
break;
default: // 默认
$result['data']['url'] = '';
$result['data']['patchv'] = '';
$result['data']['filecode'] = '';
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
break;
}
$ios = 'ios';
$android = 'android';
// 根据版本号返回补丁文件信息
if (strcasecmp($clienttype, $ios) == 0){
switch ($version) {
// case '4.0.1': // 版本
// $result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.1/main-4.js';
// $result['data']['patchv'] = '103';
// $result['data']['filecode'] = md5('f9c03ec39cfb2686d2b778e444fb2306' . 'yohopatch2016');
// $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// break;
case '4.0.0': // 版本
$result['data']['url'] = '';
$result['data']['patchv'] = '';
$result['data']['filecode'] = md5('dddd71eed2754a53ad843a78587dc1f5' . 'yohopatch2016');
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// var_dump('ios 4.0');
break;
default: // 默认
$result['data']['url'] = '';
$result['data']['patchv'] = '';
$result['data']['filecode'] = '';
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// var_dump('ios 4.1');
break;
}
$this->echoJson($result);
}
else if (strcasecmp($clienttype, $android) == 0){
switch ($version) {
case '4.4.0': // 版本
$result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/a/4.3.0/201605191600.apatch';
$result['data']['patchv'] = '103';
$result['data']['filecode'] = md5('c1edcb91fc0eb56a4699e0b31e942d06' . 'yohopatch2016');
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// var_dump('android 4.3.0');
break;
default: // 默认
$result['data']['url'] = '';
$result['data']['patchv'] = '';
$result['data']['filecode'] = '';
$result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
// var_dump('android noversion');
break;
}
}
else
{
// var_dump('no found app clienttype');
}
$this->echoJson($result);
}
}
... ...
... ... @@ -1065,7 +1065,9 @@ class CartModel
break;
}
}
$result['packages'][$pk]['expressCost'] = $pv['shopping_cost']; //运费
if ($pv['shopping_cost'] != 0) {
$result['packages'][$pk]['expressCost'] = $pv['shopping_cost']; //运费
}
if ($pv['shopping_cut_cost'] != 0) {
$result['packages'][$pk]['discount'] = $pv['shopping_cut_cost']; //已优惠
}
... ...
... ... @@ -174,6 +174,7 @@ class NewsaleController extends AbstractAction
if ($this->isAjax()) {
$gender = $this->get('gender', null);
$brand = $this->get('brand', null);
$shop = $this->get('shop_id', null);
$sort = $this->get('sort', null);
$color = $this->get('color', null);
$size = $this->get('size', null);
... ... @@ -190,7 +191,7 @@ class NewsaleController extends AbstractAction
$channel = Helpers::getChannelByCookie();
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order, $shop
);
$result = \Product\NewsaleModel::filterData($data, $gender);
}
... ...