index.wxml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <view>
  2. <xr-beside-edge
  3. disable-scroll
  4. id="main-frame"
  5. width="{{renderWidth}}"
  6. height="{{renderHeight}}"
  7. style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
  8. nextAction="{{nextAction}}"
  9. bind:requireLight="handleRequireLight"
  10. bind:requireDialog="handleRequireDialog"
  11. />
  12. <view
  13. wx:if="{{showLightButton}}"
  14. bindtap="handleTriggerLight"
  15. style="position: absolute;width: 4rem;height: 4rem;background:rgba(140, 140, 140, 0.4);bottom: 4rem;left: 50%;transform: translateX(-50%);border-radius: 50%;"
  16. >
  17. <view style="position: absolute; left: 0; top: 0;width: 100%;height: 100%;background:rgba(227, 230, 66, {{lightProgress * 0.8}});border-radius: 50%;color: white; text-align: center;line-height: 4rem;font-size: 2rem;">
  18. {{lightProgress === 1 ? '○' : ''}}
  19. </view>
  20. </view>
  21. <view
  22. wx:if="{{showDialog}}"
  23. style="position: absolute; left: 0; top: 0;background:{{bg}};width: 100vw;height: 100vh;"
  24. >
  25. <view
  26. bindtap="handleClickDialog" wx:if="{{text != ''}}"
  27. style="position: absolute; left: 5%; bottom: 5%;background:rgba(44, 44, 44, 0.5);width: 90%;height: 25vh;word-break: break-all;color:white;border-radius: 1rem;"
  28. >
  29. <view style="position: absolute;left: 1rem;top: 1rem;font-size: 1.4rem;text-align: center;">{{name}}</view>
  30. <view style="position: absolute;left: 5%;top: 4rem;font-size: 1.2rem;width: 90%;height: 100%;">
  31. <text wx:if="{{hint == ''}}">{{text}}</text>
  32. <view wx:if="{{hint != ''}}">{{start}}<span style="color:red">{{hint}}</span>{{end}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>