It's easy to terminate an interview, but you have to be responsible to yourself. So I spent a day writing this weather question. Record it here.
I just wrote a simple frame without customizing any special styles, so let it look like this
- Three parties used: Moya, SnapKit, HandyJSON, MBProgressHUD. The project structure is as follows:
I don't intend to go into details, but I just took out the project I wrote before and extracted the main framework
- Implement Moya's TargetType protocol according to different modules,
- Parse the data model through the return in Response combined with HandyJSON
- Re-encapsulate the request request to adapt to the background data structure
- Customize the protocol in terms of parameter encryption, and call it at the right place