feat: 初始化项目
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const cloud = require('wx-server-sdk');
|
||||
const responseMiddleware = require('../../common/responseMiddleware');
|
||||
|
||||
// 使用中间件包装异步函数
|
||||
module.exports = responseMiddleware(async (event, context) => {
|
||||
// 获取基础信息
|
||||
const wxContext = cloud.getWXContext();
|
||||
return {
|
||||
openid: wxContext.OPENID,
|
||||
appid: wxContext.APPID,
|
||||
unionid: wxContext.UNIONID,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user