Authored by 梁志锋

Merge remote-tracking branch 'origin/beta/wap' into beta/wap

  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5 + <meta charset="utf-8">
  6 + <title>{{staticTitle}}</title>
  7 + <!-- <meta name="apple-mobile-web-app-title" content="SUMMER SALE"> -->
  8 + <meta name="format-detection" content="telephone=no">
  9 + <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui">
  10 + <meta name="apple-mobile-web-app-capable" content="yes">
  11 + <meta name="apple-mobile-web-app-status-bar-style" content="grey">
  12 + <script>
  13 + (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="80px"}else{e.style.fontSize=80*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
  14 + </script>
  15 +</head>
  16 +<body>
  17 + <div class="main-wrap">
  18 + 元宵节抽签
  19 + </div>
  20 +</body>
  1 +<?php
  2 +
  3 +use Action\HuodongAction;
  4 +use Plugin\Helpers;
  5 +use LibModels\Wap\Cuxiao\ActivityData;
  6 +use Api\Yohobuy;
  7 +
  8 +/**
  9 + * 元宵抽签活动
  10 + */
  11 +class YuanxiaoController extends HuodongAction
  12 +{
  13 + /**
  14 + * 元宵抽签
  15 + */
  16 + public function indexAction()
  17 + {
  18 + $this->_view->display('index', array(
  19 + 'staticTitle' => '元宵抽签'
  20 + ));
  21 + }
  22 +}
@@ -41,7 +41,7 @@ class HfController extends AbstractAction @@ -41,7 +41,7 @@ class HfController extends AbstractAction
41 * patchv 当前补丁的版本号,没有就传空 string "100" 41 * patchv 当前补丁的版本号,没有就传空 string "100"
42 * filecode md5(md5(文件内容) + "yohopatch2016") string "1233321121212332" 42 * filecode md5(md5(文件内容) + "yohopatch2016") string "1233321121212332"
43 * ] 43 * ]
44 - * echo md5(file_get_contents('http://ad.yoho.cn/test/main.js')); 44 + * echo md5(file_get_contents('http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.0/main.js'));
45 */ 45 */
46 public function v1Action() 46 public function v1Action()
47 { 47 {
@@ -51,16 +51,17 @@ class HfController extends AbstractAction @@ -51,16 +51,17 @@ class HfController extends AbstractAction
51 $version = $this->post('app_version'); 51 $version = $this->post('app_version');
52 switch ($version) { 52 switch ($version) {
53 case '4.0.0': // 版本号 53 case '4.0.0': // 版本号
54 -// $result['data']['url'] = 'http://ad.yoho.cn/test/main.js';  
55 -// $result['data']['patchv'] = '102';  
56 -// $result['data']['filecode'] = md5('bae3f6522d7a53436931799ac10f8a40' . 'yohopatch2016');  
57 -// $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));  
58 -// break; 54 + $result['data']['url'] = 'http://cdn.yoho.cn/app-hotfix/yohobuy/4.0.0/main.js';
  55 + $result['data']['patchv'] = '102';
  56 + $result['data']['filecode'] = md5('53b86b14490ead50ff78cac30a2494f3' . 'yohopatch2016');
  57 + $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
  58 + break;
59 default: // 默认 59 default: // 默认
60 $result['data']['url'] = ''; 60 $result['data']['url'] = '';
61 $result['data']['patchv'] = ''; 61 $result['data']['patchv'] = '';
62 $result['data']['filecode'] = ''; 62 $result['data']['filecode'] = '';
63 $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data'])); 63 $result['md5'] = md5(self::PRIVATE_KEY . ':' . json_encode($result['data']));
  64 + break;
64 } 65 }
65 66
66 $this->echoJson($result); 67 $this->echoJson($result);