Project introduction

  • This project is a simplified version of the mall, which retains the main logic of the mall and removes some complex functions. Through this project, you can be familiar with cloud functions and cloud database operations of cloud development.
  • The project has no background management function, and the details and pictures of the products are all from the Internet.
  • The payment operation in the project is simulated payment, without real introduction of payment function. The cloud development integrates wechat payment ability, which can be easily used.

Deployment steps

  • Open the project source code in the small program developer tools, fill in their own small program APPID
  • The cloud development environment was opened and two database sets of GOODS and order were created.
  • Will/cloudfunctions/data. The json file to import the goods collection, which contains two sample goods (from the hammer mall)
  • Log in the background of small program developer, set the service category as [Enterprise Management], select 3520 for subscription message, and name as [New Order reminder].
  • Subscribe message item Select order number, order status and order remarks to create save template ID
  • Browser visit this website, use wechat to authorize the current small program to enter Tencent cloud official website console, set up programming user
  • As shown in the following figure, set relevant programming users and obtain API key information SecretId and SecretKey after creation

  • Open the cloudcontainer/work/key. Json, will SecretId and SecretKey and fill in the template id into json
  • Starting from Step 2, select the CloudContainer folder to upload and deploy cloud hosting according to the official documentation. Enter server for the service name in step 2 and 3000 for the listening port in step 4
  • After the cloud hosting deployment is complete, restart the preview applet to experience.

Development of attention

  • The author puts all external data interaction operations in app.js, and can directly change the corresponding background in this folder.
  • The page construction and page logic of this project are directly migrated by referring to other projects. There are some flaws in code rules and security. If you want to build your own mall, please improve it according to business needs.
  • All contents of this project can only be used for learning exchange, not for commercialization

Product introduction

Cloud Development (TCB) is a cloud native integrated development environment and tool platform provided by Tencent Cloud. It provides developers with highly available, automatic and flexible expansion of back-end cloud services, including computing, storage, hosting and other serverless capabilities, which can be used for cloud integrated development of various end applications (small programs, Public account, Web application, Flutter client, etc.) to help developers build and manage back-end services and cloud resources in a unified manner, avoiding tedious server construction, operation and maintenance during application development. Developers can focus on the implementation of business logic, with lower development threshold and higher efficiency.

Open cloud development: console.cloud.tencent.com/tcb?tdl_anc…

The product documentation: cloud.tencent.com/product/tcb…

Technical documentation: Cloudbase.net? From =10004

Technical exchange plus Q group: 601134960

Latest news follow wechat official account [Tencent Yunyun Development]