Ver código fonte

activityController

DengTao 8 anos atrás
pai
commit
5f1b1f1036

+ 2 - 1
www/protected/modules/common/controllers/ActivityController.php

@@ -90,7 +90,8 @@ class ActivityController extends O2oBaseController  {
         if (CommonFn::isMongoId($coupon_id) && !$coupon_id) {
             if (CommonFn::isMongoId($user->_id) && !$user->_id) {
                 Service::factory('CouponService')->giveCoupon($user->_id, $coupon_id, $start_time, $end_time);//发放代金券
-                $this->renderpartial('index');exit;
+                echo "123";exit;
+                //$this->renderpartial('index');exit;
             }
         }
 

+ 1 - 4
www/protected/modules/common/views/activity/getCoupon.php

@@ -47,8 +47,6 @@
             }
         }
         ?>
-        alert("<?php $userId?>");
-
         if (ua.match(/MicroMessenger/i) == 'micromessenger') {
             <?php
             if(!empty($userId) && !empty($appToken)){
@@ -60,7 +58,7 @@
             ?>
             var userID = localStorage.getItem('wxUserID');
             var appToken = localStorage.getItem('appToken');
-            alert(userID);alert(appToken);
+
             if (!userID || !appToken) {
                 localStorage.clear();
                 location.href = '<?php echo Yii::app()->request->baseUrl . 'index.php?r=/common/activity/wxIndex&coupon_id='.$coupon_id; ?>';
@@ -69,7 +67,6 @@
                 location.href = '<?php echo Yii::app()->request->baseUrl . 'index.php?r=/common/activity/wxIndex&coupon_id='.$coupon_id; ?>';
 
             }
-            alert(location.href);
             document.write('<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"><\/script>');
         }
         if (location.hash == '#rd') {