feat: 报名逻辑

This commit is contained in:
eric
2022-11-21 22:03:42 +08:00
parent 841b480f01
commit 78adbef9b4
20 changed files with 384 additions and 96 deletions

View File

@@ -0,0 +1,6 @@
{
"permissions": {
"openapi": [
]
}
}

View File

@@ -0,0 +1,18 @@
// 云函数入口文件
const cloud = require("wx-server-sdk");
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }); // 使用当前云环境
// 云函数入口函数
exports.main = async (event, context) => {
return new Promise((resolve, reject) => {
const wxContext = cloud.getWXContext();
resolve({
event,
openid: wxContext.OPENID,
appid: wxContext.APPID,
unionid: wxContext.UNIONID,
});
});
};

View File

@@ -0,0 +1,14 @@
{
"name": "getOpenid",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"wx-server-sdk": "~2.6.3"
}
}