|
@@ -58,13 +58,18 @@
|
|
|
';
|
|
|
}
|
|
|
?>
|
|
|
- location.href = '<?php echo Yii::app()->request->baseUrl . 'index.php?r=/common/activity/wxIndex&coupon_id='.$coupon_id; ?>';
|
|
|
+
|
|
|
+ var userID = localStorage.getItem('wxUserID');
|
|
|
+ var appToken = localStorage.getItem('appToken');
|
|
|
+ alert(userID);
|
|
|
+ if (!userID || !appToken) {
|
|
|
+ localStorage.clear();
|
|
|
+ location.href = '<?php echo Yii::app()->request->baseUrl . 'index.php?r=/common/activity/wxIndex&coupon_id=' . $coupon_id; ?>';
|
|
|
+ }
|
|
|
|
|
|
document.write('<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"><\/script>');
|
|
|
}
|
|
|
- if (location.hash == '#rd') {
|
|
|
- location.hash = '';
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
})();
|
|
|
</script>
|