Prechádzať zdrojové kódy

Weenier utc项目部署 0625

wesmiler 4 rokov pred
rodič
commit
9b1e31b73b

+ 33 - 10
app/Http/Controllers/PositionController.php

@@ -9,40 +9,63 @@
 // | Author: laravel开发员 <laravel.qq.com>
 // +----------------------------------------------------------------------
 
-namespace App\Http\Controllers;
+namespace App\Http\Controllers\Admin;
 
-use App\Services\PositionService;
+use App\Services\Common\RoleService;
 
 /**
- * 岗位管理-控制器
+ * 角色管理-控制器
  * @author laravel开发员
  * @since 2020/11/11
- * Class PositionController
+ * Class RoleController
  * @package App\Http\Controllers
  */
-class PositionController extends Backend
+class RoleController extends Backend
 {
     /**
      * 构造函数
      * @author laravel开发员
      * @since 2020/11/11
-     * PositionController constructor.
+     * RoleController constructor.
      */
     public function __construct()
     {
         parent::__construct();
-        $this->service = new PositionService();
+        $this->service = new RoleService();
     }
 
     /**
-     * 获取岗位列表
+     * 获取角色列表
      * @return mixed
      * @since 2020/11/11
      * @author laravel开发员
      */
-    public function getPositionList()
+    public function getRoleList()
     {
-        $result = $this->service->getPositionList();
+        $result = $this->service->getRoleList();
+        return $result;
+    }
+
+    /**
+     * 获取角色权限列表
+     * @author laravel开发员
+     * @since 2020/11/11
+     */
+    public function getPermissionList()
+    {
+        $result = $this->service->getPermissionList();
+        return $result;
+    }
+
+    /**
+     * 保存权限
+     * @return mixed
+     * @since 2020/11/11
+     * @author laravel开发员
+     */
+    public function savePermission()
+    {
+        $result = $this->service->savePermission();
         return $result;
     }
 

+ 1 - 1
app/Services/EmailService.php

@@ -56,7 +56,7 @@ class EmailService extends BaseService
         $mail['from']['name'] = 'UTC交易平台';
         $this->config = array_merge($config, $smtp);
         if ($mailKey != md5(json_encode($mail))) {
-            file_put_contents(base_path() . '/config/mail.php', '<?php \\n /* 邮箱服务配置 */ \\n return ' . var_export($mail, true) . ';' . '\\n ?>');
+            file_put_contents(base_path() . '/config/mail.php', "<?php \n /* 邮箱服务配置 */ \n return " . var_export($mail, true) . ';' . "\n ?>");
         }
 
         return true;