Browse Source

Merge branch 'qixi_test' into bonus_rate

stanley-king 6 years atrás
parent
commit
5d8495f456

+ 22 - 9
data/resource/mobile/qixi/js/game.js

@@ -54,6 +54,7 @@ Game.prototype = {
       _this.times--;
       _this.countTimesText();
       if (_this.times <= 0) {
+        this.gameContainer.innerHTML = '';
         _this.finalResult();
         $('#speaker_handle').fadeOut('fast');
         $('#Jaudio').attr('src', '');
@@ -129,12 +130,30 @@ Game.prototype = {
   },
   calcScore: function() {
     var score = 0;
-    if(!isShare) {
-      score = this.count > 70 ? 70 : this.count ;
+
+    // 微信分享后玩第二次, app点击后可以玩第二次
+
+    if(from_app) {
+      if(appClick == 1) {
+        score = this.count * 2 > 70 ? 70 : this.count * 2;
+        
+      }
+      else {
+        score = this.count * 2 > 100 ? 100 : this.count * 2;
+      }
     }
     else {
-        score = this.count > 100 ? 100 : this.count;
+      if(!isShare) {
+        score = this.count * 2 > 70 ? 70 : this.count * 2;
+      }
+      else {
+        score = this.count * 2 > 100 ? 100 : this.count * 2;
+      }
     }
+
+
+
+
     // if(!score)return;
     if(score < 21) {
       this.moneyText = 20;
@@ -177,12 +196,6 @@ Game.prototype = {
   },
   finalResult: function() {
     this.caclBonus();
-    console.log(this.count);
-
-    ///
-    this.callback && this.callback();return;
-    ///
-
     if(from_app) {
       if(appClick == 1) {
         this.select.style.display = 'block';

+ 2 - 0
helper/session_helper.php

@@ -315,6 +315,8 @@ class session_helper
             }
             else
             {
+                return true;
+
                 if (session_helper::binded_wechat())
                 {
                     $author_time = $_SESSION['wxauthor_time'];

+ 1 - 1
mobile/control/control.php

@@ -297,7 +297,7 @@ class mbMemberControl extends mobileControl
 
 function bonus_version()
 {
-    return "v=2018020504";
+    return "v=2018081503";
 }
 function shop_version()
 {

+ 1 - 1
mobile/control/festval.php

@@ -40,7 +40,7 @@ class festvalControl extends mobileControl
         if(session_helper::need_wechat_author())
         {
             $author = new thrid_author\wxauthor();
-            $url = BASE_SITE_URL . "/mobile/index.php?act=festval&op=qixi";
+            $url = urlencode(BASE_SITE_URL . "/mobile/index.php?act=festval&op=qixi");
             $url = $author->enter($url);
             return self::outsuccess(['direct_uri' => $url],"redirect");
         }

+ 3 - 3
mobile/templates/default/festival/TanabataFestival/index.php

@@ -123,9 +123,9 @@
 <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/new_bridge.js"></script>
 <script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/jquery-1.11.0.min.js"></script>
 <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/comm/iSlider.js"></script>
-<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/point.js"></script>
-<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/game.js"></script>
-<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/draw.js"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/point.js?<?php echo bonus_version(); ?>"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/game.js?<?php echo bonus_version(); ?>"></script>
+<script src="<?php echo RESOURCE_SITE_URL; ?>/mobile/qixi/js/draw.js?<?php echo bonus_version(); ?>"></script>
 
 <script>
   var isShare = false;

+ 1 - 0
mobile/wxauthor.php

@@ -74,5 +74,6 @@ else
                         </html>";
 
         echo $html;
+
     }
 }