Passwd/miniprogram/pages/openapi/serverapi/serverapi.wxml
Saturneric fb74e7395f Add
2020-09-01 01:19:39 +08:00

42 lines
1.5 KiB
Plaintext

<view class="container">
<form class="list" bindsubmit="submitTemplateMessageForm" report-submit>
<button class="list-item" form-type="submit">
<text>发送模板消息</text>
</button>
<view class="list-item" wx:if="{{templateMessageResult}}">
<text class="request-text">调用结果:{{templateMessageResult}}</text>
</view>
</form>
<view class="guide">
<text class="headline">测试须知</text>
<text class="p">1. 需在手机上预览测试,工具中无效</text>
<text class="p">2. 需上传 cloudfunctions 目录下的 openapi 云函数</text>
<text class="p">3. 调用成功后返回到微信主界面查看收到的模板消息</text>
</view>
<view class="list">
<view class="list-item" bindtap="onGetWXACode">
<text>获取小程序码</text>
</view>
<view class="list-item" wx:if="{{wxacodeResult}}">
<text class="request-text">{{wxacodeResult}}</text>
<text class="request-text" wx:if="{{showClearWXACodeCache}}" bindtap="clearWXACodeCache">清除缓存</text>
</view>
</view>
<view class="guide">
<text class="headline">测试须知</text>
<text class="p">1. 需上传 cloudfunctions 目录下的 openapi 云函数</text>
<text class="p">2. 云函数中获取图片后会上传至存储空间并返回至小程序使用和缓存</text>
<text class="p">3. 云存储需设置为公有读</text>
</view>
<view class="guide">
<image src="{{wxacodeSrc}}" mode="aspectFit"></image>
</view>
</view>