Authored by hf

code review by fei.hong: do modify app hotfix api add 4.0.1 patch

... ... @@ -41,7 +41,7 @@ class HfController extends AbstractAction
* patchv 当前补丁的版本号,没有就传空 string "100"
* filecode md5(md5(文件内容) + "yohopatch2016") string "1233321121212332"
* ]
* echo md5(file_get_contents('http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.0/main2.js'));
* echo md5(file_get_contents('http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.1/main.js')); exit;
*/
public function v1Action()
{
... ... @@ -50,7 +50,13 @@ class HfController extends AbstractAction
// 根据版本号返回补丁文件信息
$version = $this->post('app_version');
switch ($version) {
case '4.0.0': // 版本号
case '4.0.1': // 版本
$result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.1/main.js';
$result['data']['patchv'] = '103';
$result['data']['filecode'] = md5('a0bb1f61c26ca8ed5dc19ab647715b1a' . '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');
... ...