In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this "WeChat Mini Programs initialization how to configure" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can gain something after reading this article. Let's take a look at this "WeChat Mini Programs initialization how to configure" article.
Guidelines for initialization configuration of Mini Program
If you have successfully created Mini Program resources, you need to make some simple configuration of existing resources before Mini Program can run.
Users who have not created resources can first create them in the Mini Program console.
1. Configure WeChat Mini Programs communication domain name
First of all, we copy the secondary domain name in the Mini Program resources view, which will be used in the following processes.
Then go to the Wechat public platform-* * Development * *-> * * basic configuration * *-> * * Server configuration * *-> * * modify configuration * *, and use the second-level domain name to set the communication domain name. After setting it, you may need to wait a few minutes to restart the Wechat developer tool to take effect.
Request legal domain name: enter the second-level domain name assigned by Tencent Cloud
Socket legal domain name: enter the Socket domain name assigned by Tencent Cloud, such as 12345678.ws.qcloud.la
UploadFile legal domain name: enter the second-level domain name assigned by Tencent Cloud
DownloadFile legal domain name: enter the second-level domain name assigned by Tencent Cloud
two。 Modify business server configuration
If the development language environment is the CentOS operating system, you can skip this step if the resource is already configured to / etc/qcloud/sdk.config by default when you create the resource.
The password for logging in to the CVM can be checked in the internal messages, SMS messages and mailboxes.
Windows Server system modifies the sdk.config file under c://qcloud
{"serverHost": "xxxx.qcloud.la", / / the secondary domain name given in the resource view is "authServerUrl": "http:// private network IP/mina_auth/", / / the private network IP is changed to the session management server's private network IP "tunnelServerUrl": "https://xxxx.ws.qcloud.la", / / there is no need to modify" tunnelSignatureKey ":" 62aaa14292b3a65a61c14b8c30437bc648e087b2 ", / / fill in a random character" networkTimeout ":" 30000 "}
After the modification is completed, you need to restart the website in IIS to take effect.
3. Download WeChat Mini Programs Demo and SDK
Go to github and download Demo locally.
Modify the host configuration in the config.js configuration file under the Demo root directory
Var host = 'www.qcloud.la'; / / host is replaced by the secondary domain name var config = {service: {host, loginUrl: `https://${host}/login`, tunnelUrl: `https://${host}/tunnel`}} assigned in WeChat Mini Programs's resource view; module.exports = config
Wechat developer tools import the Demo project directory, and then click debug to open the chat room Demo to experience
Developer tools download address: windows 64, windows 32, mac
4. Upgrade scheme
If the existing configuration can not meet your business needs, we provide standalone architecture upgrade and cluster architecture expansion to upgrade and expand the existing resources.
FAQ what if Wechat AppId and AppSecret fill in the wrong words when purchasing?
If you fill in AppId and AppSecret incorrectly when purchasing a solution. Mini Program users will return an error code 40029 and an error message MA_WEIXIN_CODE_ERR when they log in. At this point, you need to modify AppId and AppSecret manually.
The modification steps are as follows:
Log in to the session management server, enter the / opt/lampp/htdocs/mina_auth/system/db/ directory, and view the db.ini file, which stores the ip, port, username, passwd and dbname information of the cloud database CDB.
1.1) enter the CDB configuration file directory
Cd / opt/lampp/htdocs/mina_auth/system/db/
1.2) View the server profile
Vi db.ini
After obtaining this information, log in to the cloud database CDB and modify the AppId and secretKey in the cAppinfo table.
2.1) enter the directory where the mysql command is installed
Cd / opt/lampp/bin/
2.2) Connect CDB
. / mysql-h # ip-P # port-u # username-p # passwd (where # ip, # port, # username, # passwd are the specific information found in step 1.2)
2.3) Update AppId and AppSecret
Use cAuth;// selects the database. Update cAppinfo set appid = "your appid", secret = "your secret"; / / where can I find the AppID and AppSecret that I filled in when I created the resource with the correct AppId and AppSecret?
To view AppID, go to Wechat Public platform-* * Select Settings * *-> developer Settings * *. You can see it in the developer ID column. AppSecret is the private key of Mini Program. Wechat is no longer saved and cannot be viewed, so it can only be reset. Please take good care of it after reset, and refer to the above process to modify the version held in the Wafer service.
Where can I get the CVM/CDB password assigned by one-stop Construction Mini Program?
The passwords of the assigned server and database resources can be obtained from internal messages, SMS messages and mailboxes.
Reinstall the development language environment
Currently, the business server provides PHP, Node.js, Java and .NET versions of the language environment. If you want to switch, you need to do the following:
Backup configuration fil
Copy sdk.config from server to local, CentOS system under / etc/qcloud path, Windows Server system under c://qcloud path
Reinstall the system
If you have any important data, please keep it in advance.
First, log in to the Tencent Cloud CVM console, click "more"-"reinstall system" in the operation bar on the right side of the session management CVM instance.
Select the service market for the source of the image in the pop-up box, select the basic environment for the image, find the image in four languages in the drop-down list to select the image, and start reinstalling the image at the point after setting the system password.
Upload configuration fil
After the system is reinstalled, upload the sdk.config saved in step 1 to the server. The CentOS system is in the / etc/qcloud path, and the Windows Server system is in the c://qcloud path.
Restart the service
Node.js environment enters / data/release/node-weapp-demo to execute pm2 start process.json
The .NET environment needs to restart the website in IIS for the configuration to take effect.
The Java environment restarts the tomcat execution command systemctl restart tomcat
The above is about the content of this article on "how to configure WeChat Mini Programs initialization". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.