banner
Norman Wang

Norman Wang

Front-end / Electronjs Development Engineer
github
playstation

Wedding invitation WeChat mini program, using WeChat cloud development, no need for domain name and server.

Prerequisites#

  • Apply for a mini program account

Getting Started#

  1. Clone Wedding-invitation and import it into the WeChat development tool. When importing, fill in your appid.

  2. Enable cloud development (choose the free package).

  3. Create four collections named bless, photos, comment, invitation, and user.

  4. Open the sql folder and import the data according to the collection names.

  5. Modify the env field in the app.js file in the root directory to your cloud development environment ID.

wx.cloud.init({
  env: ''
})
  1. Right-click on functions and select the current cloud development environment. Right-click on get_openId and select the third option "Upload and Deploy: Cloud Installation Dependencies".

  2. Recompile.

Data Format Description#

  1. bless is the data for the "Friend's Blessing" page.

  2. comment is the data for the "Leave a Comment" page.

  3. photos is the data for the "Sweet Album" page.

  4. user is the user data.

  5. invitation is the data table (only one record) for basic information. This data is used for the mini program's "Home" and "Map" pages. The data format is as follows:

{
  // Groom's name
  "boy": "Jay Chou",
  // Wedding date in Gregorian calendar
  "date": "2020-10-01 12:00:00",
  // Bride's name
  "girl": "Hannah Quinlivan",
  // Wedding location (name of hotel or church)
  "hotel": "Selby Abbey, North Yorkshire, England",
  // Wedding date in lunar calendar
  "lunar": "15th day of the 8th lunar month in the year of Gengzi",
  // Background music URL
  "music": "https://6465-dev-1goaza5i509ecff5-1258198969.tcb.qcloud.la/audio/ido.mp3?sign=f186b54afeca081690c8c03c2573521c&t=1601797034",
  // Whether the background music plays automatically
  "autoPlay": false,
  // Homepage background image
  "image": "https://6465-dev-1goaza5i509ecff5-1258198969.tcb.qcloud.la/photos/cover.jpeg?sign=5ebe072ba028b0a2da8aa54fb82586a0&t=1601799069",
  // Wedding location address
  "address": "Selby, North Yorkshire, England",
  // Wedding location latitude and longitude
  "latitude": 38.446324,
  "longitude": 112.735426,
  // Groom & bride's phone numbers
  "boyPhone": "13412344321",
  "girlPhone": "13698766789"
}

Note⚠️⚠️⚠️#

  • If the mini program page displays abnormally, please disable the "ES6 to ES5" function.

  • Due to the adjustment of the rules for obtaining user avatars and nicknames in the mini program, it is no longer possible to directly obtain user nicknames and avatars by calling wx.getUserProfile. Therefore, Wedding-invitation has been modified according to the official requirements, and users will be redirected to a page to fill in their nicknames and avatars when using the "Blessing" and "Comment" functions for the first time.

  • You need to modify the security rules for all tables in the cloud development database and storage to custom rules. The rules are as follows:

xxx.png

  • If you are a personal mini program, the "Leave a Comment" page will not pass the review and you need to comment out this page. 😭😭😭
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.