- 从项目中删除分类页及相关代码和样式文件 - 从项目中删除详情页及相关代码和样式文件 - 首页简化为欢迎界面并添加跳转云开发测试页入口 - 更新自定义底部栏移除分类入口 - 更新app.js初始化云开发环境 - 修改app.json移除分类页面配置 - 调整首页样式和交互,提高简洁度 - 配置云函数目录路径cloudfunctionRoot为cloudfunctions/
119 lines
2.7 KiB
Plaintext
119 lines
2.7 KiB
Plaintext
<!--pages/cloud-test/cloud-test.wxml-->
|
|
<view class="container">
|
|
<!-- 标题 -->
|
|
<view class="header">
|
|
<text class="title">云开发功能测试</text>
|
|
<text class="subtitle">测试云函数、云数据库、云存储</text>
|
|
</view>
|
|
|
|
<!-- 云函数测试 -->
|
|
<view class="section">
|
|
<view class="section-title">
|
|
<van-icon name="code-o" size="36rpx" color="#1890ff" />
|
|
<text>云函数测试</text>
|
|
</view>
|
|
<view class="btn-group">
|
|
<van-button
|
|
type="primary"
|
|
size="small"
|
|
loading="{{ loading }}"
|
|
bindtap="onTestFunction"
|
|
>
|
|
调用云函数
|
|
</van-button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 云数据库测试 -->
|
|
<view class="section">
|
|
<view class="section-title">
|
|
<van-icon name="records" size="36rpx" color="#52c41a" />
|
|
<text>云数据库测试</text>
|
|
</view>
|
|
<view class="btn-group">
|
|
<van-button
|
|
type="primary"
|
|
size="small"
|
|
loading="{{ loading }}"
|
|
bindtap="onTestDbAdd"
|
|
>
|
|
添加数据
|
|
</van-button>
|
|
<van-button
|
|
type="info"
|
|
size="small"
|
|
loading="{{ loading }}"
|
|
bindtap="onTestDbQuery"
|
|
>
|
|
查询数据
|
|
</van-button>
|
|
<van-button
|
|
type="warning"
|
|
size="small"
|
|
loading="{{ loading }}"
|
|
bindtap="onTestDbDelete"
|
|
>
|
|
删除数据
|
|
</van-button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 云存储测试 -->
|
|
<view class="section">
|
|
<view class="section-title">
|
|
<van-icon name="photo-o" size="36rpx" color="#faad14" />
|
|
<text>云存储测试</text>
|
|
</view>
|
|
<view class="btn-group">
|
|
<van-button
|
|
type="primary"
|
|
size="small"
|
|
loading="{{ loading }}"
|
|
bindtap="onTestStorageUpload"
|
|
>
|
|
上传图片
|
|
</van-button>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 日志区域 -->
|
|
<view class="log-section">
|
|
<view class="log-header">
|
|
<text class="log-title">执行日志</text>
|
|
<van-button
|
|
plain
|
|
type="default"
|
|
size="mini"
|
|
bindtap="onClearLogs"
|
|
>
|
|
清空
|
|
</van-button>
|
|
</view>
|
|
<scroll-view class="log-list" scroll-y>
|
|
<view
|
|
class="log-item log-{{ item.type }}"
|
|
wx:for="{{ logs }}"
|
|
wx:key="index"
|
|
>
|
|
<text class="log-time">[{{ item.time }}]</text>
|
|
<text class="log-message">{{ item.message }}</text>
|
|
</view>
|
|
<view class="log-empty" wx:if="{{ logs.length === 0 }}">
|
|
<text>暂无日志</text>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<!-- 返回按钮 -->
|
|
<view class="footer">
|
|
<van-button
|
|
plain
|
|
type="default"
|
|
block
|
|
bindtap="onBack"
|
|
>
|
|
返回首页
|
|
</van-button>
|
|
</view>
|
|
</view>
|