Commit 3e80add8 by 杨昕

修改管理员店铺管理逻辑

parent e91bfb1f
Pipeline #14030 passed with stages
in 2 minutes 37 seconds
......@@ -18,10 +18,19 @@ class PrivilegeController extends Controller
*/
public function index(Request $request)
{
$user = Auth::user();
if ($user->name == config("custom.supper_admin")['name']){
$url = getRbac($request);
$data['url'] = $url;
return view('admin.privilege.list',$data);
}
$url = getRbac($request,'api/open/check');
$data['appid'] = $request->appid;
$data['uid'] = Auth::user()->mis_uid;
$data['uid'] = $user->mis_uid;
$data['tree'] = 1;
......@@ -31,6 +40,7 @@ class PrivilegeController extends Controller
$data
);
$result = json_decode($result,true);
if (empty($result['data'])){
......
......@@ -3,6 +3,7 @@
namespace App\Model;
use App\Exceptions\DatabaseException;
use Carbon\Carbon;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\DB;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
......@@ -169,13 +170,13 @@ class UserModel extends Authenticatable
if (!empty($user)){
throw new \Exception("用户已存在");
}
$create_time = new UTCDateTime(time() * 1000);
$data = [
'name' => $request->name,
'password' => md5($request->password),
'organization_id' => 0,
'status' => 0,
'create_time' => date('Y-m-d H:i:s',time()),
'create_time' => $create_time,
'user_type' => 1
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment