refactor(app): 移除分类和详情模块,新增云开发测试页
- 从项目中删除分类页及相关代码和样式文件 - 从项目中删除详情页及相关代码和样式文件 - 首页简化为欢迎界面并添加跳转云开发测试页入口 - 更新自定义底部栏移除分类入口 - 更新app.js初始化云开发环境 - 修改app.json移除分类页面配置 - 调整首页样式和交互,提高简洁度 - 配置云函数目录路径cloudfunctionRoot为cloudfunctions/
This commit is contained in:
23
cloudfunctions/test/index.js
Normal file
23
cloudfunctions/test/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 云函数入口文件
|
||||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
|
||||
// 云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
const wxContext = cloud.getWXContext();
|
||||
|
||||
return {
|
||||
code: 0,
|
||||
message: '云函数调用成功',
|
||||
data: {
|
||||
event,
|
||||
openid: wxContext.OPENID,
|
||||
appid: wxContext.APPID,
|
||||
unionid: wxContext.UNIONID,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
};
|
||||
};
|
||||
9
cloudfunctions/test/package.json
Normal file
9
cloudfunctions/test/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "test",
|
||||
"version": "1.0.0",
|
||||
"description": "云函数测试",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"wx-server-sdk": "~2.6.3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user