shish 6 лет назад
Родитель
Сommit
34ffd135a0
2 измененных файлов с 5 добавлено и 10 удалено
  1. 0 5
      app/mobile/controllers/MainController.php
  2. 5 5
      app/mobile/views/main/index.php

+ 0 - 5
app/mobile/controllers/MainController.php

@@ -20,10 +20,5 @@ class MainController extends PublicController
 		$token = strpos($fullUrl, 'token') === false ? '' : 'hasToken';
 		return $this->renderPartial('index', ['host' => $host, 'token' => $token]);
 	}
-	
-	public function actionJwt()
-	{
-		
-	}
 
 }

+ 5 - 5
app/mobile/views/main/index.php

@@ -10,8 +10,8 @@ http://m.huaml.com/#main/index?account=12358&shopId=15680
     var code = encodeURIComponent('#main/index?account=12358&shopId=15680');
     <?php if(empty($token)){ ?>
     window.location='<?= $host ?>/auth/prepare?suffixUrl='+code+'&authScope=snsapi_base&account=12358';
-    <?php } ?>
-    /*
+    <?php }else{ ?>
+    
     function StandardPost(url,args){
         var form = $("<form method='post'></form>"),
             input;
@@ -31,8 +31,8 @@ http://m.huaml.com/#main/index?account=12358&shopId=15680
         form.submit();  //进行提交
     }
 
-    var args = { suffixUrl: "#main/index?account=12358",authScope: "snsapi_base"};
-    StandardPost("host/auth/prepare",args)
-    */
+    var args = { suffixUrl: "#main/index?account=12358",token: "<?= $token ?>"};
+    StandardPost("<?= $host ?>/auth/prepare",args)
+    <?php } ?>
 </script>
 </body>