shish 6 lat temu
rodzic
commit
943f972500

+ 5 - 3
app/platform/controllers/AuthController.php

@@ -3,17 +3,19 @@
 namespace platform\controllers;
 
 use biz\auth\services\AuthService;
+use common\components\util;
 use Yii;
 
 class AuthController extends BaseController
 {
-
+	
 	//获取权限树 shish 2019.11.24
 	public function actionTree()
 	{
 		$get = Yii::$app->request->get();
 		$endId = isset($get['endId']) ? $get['endId'] : 1;
-		AuthService::getTree($endId);
+		$tree = AuthService::getTree($endId);
+		util::success($tree);
 	}
-
+	
 }

+ 3 - 3
biz/platform/classes/WxOpenClass.php

@@ -13,17 +13,17 @@ class WxOpenClass extends BaseClass
 	//各来源ID
 	public static $sourceList = [
 		//商城H5
-		'h5' => 1,
+		'mobile' => 1,
 		//商城小程序
 		'mini' => 2,
 		//商家后台PC
 		'admin' => 3,
 		//商家后台H5
-		'backend' => 4,
+		'back' => 4,
 		//总后台
 		'platform' => 5,
 	];
-	
+
 	//获取各端列表
 	public static function getSourceList()
 	{

+ 1 - 1
biz/platform/services/WxOpenService.php

@@ -15,7 +15,7 @@ class WxOpenService extends BaseService
 	public static function getSourceId()
 	{
 		$header = httpUtil::getHeader();
-		$source = isset($header['source']) ? $header['source'] : 'h5';
+		$source = isset($header['source']) ? $header['source'] : 'mobile';
 		$sourceList = WxOpenClass::getSourceList();
 		$id = isset($sourceList[$source]) ? $sourceList[$source] : 1;
 		return $id;