本地调试出错,云运行是正确的
const cloud = require("wx-server-sdk")
cloud.init()
const db = cloud.database()
exports.main = async (event, context) => {
const {
OPENID,
APPID,
UNIONID,
} = cloud.getWXContext()
}
在本地调试时出现下面提示,求解!
TypeError: cloud.getWXContext is not a function