get-background-prefetch-data.wxml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <import src="../../../common/head.wxml" />
  2. <import src="../../../common/foot.wxml" />
  3. <view class="container page" data-weui-theme="{{theme}}">
  4. <template is="head" data="{{title: 'getBackgroundFetchData'}}"/>
  5. <view class="page-body">
  6. <view class="page-section">
  7. <view wx:if="{{canIUse}}" class="page-body-info">
  8. <view class="page-body-title">数据预拉取</view>
  9. <block wx:if="{{appid}}">
  10. <block>
  11. <text class="page-body-text">OpenID</text>
  12. <text class="context-value">{{openid}}</text>
  13. </block>
  14. <block>
  15. <text class="page-body-text">AppID</text>
  16. <text class="context-value">{{appid}}</text>
  17. </block>
  18. <block>
  19. <text class="page-body-text">数据缓存的时间</text>
  20. <text class="context-value">{{getDataTime}}</text>
  21. </block>
  22. </block>
  23. <block>
  24. <text class="page-body-text">用户启动小程序时,调用 wx.getBackgroundFetchData() 获取已缓存到本地的数据。
  25. </text>
  26. </block>
  27. </view>
  28. </view>
  29. </view>
  30. <template is="foot" />
  31. </view>