Recently, I have been learning the development of Vue+Node+MongoDB full stack. Due to the large scale of the project and the old middleware, I tried to build a new version of middleware for better targeted learning. Here are the pits encountered during the period:

Create a project:

Create -nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create-nuxt-app: create- Nuxt-app: create- Nuxt-app

Normal installation: NPX create-nuxt-app projectName Specifies the scaffolding version: NPX [email protected] projectName

Note that when creating a project, remember to select the server framework KOA or Express when selecting configuration items, otherwise the project will still not have the Server folder

Every time you run, Nuxt asks Are you interested in participation?

How can this problem be ignored at every run?

Solutions:

Open node_modules > @nuxt > Telemetry > dist > module.js

Accept to false

Wechat public Number – wechat verification access

The access process of wechat authentication is that wechat sends a GET request to your server, which carries four parameters: Signature, TIMESTAMP, nonce and Echostr, where signature is the signature. Timestamp is a timestamp, and nonce is a random string echostr is the return code. The controller receives these four parameters, and then performs operations on the three parameters timestamp,nonce, and token. If the operation results are as expected, Returns echostr to the wechat server, otherwise returns any other string.

The specific operation steps are as follows:

1. Sort the tokens, timestamp and nonce entered on the wechat public account test platform in lexicographical order

2. Encrypt the sorted parameters with SHA1 encryption

3. If the encrypted result is the same as signature, return true; otherwise return false

Wechat official number – Registration and configuration of test number

WeChat public, test, provided a test platform, can not apply for WeChat number under the premise of public use WeChat provide public interface, the registered address is: mp.weixin.qq.com/debug/cgi-b…

After registration, developers will be assigned an appID and AppSecret which is the credential of the developer test number, which is very important.

On the homepage of the wechat test number, you need to fill in “Interface Configuration Information”, including the URL and Token. The URL is accepted WeChat validation request access to the address, the port number must be 80 ports, such as: http://48.101.190.197/wechat-hear, the Token is a random string, used for validation. After filling in “Interface Configuration Information”, click the access test button, and the wechat server will send a request to start the verification access process.

2. Realize wechat web page authorization mechanism and user data acquisition in VUE SSR

Obtain the public account appID and AppSecret;

Follow our test public account;

Set the domain name to be called back after sweeping user authorization.

3. Access to wechat JS-SDK permission in Vue SSR