home.wxml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <scroll-view class="page" scroll-y>
  2. <view class="shell">
  3. <view class="hero">
  4. <view class="hero__eyebrow">Entry Home</view>
  5. <view class="hero__title">{{userNameText}}</view>
  6. <view class="hero__desc">{{tenantText}}</view>
  7. <view class="hero__desc">{{channelText}}</view>
  8. </view>
  9. <view class="panel">
  10. <view class="panel__title">当前状态</view>
  11. <view class="summary">{{statusText}}</view>
  12. <view wx:if="{{showOngoingPanel}}" class="summary">进行中:{{ongoingSessionText}}</view>
  13. <view wx:if="{{showOngoingPanel}}" class="summary">进行中运行对象:{{ongoingRuntimeText}}</view>
  14. <view wx:if="{{showOngoingPanel}}" class="summary">{{ongoingActionHintText}}</view>
  15. <view class="summary">最近一局:{{recentSessionText}}</view>
  16. <view class="summary">最近一局运行对象:{{recentRuntimeText}}</view>
  17. <view class="actions">
  18. <button class="btn btn--secondary" bindtap="handleRefresh">刷新首页</button>
  19. <button class="btn btn--ghost" bindtap="handleOpenEventList">活动列表</button>
  20. <button class="btn btn--ghost" bindtap="handleOpenExperienceMaps">地图体验</button>
  21. <button class="btn btn--ghost" bindtap="handleOpenRecentResult">查看结果</button>
  22. <button class="btn btn--ghost" bindtap="handleLogout">退出登录</button>
  23. </view>
  24. </view>
  25. <view wx:if="{{showOngoingPanel}}" class="panel">
  26. <view class="panel__title">进行中的游戏</view>
  27. <view class="summary">{{ongoingSessionText}}</view>
  28. <view class="summary">{{ongoingRuntimeText}}</view>
  29. <view class="summary">{{ongoingActionHintText}}</view>
  30. <view class="actions">
  31. <button class="btn btn--secondary" bindtap="handleResumeOngoing" disabled="{{!canRecoverOngoing}}">恢复</button>
  32. <button class="btn btn--ghost" bindtap="handleAbandonOngoing" disabled="{{!canAbandonOngoing}}">放弃</button>
  33. </view>
  34. </view>
  35. <view class="panel">
  36. <view class="panel__title">活动入口</view>
  37. <view wx:if="{{!cards.length}}" class="summary">当前没有首页卡片</view>
  38. <view wx:for="{{cards}}" wx:key="id" class="card" bindtap="handleOpenCard" data-event-id="{{item.event && item.event.id ? item.event.id : ''}}">
  39. <view class="card__title">{{item.title}}</view>
  40. <view class="card__subtitle">{{item.subtitle || (item.event && item.event.displayName ? item.event.displayName : '暂无副标题')}}</view>
  41. <view class="card__meta">{{item.type}} / {{item.displaySlot}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. </scroll-view>