|
@@ -7,7 +7,7 @@ use Api\Yohobuy; |
|
@@ -7,7 +7,7 @@ use Api\Yohobuy; |
7
|
|
7
|
|
8
|
/**
|
8
|
/**
|
9
|
* 领券活动
|
9
|
* 领券活动
|
10
|
- *
|
10
|
+ *
|
11
|
* @name Coupon
|
11
|
* @name Coupon
|
12
|
* @package Cuxiao
|
12
|
* @package Cuxiao
|
13
|
* @copyright yoho.inc
|
13
|
* @copyright yoho.inc
|
|
@@ -109,7 +109,7 @@ class CouponController extends HuodongAction |
|
@@ -109,7 +109,7 @@ class CouponController extends HuodongAction |
109
|
|
109
|
|
110
|
/**
|
110
|
/**
|
111
|
* 女生的品牌领券
|
111
|
* 女生的品牌领券
|
112
|
- *
|
112
|
+ *
|
113
|
* 上线时间 2015/12/1
|
113
|
* 上线时间 2015/12/1
|
114
|
*/
|
114
|
*/
|
115
|
public function girlsbrandAction()
|
115
|
public function girlsbrandAction()
|
|
@@ -202,7 +202,7 @@ class CouponController extends HuodongAction |
|
@@ -202,7 +202,7 @@ class CouponController extends HuodongAction |
202
|
|
202
|
|
203
|
/**
|
203
|
/**
|
204
|
* 潮童的品牌领券
|
204
|
* 潮童的品牌领券
|
205
|
- *
|
205
|
+ *
|
206
|
* 上线时间 2015/12/1
|
206
|
* 上线时间 2015/12/1
|
207
|
*/
|
207
|
*/
|
208
|
public function kidsbrandAction()
|
208
|
public function kidsbrandAction()
|
|
@@ -250,7 +250,7 @@ class CouponController extends HuodongAction |
|
@@ -250,7 +250,7 @@ class CouponController extends HuodongAction |
250
|
|
250
|
|
251
|
/**
|
251
|
/**
|
252
|
* 创意生活的品牌领券
|
252
|
* 创意生活的品牌领券
|
253
|
- *
|
253
|
+ *
|
254
|
* 上线时间 2015/12/1
|
254
|
* 上线时间 2015/12/1
|
255
|
*/
|
255
|
*/
|
256
|
public function lifestylebrandAction()
|
256
|
public function lifestylebrandAction()
|
|
@@ -363,7 +363,7 @@ class CouponController extends HuodongAction |
|
@@ -363,7 +363,7 @@ class CouponController extends HuodongAction |
363
|
|
363
|
|
364
|
/**
|
364
|
/**
|
365
|
* 女生的品牌领券
|
365
|
* 女生的品牌领券
|
366
|
- *
|
366
|
+ *
|
367
|
* 上线时间 2015/12/7
|
367
|
* 上线时间 2015/12/7
|
368
|
*/
|
368
|
*/
|
369
|
public function girlsbrand2Action()
|
369
|
public function girlsbrand2Action()
|
|
@@ -425,8 +425,8 @@ class CouponController extends HuodongAction |
|
@@ -425,8 +425,8 @@ class CouponController extends HuodongAction |
425
|
}
|
425
|
}
|
426
|
|
426
|
|
427
|
/**
|
427
|
/**
|
428
|
- * 新客领券
|
|
|
429
|
- *
|
428
|
+ * 新客领券
|
|
|
429
|
+ *
|
430
|
* 上线时间2015/12/2
|
430
|
* 上线时间2015/12/2
|
431
|
*/
|
431
|
*/
|
432
|
public function newuserAction()
|
432
|
public function newuserAction()
|
|
@@ -519,7 +519,7 @@ class CouponController extends HuodongAction |
|
@@ -519,7 +519,7 @@ class CouponController extends HuodongAction |
519
|
'url_1026' => 'http://list.m.yohobuy.com/?msort=6&misort=45&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"45","title":"冬靴"}}'
|
519
|
'url_1026' => 'http://list.m.yohobuy.com/?msort=6&misort=45&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"45","title":"冬靴"}}'
|
520
|
));
|
520
|
));
|
521
|
}
|
521
|
}
|
522
|
-
|
522
|
+
|
523
|
/**
|
523
|
/**
|
524
|
* 新客领券(第三波)2016年1月7号上线
|
524
|
* 新客领券(第三波)2016年1月7号上线
|
525
|
*/
|
525
|
*/
|
|
@@ -567,7 +567,7 @@ class CouponController extends HuodongAction |
|
@@ -567,7 +567,7 @@ class CouponController extends HuodongAction |
567
|
//// 'url_4' => 'http://list.m.yohobuy.com/?msort=3,4&title=下装&openby:yohobuy={"action":"go.list","params":{"msort":"3,4","title":"下装"}}',
|
567
|
//// 'url_4' => 'http://list.m.yohobuy.com/?msort=3,4&title=下装&openby:yohobuy={"action":"go.list","params":{"msort":"3,4","title":"下装"}}',
|
568
|
//// 'url_3' => 'http://list.m.yohobuy.com/?msort=7,8&title=包配&openby:yohobuy={"action":"go.list","params":{"msort":"7,8","title":"包配"}}',
|
568
|
//// 'url_3' => 'http://list.m.yohobuy.com/?msort=7,8&title=包配&openby:yohobuy={"action":"go.list","params":{"msort":"7,8","title":"包配"}}',
|
569
|
//// 'url_6' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=反季&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"反季"}}',
|
569
|
//// 'url_6' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=反季&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"反季"}}',
|
570
|
-//
|
570
|
+//
|
571
|
// 'url_1' => 'http://list.m.yohobuy.com/?msort=1&misort=18,20,21,22&title=冬装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"冬装"}}',
|
571
|
// 'url_1' => 'http://list.m.yohobuy.com/?msort=1&misort=18,20,21,22&title=冬装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"冬装"}}',
|
572
|
// 'url_2' => 'http://list.m.yohobuy.com/?msort=1&misort=21,22,226&title=春装外套&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"春装外套"}}',
|
572
|
// 'url_2' => 'http://list.m.yohobuy.com/?msort=1&misort=21,22,226&title=春装外套&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"春装外套"}}',
|
573
|
// 'url_3' => 'http://list.m.yohobuy.com/?msort=6&misort=45&title=靴子&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"45","title":"靴子"}}',
|
573
|
// 'url_3' => 'http://list.m.yohobuy.com/?msort=6&misort=45&title=靴子&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"45","title":"靴子"}}',
|
|
@@ -576,7 +576,7 @@ class CouponController extends HuodongAction |
|
@@ -576,7 +576,7 @@ class CouponController extends HuodongAction |
576
|
// 'url_6' => 'http://list.m.yohobuy.com/?msort=1&misort=16,257&title=春装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"16,257","title":"春装"}}',
|
576
|
// 'url_6' => 'http://list.m.yohobuy.com/?msort=1&misort=16,257&title=春装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"16,257","title":"春装"}}',
|
577
|
// 'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
577
|
// 'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
578
|
// ));
|
578
|
// ));
|
579
|
-
|
579
|
+
|
580
|
// 判断是否是应用访问, 拼接APP需要的URL参数
|
580
|
// 判断是否是应用访问, 拼接APP需要的URL参数
|
581
|
$isApp = null !== $this->get('app_version');
|
581
|
$isApp = null !== $this->get('app_version');
|
582
|
$isAppLogged = true;
|
582
|
$isAppLogged = true;
|
|
@@ -623,7 +623,7 @@ class CouponController extends HuodongAction |
|
@@ -623,7 +623,7 @@ class CouponController extends HuodongAction |
623
|
'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
623
|
'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
624
|
));
|
624
|
));
|
625
|
}
|
625
|
}
|
626
|
-
|
626
|
+
|
627
|
/**
|
627
|
/**
|
628
|
* 新客领券(第4波)2016年3月14号上线
|
628
|
* 新客领券(第4波)2016年3月14号上线
|
629
|
*/
|
629
|
*/
|
|
@@ -743,7 +743,7 @@ class CouponController extends HuodongAction |
|
@@ -743,7 +743,7 @@ class CouponController extends HuodongAction |
743
|
} else {
|
743
|
} else {
|
744
|
$isLogged = $this->getUid();
|
744
|
$isLogged = $this->getUid();
|
745
|
}
|
745
|
}
|
746
|
- $urlNewuser = Helpers::url('/cuxiao/coupon/newuser6');
|
746
|
+ $urlNewuser = Helpers::url('/cuxiao/coupon/newuser5');
|
747
|
$urlYohope = Helpers::url('/cuxiao/coupon/yohope');
|
747
|
$urlYohope = Helpers::url('/cuxiao/coupon/yohope');
|
748
|
$urlHelp = Helpers::url('/cuxiao/coupon/help');
|
748
|
$urlHelp = Helpers::url('/cuxiao/coupon/help');
|
749
|
$urlMycoupon = Helpers::url('/home/coupons', null, 'default');
|
749
|
$urlMycoupon = Helpers::url('/home/coupons', null, 'default');
|
|
@@ -783,7 +783,7 @@ class CouponController extends HuodongAction |
|
@@ -783,7 +783,7 @@ class CouponController extends HuodongAction |
783
|
|
783
|
|
784
|
/**
|
784
|
/**
|
785
|
* 新客领券YOHOPE
|
785
|
* 新客领券YOHOPE
|
786
|
- *
|
786
|
+ *
|
787
|
* 上线时间2015/12/2
|
787
|
* 上线时间2015/12/2
|
788
|
*/
|
788
|
*/
|
789
|
public function yohopeAction()
|
789
|
public function yohopeAction()
|
|
@@ -820,8 +820,8 @@ class CouponController extends HuodongAction |
|
@@ -820,8 +820,8 @@ class CouponController extends HuodongAction |
820
|
}
|
820
|
}
|
821
|
|
821
|
|
822
|
/**
|
822
|
/**
|
823
|
- * 新客领券 - 如何使用优惠券帮助页
|
|
|
824
|
- *
|
823
|
+ * 新客领券 - 如何使用优惠券帮助页
|
|
|
824
|
+ *
|
825
|
* 上线时间2015/12/2
|
825
|
* 上线时间2015/12/2
|
826
|
*/
|
826
|
*/
|
827
|
public function helpAction()
|
827
|
public function helpAction()
|
|
@@ -830,10 +830,10 @@ class CouponController extends HuodongAction |
|
@@ -830,10 +830,10 @@ class CouponController extends HuodongAction |
830
|
'staticTitle' => '如何使用优惠券'
|
830
|
'staticTitle' => '如何使用优惠券'
|
831
|
));
|
831
|
));
|
832
|
}
|
832
|
}
|
833
|
-
|
833
|
+
|
834
|
/**
|
834
|
/**
|
835
|
* Final Sale 领券活动
|
835
|
* Final Sale 领券活动
|
836
|
- *
|
836
|
+ *
|
837
|
* 上线时间2016/01/12
|
837
|
* 上线时间2016/01/12
|
838
|
*/
|
838
|
*/
|
839
|
public function finalAction()
|
839
|
public function finalAction()
|
|
@@ -844,7 +844,7 @@ class CouponController extends HuodongAction |
|
@@ -844,7 +844,7 @@ class CouponController extends HuodongAction |
844
|
//未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面
|
844
|
//未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面
|
845
|
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/coupon/final')), 'default'));
|
845
|
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/coupon/final')), 'default'));
|
846
|
}
|
846
|
}
|
847
|
-
|
847
|
+
|
848
|
// 该变量用来控制和显示页面的弹出提示
|
848
|
// 该变量用来控制和显示页面的弹出提示
|
849
|
$showPopupFlag = '0';
|
849
|
$showPopupFlag = '0';
|
850
|
|
850
|
|
|
@@ -883,10 +883,10 @@ class CouponController extends HuodongAction |
|
@@ -883,10 +883,10 @@ class CouponController extends HuodongAction |
883
|
'downAppUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr',
|
883
|
'downAppUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr',
|
884
|
));
|
884
|
));
|
885
|
}
|
885
|
}
|
886
|
-
|
886
|
+
|
887
|
/**
|
887
|
/**
|
888
|
* Final Sale 领券活动第二波
|
888
|
* Final Sale 领券活动第二波
|
889
|
- *
|
889
|
+ *
|
890
|
* 上线时间2016/01/25
|
890
|
* 上线时间2016/01/25
|
891
|
*/
|
891
|
*/
|
892
|
public function final2Action()
|
892
|
public function final2Action()
|
|
@@ -897,7 +897,7 @@ class CouponController extends HuodongAction |
|
@@ -897,7 +897,7 @@ class CouponController extends HuodongAction |
897
|
//未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面
|
897
|
//未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面
|
898
|
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/coupon/final2')), 'default'));
|
898
|
$this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/coupon/final2')), 'default'));
|
899
|
}
|
899
|
}
|
900
|
-
|
900
|
+
|
901
|
// 该变量用来控制和显示页面的弹出提示
|
901
|
// 该变量用来控制和显示页面的弹出提示
|
902
|
$showPopupFlag = '0';
|
902
|
$showPopupFlag = '0';
|
903
|
|
903
|
|
|
@@ -936,11 +936,11 @@ class CouponController extends HuodongAction |
|
@@ -936,11 +936,11 @@ class CouponController extends HuodongAction |
936
|
'downAppUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr',
|
936
|
'downAppUrl' => 'http://www.yohoshow.com/about/index/yohobuyqr',
|
937
|
));
|
937
|
));
|
938
|
}
|
938
|
}
|
939
|
-
|
939
|
+
|
940
|
|
940
|
|
941
|
/**
|
941
|
/**
|
942
|
* 领取指定的优惠券
|
942
|
* 领取指定的优惠券
|
943
|
- *
|
943
|
+ *
|
944
|
* @param int activityId 活动ID
|
944
|
* @param int activityId 活动ID
|
945
|
* @param int couponId 优惠券ID
|
945
|
* @param int couponId 优惠券ID
|
946
|
* @return json
|
946
|
* @return json
|
|
@@ -964,9 +964,14 @@ class CouponController extends HuodongAction |
|
@@ -964,9 +964,14 @@ class CouponController extends HuodongAction |
964
|
|
964
|
|
965
|
/* 判断用户是否登录 */
|
965
|
/* 判断用户是否登录 */
|
966
|
$uid = $this->getSession(self::SESSION_UID);
|
966
|
$uid = $this->getSession(self::SESSION_UID);
|
|
|
967
|
+
|
967
|
if (!$uid) {
|
968
|
if (!$uid) {
|
968
|
$uid = $this->getUid();
|
969
|
$uid = $this->getUid();
|
969
|
if (!$uid) {
|
970
|
if (!$uid) {
|
|
|
971
|
+ $uid = $this->get('uid'); // session 获取不到 UID,直接获取查询字符串的 uid, 严重问题,不安全,需要修复
|
|
|
972
|
+ }
|
|
|
973
|
+
|
|
|
974
|
+ if (empty($uid)) {
|
970
|
$result['code'] = 400;
|
975
|
$result['code'] = 400;
|
971
|
$result['message'] = '请先登录';
|
976
|
$result['message'] = '请先登录';
|
972
|
$result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default');
|
977
|
$result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default');
|
|
@@ -983,7 +988,7 @@ class CouponController extends HuodongAction |
|
@@ -983,7 +988,7 @@ class CouponController extends HuodongAction |
983
|
|
988
|
|
984
|
/**
|
989
|
/**
|
985
|
* 领取所有的优惠券
|
990
|
* 领取所有的优惠券
|
986
|
- *
|
991
|
+ *
|
987
|
* @param int activityId 活动ID
|
992
|
* @param int activityId 活动ID
|
988
|
* @return json
|
993
|
* @return json
|
989
|
*/
|
994
|
*/
|
|
@@ -1024,7 +1029,7 @@ class CouponController extends HuodongAction |
|
@@ -1024,7 +1029,7 @@ class CouponController extends HuodongAction |
1024
|
|
1029
|
|
1025
|
/**
|
1030
|
/**
|
1026
|
* 检查用户是否登录
|
1031
|
* 检查用户是否登录
|
1027
|
- *
|
1032
|
+ *
|
1028
|
* @return bool (false:表示未登录,true:表示已登录)
|
1033
|
* @return bool (false:表示未登录,true:表示已登录)
|
1029
|
*/
|
1034
|
*/
|
1030
|
private function checkIsLogin()
|
1035
|
private function checkIsLogin()
|
|
@@ -1049,10 +1054,10 @@ class CouponController extends HuodongAction |
|
@@ -1049,10 +1054,10 @@ class CouponController extends HuodongAction |
1049
|
|
1054
|
|
1050
|
return false;
|
1055
|
return false;
|
1051
|
}
|
1056
|
}
|
1052
|
-
|
1057
|
+
|
1053
|
/**
|
1058
|
/**
|
1054
|
* 检测登录状态
|
1059
|
* 检测登录状态
|
1055
|
- *
|
1060
|
+ *
|
1056
|
* @return int
|
1061
|
* @return int
|
1057
|
*/
|
1062
|
*/
|
1058
|
private function getLoggedUid()
|
1063
|
private function getLoggedUid()
|
|
@@ -1071,7 +1076,7 @@ class CouponController extends HuodongAction |
|
@@ -1071,7 +1076,7 @@ class CouponController extends HuodongAction |
1071
|
|
1076
|
|
1072
|
/**
|
1077
|
/**
|
1073
|
* 发送站内信
|
1078
|
* 发送站内信
|
1074
|
- *
|
1079
|
+ *
|
1075
|
* @param int $uid 用户ID
|
1080
|
* @param int $uid 用户ID
|
1076
|
*/
|
1081
|
*/
|
1077
|
private function sendMessage($uid, $title, $content)
|
1082
|
private function sendMessage($uid, $title, $content)
|
|
@@ -1085,7 +1090,7 @@ class CouponController extends HuodongAction |
|
@@ -1085,7 +1090,7 @@ class CouponController extends HuodongAction |
1085
|
|
1090
|
|
1086
|
/**
|
1091
|
/**
|
1087
|
* 根据环境来获取活动ID
|
1092
|
* 根据环境来获取活动ID
|
1088
|
- *
|
1093
|
+ *
|
1089
|
* @return int
|
1094
|
* @return int
|
1090
|
*/
|
1095
|
*/
|
1091
|
private function getActivityId()
|
1096
|
private function getActivityId()
|
|
@@ -1101,10 +1106,10 @@ class CouponController extends HuodongAction |
|
@@ -1101,10 +1106,10 @@ class CouponController extends HuodongAction |
1101
|
return 89;
|
1106
|
return 89;
|
1102
|
}
|
1107
|
}
|
1103
|
}
|
1108
|
}
|
1104
|
-
|
1109
|
+
|
1105
|
/**
|
1110
|
/**
|
1106
|
* 根据环境来获取活动ID
|
1111
|
* 根据环境来获取活动ID
|
1107
|
- *
|
1112
|
+ *
|
1108
|
* @return int
|
1113
|
* @return int
|
1109
|
*/
|
1114
|
*/
|
1110
|
private function getActivityId2()
|
1115
|
private function getActivityId2()
|