Waiting online for help? Laravel does the backend, but all data in the backend needs to be connected through the given API data interface.
战狼
战狼 2019-07-31 21:35:52
0
8
1150

This is my first time doing such a project, so I asked the teacher for guidance.
The data API is as follows:
1. User--》Administrator login (/api/lock/admin/user/admin/login) POST
Data request list

{  
"account": "string", 
 "password": "string"
 }
数据类型:
application/json

2. Administrator--》Create Administrator (/api/lock/admin/create) POST
Data request example

{  
"account": "string",  
"confirmPassword": "string",  
"nickName": "string", 
 "password": "string"
 }
数据类型:
application/json


战狼
战狼

reply all(2)
像风一样自由

You can just write it directly in web.php

  • reply What to write directly? Please make it clear
    战狼 author 2019-08-03 16:17:35
ringa_lee

There is nothing wrong with connecting this through the given API data interface

I don’t know what your specific problem is?

  • reply The specific question is, My current local login address: znspt.test/admins/login How can I successfully log in when I enter the correct account and password? Do I need to write an ajax in the login page to get the login information and address?
    战狼 author 2019-08-01 11:02:22
  • reply The specific question is, my current local login address is: znspt.test/admins/login. How can I successfully log in when I enter my account number and password? Do I need to write an ajax in the login page to obtain the login information and address?
    战狼 author 2019-08-01 11:03:13
  • reply <form action="/admins/login" method="post"> @csrf <div class="form-group mb-3"> <label for="emailaddress">account</label> <input class="form-control" type="text" name="account" id="nameaddress" required="" placeholder="请输入用户名称" value="admin"> </div> <div class="form-group mb-3"> <label for="password">password</label> <input class="form-control" type="password" name="password" required="" id="password" placeholder="请输入密码" value="smartlock"> </div> <div class="form-group mb-3"> <div class="custom-control custom-checkbox checkbox-info"> <input type="checkbox" class="custom-control-input" id="checkbox-signin" name="remember" {{ old('remember') ? 'checked' : '' }}> <label class="custom-control-label" for="checkbox-signin">Remember Password</label> </div> </div> <div class="form-group mb-0 text-center"> <button class="btn btn-danger btn-block" type="submit"> log in system </button> </div> </form>
    战狼 author 2019-08-01 11:04:38
  • reply Because the login account and password are all in the API interface, I want to log in to the system functionally by using the account in the API!
    战狼 author 2019-08-01 12:02:44
  • reply Because the login account and password are all in the API interface, I want to log in to the system by using the account in the API!
    战狼 author 2019-08-01 12:16:59
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template