<!--subpages/textStep/textStep.wxml-->
<view>
  <van-nav-bar title="" left-text="" leftArrow custom-class="nav-bar" bind:click-left="leftBack"></van-nav-bar>
  <text class="page-title">睡眠质量指数分析</text>
  <view class="w-card">
    <view class="resultsAreShown-content-h">
      <text class="resultsAreShown-content-desc">睡眠得分：</text>
      <text class="resultsAreShown-content-score">{{comScore}}</text>
      <text class="resultsAreShown-content-units">分</text>
    </view>

    <view class="resultsAreShown-content-score-view">
      <view wx:for="{{ratingResultsList}}" wx:for-item="item" wx:for-index="index" wx:key="{{index}}"
        class="resultsAreShown-content-score-item">
        <image class="resultsAreShown-content-score-icon" src="{{item.icon}}"
          style="{{'opacity: '+(comScoreIndex == index ? '1' : '0')}}">
        </image>
        <view class="resultsAreShown-content-score-line" style="{{'background-color:'+item.color}}">
        </view>
        <text class="resultsAreShown-content-score-desc"
          style="{{comScoreIndex == index ? 'color:'+item.color : ''}}">{{item.title}}</text>

      </view>
    </view>

  </view>
  <view class="w-card">
    <view class="base-title-view">
      <view class="base-title-line" />
      <text class="base-title">结果分析</text>
    </view>
    <text class="resultAnalysis">{{comScoreDesc}}</text>
  </view>
  <view class="w-card">
    <view class="base-title-view">
      <view class="base-title-line" />
      <text class="base-title">睡眠建议</text>
    </view>
    <text class="resultAnalysis">{{comScoreDesc}}</text>
  </view>
  <view class="ad-box">
    <image src="/subpages/images/testRes/ic_test_share_ad.png" mode="widthFix"></image>
    <button open-type="share"></button>
  </view>
  <view style="height: 200rpx;" />
  <view class="bottom-btn-view">
    <view class="res-test-btn-view">
      <text class="view-res-btn" bindtap="toTest">重新评测</text>
      <text class="restart-test-btn" bindtap="toHome">返回首页</text>
    </view>
  </view>
</view>