Interface to preview

Sweep code experience

Test account: enter a valid mobile phone number and 6-digit verification code randomly. Or open wechat — a small program — and search for “online book lending platform.”

introduce

This is a small program I participated in the competition last summer. I reconfigured the front and back end code at the beginning of this year. I recently remembered this, so I reorganized the document and posted it to Github.

The main purpose is to share the code and give beginners a reference. The code may not be very well written, but the comments are detailed, layered, and easy to read. The interface definition is YAML, published on Swagger (click to see). The interface has been carefully designed, smooth interaction, good user experience.

The front end involves more than 30 pages of business logic, using the basic functions of small programs, encapsulating some common components, and set up the relevant demonstration pages. The front end now uses mock data from EasyMock, so it’s sometimes slow to respond.

The back-end supports a simple RESTful API using Slim+Eloquent. The interface implements parameter verification and permission control (Low) through middleware. The back end has not been deployed to the server yet, but will be refactored with Laravel sometime later.

The document

I have the document on Github and it’s available (click this link to view it). The contents include:

  • API design: How to design RESTful apis, data formats, HTTP status codes, error objects, testing tools
  • Back end: parameter verification, permission control, error handling
  • Front-end: network request encapsulation, network request error processing, cross-page communication, componentization

If there is something I need to explain in detail, please leave a message or issue. Welcome to participate in the discussion, common progress ~

A link to the

Document address: online library platform

Github: github.com/imageslr/we…

Backend github: github.com/imageslr/li…