dever 6 years ago
parent
commit
0dbb06fbe3
66 changed files with 721 additions and 954 deletions
  1. 1 1
      kissy/cfg-min.js
  2. BIN
      kissy/public/avatar/1.jpg
  3. BIN
      kissy/public/avatar/10.jpg
  4. BIN
      kissy/public/avatar/11.jpg
  5. BIN
      kissy/public/avatar/12.jpg
  6. BIN
      kissy/public/avatar/13.jpg
  7. BIN
      kissy/public/avatar/14.jpg
  8. BIN
      kissy/public/avatar/15.jpg
  9. BIN
      kissy/public/avatar/16.jpg
  10. BIN
      kissy/public/avatar/2.jpg
  11. BIN
      kissy/public/avatar/3.jpg
  12. BIN
      kissy/public/avatar/4.jpg
  13. BIN
      kissy/public/avatar/5.jpg
  14. BIN
      kissy/public/avatar/6.jpg
  15. BIN
      kissy/public/avatar/7.jpg
  16. BIN
      kissy/public/avatar/8.jpg
  17. BIN
      kissy/public/avatar/9.jpg
  18. 52 89
      tm/compile_dir/%%48^48D^48DE5A4F%%bottom.html.php
  19. 31 1
      tm/compile_dir/%%71^714^714F4B17%%header.html.php
  20. 12 52
      tm/compile_dir/%%73^73D^73D43E79%%events_code.html.php
  21. 1 1
      tm/compile_dir/%%77^774^774BE9C9%%index.html.php
  22. 8 52
      tm/compile_dir/%%80^804^80487B52%%events_survey.html.php
  23. 8 93
      tm/compile_dir/%%9F^9F5^9F50A076%%events_turntable.html.php
  24. 7 4
      tm/compile_dir/%%A0^A01^A01AF397%%events_try.html.php
  25. 4 2
      tm/compile_dir/%%A1^A1B^A1B92DB5%%user_participate_log.html.php
  26. 4 2
      tm/compile_dir/%%C3^C33^C3389195%%user_participate_form.html.php
  27. 4 2
      tm/compile_dir/%%C4^C4B^C4B7643A%%user_participate_win.html.php
  28. 13 50
      tm/compile_dir/%%F1^F1B^F1BAA341%%events_invitation.html.php
  29. 13 141
      tm/compile_dir/%%F2^F25^F25DA589%%events_vote.html.php
  30. 4 0
      tm/lib/Controller/Admin/Activity/UserHelp.class.php
  31. 2 2
      tm/lib/Controller/Admin/Controller.class.php
  32. 1 0
      tm/lib/Controller/EventsArticle.class.php
  33. 2 1
      tm/lib/Controller/EventsCode.class.php
  34. 91 43
      tm/lib/Controller/EventsController.class.php
  35. 3 2
      tm/lib/Controller/EventsInvitation.class.php
  36. 6 1
      tm/lib/Controller/EventsScratch.class.php
  37. 5 1
      tm/lib/Controller/EventsSurvey.class.php
  38. 2 0
      tm/lib/Controller/EventsTurntable.class.php
  39. 2 0
      tm/lib/Controller/EventsVote.class.php
  40. 2 4
      tm/lib/Controller/FeedBack.class.php
  41. 8 1
      tm/lib/Controller/Index.class.php
  42. 79 0
      tm/lib/Controller/UserHelp.class.php
  43. 0 1
      tm/lib/Dao/LotteryUserHelp.class.php
  44. 1 1
      tm/lib/Dao/LotteryUserHelpLog.class.php
  45. 3 2
      tm/lib/Module/LotteryEventsTypeCode.class.php
  46. 1 1
      tm/lib/Module/LotteryEventsTypeInvitation.class.php
  47. 42 1
      tm/lib/Module/User.class.php
  48. 2 0
      tm/template_dir/admin/activity/user_participate_form.html
  49. 2 0
      tm/template_dir/admin/activity/user_participate_log.html
  50. 2 0
      tm/template_dir/admin/activity/user_participate_win.html
  51. 51 67
      tm/template_dir/bottom.html
  52. 8 42
      tm/template_dir/events_code.html
  53. 48 27
      tm/template_dir/events_infos.html
  54. 10 41
      tm/template_dir/events_invitation.html
  55. 2 0
      tm/template_dir/events_scratch.html
  56. 2 37
      tm/template_dir/events_survey.html
  57. 25 0
      tm/template_dir/events_survey_content.html
  58. 13 6
      tm/template_dir/events_survey_underway.html
  59. 1 0
      tm/template_dir/events_top.html
  60. 6 3
      tm/template_dir/events_try.html
  61. 2 76
      tm/template_dir/events_turntable.html
  62. 46 0
      tm/template_dir/events_turntable_content.html
  63. 6 102
      tm/template_dir/events_vote.html
  64. 62 0
      tm/template_dir/events_vote_content.html
  65. 3 2
      tm/template_dir/feedback.html
  66. 18 0
      tm/template_dir/header.html

+ 1 - 1
kissy/cfg-min.js

@@ -3,7 +3,7 @@ KISSY.config({
 	debug: false,
     packages: {
         gallery: {
-            base: 'http://op_cdn_mac.5dev.cn/kissy/1.4.0'
+            base: 'http://op_cdn.5dev.cn/kissy/1.4.0'
         }
         , op_dever: {
             base: 'http://op_cdn.5dev.cn/op_dever/'

BIN
kissy/public/avatar/1.jpg


BIN
kissy/public/avatar/10.jpg


BIN
kissy/public/avatar/11.jpg


BIN
kissy/public/avatar/12.jpg


BIN
kissy/public/avatar/13.jpg


BIN
kissy/public/avatar/14.jpg


BIN
kissy/public/avatar/15.jpg


BIN
kissy/public/avatar/16.jpg


BIN
kissy/public/avatar/2.jpg


BIN
kissy/public/avatar/3.jpg


BIN
kissy/public/avatar/4.jpg


BIN
kissy/public/avatar/5.jpg


BIN
kissy/public/avatar/6.jpg


BIN
kissy/public/avatar/7.jpg


BIN
kissy/public/avatar/8.jpg


BIN
kissy/public/avatar/9.jpg


+ 52 - 89
tm/compile_dir/%%48^48D^48DE5A4F%%bottom.html.php

@@ -1,5 +1,7 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-27 09:15:02
+<?php /* Smarty version 2.6.17, created on 2018-05-28 14:42:47
          compiled from bottom.html */ ?>
+<section class="toast" style="display:none;">错误信息</section>
+
 <?php if (! $this->_tpl_vars['cutScreenInfo'] && $this->_tpl_vars['display'] == 1): ?>
 
 <footer>
@@ -32,8 +34,24 @@
     </ul>
 </footer>
 <?php endif; ?>
-<?php if (! $this->_tpl_vars['notShowWeixinShare'] && ! $this->_tpl_vars['weixinShare']['notAllow']): ?>
 <script type="text/javascript">
+function toast(content, url)
+{
+    var e = $(".toast");
+    e.html(content).show();
+    var func = function(url)
+    {
+        e.hide();
+        if (url == 1) {
+            return;
+        } else if (url) {
+            location.href = url;
+        } else {
+            location.reload();
+        }
+    };
+    setTimeout(function(){func(url)}, 1000);
+}
 
 function checkApp() {
     var u = navigator.userAgent.toLowerCase();
@@ -78,48 +96,48 @@ function buy_button()
     }
 }
 
-$(function()
+function yaoqing()
 {
-    buy_button();  
-})
-
-/*
-function share_ios(title, url, img, content) {
-    window.location = 'myscheme://share_title/' + title + '/share_url/' + url + '/share_img/' + img + '/share_content/' + content;
+    if ($(".yaoqing").length) {
+        var app = checkApp();
+        if (app) {
+            $(".yaoqing").addClass('share_button');
+        } else {
+            $(".yaoqing").removeClass('share_button');
+            $(".yaoqing").click(function()
+            {
+                toast('点击右上角,分享邀请好友为你加油!', 1);
+            });
+        }
+    }
 }
 
-function share_android(title, url, img, content) {
-    window.AndroidBridge.openShare(title, url, img, content);
-}
-*/
+</script>
+<?php if (! $this->_tpl_vars['notShowWeixinShare'] && ! $this->_tpl_vars['weixinShare']['notAllow']): ?>
+<script type="text/javascript">
 
 var URL = window.location.href, site;
 site = 1;
+console.log(share_url);
 
-<?php if ($this->_tpl_vars['weixinShare']['weixinShare_title']): ?>
 new brickjs.MShare({
     website : 'sg',
     site: site,
     catalog: "",
-    sUrl: "<?php echo $this->_tpl_vars['web_cfg']['url']; ?>
-", //分享地址
-    title: "<?php echo $this->_tpl_vars['weixinShare']['title']; ?>
-",
-    imgUrl: "<?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
-",
+    sUrl: share_url, //分享地址
+    title: share_title,
+    imgUrl: share_img,
     imgWidth: "640",
     imgHeight: "640",
     source_id : 1,
     source_table : 'onepage',
-    desc: "<?php echo $this->_tpl_vars['weixinShare']['content']; ?>
-",
+    desc: share_content,
     appKey: {
         tsina: "2412621184"
     },
     ralateUid: '1658402750',
     wxGuide: {
-        imgUrl: '<?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
-',
+        imgUrl: share_img,
         width: 100,
         height: 100,
         style: {
@@ -129,85 +147,28 @@ new brickjs.MShare({
     }
 });
 
-$(function()
+function init()
 {
+    yaoqing();
+    buy_button();
     if ($('.share_button').length) {
-        share_button($('.share_button'), '<?php echo $this->_tpl_vars['weixinShare']['title']; ?>
-', '<?php echo $this->_tpl_vars['web_cfg']['url']; ?>
-', '<?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
-', '<?php echo $this->_tpl_vars['weixinShare']['content']; ?>
-');
+        share_button($('.share_button'), share_title, share_url, share_img, share_content);
     }
 
     if (checkApp()) {
         if ($('.bottom_share').length) {
             $('.bottom_follow').hide();
-            share_button($('.bottom_share'), '<?php echo $this->_tpl_vars['weixinShare']['title']; ?>
-', '<?php echo $this->_tpl_vars['web_cfg']['url']; ?>
-', '<?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
-', '<?php echo $this->_tpl_vars['weixinShare']['content']; ?>
-');
+            share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
         }
     }
-})
-
-
-<?php else: ?>
+}
 
-var url = '<?php if ($this->_tpl_vars['weixinShare']['jump_url']): ?><?php echo $this->_tpl_vars['weixinShare']['jump_url']; ?>
-<?php else: ?><?php echo $this->_tpl_vars['web_cfg']['url']; ?>
-<?php endif; ?>';
-var title = '<?php if ($this->_tpl_vars['weixinShare']['title']): ?><?php echo $this->_tpl_vars['weixinShare']['title']; ?>
-<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_title']; ?>
-<?php endif; ?>';
-var img = '<?php if ($this->_tpl_vars['weixinShare']['imgUrl']): ?><?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
-<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_img_url']; ?>
-<?php endif; ?>';
-var content = '<?php if ($this->_tpl_vars['weixinShare']['content']): ?><?php echo $this->_tpl_vars['weixinShare']['content']; ?>
-<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_content']; ?>
-<?php endif; ?>';
 
 $(function()
 {
-    if ($('.share_button').length) {
-        share_button($('.share_button'), title, url, img, content);
-    }
-
-    if (checkApp()) {
-        if ($('.bottom_share').length) {
-            $('.bottom_follow').hide();
-            share_button($('.bottom_share'), title, url, img, content);
-        }
-    }
-});
+    init();
+})
 
-new brickjs.MShare({
-    website : 'sg',
-    site: site,
-    catalog: "",
-    sUrl: url, //分享地址
-    title: title,
-    imgUrl: img,
-    imgWidth: "640",
-    imgHeight: "640",
-    source_id : 1,
-    source_table : 'onepage',
-    desc: content,
-    appKey: {
-        tsina: "2412621184"
-    },
-    ralateUid: '1658402750',
-    wxGuide: {
-        imgUrl: img,
-        width: 100,
-        height: 100,
-        style: {
-            right: 0,
-            top: 0
-        }
-    }
-});
-<?php endif; ?>
 </script>
 <?php else: ?>
 <script>
@@ -216,8 +177,10 @@ wx.hideOptionMenu();
 </script>
 <?php endif; ?>
 
+<?php if (! $this->_tpl_vars['js']): ?>
 <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
 /haili/js/global.js"></script>
+<?php endif; ?>
 
 </body>
 </html>

+ 31 - 1
tm/compile_dir/%%71^714^714F4B17%%header.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 20:02:25
+<?php /* Smarty version 2.6.17, created on 2018-05-28 11:00:29
          compiled from header.html */ ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
@@ -55,7 +55,37 @@
         , url: '<?php echo $this->_tpl_vars['web_cfg']['url']; ?>
 '
     };
+
+
+	<?php if ($this->_tpl_vars['weixinShare']['weixinShare_title']): ?>
+	var share_url = "<?php echo $this->_tpl_vars['web_cfg']['url']; ?>
+";
+	var share_title = "<?php echo $this->_tpl_vars['weixinShare']['title']; ?>
+";
+	var share_img = "<?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
+";
+	var share_content = "<?php echo $this->_tpl_vars['weixinShare']['content']; ?>
+";
+
+	<?php else: ?>
+
+	var share_url = '<?php if ($this->_tpl_vars['weixinShare']['jump_url']): ?><?php echo $this->_tpl_vars['weixinShare']['jump_url']; ?>
+<?php else: ?><?php echo $this->_tpl_vars['web_cfg']['url']; ?>
+<?php endif; ?>';
+	var share_title = '<?php if ($this->_tpl_vars['weixinShare']['title']): ?><?php echo $this->_tpl_vars['weixinShare']['title']; ?>
+<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_title']; ?>
+<?php endif; ?>';
+	var share_img = '<?php if ($this->_tpl_vars['weixinShare']['imgUrl']): ?><?php echo $this->_tpl_vars['weixinShare']['imgUrl']; ?>
+<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_img_url']; ?>
+<?php endif; ?>';
+	var share_content = '<?php if ($this->_tpl_vars['weixinShare']['content']): ?><?php echo $this->_tpl_vars['weixinShare']['content']; ?>
+<?php else: ?><?php echo $this->_tpl_vars['platform']['weixinShare_content']; ?>
+<?php endif; ?>';
+
+	<?php endif; ?>
+
 </script>
+
 <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
 /public/share/zepto.min.js"></script>
 <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>

+ 12 - 52
tm/compile_dir/%%73^73D^73D43E79%%events_code.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-04-25 15:04:00
+<?php /* Smarty version 2.6.17, created on 2018-05-28 13:42:06
          compiled from events_code.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -12,59 +12,18 @@ $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
 
-
-<div class="wrapper clear">
-    <div class="article_title center"><?php echo $this->_tpl_vars['codeInfo']['events_name']; ?>
-</div>
-	<!--公用活动说明样式-->
-    <div class="article_content">
-    	<?php echo $this->_tpl_vars['codeInfo']['events_tips']; ?>
-
-    </div>
-    <div class="v_box_w clear">
-        <?php if (! $this->_tpl_vars['eventsStatus']): ?>
-        <?php if ($this->_tpl_vars['codeInfo']['events_hd_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['codeInfo']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "event_forms_template.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php else: ?>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<?php echo $this->_tpl_vars['listUrl']; ?>
-" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <?php endif; ?>
-
-        <?php if ($this->_tpl_vars['codeInfo']['share_button'] == 2): ?>
-        	<?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "share_button.html", 'smarty_include_vars' => array()));
+
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-	    <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['codeInfo']['operationt_tips']): ?>
-        <div class="h3_title"><span><?php echo $this->_tpl_vars['codeInfo']['operationt_tips']; ?>
-</span></div>
-        <?php endif; ?>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <?php echo $this->_tpl_vars['codeInfo']['events_rules']; ?>
-
-        </div>
-        
-        <div class="clear"></div>
-    </div>
-    
-    
-    
-</div>
+
 
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
@@ -124,10 +83,10 @@ KISSY.use('node, io', function (S, Node, IO) {
 		$('.tips_msg').html('<i class="fa fa-spinner fa-pulse"></i>');
 		$('#msg_tips_box, .a_cover').fadeIn();
 	}
-	
+
 	$('#common_submit_btn').on('click', function () {
 		IO.on("send",function(){
-			showLoading();
+			//showLoading();
 		});
 		
 		IO.on("complete",function(){
@@ -148,14 +107,15 @@ KISSY.use('node, io', function (S, Node, IO) {
 					$(".v_tips_box2").fadeIn();
 				} else {
 					if(data.msg.url){
-						$(".tips_msg").html('本活需登录后才可以参与');
+						$(".tips_msg").html('本活需登录后才可以参与');
 						$('#msg_tips_box').fadeIn();
 						goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
 ';
 						setInterval("go_page();",seconds);
 						return ;
 					}
-					showMsg(data.msg);
+					//showMsg(data.msg);
+					toast(data.msg, 1);
 					return ;
 					
 				}

+ 1 - 1
tm/compile_dir/%%77^774^774BE9C9%%index.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-27 17:43:06
+<?php /* Smarty version 2.6.17, created on 2018-05-28 15:02:00
          compiled from index.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));

+ 8 - 52
tm/compile_dir/%%80^804^80487B52%%events_survey.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-04-25 15:06:56
+<?php /* Smarty version 2.6.17, created on 2018-05-28 14:26:39
          compiled from events_survey.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -14,61 +14,17 @@ $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
 
-<!---->
-<div class="wrapper clear">    
-    <div class="v_hd_title clear">
-        <div class="article_title center"><?php echo $this->_tpl_vars['surveyInfo']['events_name']; ?>
-</div>            
-        <div class="article_content"><?php echo $this->_tpl_vars['surveyInfo']['events_tips']; ?>
-</div>
-        <div class="ac_btn_box center"><a class="submit_btn_style">参与问卷</a></div>
-    </div>
-    
-    <div class="v_box_w clear">
-        <?php if ($this->_tpl_vars['surveyInfo']['events_hd_tips']): ?>
-            <div class="h3_title"><?php echo $this->_tpl_vars['surveyInfo']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        <div class="pro_list_box pro_list_survey">
-        	<?php $_from = $this->_tpl_vars['surveyInfo']['survery_prize']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['survery'] = array('total' => count($_from), 'iteration' => 0);
-if ($this->_foreach['survery']['total'] > 0):
-    foreach ($_from as $this->_tpl_vars['data']):
-        $this->_foreach['survery']['iteration']++;
-?>
-        	<dl>
-            	<dt><img src="<?php echo $this->_tpl_vars['data']['img_url']; ?>
-"></dt>
-                <dd>
-                	<p class="pro_name"><?php echo $this->_tpl_vars['data']['name']; ?>
-</p>
-                    <p class="pro_num"><?php echo $this->_tpl_vars['data']['num']; ?>
-<?php echo $this->_tpl_vars['data']['unit_name']; ?>
-</p>
-                </dd>
-            </dl>
-            <?php endforeach; endif; unset($_from); ?>
-        </div>
-
-        <?php if ($this->_tpl_vars['surveyInfo']['share_button'] == 2): ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "share_button.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['surveyInfo']['operationt_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['surveyInfo']['operationt_tips']; ?>
-</div>
-        <?php endif; ?>
-        <div class="article_content"><?php echo $this->_tpl_vars['surveyInfo']['events_rules']; ?>
-</div>
-        
-    </div>
-    
-    
-</div>
 
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
+$this->_tpl_vars = $_smarty_tpl_vars;
+unset($_smarty_tpl_vars);
+ ?>
 
 <script type="text/javascript">
 KISSY.use('node, cookie', function (S, Node, Cookie) {

+ 8 - 93
tm/compile_dir/%%9F^9F5^9F50A076%%events_turntable.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 22:13:02
+<?php /* Smarty version 2.6.17, created on 2018-05-28 12:10:52
          compiled from events_turntable.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -18,102 +18,17 @@ $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
 
-<div class="wrapper clear">    
-    
-    
-    <div class="v_hd_title clear">
-        <div class="article_title center"><?php echo $this->_tpl_vars['turntableData']['events']['events_name']; ?>
-</div>
-        
-        <!--抽奖活动内容 begin-->
-        <?php if (! $this->_tpl_vars['eventsStatus']): ?>
-        <div class="luck_show" id="luck_show">        
-            <div class="article_content"><?php echo $this->_tpl_vars['turntableData']['events']['events_tips']; ?>
-</div>
-            <div class="ac_btn_box center"><a class="submit_btn_style" id="award_btn">开始抽奖</a></div>
-        </div>
-        <?php endif; ?>
-        <!--抽奖活动内容 end-->
-        
-        <!--活动已结束提示 begin-->
-        <?php if ($this->_tpl_vars['eventsStatus']): ?>
-        <div class="luck_result luck_end_tips">
-            <div><img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
-/public/static/img/error_icon.png"></div>
-            <div>活动已结束!</div>
-        </div>
-        <?php endif; ?>
-        <!--活动已结束提示 end-->
-        
-        <!--抽奖loading begin-->
-        <div class="luck_loading" id="luck_loading">
-            <div class="luck_load_icon">
-                <div class="loading_img"></div>
-            </div>
-        </div>
-        <!--抽奖loading end-->
-        
-        <!--抽奖结果 begin-->
-        <div class="luck_result" id="luck_result">
-            <div><img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
-/public/static/img/error_icon.png"></div>
-            <div>未中奖,感谢参与</div>
-        </div>
-        <!--抽奖结果 end-->
-    </div>
-    
-    <div class="v_box_w clear">
-    	<?php if ($this->_tpl_vars['turntableData']['events']['events_hd_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['turntableData']['events']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        
-        <div class="pro_list_box">
-        	<?php $_from = $this->_tpl_vars['turntableData']['prize']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['turntable'] = array('total' => count($_from), 'iteration' => 0);
-if ($this->_foreach['turntable']['total'] > 0):
-    foreach ($_from as $this->_tpl_vars['prize']):
-        $this->_foreach['turntable']['iteration']++;
-?>
-        	<?php if ($this->_tpl_vars['prize']['display'] == 1): ?>
-        	<dl>
-            	<dt>
-                    <img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
-/public/static/img/item_img.jpg">
-                    <p class="img_cover" style="background-image:url(<?php echo $this->_tpl_vars['prize']['img_url']; ?>
-);"></p>
-                </dt>
-                <dd>
-                	<p class="pro_name"><?php echo $this->_tpl_vars['prize']['prize_name']; ?>
-</p>
-                	<p class="pro_num"><?php echo $this->_tpl_vars['prize']['prize_num']; ?>
-份</p>
-                </dd>
-            </dl>
-            <?php endif; ?>
-            <?php endforeach; endif; unset($_from); ?>
-        </div>
-
-        <?php if ($this->_tpl_vars['turntableData']['events']['share_button'] == 2): ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "share_button.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['turntableData']['events']['operationt_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['turntableData']['events']['operationt_tips']; ?>
-</div>
-        <?php endif; ?>
-        <div class="activity_des">            
-            <?php echo $this->_tpl_vars['turntableData']['events']['events_rules']; ?>
 
-        </div>
-        
-    </div>
-    
-</div>
-<!---->
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
+$this->_tpl_vars = $_smarty_tpl_vars;
+unset($_smarty_tpl_vars);
+ ?>
 
 
 <!--遮罩层-->

+ 7 - 4
tm/compile_dir/%%A0^A01^A01AF397%%events_try.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-27 21:25:38
+<?php /* Smarty version 2.6.17, created on 2018-05-28 11:46:16
          compiled from events_try.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -103,6 +103,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 		$(".v_tips_box,.a_cover").hide();
 	});
 	
+	/*
 	IO.on("send",function(){
 		//$(".a_cover").css("opacity", 0);
 		showErrorMsg('<i class="fa fa-spinner fa-pulse"></i>');
@@ -113,6 +114,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 	IO.on("complete",function(){
 		//$("#error_tips_box").fadeOut();
 	});
+	*/
 	
 	$('#common_submit_btn').on('click', function () {
 		var formData = IO.serialize('#ff');
@@ -122,15 +124,16 @@ KISSY.use('node, io', function (S, Node, IO) {
 			, formData
 			, function (data) {
 				if (data.ok) {
-					showOkMsg();
+					//showOkMsg();
+					toast('提交成功,请等待管理员审核');
 				} else {
 					if(data.msg.url){
 						goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
 ';
-						showErrorMsgGoPage('本活需登录后才可以参与');
+						showErrorMsgGoPage('本活需登录后才可以参与');
 						return;
 					}
-					showErrorMsg(data.msg);
+					toast(data.msg, 1);
 				}
 			}
 			, 'json'

+ 4 - 2
tm/compile_dir/%%A1^A1B^A1B92DB5%%user_participate_log.html.php

@@ -1,7 +1,7 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 19:57:17
+<?php /* Smarty version 2.6.17, created on 2018-05-28 12:14:07
          compiled from admin/activity/user_participate_log.html */ ?>
 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
-smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_log.html', 81, false),)), $this); ?>
+smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_log.html', 83, false),)), $this); ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
@@ -70,9 +70,11 @@ unset($_smarty_tpl_vars);
 	<?php endif; ?>
 	<?php endif; ?>
 
+	<?php if ($this->_tpl_vars['eventData']['type'] == 4): ?>
 	<a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
 /?c=Admin_Activity_UserHelp&a=PageList&events_id=<?php echo $this->_tpl_vars['eventData']['id']; ?>
 ">助力排行</a> &nbsp;
+	<?php endif; ?>
 	
 	<?php if ($this->_tpl_vars['download_url']): ?>
 	<a href="<?php echo $this->_tpl_vars['download_url']; ?>

+ 4 - 2
tm/compile_dir/%%C3^C33^C3389195%%user_participate_form.html.php

@@ -1,7 +1,7 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 19:57:23
+<?php /* Smarty version 2.6.17, created on 2018-05-28 12:14:16
          compiled from admin/activity/user_participate_form.html */ ?>
 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
-smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_form.html', 76, false),)), $this); ?>
+smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_form.html', 78, false),)), $this); ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
@@ -65,9 +65,11 @@ unset($_smarty_tpl_vars);
 	<?php endif; ?>
 	<?php endif; ?>
 
+	<?php if ($this->_tpl_vars['eventData']['type'] == 4): ?>
 	<a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
 /?c=Admin_Activity_UserHelp&a=PageList&events_id=<?php echo $this->_tpl_vars['eventData']['id']; ?>
 ">助力排行</a> &nbsp;
+	<?php endif; ?>
 	
 	<?php if ($this->_tpl_vars['download_url']): ?>
 	<a href="<?php echo $this->_tpl_vars['download_url']; ?>

+ 4 - 2
tm/compile_dir/%%C4^C4B^C4B7643A%%user_participate_win.html.php

@@ -1,7 +1,7 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 19:57:28
+<?php /* Smarty version 2.6.17, created on 2018-05-28 12:14:08
          compiled from admin/activity/user_participate_win.html */ ?>
 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
-smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_win.html', 73, false),)), $this); ?>
+smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'admin/activity/user_participate_win.html', 75, false),)), $this); ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
@@ -65,9 +65,11 @@ unset($_smarty_tpl_vars);
 &action=win">中奖</a> &nbsp;
 	<?php endif; ?>
 
+	<?php if ($this->_tpl_vars['eventData']['type'] == 4): ?>
 	<a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
 /?c=Admin_Activity_UserHelp&a=PageList&events_id=<?php echo $this->_tpl_vars['eventData']['id']; ?>
 ">助力排行</a> &nbsp;
+	<?php endif; ?>
 	
 	<?php if ($this->_tpl_vars['download_url']): ?>
 	<a href="<?php echo $this->_tpl_vars['download_url']; ?>

+ 13 - 50
tm/compile_dir/%%F1^F1B^F1BAA341%%events_invitation.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-05-26 22:13:42
+<?php /* Smarty version 2.6.17, created on 2018-05-28 13:08:47
          compiled from events_invitation.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -13,60 +13,19 @@ $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
 
-<!---->
-<div class="wrapper clear">
-	<div class="article_title center"><?php echo $this->_tpl_vars['info']['events_name']; ?>
-</div>
-    <!--公用活动说明样式-->
-    <div class="article_content">
-    	<?php echo $this->_tpl_vars['info']['events_tips']; ?>
-
-    </div>
-    
-    
-    <div class="v_box_w clear">
-    
-        <?php if (! $this->_tpl_vars['eventsStatus']): ?>
-        <?php if ($this->_tpl_vars['info']['events_hd_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['info']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "event_forms_template.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php else: ?>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<?php echo $this->_tpl_vars['listUrl']; ?>
-" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <?php endif; ?>
 
-        <?php if ($this->_tpl_vars['info']['share_button'] == 2): ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "share_button.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['info']['operationt_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['info']['operationt_tips']; ?>
-</div>
-        <?php endif; ?>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <?php echo $this->_tpl_vars['info']['events_rules']; ?>
-
-        </div>
-        
-        <div class="clear"></div>
-	</div>
-</div>
 
+<!---->
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
 
@@ -127,7 +86,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 	
 	IO.on("send",function(){
 		//$(".a_cover").css("opacity", 0);
-		showTipsBox('<i class="fa fa-spinner fa-pulse"></i>', true);
+		//showTipsBox('<i class="fa fa-spinner fa-pulse"></i>', true);
 	});
 	
 	
@@ -144,6 +103,8 @@ KISSY.use('node, io', function (S, Node, IO) {
 			, formData
 			, function (data) {
 				if (data.ok) {
+					toast('提交成功,请等待管理员审核', 1);
+					return;
 					var formsId = data.msg;
 					location.href = "<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
 /?c=EventsInvitation&a=Qrcode&events_id=<?php echo $this->_tpl_vars['info']['id']; ?>
@@ -152,10 +113,12 @@ KISSY.use('node, io', function (S, Node, IO) {
 					if(data.msg.url){
 						goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
 ';
-						showTipsBox('本活需登录后才可以参与');
+						//showTipsBox('本活需登录后才可以参与');
+						toast('本活动需登录后才可以参与', 1);
 						return false;
 					}
-					showTipsBox(data.msg);
+					//showTipsBox(data.msg);
+					toast(data.msg, 1)
 				}
 			}
 			, 'json'

+ 13 - 141
tm/compile_dir/%%F2^F25^F25DA589%%events_vote.html.php

@@ -1,4 +1,4 @@
-<?php /* Smarty version 2.6.17, created on 2018-04-25 15:07:22
+<?php /* Smarty version 2.6.17, created on 2018-05-28 14:57:36
          compiled from events_vote.html */ ?>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
 $this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
@@ -13,147 +13,17 @@ $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
 
-<!---->
-<div class="wrapper" data-total-vote-num="<?php echo $this->_tpl_vars['voteInfo']['total_vote_num']; ?>
-">
-    
-    
-    <div class="article_title center"><?php echo $this->_tpl_vars['voteInfo']['events_name']; ?>
-</div>
-    <!--公用活动说明样式-->
-    <div class="article_content"><?php echo $this->_tpl_vars['voteInfo']['events_tips']; ?>
-</div>
-    
-    
-    
-    <div class="v_box_w clear">
-    
-        <?php if ($this->_tpl_vars['eventsStatus'] && $this->_tpl_vars['eventsStatus'] != 'STATUS_LIMITATIONS'): ?>
-        <?php if ($this->_tpl_vars['voteInfo']['events_hd_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['voteInfo']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<?php echo $this->_tpl_vars['listUrl']; ?>
-" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['voteInfo']['events_hd_tips']): ?>
-        <div class="h3_title"><?php echo $this->_tpl_vars['voteInfo']['events_hd_tips']; ?>
-</div>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['voteInfo']['vote_type'] == 1): ?>
-       
-        <!--<div class="vote_show_box2" id="vote_show_box2">
-            <?php $_from = $this->_tpl_vars['voteInfo']['vote']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
-    foreach ($_from as $this->_tpl_vars['vote']):
-?>
-            <div class="radio_cell" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-">
-            <label for="radio-2-<?php echo $this->_tpl_vars['vote']['id']; ?>
-" class="lable_div" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-" >
-                <div class="data_cell_box vote_box" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-" >
-                    <p class="dv_title dv_title_default"><?php echo $this->_tpl_vars['vote']['title']; ?>
-</p>
-                    <?php $this->assign('total_num', $this->_tpl_vars['vote']['num']+$this->_tpl_vars['vote']['add_num']); ?>
-                    <p class="data_show_cell"><em style="width:0px;" data-num="<?php echo $this->_tpl_vars['total_num']; ?>
-"></em><b><?php echo $this->_tpl_vars['vote']['per_num']; ?>
-%</b></p>
-                </div>
-            </label>
-            </div>
-            <?php endforeach; endif; unset($_from); ?>
-        </div>-->
-        
-        <div class="vote_txt_box clear">
-        	<?php $_from = $this->_tpl_vars['voteInfo']['vote']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['votebox'] = array('total' => count($_from), 'iteration' => 0);
-if ($this->_foreach['votebox']['total'] > 0):
-    foreach ($_from as $this->_tpl_vars['vote']):
-        $this->_foreach['votebox']['iteration']++;
-?>
-            <div class="radio_cell" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-">
-                <label for="radio-2-<?php echo $this->_tpl_vars['vote']['id']; ?>
-" class="lable_div" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-" >
-                <div class="vt_cell vote_box" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-">
-                    <div class="vt_index"><span class="vt_num"><em><?php echo $this->_foreach['votebox']['iteration']; ?>
-</em></span></div>
-                    <div class="vt_title"><span><?php echo $this->_tpl_vars['vote']['title']; ?>
-</span></div>
-                    <?php $this->assign('total_num', $this->_tpl_vars['vote']['num']+$this->_tpl_vars['vote']['add_num']); ?>
-                    <p class="data_show_cell vt_total_bg"><em style="width:0px;" class="vt_total_line bg_color" data-num="<?php echo $this->_tpl_vars['total_num']; ?>
-"></em></p>
-                    <div class="vt_total_num font_color"><?php echo $this->_tpl_vars['vote']['per_num']; ?>
-%</div>
-                </div>
-                </label>
-            </div>
-            <?php endforeach; endif; unset($_from); ?>
-        </div>
-        
-        
-        <?php else: ?>
-        <div class="vote_show_box">
-            <div class="vote_cell_row clear">
-            	<div class="vote_item_show clear">
-                    <?php $_from = $this->_tpl_vars['voteInfo']['vote']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
-    foreach ($_from as $this->_tpl_vars['vote']):
-?>
-                    <dl class="vote_item">
-                        <dt>
-                            <img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
-/public/static/img/vote_img_bg.jpg">
-                            <div class="vote_img_thumb" style="background-image:url(<?php echo $this->_tpl_vars['vote']['img_url']; ?>
-);"></div>
-                            <?php $this->assign('total_num', $this->_tpl_vars['vote']['num']+$this->_tpl_vars['vote']['add_num']); ?>
-                            <div class="vote_btn bg_color" data-voteid="<?php echo $this->_tpl_vars['vote']['id']; ?>
-" data-num="<?php echo $this->_tpl_vars['total_num']; ?>
-"><span <?php if ($this->_tpl_vars['eventsStatus'] == 'STATUS_LIMITATIONS' || $this->_tpl_vars['eventsStatus'] == 'STATUS_HAS_END'): ?>class="h_selected" <?php endif; ?>></span><p class="total_num_show"><?php echo $this->_tpl_vars['total_num']; ?>
-</p></div>
-                        </dt>
-                        <dd>
-                            <p class="vote_name"><?php echo $this->_tpl_vars['vote']['title']; ?>
-</p>
-                        </dd>
-                    </dl>
-                    <?php endforeach; endif; unset($_from); ?>
-                </div>
-            </div>
-        </div>
-        <?php endif; ?>
-
-        <?php if ($this->_tpl_vars['voteInfo']['share_button'] == 2): ?>
-        <?php $_smarty_tpl_vars = $this->_tpl_vars;
-$this->_smarty_include(array('smarty_include_tpl_file' => "share_button.html", 'smarty_include_vars' => array()));
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
 $this->_tpl_vars = $_smarty_tpl_vars;
 unset($_smarty_tpl_vars);
  ?>
-        <?php endif; ?>
-        
-        <?php if ($this->_tpl_vars['voteInfo']['operationt_tips']): ?>
-        <div class="h3_title"><span><?php echo $this->_tpl_vars['voteInfo']['operationt_tips']; ?>
-</span></div>
-        <?php endif; ?>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <?php echo $this->_tpl_vars['voteInfo']['events_rules']; ?>
 
-        </div>
-        
-        <div class="clear"></div>
-        
-    </div>
-    
-       
-</div>
+<?php $_smarty_tpl_vars = $this->_tpl_vars;
+$this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
+$this->_tpl_vars = $_smarty_tpl_vars;
+unset($_smarty_tpl_vars);
+ ?>
 
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
@@ -168,6 +38,8 @@ unset($_smarty_tpl_vars);
 <script>
 var seconds = 1000;
 var goUrl = '';
+var config_total_vote_num = '<?php echo $this->_tpl_vars['voteInfo']['total_vote_num']; ?>
+';
 function go_page(){
 	location.href = goUrl;
 }
@@ -218,7 +90,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 		
 		var _self = $(this);
 		var voteid = $(this).data('voteid');
-		var total_vote_num = $('.wrapper').attr('data-total-vote-num');
+		var total_vote_num = config_total_vote_num;
 		if (!voteid) {
 			return false
 		}
@@ -241,7 +113,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 						var addNum = _self.find('em').data('num') + 1;
 						_self.find('em').data('num', addNum);
 						total_vote_num = Number(total_vote_num) + 1;
-						$('.wrapper').attr('data-total-vote-num', total_vote_num);
+						config_total_vote_num = total_vote_num;
 						refreshVoteBox(true);
 					});
 				} else {
@@ -349,7 +221,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 			total += num;
 		});
 		
-		var total_vote_num = $('.wrapper').attr('data-total-vote-num');
+		var total_vote_num = config_total_vote_num;
 		
 		$(".data_show_cell").fadeIn();
 		$(".data_show_cell em").each(function (i) {

+ 4 - 0
tm/lib/Controller/Admin/Activity/UserHelp.class.php

@@ -80,6 +80,9 @@ class UserHelp  extends Controller {
 		$helpData = $this->objLotteryUserHelp->gets ( $ids );
 
 		// 分页
+
+		$this->objLotteryUserHelpLog = new LotteryUserHelpLog ();
+
 		$url_tpl = Request::url();
 		$url_tpl .= "&page={page}";
 		$objPage = new Page ( $total_num, $url_tpl, $page, $size );
@@ -88,6 +91,7 @@ class UserHelp  extends Controller {
 		$uids = array ();
 		foreach ( $helpData as $key => $data ) {
 			$uids [$data ['uid']] = $data ['uid'];
+			//$helpData[$key]['num'] = $this->objLotteryUserHelpLog->totals(array('help_id' => $data['id']));
 		}
 		
 		# 通过UIDs 获取用户信息

+ 2 - 2
tm/lib/Controller/Admin/Controller.class.php

@@ -92,7 +92,7 @@ class Controller extends \KIF\Core\PermissionController {
 				)
 		);
 
-		if (in_array($type, array(4,6))) {
+		if (in_array($type, array(4))) {
 			$config['FeedBack'] = array (
 					'name' => '用户反馈' 
 			);
@@ -151,7 +151,7 @@ class Controller extends \KIF\Core\PermissionController {
 		
 		$type = $eventData ['type'];
 
-		if (in_array($type, array(4,6))) {
+		if (in_array($type, array(4))) {
 			$navArr['FeedBack'] = array (
 					'show' => true,
 					'url' => $hostUrl . "/?c=Admin_Activity_FeedBack&a=PageList&events_id={$event_id}",

+ 1 - 0
tm/lib/Controller/EventsArticle.class.php

@@ -94,6 +94,7 @@ class EventsArticle extends EventsController {
 		
 		$this->tpl = 'events_article';
 		$this->setOutput('title', $articleInfo['weixinShare']['title'] ? $articleInfo['weixinShare']['title'] : $articleInfo['events_name']);
+		$this->setOutput('display', $articleInfo['list_display']);
 		$this->setOutput('article', $articleInfo);
 		$this->setOutput('weixinShare', $articleInfo['weixinShare']);
 		$this->setOutput('likes', $likes);

+ 2 - 1
tm/lib/Controller/EventsCode.class.php

@@ -71,7 +71,8 @@ class EventsCode extends EventsController {
 		} elseif ($codeInfo['display'] == \Cas\Dao\LotteryEvents::EVENT_DISPLAY_HIDE) {
 			//$eventsStatus = 'STATUS_HIDE'; //先注释了。此隐藏 之印象
 		}
-		
+
+		$this->info($codeInfo);
 		# 记录PV UV日志 访问
 		$objCount = new Count();
 		$objCount->setPassLog( $events_id,$plat_form_id);

+ 91 - 43
tm/lib/Controller/EventsController.class.php

@@ -99,6 +99,7 @@ class EventsController extends Controller {
 		$objUserData = new UserInfo();
 		$uid = $this->getRunTimeUid();
 		$userData = $objUserData -> get($uid);
+		$userData['headimgurl'] = $this->getUserHead($userData);
 		$this->setOutput('uid', $uid);
 		$this->setOutput('userInfo', $userData);
 
@@ -107,19 +108,16 @@ class EventsController extends Controller {
 			$source_user = $uid;
 		}
 		$this->setOutput('source_user', $source_user);
-		$userData = $objUserData -> get($source_user);
-		if (isset($userData['headimgurl']) && $userData['headimgurl']) {
+		if ($source_user != $uid) {
+			$userData = $objUserData -> get($source_user);
 
-		} else {
-			$userData['headimgurl'] = 'http://news.mydrivers.com/Img/20110518/04481549.png';
-		}
+			$userData['headimgurl'] = $this->getUserHead($userData);
 
-		if (isset($userData['nickname']) && $userData['nickname']) {
-
-		} else {
-			$userData['nickname'] = '福利社网友';
+			if (!$userData['nickname']) {
+				$userData['nickname'] = '福利社网友';
+			}
+			$this->setOutput('userSourceInfo', $userData);
 		}
-		$this->setOutput('userSourceInfo', $userData);
 
 		$info['end'] = 1; //未过期
 		if ($TIME > $info['end_time']) {
@@ -146,7 +144,7 @@ class EventsController extends Controller {
 		}
 
 		# 如果是试用,判断评价
-		$condition = array('audit' => 2, 'uid' => $uid,'scratch_receive' => LotteryData::EVENT_SCRATCH_RECEIVE_TRUE);
+		$condition = array('events_id' => $info['id'],'audit' => 2, 'uid' => $uid,'scratch_receive' => LotteryData::EVENT_SCRATCH_RECEIVE_TRUE);
 		$offset = 0;
 		$size = 1;
 		$order = 'id desc';
@@ -200,32 +198,7 @@ class EventsController extends Controller {
 
 		if ($type == 'share') {
 			# 分享
-			$condition = array (
-				'events_id' => $events_id,
-				'uid' => $source_user,
-			);
-			$objLotteryUserHelp = new LotteryUserHelp();
-			$info = $objLotteryUserHelp->fetchOne ( $condition);
-			if (!$info) {
-				$id = $objLotteryUserHelp->add ( $condition);
-			} else {
-				$id = $info['id'];
-			}
-			if ($id) {
-				$objLotteryUserHelpLog = new LotteryUserHelpLog();
-
-				$condition = array (
-					'events_id' => $events_id,
-					'help_id' => $id,
-				);
-
-				$total_num = $objLotteryUserHelpLog->totals ( $condition );
-
-				$ids = $objLotteryUserHelpLog->findIdsBy ( $condition, '0,100000', 'id desc' );
-				$helpData = $objLotteryUserHelpLog->gets ( $ids );
-				$this->setOutput('helpData', $helpData);
-			}
-
+			$this->share($info, $plat_form_id, $source_user);
 		} elseif ($type == 'prize') {
 			# 获得福利
 			$this->prize($info, $plat_form_id, 10, false);
@@ -243,6 +216,62 @@ class EventsController extends Controller {
 		}
 	}
 
+	public function share($eventsData, $plat_form_id, $uid)
+	{
+		$events_id = $eventsData['id'];
+		$condition = array (
+			'events_id' => $events_id,
+			'uid' => $uid,
+		);
+		$objLotteryUserHelp = new LotteryUserHelp();
+		$info = $objLotteryUserHelp->fetchOne ( $condition);
+		if (!$info) {
+			$id = $objLotteryUserHelp->add ( $condition);
+		} else {
+			$id = $info['id'];
+		}
+		if ($id) {
+			$objLotteryUserHelpLog = new LotteryUserHelpLog();
+
+			$condition = array (
+				'events_id' => $events_id,
+				'help_id' => $id,
+			);
+
+			$total_num = $objLotteryUserHelpLog->totals ( $condition );
+
+			$ids = $objLotteryUserHelpLog->findIdsBy ( $condition, '0,50', 'id desc' );
+			$helpData = $objLotteryUserHelpLog->gets ( $ids );
+
+			if ($helpData) {
+				foreach ($helpData as $k => $v) {
+					$helpData[$k]['headimgurl'] = $this->getUserHead($v['uid']);
+				}
+			}
+
+			$session = $this->shareSession($id, $uid);
+			$this->setOutput('help_session', $session);
+			$this->setOutput('help_id', $id);
+			$this->setOutput('helpData', $helpData);
+			$this->setOutput('helpDataTotal', $total_num);
+		}
+	}
+
+	public function shareSession($id, $uid, $source_session = false)
+	{
+		$key = 'onepage2999';
+		$session = md5($id . '_' . $key . '_' . $uid);
+		if ($source_session) {
+			if ($source_session == $session) {
+				return true;
+			} else {
+				return false;
+			}
+		} else {
+			return $session;
+		}
+	}
+
 	public function feedback($eventsData, $plat_form_id, $limit = 10, $uid = false)
 	{
 		$objFeedBack = new LotteryUserFeedback ();
@@ -280,12 +309,16 @@ class EventsController extends Controller {
 
 	public function prize($eventsData, $plat_form_id, $limit = 10, $uid = false)
 	{
-		$condition = array('platform_id' => SqlHelper::addCompareOperator('&', $plat_form_id), 'scratch_receive' => LotteryData::EVENT_SCRATCH_RECEIVE_TRUE);
+		$condition = array('audit' => 2, 'platform_id' => SqlHelper::addCompareOperator('&', $plat_form_id), 'scratch_receive' => LotteryData::EVENT_SCRATCH_RECEIVE_TRUE);
 
+		if (isset($eventsData['id'])) {
+			$condition['events_id'] = $eventsData['id'];
+		}
 		if ($uid) {
 			$condition['uid'] = $uid;
 		}
 		$totals = $this->objMLottery -> getLotteryDataListNum($condition);
+
 		$page = Request::varGetInt ( 'page', 1 );
 		$size = $limit;
 		$offset = ($page - 1) * $size;
@@ -332,11 +365,8 @@ class EventsController extends Controller {
 			$data[$k]['user'] = array();
 			$data[$k]['user']['cdate'] = date('Y.m.d H:i', isset($v['winners_time']) ? $v['winners_time'] : $v['create_time']);
 			$data[$k]['user']['events'] = isset($eventsData['events_name']) ? $eventsData['events_name'] : $eventsData[$v['events_id']]['events_name'];
-			if (isset($users[$v['uid']]['headimgurl']) && $users[$v['uid']]['headimgurl']) {
-				$data[$k]['user']['headimgurl'] = $users[$v['uid']]['headimgurl'];
-			} else {
-				$data[$k]['user']['headimgurl'] = 'http://news.mydrivers.com/Img/20110518/04481549.png';
-			}
+
+			$data[$k]['user']['headimgurl'] = $this->getUserHead($users[$v['uid']]);
 
 			if (isset($v['express']['phone']) && $v['express']['phone']) {
 				$data[$k]['user']['mobile'] = substr_replace($v['express']['phone'],'****',3,4);
@@ -349,6 +379,24 @@ class EventsController extends Controller {
 
 		return $data;
 	}
+
+	/**
+	 * 获取头像
+	 */
+	public function getUserHead($user)
+	{
+		if (!is_array($user)) {
+			$objUserData = new UserInfo();
+			$user = $objUserData -> get($user);
+		}
+		if (isset($user['headimgurl']) && $user['headimgurl']) {
+			$result = $user['headimgurl'];
+		} else {
+			$result = 'http://news.mydrivers.com/Img/20110518/04481549.png';
+		}
+
+		return $result;
+	}
 	
 	/**
 	 * 判断当前用户是否已经登录

+ 3 - 2
tm/lib/Controller/EventsInvitation.class.php

@@ -76,7 +76,8 @@ class EventsInvitation extends EventsController {
 		} elseif ($info['display'] == \Cas\Dao\LotteryEvents::EVENT_DISPLAY_HIDE) {
 			//$eventsStatus = 'STATUS_HIDE'; //先注释了。此隐藏 之印象列表
 		}
-		
+
+		$this->info($info);
 		# 记录PV UV日志 访问
 		$objCount = new Count();
 		$objCount->setPassLog( $events_id,$plat_form_id);
@@ -91,7 +92,7 @@ class EventsInvitation extends EventsController {
 		$this->tpl = 'events_invitation';
 		$this->setOutput('display', $info['list_display']);
 		$this->setOutput('title', $info['weixinShare']['title'] ? $info['weixinShare']['title'] : $info['events_name']);
-		$this->setOutput('info', $info);
+		$this->setOutput('infos', $info);
 		$this->setOutput('forms', $info['forms']);
 		$this->setOutput('weixinShare', $info['weixinShare']);
 		$this->setOutput('eventsStatus', $eventsStatus);

+ 6 - 1
tm/lib/Controller/EventsScratch.class.php

@@ -75,14 +75,19 @@ class EventsScratch extends EventsController {
 		} elseif (!$objMLotteryEventsLimitations -> ckEventRestrictions($uid, Request::ip(), $events_id)){
 			$eventsStatus = 'STATUS_HAS_RESTRTICTIONS';
 		}
+
+		print_r($scratchData);die;
 		
-		
+		$this->info($scratchData);
+
 		# 记录PV UV日志 访问
 		$objCount = new Count();
 		$objCount->setPassLog( $events_id,$plat_form_id);
 		
 		$this->tpl = 'events_scratch';
 
+
+
 		$this->setOutput('display', $scratchData['events']['list_display']);
 		$this->setOutput('title', $scratchData['events']['weixinShare']['title'] ? $scratchData['events']['weixinShare']['title'] : $scratchData['events']['events_name']);
 		$this->setOutput('scratchData', $scratchData);

+ 5 - 1
tm/lib/Controller/EventsSurvey.class.php

@@ -99,6 +99,8 @@ class EventsSurvey extends EventsController {
 					self::redirect($loginUrl);
 				}
 		}
+
+		$this->info($surveyInfo);
 		
 		# 记录PV UV日志 访问
 		$objCount = new Count();
@@ -124,8 +126,10 @@ class EventsSurvey extends EventsController {
 		
 		if (Cookie::get('SURVEY_IS_UNDERWAY') >= 2) {
 			Cookie::set('SURVEY_IS_UNDERWAY', 1, null, $_SERVER['HTTP_HOST'], '/');
+			$this->setOutput('display', $surveyInfo['list_display']);
 			$this->tpl = 'events_survey_underway';
 		} else {
+			$this->setOutput('display', $surveyInfo['list_display']);
 			$this->tpl = 'events_survey';
 		}
 		
@@ -136,7 +140,7 @@ class EventsSurvey extends EventsController {
 			$surveyInfo['events_tips'] = str_replace($tmpMatch, $tmp_new_video_html, $surveyInfo['events_tips']);
 		}
 		
-		$this->setOutput('display', $surveyInfo['list_display']);
+		
 		$this->setOutput('eventsStatus', $eventsStatus);
 		$this->setOutput('title', $surveyInfo['weixinShare']['title'] ? $surveyInfo['weixinShare']['title'] : $surveyInfo['events_name']);
 		$this->setOutput('surveyInfo', $surveyInfo);

+ 2 - 0
tm/lib/Controller/EventsTurntable.class.php

@@ -108,6 +108,8 @@ class EventsTurntable extends EventsController {
 			}
 		}
 		
+		$this->info($turntableData['events']);
+		
 		# 记录PV UV日志 访问
 		$objCount = new Count();
 		$objCount->setPassLog( $events_id,$plat_form_id);

+ 2 - 0
tm/lib/Controller/EventsVote.class.php

@@ -91,6 +91,8 @@ class EventsVote extends EventsController {
 		foreach ($voteInfo['vote'] as $tmpkey => $tmpvote) {
 			$voteInfo['vote'][$tmpkey]['per_num'] = round(($tmpvote['num']+$tmpvote['add_num'])/$total_vote_num*100);
 		}
+
+		$this->info($voteInfo);
 		
 		# 记录PV UV日志 访问
 		$objCount = new Count();

+ 2 - 4
tm/lib/Controller/FeedBack.class.php

@@ -80,6 +80,7 @@ class FeedBack extends EventsController {
 		if ($r) {
 			$r = base64_decode($r);
 			$this->setOutput('refer', $r);
+			$this->setOutput('action', '');
 		}
 		$this->setOutput('display', 1);
 		$this->tpl = 'feedback';
@@ -127,7 +128,6 @@ class FeedBack extends EventsController {
 		}
 
 		$type = $eventData['type'];
-
 		if (!in_array($type, array(4,6))) {
 			self::ajax_fail_exit('无效类型');
 		}
@@ -156,14 +156,12 @@ class FeedBack extends EventsController {
 		$data['status'] = 1;
 		
 
-		$ids = $objLotteryUserFeedback->findIdsBy ( $data, 1, $order = ' id desc');
-		$info = $objLotteryUserFeedback->gets ( $ids );
+		$info = $objLotteryUserFeedback->fetchOne ( $data);
 
 		$data['content'] = Request::g('content');
 		$data['pic'] = Request::g('pic');
 
 		if ($info) {
-			$info = array_pop($info);
 
 			$tmpResult = $objLotteryUserFeedback->modify($data, array (
 				'id' => $info['id'] 

+ 8 - 1
tm/lib/Controller/Index.class.php

@@ -16,6 +16,13 @@ use Cas\Dao\Category;
  */
 class Index extends EventsController {
 	
+
+	public function doSetUser() {
+		$objUserData = new User();
+		$objUserData->setAvatar();
+
+		echo 'yes';
+	}
 	/**
 	 * 页面:默认新版首页
 	 */
@@ -46,7 +53,7 @@ class Index extends EventsController {
 		$uid = $this->getRunTimeUid();
 		$userData = $objUserData -> get($uid);
 		$this->setOutput('userData', $userData);
-		
+
 		# 获取焦点图
 		$order = 'begin_time desc';
 		$focusCondition = array(

+ 79 - 0
tm/lib/Controller/UserHelp.class.php

@@ -0,0 +1,79 @@
+<?php
+
+namespace Cas\Controller;
+
+use Cas\Module\Lottery;
+use Cas\Dao\LotteryUserHelp;
+use Cas\Dao\LotteryUserHelpLog;
+use KIF\Verify;
+use KIF\Core\Request;
+
+
+class UserHelp  extends EventsController {
+
+	public function doApply() {
+		
+		# 1.必要参数验证
+		$uid = $this->getRunTimeUid();
+		if (!Verify::unsignedInt($uid)) {
+			self::ajax_fail_exit('无效用户id');
+		}
+
+		$help_id = Request::g('help_id');
+		if (!Verify::unsignedInt($help_id)) {
+			self::ajax_fail_exit('无效试用id');
+		}
+
+		$source_user = Request::g('source_user');
+		if (!Verify::unsignedInt($source_user)) {
+			self::ajax_fail_exit('无效用户id');
+		}
+
+		if ($uid == $source_user) {
+			self::ajax_fail_exit('不能给自己助力');
+		}
+
+		$help_session = Request::g('help_session');
+		$state = $this->shareSession($help_id, $source_user, $help_session);
+		if (!$state) {
+			self::ajax_fail_exit('无效试用id');
+		}
+		
+		$events_id = Request::g('events_id');
+		if (!Verify::unsignedInt($events_id)) {
+			self::ajax_fail_exit('无效试用id');
+		}
+		
+		$this->LotteryUserHelpLog = new LotteryUserHelpLog ();
+
+		$this->LotteryUserHelp = new LotteryUserHelp ();
+
+		$totals = $this->LotteryUserHelpLog->totals(array('help_id' => $help_id));
+		$this->LotteryUserHelp->modify(array('num' => $totals), array('id' => $help_id));
+
+		$condition = array
+		(
+			'help_id' => $help_id,
+			'events_id' => $events_id,
+			'uid' => $uid,
+		);
+		$info = $this->LotteryUserHelpLog->fetchOne ( $condition);
+		if ($info) {
+			self::ajax_fail_exit('您只能助力一次');
+			# modify
+			$this->LotteryUserHelpLog->modify($condition, array('id' => $info['id']));
+		} else {
+			# add
+			$id = $this->LotteryUserHelpLog->add($condition);
+		}
+
+
+		
+		self::ajax_success_exit();
+	}
+
+	public function display() {
+		return $this->render ();
+	}
+}
+	

+ 0 - 1
tm/lib/Dao/LotteryUserHelp.class.php

@@ -23,6 +23,5 @@ class LotteryUserHelp extends DBAgileDev {
 	protected $other_field = array (
 			'events_id',
 			'uid',
-			'help_id',
 	);
 }

+ 1 - 1
tm/lib/Dao/LotteryUserHelpLog.class.php

@@ -23,6 +23,6 @@ class LotteryUserHelpLog extends DBAgileDev {
 	protected $other_field = array (
 			'events_id',
 			'uid',
-			'num',
+			'help_id',
 	);
 }

+ 3 - 2
tm/lib/Module/LotteryEventsTypeCode.class.php

@@ -85,8 +85,9 @@ class LotteryEventsTypeCode  {
 		$objDLotteryData = new LotteryData();
 		
 		$info  = array(
-				'events_id' => $this->eventsId,
+				'events_id' => $this->events_id,
 				'prize_id' => 0,
+				'audit' => 2,//已审核
 				'uid' => $this->uid,
 				'winners_time' => $this->thisTime,
 				'winning_time' => $this->thisTime,
@@ -94,7 +95,7 @@ class LotteryEventsTypeCode  {
 					'events' => $eventsData,
 					'prize' => array(
 						0 => array(
-							'events_id' => $this->eventsId,
+							'events_id' => $this->events_id,
 							'prize_name'  => $eventsData['code_name'],
 							'img_url' => $eventsData['code_img_url'],
 							'type' => LotteryPrize::TYPE_ENTITY,

+ 1 - 1
tm/lib/Module/LotteryEventsTypeInvitation.class.php

@@ -93,7 +93,7 @@ class LotteryEventsTypeInvitation  {
 		
 		# 活动限制
 		if(!$this->objMLotteryEventsLimitations->ckEventRestrictions($this->uid,Request::ip(), $this->events_id)){
-			return ResultWrapper::fail('您已成功领取二维码');
+			return ResultWrapper::fail('您已成功提交资料');
 		}
 		
 		# 获取当前活动最大上线

+ 42 - 1
tm/lib/Module/User.class.php

@@ -6,6 +6,7 @@ use Cas\Dao\UserInfo;
 use KIF\Verify;
 use KIF\Cookie;
 use KIF\Core\Request;
+use KIF\Core\Config;
 
 /**
  *
@@ -58,6 +59,36 @@ class User {
 		return $userData;
 		
 	}
+
+	/**
+	 * 获取一个随机头像
+	 */
+	public function getAvatar() {
+		$num = 16;
+		$config = Config::getInstance ()->get ( 'web_cfg' );
+		$file = $config['cdn'] . '/public/avatar/'.rand(1,$num).'.jpg';
+		return $file;
+	}
+
+	/**
+	 * 为当前用户分配一个头像
+	 */
+	public function setAvatar() {
+		$ids = $this->objDUserInfo -> findIdsBy(array());
+		
+		$userData = $this->objDUserInfo -> gets($ids);
+
+		if ($userData) {
+			foreach ($userData as $k => $v) {
+				if (empty($v['headimgurl']) || (isset($v['headimgurl']) && !strstr($v['headimgurl'], 'https://'))) {
+					$result['headimgurl'] = $this->getAvatar();
+					$this->objDUserInfo->modify (array('headimgurl' => $result['headimgurl']) , array (
+							'id' => $v['id']
+					) );
+				}
+			}
+		}
+	}
 	
 	/**
 	 * 初始化一个新用户 返回ID
@@ -66,6 +97,7 @@ class User {
 		$info = array (
 				'is_new' => UserInfo::NEW_USER ,
 				'passport_uid' => '-1',
+				'headimgurl' => $this->getAvatar(),
 		);
 		return $this->objDUserInfo->add ( $info );
 	}
@@ -97,7 +129,16 @@ class User {
 			return array ();
 		}
 		
-		return array_pop ( $result );
+		$result = array_pop ( $result );
+
+		if (empty($result['headimgurl'])) {
+			$result['headimgurl'] = $this->getAvatar();
+			$this->objDUserInfo->modify (array('headimgurl' => $result['headimgurl']) , array (
+					'id' => $result['id']
+			));
+		}
+
+		return $result;
 	}
 	
 	/**

+ 2 - 0
tm/template_dir/admin/activity/user_participate_form.html

@@ -33,7 +33,9 @@
 	<{/if}>
 	<{/if}>
 
+	<{if $eventData.type == 4}>
 	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserHelp&a=PageList&events_id=<{$eventData.id}>">助力排行</a> &nbsp;
+	<{/if}>
 	
 	<{if $download_url}>
 	<a href="<{$download_url}>" target="_blank" class="" style="padding:0 10px;margin-left:10px;"><i class="fa fa-download"></i> 导出数据</a>

+ 2 - 0
tm/template_dir/admin/activity/user_participate_log.html

@@ -37,7 +37,9 @@
 	<{/if}>
 	<{/if}>
 
+	<{if $eventData.type == 4}>
 	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserHelp&a=PageList&events_id=<{$eventData.id}>">助力排行</a> &nbsp;
+	<{/if}>
 	
 	<{if $download_url}>
 	<a href="<{$download_url}>" target="_blank" class="" style="padding:0 10px;margin-left:10px;"><i class="fa fa-download"></i> 导出数据</a>

+ 2 - 0
tm/template_dir/admin/activity/user_participate_win.html

@@ -33,7 +33,9 @@
 	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageLotteryDataList&events_id=<{$eventData.id}>&action=win">中奖</a> &nbsp;
 	<{/if}>
 
+	<{if $eventData.type == 4}>
 	<a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserHelp&a=PageList&events_id=<{$eventData.id}>">助力排行</a> &nbsp;
+	<{/if}>
 	
 	<{if $download_url}>
 	<a href="<{$download_url}>" target="_blank" class="" style="padding:0 10px;margin-left:10px;"><i class="fa fa-download"></i> 导出数据</a>

+ 51 - 67
tm/template_dir/bottom.html

@@ -1,3 +1,5 @@
+<section class="toast" style="display:none;">错误信息</section>
+
 <{if !$cutScreenInfo && $display == 1}>
 
 <footer>
@@ -15,8 +17,24 @@
     </ul>
 </footer>
 <{/if}>
-<{if !$notShowWeixinShare && !$weixinShare.notAllow}>
 <script type="text/javascript">
+function toast(content, url)
+{
+    var e = $(".toast");
+    e.html(content).show();
+    var func = function(url)
+    {
+        e.hide();
+        if (url == 1) {
+            return;
+        } else if (url) {
+            location.href = url;
+        } else {
+            location.reload();
+        }
+    };
+    setTimeout(function(){func(url)}, 1000);
+}
 
 function checkApp() {
     var u = navigator.userAgent.toLowerCase();
@@ -61,43 +79,48 @@ function buy_button()
     }
 }
 
-$(function()
+function yaoqing()
 {
-    buy_button();  
-})
-
-/*
-function share_ios(title, url, img, content) {
-    window.location = 'myscheme://share_title/' + title + '/share_url/' + url + '/share_img/' + img + '/share_content/' + content;
+    if ($(".yaoqing").length) {
+        var app = checkApp();
+        if (app) {
+            $(".yaoqing").addClass('share_button');
+        } else {
+            $(".yaoqing").removeClass('share_button');
+            $(".yaoqing").click(function()
+            {
+                toast('点击右上角,分享邀请好友为你加油!', 1);
+            });
+        }
+    }
 }
 
-function share_android(title, url, img, content) {
-    window.AndroidBridge.openShare(title, url, img, content);
-}
-*/
+</script>
+<{if !$notShowWeixinShare && !$weixinShare.notAllow}>
+<script type="text/javascript">
 
 var URL = window.location.href, site;
 site = 1;
+console.log(share_url);
 
-<{if $weixinShare.weixinShare_title }>
 new brickjs.MShare({
     website : 'sg',
     site: site,
     catalog: "",
-    sUrl: "<{$web_cfg.url}>", //分享地址
-    title: "<{$weixinShare.title}>",
-    imgUrl: "<{$weixinShare.imgUrl}>",
+    sUrl: share_url, //分享地址
+    title: share_title,
+    imgUrl: share_img,
     imgWidth: "640",
     imgHeight: "640",
     source_id : 1,
     source_table : 'onepage',
-    desc: "<{$weixinShare.content}>",
+    desc: share_content,
     appKey: {
         tsina: "2412621184"
     },
     ralateUid: '1658402750',
     wxGuide: {
-        imgUrl: '<{$weixinShare.imgUrl}>',
+        imgUrl: share_img,
         width: 100,
         height: 100,
         style: {
@@ -107,69 +130,28 @@ new brickjs.MShare({
     }
 });
 
-$(function()
+function init()
 {
+    yaoqing();
+    buy_button();
     if ($('.share_button').length) {
-        share_button($('.share_button'), '<{$weixinShare.title}>', '<{$web_cfg.url}>', '<{$weixinShare.imgUrl}>', '<{$weixinShare.content}>');
+        share_button($('.share_button'), share_title, share_url, share_img, share_content);
     }
 
     if (checkApp()) {
         if ($('.bottom_share').length) {
             $('.bottom_follow').hide();
-            share_button($('.bottom_share'), '<{$weixinShare.title}>', '<{$web_cfg.url}>', '<{$weixinShare.imgUrl}>', '<{$weixinShare.content}>');
+            share_button($('.bottom_share'), share_title, share_url, share_img, share_content);
         }
     }
-})
-
-
-<{else}>
+}
 
-var url = '<{if $weixinShare.jump_url}><{$weixinShare.jump_url}><{else}><{$web_cfg.url}><{/if}>';
-var title = '<{if $weixinShare.title}><{$weixinShare.title}><{else}><{$platform.weixinShare_title}><{/if}>';
-var img = '<{if $weixinShare.imgUrl}><{$weixinShare.imgUrl}><{else}><{$platform.weixinShare_img_url}><{/if}>';
-var content = '<{if $weixinShare.content}><{$weixinShare.content}><{else}><{$platform.weixinShare_content}><{/if}>';
 
 $(function()
 {
-    if ($('.share_button').length) {
-        share_button($('.share_button'), title, url, img, content);
-    }
-
-    if (checkApp()) {
-        if ($('.bottom_share').length) {
-            $('.bottom_follow').hide();
-            share_button($('.bottom_share'), title, url, img, content);
-        }
-    }
-});
+    init();
+})
 
-new brickjs.MShare({
-    website : 'sg',
-    site: site,
-    catalog: "",
-    sUrl: url, //分享地址
-    title: title,
-    imgUrl: img,
-    imgWidth: "640",
-    imgHeight: "640",
-    source_id : 1,
-    source_table : 'onepage',
-    desc: content,
-    appKey: {
-        tsina: "2412621184"
-    },
-    ralateUid: '1658402750',
-    wxGuide: {
-        imgUrl: img,
-        width: 100,
-        height: 100,
-        style: {
-            right: 0,
-            top: 0
-        }
-    }
-});
-<{/if}>
 </script>
 <{else}>
 <script>
@@ -178,7 +160,9 @@ wx.hideOptionMenu();
 </script>
 <{/if}>
 
+<{if !$js}>
 <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/global.js"></script>
+<{/if}>
 
 </body>
 </html>

+ 8 - 42
tm/template_dir/events_code.html

@@ -2,45 +2,10 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
+<{include file="events_top.html"}>
+
+<{include file="events_infos.html"}>
 
-<div class="wrapper clear">
-    <div class="article_title center"><{$codeInfo.events_name}></div>
-	<!--公用活动说明样式-->
-    <div class="article_content">
-    	<{$codeInfo.events_tips}>
-    </div>
-    <div class="v_box_w clear">
-        <{if !$eventsStatus}>
-        <{if $codeInfo.events_hd_tips}>
-        <div class="h3_title"><{$codeInfo.events_hd_tips}></div>
-        <{/if}>
-        <{include file="event_forms_template.html"}>
-        <{else}>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<{$listUrl}>" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <{/if}>
-
-        <{if $codeInfo.share_button == 2}>
-        	<{include file="share_button.html"}>
-	    <{/if}>
-        
-        <{if $codeInfo.operationt_tips}>
-        <div class="h3_title"><span><{$codeInfo.operationt_tips}></span></div>
-        <{/if}>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <{$codeInfo.events_rules}>
-        </div>
-        
-        <div class="clear"></div>
-    </div>
-    
-    
-    
-</div>
 
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
@@ -97,10 +62,10 @@ KISSY.use('node, io', function (S, Node, IO) {
 		$('.tips_msg').html('<i class="fa fa-spinner fa-pulse"></i>');
 		$('#msg_tips_box, .a_cover').fadeIn();
 	}
-	
+
 	$('#common_submit_btn').on('click', function () {
 		IO.on("send",function(){
-			showLoading();
+			//showLoading();
 		});
 		
 		IO.on("complete",function(){
@@ -119,13 +84,14 @@ KISSY.use('node, io', function (S, Node, IO) {
 					$(".v_tips_box2").fadeIn();
 				} else {
 					if(data.msg.url){
-						$(".tips_msg").html('本活需登录后才可以参与');
+						$(".tips_msg").html('本活需登录后才可以参与');
 						$('#msg_tips_box').fadeIn();
 						goUrl = '<{$loginUrl}>';
 						setInterval("go_page();",seconds);
 						return ;
 					}
-					showMsg(data.msg);
+					//showMsg(data.msg);
+					toast(data.msg, 1);
 					return ;
 					
 				}

+ 48 - 27
tm/template_dir/events_infos.html

@@ -1,4 +1,8 @@
-<link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/active.css" />
+<style>
+.button {
+    cursor: pointer;
+}
+</style>
 <{if $type == 'share'}>
 <link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/detail.css" />
 <section class="profile">
@@ -11,33 +15,22 @@
             <dt><img src="<{$info.img_url}>"></dt>
         </dl>
         <section class="button-wrapper">
-            <{if $uid == $source_user}>
-            <a class="button" node-type="share">邀请好友助力!</a>
+            <{if $uid != $source_user}>
+            <a class="button yaoqing">邀请好友助力!</a>
             <{else}>
-            <a class="button">为好友助力!</a>
-            <a class="button">我也要参加!</a>
+            <a class="button" href="javascript:;" onclick="help();">为好友助力!</a>
+            <a class="button" href="<{$info.thisUrl}>">我也要参加!</a>
             <{/if}>
         </section>
         <section class="friends">
-            <p>已助力好友<span>16</span>人</p>
+            <p>已助力好友<span><{$helpDataTotal}></span>人</p>
+            <{if $helpData}>
             <ul>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
-                <li><img src="images/8db3cefb.tmp5.jpg"></li>
+                <{foreach from=$helpData item=v}>
+                <li><img src="<{$v.headimgurl}>"></li>
+                <{/foreach}>
             </ul>
+            <{/if}>
         </section>
     </section>
     <section class="applycont">
@@ -64,8 +57,23 @@
         <{$ad}>
     </section>
     <{/if}>
-    <section class="toast" style="display:none;">助力成功!</section>
 
+<script>
+share_url = '<{$info.thisUrl}>/share?events_id=<{$info.id}>&help_id=<{$help_id}>&help_session=<{$help_session}>&source_user=<{$source_user}>';
+function help()
+{
+    var url = '<{$web_cfg.domain}>/?c=UserHelp&a=apply';
+    $.getJSON(url, {events_id:'<{$info.id}>', help_id:'<{$help_id}>', help_session:'<{$help_session}>', source_user:'<{$source_user}>'}, function(t)
+    {
+        if (t.ok) {
+            toast('助力成功!');
+        } else {
+            toast(t.msg, 1);
+        }
+    });
+}
+
+</script>
 <{elseif $type == 'prize'}>
 
 <{if $userEventsData}>
@@ -87,7 +95,7 @@
         data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
         data-request-url="<{$info.thisUrl}>/prize?ajax=ajax"
         data-page="2"
-        data-totals="<{$totals}>"
+        data-totals="<{$userEventsDataTotals}>"
         style="width:0px;"
     />
     
@@ -111,7 +119,7 @@ KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Dat
             if (!requesrUrl) {
                 return false;
             }
-            
+
             if (page > totals) {
                 $('.loading').hide();
                 return false;
@@ -126,7 +134,8 @@ KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Dat
                         $('#loadPage').data('page', next_page);
                         $("#lazyLoad").append(data.msg);
                         lock = false;
-                        //new Datalazyload();
+                        $('.loading').hide();
+                        new Datalazyload();
                         if (next_page > totals) {
                             $('.up_icon').hide();
                         }
@@ -247,7 +256,7 @@ $(body).addClass("bg_white");
 
         <{if $info.share_button == 2 || $info.buy_button == 2}>
         <section class="button-wrapper">
-            <{if $info.share_button == 2 && $info.type == 4 && $userData.feedback != 1}>
+            <{if $info.share_button == 2 && $info.type == 4 && $userData &&  $userData.feedback != 1}>
             <a class="button share_buttons" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
             <{elseif $info.share_button == 2}>
             <a class="button share_button"><{$info.share_button_tips}></a>
@@ -259,12 +268,24 @@ $(body).addClass("bg_white");
         <{/if}>
     </section>
     <section class="applycont">
+        <{if $info.type == 4 || $info.type == 6 || $info.type == 7}>
         <{if $info.events_hd_tips}>
         <h2><{$info.events_hd_tips}></h2>
         <{/if}>
 
         <{include file="events_forms_template_new.html"}>
 
+        <{elseif $info.type == 1}>
+        <{include file="events_turntable_content.html"}>
+
+        <{elseif $info.type == 11}>
+        <{include file="events_survey_content.html"}>
+
+        <{elseif $info.type == 5}>
+        <{include file="events_vote_content.html"}>
+
+        <{/if}>
+
         <{if $info.operationt_tips}>
         <h2><{$info.operationt_tips}></h2>
         <{/if}>

+ 10 - 41
tm/template_dir/events_invitation.html

@@ -3,46 +3,11 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
-<!---->
-<div class="wrapper clear">
-	<div class="article_title center"><{$info.events_name}></div>
-    <!--公用活动说明样式-->
-    <div class="article_content">
-    	<{$info.events_tips}>
-    </div>
-    
-    
-    <div class="v_box_w clear">
-    
-        <{if !$eventsStatus}>
-        <{if $info.events_hd_tips}>
-        <div class="h3_title"><{$info.events_hd_tips}></div>
-        <{/if}>
-        <{include file="event_forms_template.html"}>
-        <{else}>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<{$listUrl}>" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <{/if}>
+<{include file="events_top.html"}>
 
-        <{if $info.share_button == 2}>
-        <{include file="share_button.html"}>
-        <{/if}>
-        
-        <{if $info.operationt_tips}>
-        <div class="h3_title"><{$info.operationt_tips}></div>
-        <{/if}>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <{$info.events_rules}>
-        </div>
-        
-        <div class="clear"></div>
-	</div>
-</div>
+<{include file="events_infos.html"}>
 
+<!---->
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
 
@@ -100,7 +65,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 	
 	IO.on("send",function(){
 		//$(".a_cover").css("opacity", 0);
-		showTipsBox('<i class="fa fa-spinner fa-pulse"></i>', true);
+		//showTipsBox('<i class="fa fa-spinner fa-pulse"></i>', true);
 	});
 	
 	
@@ -115,15 +80,19 @@ KISSY.use('node, io', function (S, Node, IO) {
 			, formData
 			, function (data) {
 				if (data.ok) {
+					toast('提交成功,请等待管理员审核', 1);
+					return;
 					var formsId = data.msg;
 					location.href = "<{$web_cfg.domain}>/?c=EventsInvitation&a=Qrcode&events_id=<{$info.id}>&formsId="+formsId;
 				} else {
 					if(data.msg.url){
 						goUrl = '<{$loginUrl}>';
-						showTipsBox('本活需登录后才可以参与');
+						//showTipsBox('本活需登录后才可以参与');
+						toast('本活动需登录后才可以参与', 1);
 						return false;
 					}
-					showTipsBox(data.msg);
+					//showTipsBox(data.msg);
+					toast(data.msg, 1)
 				}
 			}
 			, 'json'

+ 2 - 0
tm/template_dir/events_scratch.html

@@ -4,6 +4,8 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
+<{include file="events_top.html"}>
+
 <div class="wrapper clear">
 	<div class="ac_title_com_app"><{$scratchData.events.events_name}></div>
     <!--公用活动说明样式-->

+ 2 - 37
tm/template_dir/events_survey.html

@@ -4,44 +4,9 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
-<!---->
-<div class="wrapper clear">    
-    <div class="v_hd_title clear">
-        <div class="article_title center"><{$surveyInfo.events_name}></div>            
-        <div class="article_content"><{$surveyInfo.events_tips}></div>
-        <div class="ac_btn_box center"><a class="submit_btn_style">参与问卷</a></div>
-    </div>
-    
-    <div class="v_box_w clear">
-        <{if $surveyInfo.events_hd_tips}>
-            <div class="h3_title"><{$surveyInfo.events_hd_tips}></div>
-        <{/if}>
-        <div class="pro_list_box pro_list_survey">
-        	<{foreach from=$surveyInfo.survery_prize item=data name=survery}>
-        	<dl>
-            	<dt><img src="<{$data.img_url}>"></dt>
-                <dd>
-                	<p class="pro_name"><{$data.name}></p>
-                    <p class="pro_num"><{$data.num}><{$data.unit_name}></p>
-                </dd>
-            </dl>
-            <{/foreach}>
-        </div>
-
-        <{if $surveyInfo.share_button == 2}>
-        <{include file="share_button.html"}>
-        <{/if}>
-        
-        <{if $surveyInfo.operationt_tips}>
-        <div class="h3_title"><{$surveyInfo.operationt_tips}></div>
-        <{/if}>
-        <div class="article_content"><{$surveyInfo.events_rules}></div>
-        
-    </div>
-    
-    
-</div>
+<{include file="events_top.html"}>
 
+<{include file="events_infos.html"}>
 
 <script type="text/javascript">
 KISSY.use('node, cookie', function (S, Node, Cookie) {

+ 25 - 0
tm/template_dir/events_survey_content.html

@@ -0,0 +1,25 @@
+
+<section class="button-wrapper luck_show">
+    <a class="button ac_btn_box">参与问卷</a>
+</section>
+
+</section>
+<section class="applycont">
+<{if $surveyInfo.events_hd_tips}>
+    <h2><{$surveyInfo.events_hd_tips}></h2>
+<{/if}>
+<div class="pro_list_box pro_list_survey">
+	<{foreach from=$surveyInfo.survery_prize item=data name=survery}>
+	<dl>
+    	<dt><img src="<{$data.img_url}>"></dt>
+        <dd>
+        	<p class="pro_name"><{$data.name}></p>
+            <p class="pro_num"><{$data.num}><{$data.unit_name}></p>
+        </dd>
+    </dl>
+    <{/foreach}>
+</div>
+
+</section>
+
+<section class="applycont">

+ 13 - 6
tm/template_dir/events_survey_underway.html

@@ -1,7 +1,13 @@
 <{include file="header.html"}>
 <{include file="nav.html"}>
-<link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/public/static/css/??swiper.min.css,swiper.animate.min.css" />
-<script src="<{$web_cfg.cdn}>/public/static/js/??swiper.jquery.min.js,swiper.animate.min.js"></script>
+<link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/public/static/css/swiper.min.css" />
+<link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/public/static/css/swiper.animate.min.css" />
+
+
+<script src="<{$web_cfg.cdn}>/public/static/js/swiper.jquery.min.js"></script>
+
+<script src="<{$web_cfg.cdn}>/public/static/js/swiper.animate.min.js"></script>
+
 
 <style>
 .mask {background-color: #fff;height: 100%;opacity: 0.5;position: absolute;width: 100%;display:none;
@@ -9,10 +15,9 @@
 
 <{include file="common_header.html"}>
 
+<{include file="events_top.html"}>
+
 <div class="wrapper clear">
-	<div class="v_ques_title">
-    	<div class="article_title center"><{$surveyInfo.events_name}></div>
-    </div>
     
     <div class="clear">
 	
@@ -219,4 +224,6 @@ KISSY.use('node, dom, cookie, json, io', function (S, Node, DOM, Cookie, JSON, I
 	//swiper.slidePrev();
 	//swiper.slideNext();
 });
-</script>
+</script>
+
+<{include file="bottom.html"}>

+ 1 - 0
tm/template_dir/events_top.html

@@ -1,3 +1,4 @@
+<link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/active.css" />
 <{if $type != 'share'}>
 <section class="infos">
     <h2><{$info.events_name}></h2>

+ 6 - 3
tm/template_dir/events_try.html

@@ -85,6 +85,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 		$(".v_tips_box,.a_cover").hide();
 	});
 	
+	/*
 	IO.on("send",function(){
 		//$(".a_cover").css("opacity", 0);
 		showErrorMsg('<i class="fa fa-spinner fa-pulse"></i>');
@@ -95,6 +96,7 @@ KISSY.use('node, io', function (S, Node, IO) {
 	IO.on("complete",function(){
 		//$("#error_tips_box").fadeOut();
 	});
+	*/
 	
 	$('#common_submit_btn').on('click', function () {
 		var formData = IO.serialize('#ff');
@@ -102,14 +104,15 @@ KISSY.use('node, io', function (S, Node, IO) {
 			, formData
 			, function (data) {
 				if (data.ok) {
-					showOkMsg();
+					//showOkMsg();
+					toast('提交成功,请等待管理员审核');
 				} else {
 					if(data.msg.url){
 						goUrl = '<{$loginUrl}>';
-						showErrorMsgGoPage('本活需登录后才可以参与');
+						showErrorMsgGoPage('本活需登录后才可以参与');
 						return;
 					}
-					showErrorMsg(data.msg);
+					toast(data.msg, 1);
 				}
 			}
 			, 'json'

+ 2 - 76
tm/template_dir/events_turntable.html

@@ -4,83 +4,9 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
-<div class="wrapper clear">    
-    
-    
-    <div class="v_hd_title clear">
-        <div class="article_title center"><{$turntableData.events.events_name}></div>
-        
-        <!--抽奖活动内容 begin-->
-        <{if !$eventsStatus}>
-        <div class="luck_show" id="luck_show">        
-            <div class="article_content"><{$turntableData.events.events_tips}></div>
-            <div class="ac_btn_box center"><a class="submit_btn_style" id="award_btn">开始抽奖</a></div>
-        </div>
-        <{/if}>
-        <!--抽奖活动内容 end-->
-        
-        <!--活动已结束提示 begin-->
-        <{if $eventsStatus}>
-        <div class="luck_result luck_end_tips">
-            <div><img src="<{$web_cfg.cdn}>/public/static/img/error_icon.png"></div>
-            <div>活动已结束!</div>
-        </div>
-        <{/if}>
-        <!--活动已结束提示 end-->
-        
-        <!--抽奖loading begin-->
-        <div class="luck_loading" id="luck_loading">
-            <div class="luck_load_icon">
-                <div class="loading_img"></div>
-            </div>
-        </div>
-        <!--抽奖loading end-->
-        
-        <!--抽奖结果 begin-->
-        <div class="luck_result" id="luck_result">
-            <div><img src="<{$web_cfg.cdn}>/public/static/img/error_icon.png"></div>
-            <div>未中奖,感谢参与</div>
-        </div>
-        <!--抽奖结果 end-->
-    </div>
-    
-    <div class="v_box_w clear">
-    	<{if $turntableData.events.events_hd_tips}>
-        <div class="h3_title"><{$turntableData.events.events_hd_tips}></div>
-        <{/if}>
-        
-        <div class="pro_list_box">
-        	<{foreach from=$turntableData.prize item=prize name=turntable}>
-        	<{if $prize.display == 1}>
-        	<dl>
-            	<dt>
-                    <img src="<{$web_cfg.cdn}>/public/static/img/item_img.jpg">
-                    <p class="img_cover" style="background-image:url(<{$prize.img_url}>);"></p>
-                </dt>
-                <dd>
-                	<p class="pro_name"><{$prize.prize_name}></p>
-                	<p class="pro_num"><{$prize.prize_num}>份</p>
-                </dd>
-            </dl>
-            <{/if}>
-            <{/foreach}>
-        </div>
+<{include file="events_top.html"}>
 
-        <{if $turntableData.events.share_button == 2}>
-        <{include file="share_button.html"}>
-        <{/if}>
-        
-        <{if $turntableData.events.operationt_tips}>
-        <div class="h3_title"><{$turntableData.events.operationt_tips}></div>
-        <{/if}>
-        <div class="activity_des">            
-            <{$turntableData.events.events_rules}>
-        </div>
-        
-    </div>
-    
-</div>
-<!---->
+<{include file="events_infos.html"}>
 
 
 <!--遮罩层-->

+ 46 - 0
tm/template_dir/events_turntable_content.html

@@ -0,0 +1,46 @@
+
+<!--抽奖loading begin-->
+<div class="luck_loading" id="luck_loading">
+    <div class="luck_load_icon">
+        <div class="loading_img"></div>
+    </div>
+</div>
+<!--抽奖loading end-->
+
+<!--抽奖结果 begin-->
+<div class="luck_result" id="luck_result">
+    <div><img src="<{$web_cfg.cdn}>/public/static/img/error_icon.png"></div>
+    <div>未中奖,感谢参与</div>
+</div>
+<!--抽奖结果 end-->
+
+<section class="button-wrapper luck_show" id="luck_show">
+    <a class="button"  id="award_btn">开始抽奖</a>
+</section>
+
+</section>
+<section class="applycont">
+<{if $turntableData.events.events_hd_tips}>
+<h2><{$turntableData.events.events_hd_tips}></h2>
+<{/if}>
+
+<div class="pro_list_box">
+	<{foreach from=$turntableData.prize item=prize name=turntable}>
+	<{if $prize.display == 1}>
+	<dl>
+    	<dt>
+            <img src="<{$web_cfg.cdn}>/public/static/img/item_img.jpg">
+            <p class="img_cover" style="background-image:url(<{$prize.img_url}>);"></p>
+        </dt>
+        <dd>
+        	<p class="pro_name"><{$prize.prize_name}></p>
+        	<p class="pro_num"><{$prize.prize_num}>份</p>
+        </dd>
+    </dl>
+    <{/if}>
+    <{/foreach}>
+</div>
+    
+</section>
+
+<section class="applycont">

+ 6 - 102
tm/template_dir/events_vote.html

@@ -3,106 +3,9 @@
 <!--公用标题居中显示-->
 <{include file="common_header.html"}>
 
-<!---->
-<div class="wrapper" data-total-vote-num="<{$voteInfo.total_vote_num}>">
-    
-    
-    <div class="article_title center"><{$voteInfo.events_name}></div>
-    <!--公用活动说明样式-->
-    <div class="article_content"><{$voteInfo.events_tips}></div>
-    
-    
-    
-    <div class="v_box_w clear">
-    
-        <{if $eventsStatus && $eventsStatus!='STATUS_LIMITATIONS'}>
-        <{if $voteInfo.events_hd_tips}>
-        <div class="h3_title"><{$voteInfo.events_hd_tips}></div>
-        <{/if}>
-        <!--公用活动结束提示 begin-->
-        <div class="v_end_com_box">
-            <div class="v_end_txt_com center">活动已结束!</div>
-            <div class="center"><a href="<{$listUrl}>" class="submit_btn_style">参与更多特权活动</a></div>
-        </div>
-        <{/if}>
-        
-        <{if $voteInfo.events_hd_tips}>
-        <div class="h3_title"><{$voteInfo.events_hd_tips}></div>
-        <{/if}>
-        
-        <{if $voteInfo.vote_type == 1}>
-       
-        <!--<div class="vote_show_box2" id="vote_show_box2">
-            <{foreach from=$voteInfo.vote item=vote}>
-            <div class="radio_cell" data-voteid="<{$vote.id}>">
-            <label for="radio-2-<{$vote.id}>" class="lable_div" data-voteid="<{$vote.id}>" >
-                <div class="data_cell_box vote_box" data-voteid="<{$vote.id}>" >
-                    <p class="dv_title dv_title_default"><{$vote.title}></p>
-                    <{assign var=total_num value=$vote.num+$vote.add_num}>
-                    <p class="data_show_cell"><em style="width:0px;" data-num="<{$total_num}>"></em><b><{$vote.per_num}>%</b></p>
-                </div>
-            </label>
-            </div>
-            <{/foreach}>
-        </div>-->
-        
-        <div class="vote_txt_box clear">
-        	<{foreach from=$voteInfo.vote item=vote name=votebox}>
-            <div class="radio_cell" data-voteid="<{$vote.id}>">
-                <label for="radio-2-<{$vote.id}>" class="lable_div" data-voteid="<{$vote.id}>" >
-                <div class="vt_cell vote_box" data-voteid="<{$vote.id}>">
-                    <div class="vt_index"><span class="vt_num"><em><{$smarty.foreach.votebox.iteration}></em></span></div>
-                    <div class="vt_title"><span><{$vote.title}></span></div>
-                    <{assign var=total_num value=$vote.num+$vote.add_num}>
-                    <p class="data_show_cell vt_total_bg"><em style="width:0px;" class="vt_total_line bg_color" data-num="<{$total_num}>"></em></p>
-                    <div class="vt_total_num font_color"><{$vote.per_num}>%</div>
-                </div>
-                </label>
-            </div>
-            <{/foreach}>
-        </div>
-        
-        
-        <{else}>
-        <div class="vote_show_box">
-            <div class="vote_cell_row clear">
-            	<div class="vote_item_show clear">
-                    <{foreach from=$voteInfo.vote item=vote}>
-                    <dl class="vote_item">
-                        <dt>
-                            <img src="<{$web_cfg.cdn}>/public/static/img/vote_img_bg.jpg">
-                            <div class="vote_img_thumb" style="background-image:url(<{$vote.img_url}>);"></div>
-                            <{assign var=total_num value=$vote.num+$vote.add_num}>
-                            <div class="vote_btn bg_color" data-voteid="<{$vote.id}>" data-num="<{$total_num}>"><span <{if  $eventsStatus=='STATUS_LIMITATIONS' || $eventsStatus=='STATUS_HAS_END'}>class="h_selected" <{/if}>></span><p class="total_num_show"><{$total_num}></p></div>
-                        </dt>
-                        <dd>
-                            <p class="vote_name"><{$vote.title}></p>
-                        </dd>
-                    </dl>
-                    <{/foreach}>
-                </div>
-            </div>
-        </div>
-        <{/if}>
+<{include file="events_top.html"}>
 
-        <{if $voteInfo.share_button == 2}>
-        <{include file="share_button.html"}>
-        <{/if}>
-        
-        <{if $voteInfo.operationt_tips}>
-        <div class="h3_title"><span><{$voteInfo.operationt_tips}></span></div>
-        <{/if}>
-        <!--公用活动规则样式-->
-        <div class="activity_des">
-            <{$voteInfo.events_rules}>
-        </div>
-        
-        <div class="clear"></div>
-        
-    </div>
-    
-       
-</div>
+<{include file="events_infos.html"}>
 
 <!--公用提示背景遮罩层-->
 <div class="a_cover"></div>
@@ -117,6 +20,7 @@
 <script>
 var seconds = 1000;
 var goUrl = '';
+var config_total_vote_num = '<{$voteInfo.total_vote_num}>';
 function go_page(){
 	location.href = goUrl;
 }
@@ -166,7 +70,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 		
 		var _self = $(this);
 		var voteid = $(this).data('voteid');
-		var total_vote_num = $('.wrapper').attr('data-total-vote-num');
+		var total_vote_num = config_total_vote_num;
 		if (!voteid) {
 			return false
 		}
@@ -187,7 +91,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 						var addNum = _self.find('em').data('num') + 1;
 						_self.find('em').data('num', addNum);
 						total_vote_num = Number(total_vote_num) + 1;
-						$('.wrapper').attr('data-total-vote-num', total_vote_num);
+						config_total_vote_num = total_vote_num;
 						refreshVoteBox(true);
 					});
 				} else {
@@ -294,7 +198,7 @@ KISSY.use('node, io, json', function (S, Node, IO, JSON) {
 			total += num;
 		});
 		
-		var total_vote_num = $('.wrapper').attr('data-total-vote-num');
+		var total_vote_num = config_total_vote_num;
 		
 		$(".data_show_cell").fadeIn();
 		$(".data_show_cell em").each(function (i) {

+ 62 - 0
tm/template_dir/events_vote_content.html

@@ -0,0 +1,62 @@
+
+<{if $surveyInfo.events_hd_tips}>
+    <h2><{$surveyInfo.events_hd_tips}></h2>
+<{/if}>
+<{if $voteInfo.vote_type == 1}>
+       
+<!--<div class="vote_show_box2" id="vote_show_box2">
+    <{foreach from=$voteInfo.vote item=vote}>
+    <div class="radio_cell" data-voteid="<{$vote.id}>">
+    <label for="radio-2-<{$vote.id}>" class="lable_div" data-voteid="<{$vote.id}>" >
+        <div class="data_cell_box vote_box" data-voteid="<{$vote.id}>" >
+            <p class="dv_title dv_title_default"><{$vote.title}></p>
+            <{assign var=total_num value=$vote.num+$vote.add_num}>
+            <p class="data_show_cell"><em style="width:0px;" data-num="<{$total_num}>"></em><b><{$vote.per_num}>%</b></p>
+        </div>
+    </label>
+    </div>
+    <{/foreach}>
+</div>-->
+
+<div class="vote_txt_box clear">
+	<{foreach from=$voteInfo.vote item=vote name=votebox}>
+    <div class="radio_cell" data-voteid="<{$vote.id}>">
+        <label for="radio-2-<{$vote.id}>" class="lable_div" data-voteid="<{$vote.id}>" >
+        <div class="vt_cell vote_box" data-voteid="<{$vote.id}>">
+            <div class="vt_index"><span class="vt_num"><em><{$smarty.foreach.votebox.iteration}></em></span></div>
+            <div class="vt_title"><span><{$vote.title}></span></div>
+            <{assign var=total_num value=$vote.num+$vote.add_num}>
+            <p class="data_show_cell vt_total_bg"><em style="width:0px;" class="vt_total_line bg_color" data-num="<{$total_num}>"></em></p>
+            <div class="vt_total_num font_color"><{$vote.per_num}>%</div>
+        </div>
+        </label>
+    </div>
+    <{/foreach}>
+</div>
+
+
+<{else}>
+<div class="vote_show_box">
+    <div class="vote_cell_row clear">
+    	<div class="vote_item_show clear">
+            <{foreach from=$voteInfo.vote item=vote}>
+            <dl class="vote_item">
+                <dt>
+                    <img src="<{$web_cfg.cdn}>/public/static/img/vote_img_bg.jpg">
+                    <div class="vote_img_thumb" style="background-image:url(<{$vote.img_url}>);"></div>
+                    <{assign var=total_num value=$vote.num+$vote.add_num}>
+                    <div class="vote_btn bg_color" data-voteid="<{$vote.id}>" data-num="<{$total_num}>"><span <{if  $eventsStatus=='STATUS_LIMITATIONS' || $eventsStatus=='STATUS_HAS_END'}>class="h_selected" <{/if}>></span><p class="total_num_show"><{$total_num}></p></div>
+                </dt>
+                <dd>
+                    <p class="vote_name"><{$vote.title}></p>
+                </dd>
+            </dl>
+            <{/foreach}>
+        </div>
+    </div>
+</div>
+<{/if}>
+
+</section>
+
+<section class="applycont">

+ 3 - 2
tm/template_dir/feedback.html

@@ -117,10 +117,11 @@ KISSY.use('node, io', function (S, Node, IO) {
                     //showTipsBox('提交成功');
                     //return true;
                     <{if $refer}>
-                    location.href ='<{$refer}>';
+                    url ='<{$refer}>';
                     <{else}>
-                    location.href ='<{$giftsUrl}>';
+                    url ='<{$giftsUrl}>';
                     <{/if}>
+                    toast('提交成功', url);
                 } else {
                     showTipsBox(data.msg);
                     return false;

+ 18 - 0
tm/template_dir/header.html

@@ -36,7 +36,25 @@
         , cdn_domain: '<{$web_cfg.cdn}>'
         , url: '<{$web_cfg.url}>'
     };
+
+
+	<{if $weixinShare.weixinShare_title }>
+	var share_url = "<{$web_cfg.url}>";
+	var share_title = "<{$weixinShare.title}>";
+	var share_img = "<{$weixinShare.imgUrl}>";
+	var share_content = "<{$weixinShare.content}>";
+
+	<{else}>
+
+	var share_url = '<{if $weixinShare.jump_url}><{$weixinShare.jump_url}><{else}><{$web_cfg.url}><{/if}>';
+	var share_title = '<{if $weixinShare.title}><{$weixinShare.title}><{else}><{$platform.weixinShare_title}><{/if}>';
+	var share_img = '<{if $weixinShare.imgUrl}><{$weixinShare.imgUrl}><{else}><{$platform.weixinShare_img_url}><{/if}>';
+	var share_content = '<{if $weixinShare.content}><{$weixinShare.content}><{else}><{$platform.weixinShare_content}><{/if}>';
+
+	<{/if}>
+
 </script>
+
 <script src="<{$web_cfg.cdn}>/public/share/zepto.min.js"></script>
 <script src="<{$web_cfg.cdn}>/public/share/jweixin.js?2"></script>
 <script src="<{$web_cfg.cdn}>/public/share/mshare.js?22"></script>