Commit be0393ff by 杨昕

code format

parent 96ca9d76
Pipeline #9911 passed with stages
in 31 seconds
......@@ -164,7 +164,12 @@ class UserModel extends Eloquent
* @throws DatabaseException
*/
public static function createUser($request){
try{
$user = UserModel::where("name",$request->name)->first();
if (!empty($user)){
throw new \Exception("用户已存在");
}
$data = [
'name' => $request->name,
......@@ -181,9 +186,7 @@ class UserModel extends Eloquent
}
}catch (\Exception $exception){
throw new DatabaseException($exception->getMessage());
}
return $flag;
}
......
......@@ -102,16 +102,16 @@
<label for="role">角色</label>
<div class="input-group ">
{{--<div class="input-group-addon"><i class="fa fa-phone"></i></div>--}}
<div class="checkbox">
<label class="radio-inline">
<input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" checked>
<span class="mr5" style="margin-right: 20px;">普通用户</span>
</label>
</div>
{{--<div class="checkbox">--}}
{{--<label class="radio-inline">--}}
{{--<input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" checked>--}}
{{--<span class="mr5" style="margin-right: 20px;">普通用户</span>--}}
{{--</label>--}}
{{--</div>--}}
<div class="checkbox">
<label class="radio-inline">
<input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1">
<input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" checked>
<span class="mr5" style="margin-right: 20px;">管理员</span>
</label>
</div>
......
......@@ -147,6 +147,7 @@
confirm: function () {
fetch_response('DELETE',"/web/member/"+id).then(function (res) {
if (res.code==200) {
$('body').toast({
position:'fixed',
......
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