allen 3 лет назад
Родитель
Сommit
902b8b77ba
2 измененных файлов с 27 добавлено и 11 удалено
  1. 15 11
      app/index/view/video/index.html
  2. 12 0
      updateGameCount.sql

+ 15 - 11
app/index/view/video/index.html

@@ -172,7 +172,7 @@
     });
 </script>
 
-<script>    
+<script>
     function getQueryString(name) {
         var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
         var r = window.location.search.substr(1).match(reg);
@@ -228,7 +228,7 @@
         }
         console.log('打开链接:', scheme);
 
-        if (isWeibo == 0) {    
+        if (isWeibo == 0) {
             // 非微博
             var u = `https://m.weibo.cn/feature/openapp?scheme=${encodeURIComponent(scheme)}`;
             console.log('u = ' + u )
@@ -272,7 +272,7 @@
         window.location.href = `sinaweibo://login?redirect_scheme=${(encodeURIComponent(location.href))} `;
     }
 
-   
+
 
     // 关于微博 ======== END
 
@@ -303,8 +303,10 @@
     isBeginActivity = '<?php echo $isBeginActivity; ?>';
     user = '<?php echo $user; ?>';
     taskData = '<?php echo $task; ?>';
+    realPlayCount = '<?php echo $realCount; ?>';
     task = ''
 
+    console.log("realPlayCount = " + realPlayCount )
     if(isBeginActivity == 0){
         // 活动结束
         $('#shareBtn').hide();
@@ -536,25 +538,25 @@
     function startGame(   ){
         var u = YUMING + 'index/index/startGame'
         var obj = { token:theTokenData };
-        $.post(u,obj,function(data){      
-            console.log(data)         
-            gameId = data.data.gameId;           
+        $.post(u,obj,function(data){
+            console.log(data)
+            gameId = data.data.gameId;
         })
     }
     // 结束游戏
     function endGame(   ){
         var u = YUMING + 'index/index/endGame'
         var obj = { token:theTokenData , gameId:gameId };
-        $.post(u,obj,function(data){      
-            console.log(data)         
+        $.post(u,obj,function(data){
+            console.log(data)
         })
     }
     // 提交彩蛋
     function submitEasterEgg( eggIndex  ){
         var u = YUMING + 'index/index/submitEasterEgg'
         var obj = { token:theTokenData , gameId:gameId,  easterEgg:eggIndex };
-        $.post(u,obj,function(data){      
-            console.log(data)         
+        $.post(u,obj,function(data){
+            console.log(data)
         })
     }
 
@@ -834,11 +836,13 @@ var _hmt = _hmt || [];
 (function() {
   var hm = document.createElement("script");
   hm.src = "https://hm.baidu.com/hm.js?6ce0a606815de6165a7d60a0d5e364d9";
-  var s = document.getElementsByTagName("script")[0]; 
+  var s = document.getElementsByTagName("script")[0];
   s.parentNode.insertBefore(hm, s);
 })();
 </script>
 
+<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
+<script>LA.init({id: "JlKtuj69pWUP1HoN",ck: "JlKtuj69pWUP1HoN"})</script>
 
 </body>
 

+ 12 - 0
updateGameCount.sql

@@ -0,0 +1,12 @@
+
+
+
+/**
+   分享过用户增加 2次参与游戏时间
+ */
+UPDATE `awards_user_info` SET `count` = `count` + 2 WHERE `is_share` = 1 and `count` < 4;
+
+/**
+  初始化用户增加 2次参与游戏时间
+ */
+UPDATE `awards_user_info` SET `count` = `count` + 2 WHERE `is_share` = 0 and `count` < 3;