How can I change a wechat applet request library into taro in four steps

Time:2021-2-26

The author of the third-party library in this project will no longer maintain it. If there is any infringement, delete it immediately!

Han Han, Ben Han, is a fast open source project.
How to be an excellent open source contributor only needs four steps.

The first step is to build a wechat applet request library

wechat-request

$ git clone [email protected]:notbucai/wechat-request.git

The second step is to change the main code

takewx.requestChange toTaro.request;

dispatchRequest.js ->About 34 lines

How can I change a wechat applet request library into taro in four steps

The third step is to reform package.json

Change the name, change the version
How can I change a wechat applet request library into taro in four steps

Step 4 release package

$ npm publish --access=public

Project introduction

$ npm install @bucai/taro-request

END

wechat-request

GitHub

https://www.notbucai.com

Recommended Today

Third party calls wechat payment interface

Step one: preparation 1. Wechat payment interface can only be called if the developer qualification has been authenticated on wechat open platform, so the first thing is to authenticate. It’s very simple, but wechat will charge 300 yuan for audit 2. Set payment directory Login wechat payment merchant platform( pay.weixin.qq . com) — > Product […]