// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
env: 'cloud1-4gp16qj0bc2e0dff'
})
const db = cloud.database()
const _ = db.command
// 云函数入口函数
exports.main = async (event, context) => {
const wxContext = cloud.getWXContext()
return {
event,
openid: wxContext.OPENID,
appid: wxContext.APPID,
unionid: wxContext.UNIONID,
ENV:wxContext.ENV,
clientip:wxContext.CLIENTIP,
clientipv6:wxContext.CLIENTIPV6,
}
}
返回信息
Error: TencentCloud API error: {
"Response": {
"Error": {
"Code": "FailedOperation.UpdateFunctionCode",
"Message": "当前函数处于Creating状态,无法进行此操作,请稍后重试。"
},
"RequestId": "9a639f86-fb60-4b4f-9008-c30fab202d0e"
}
}
云函数端一直显示在创建中