APP_code_ADD
Showing
2 changed files
with
4 additions
and
15 deletions
@@ -45,7 +45,7 @@ class CouponController extends AbstractAction | @@ -45,7 +45,7 @@ class CouponController extends AbstractAction | ||
45 | if (!$this->isApp()) { | 45 | if (!$this->isApp()) { |
46 | $this->setNavHeader($receiveData['title'], true, SITE_MAIN); | 46 | $this->setNavHeader($receiveData['title'], true, SITE_MAIN); |
47 | } else { | 47 | } else { |
48 | - $this->setTitle($receiveData['title'],false,null); | 48 | + $this->setTitle($receiveData['title'], false, null); |
49 | } | 49 | } |
50 | $this->_view->display('index', array( | 50 | $this->_view->display('index', array( |
51 | 'content' => $result, | 51 | 'content' => $result, |
@@ -63,7 +63,8 @@ class CouponController extends AbstractAction | @@ -63,7 +63,8 @@ class CouponController extends AbstractAction | ||
63 | $returnData = array(); | 63 | $returnData = array(); |
64 | // 获取优惠券 ID | 64 | // 获取优惠券 ID |
65 | $receiveData = filter_input_array(INPUT_GET, array( | 65 | $receiveData = filter_input_array(INPUT_GET, array( |
66 | - 'couponID' => FILTER_DEFAULT | 66 | + 'couponID' => FILTER_DEFAULT, |
67 | + 'code' => FILTER_DEFAULT, | ||
67 | )); | 68 | )); |
68 | // 跳转 URl | 69 | // 跳转 URl |
69 | $playUrl = Helpers::url('/coupon/floor'); | 70 | $playUrl = Helpers::url('/coupon/floor'); |
@@ -85,7 +86,7 @@ class CouponController extends AbstractAction | @@ -85,7 +86,7 @@ class CouponController extends AbstractAction | ||
85 | $returnData['url'] = Helpers::url('/signin.html', array('refer' => $playUrl), 'default'); | 86 | $returnData['url'] = Helpers::url('/signin.html', array('refer' => $playUrl), 'default'); |
86 | } else { | 87 | } else { |
87 | $playUrlEncode = strtr($playUrl, array('/' => '\\/')); | 88 | $playUrlEncode = strtr($playUrl, array('/' => '\\/')); |
88 | - $returnData['url'] = $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}'; | 89 | + $returnData['url'] = $playUrl . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $playUrlEncode . '","param":{"from":"app","code":' . $receiveData['code'] . '}},"requesturl":{"url":"","param":{}},"priority":"N"}}'; |
89 | } | 90 | } |
90 | } else { | 91 | } else { |
91 | // 登录后调用领券接口 | 92 | // 登录后调用领券接口 |
@@ -115,18 +116,6 @@ class CouponController extends AbstractAction | @@ -115,18 +116,6 @@ class CouponController extends AbstractAction | ||
115 | */ | 116 | */ |
116 | public function isApp() | 117 | public function isApp() |
117 | { | 118 | { |
118 | - /* $userAgent = $this->getUserAgent(); | ||
119 | - if (stristr($userAgent, 'ipad')) { | ||
120 | - return false; | ||
121 | - } | ||
122 | - $mobileAgents = array('iphone', 'android', "240x320", "acer", "acoon", "acs-", "abacho", "ahong", "airness", "alcatel", "amoi", "anywhereyougo.com", "applewebkit/525", "applewebkit/532", "asus", "audio", "au-mic", "avantogo", "becker", "benq", "bilbo", "bird", "blackberry", "blazer", "bleu", "cdm-", "compal", "coolpad", "danger", "dbtel", "dopod", "elaine", "eric", "etouch", "fly ", "fly_", "fly-", "go.web", "goodaccess", "gradiente", "grundig", "haier", "hedy", "hitachi", "htc", "huawei", "hutchison", "inno", "ipad", "ipaq", "ipod", "jbrowser", "kddi", "kgt", "kwc", "lenovo", "lg ", "lg2", "lg3", "lg4", "lg5", "lg7", "lg8", "lg9", "lg-", "lge-", "lge9", "longcos", "maemo", "mercator", "meridian", "micromax", "midp", "mini", "mitsu", "mmm", "mmp", "mobi", "mot-", "moto", "nec-", "netfront", "newgen", "nexian", "nf-browser", "nintendo", "nitro", "nokia", "nook", "novarra", "obigo", "palm", "panasonic", "pantech", "philips", "phone", "pg-", "playstation", "pocket", "pt-", "qc-", "qtek", "rover", "sagem", "sama", "samu", "sanyo", "samsung", "sch-", "scooter", "sec-", "sendo", "sgh-", "sharp", "siemens", "sie-", "softbank", "sony", "spice", "sprint", "spv", "symbian", "tablet", "talkabout", "tcl-", "teleca", "telit", "tianyu", "tim-", "toshiba", "tsm", "up.browser", "utec", "utstar", "verykool", "virgin", "vk-", "voda", "voxtel", "vx", "wap", "wellco", "wig browser", "wii", "windows ce", "wireless", "xda", "xde", "zte"); | ||
123 | - $isMobile = false; | ||
124 | - foreach ($mobileAgents as $device) { | ||
125 | - if (stristr($userAgent, $device)) { | ||
126 | - $isMobile = true; | ||
127 | - break; | ||
128 | - } | ||
129 | - }*/ | ||
130 | $isMobile = $this->get('app_version'); | 119 | $isMobile = $this->get('app_version'); |
131 | return !empty($isMobile); | 120 | return !empty($isMobile); |
132 | } | 121 | } |
-
Please register or login to post a comment