WeChat applet development, database table creation, and custom cloud environments

Table of Contents

1. After entering the applet, click “Cloud development” to open the cloud development function.

2669938b6ab4b8a2ebdef7a986dc8a56

2. After enabling the cloud development function, you will enter the cloud development console, click the database in the upper left corner, and then click the “+” below to generate a spreadsheet. Randomly take the table name, just be happy, my watch is called TestDatabase.

5a01e1115c70d53e136001f0a08ccc27

3. After creating the schedule, click “+ Add Record” on the right, the pop-up window will appear. This window is a pop-up window to fill in the field you need. I see you, you need to specify the field name, field type and value.

ea6f60220c9bc00d9751f52cf984966e

4. Only one piece of data can be generated at a time, and the field name and type of each piece of data must be the same. After creation, each data will contain another “_id” field. This is a cloud development database that automatically adds you and can also change its value, but the _ID of each data must be unique.

920ad975ba73ee2db0bc1202211c20ab

65c27b978d9bb43dee69c75528924a3b

5. So the database table for development and creation of clouds is ok. Don’t forget to add the specified cloud environment to App.js from the program applet before accessing the database (when calling cloud functions, databases, storage, cloud storage and other APIs, you need to specify the specific cloud ID, which is required to visit

    wx.cloud.init({
      Env: 'xxx' // идентификатор среды развития облаков
    })

6. Where can I see the Cloud ID? Click Settings in the upper right corner of the cloud development console, you can see the cloud environment. The newly discovered feature of cloud development is that the system has configured one of the system defaults. You can also create multiple cloud environments. This is free traffic for us. As a rule, small companies or individuals will suffice. After choosing the environment name, copy the environment identifier to app.js, and finally write the code to call the database.

85b2f6f1d9f26b3ffd0306fc625a0323

Leave a Comment