index.wxml 1.4 KB

123456789101112131415161718192021222324252627282930
  1. <!--index.wxml-->
  2. <view class="container">
  3. <view class="btn-content">
  4. <button type="{{ demoType === 'cos' ? 'primary' : 'default' }}" class="button" bindtap="switchCosDemo">cos demo</button>
  5. <button type="{{ demoType === 'ci' ? 'primary' : 'default' }}" class="button" bindtap="switchCiDemo">ci demo</button>
  6. </view>
  7. <block wx:if="{{ demoType === 'cos' }}">
  8. <view class="title">简单上传例子(推荐)</view>
  9. <view class="list">
  10. <button type="primary" class="button" bindtap="postUpload">不使用SDK Post 直传</button>
  11. </view>
  12. <view class="title">小程序完整 SDK 例子(功能齐全,文件较大)</view>
  13. <view class="list-panel" wx:for="{{listMap}}" wx:index="index" wx:for-item="list" wx:key="index">
  14. <view class="sub-title"> {{title[index]}} {{key}}</view>
  15. <view class="list">
  16. <button type="primary" class="button {{index}}" bindtap="{{item}}" wx:for="{{list}}" wx:key="key">{{item}}</button>
  17. </view>
  18. </view>
  19. </block>
  20. <block wx:else>
  21. <view class="title">数据万象示例</view>
  22. <view class="list-panel" wx:for="{{ciListMap}}" wx:index="index" wx:for-item="list" wx:key="index">
  23. <view class="sub-title"> {{ciTitle[index]}} {{key}}</view>
  24. <view class="list">
  25. <button type="primary" class="button {{index}}" bindtap="{{item}}" wx:for="{{list}}" wx:key="key">{{item}}</button>
  26. </view>
  27. </view>
  28. </block>
  29. </view>