微信小程序开发之云开发
2020-11-09 本文已影响0人
IT阿泽
创建云开发小程序项目

开通云开发


开通后界面

选择开发环境


开启使用npm模块

安装wx-server-sdk

npm install --save wx-server-sdk@latest

创建云函数

// 云函数入口函数
exports.main = async (event, context) => {
console.log(event)
console.log(context)
return {
sum: event.a + event.b
}
}
本地调试云函数



联系博主: https://blog.iffmd.cn/
本文由博客群发一文多发等运营工具平台 OpenWrite 发布