quyueting 5 лет назад
Родитель
Сommit
9cb6aa30bf
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      minigame/WebContent/js/main.js

+ 3 - 1
minigame/WebContent/js/main.js

@@ -580,6 +580,7 @@ function handleComplete(evt, comp) {
         } else {
             alert('您的手机不支持摇一摇功能!');
         }
+    
 
         //获取加速度信息
         //通过监听上一步获取到的x, y, z 值在一定时间范围内的变化率,进行设备是否有进行晃动的判断。
@@ -612,7 +613,8 @@ function handleComplete(evt, comp) {
                             $(".poster-mode").fadeIn();
                         })
 
-
+                        var href = document.location.href + (document.location.href.indexOf('?') > -1?'&':'?') + "type=" + chooseType + "&food=" + dishIndex;
+                        history.pushState("", "Title", href);
                         if(dishIndex == 0){
                             exportRoot.pot.hsr.gotoAndStop(1);
                         }else if(dishIndex == 1){