yuminge-app/yun-min-program-plugin-master/packageE/healthy/healthyPaper/healthyPaper.wxml

49 lines
1.9 KiB
Plaintext

<!--packageE/healthy/healthyPaper/healthyPaper.wxml-->
<view class="header">
<view class="headerWrapper">
<view class="text">
<text class="name">测试进度</text>
<text class="num">{{currentQuestionIndex}}/{{questionList.length}}</text>
</view>
<view class="progress">
<progress active-mode="forwards" percent="{{((currentQuestionIndex)/(questionList.length))*100}}" color="#ffd800" active stroke-width="7" border-radius="8rpx" />
</view>
</view>
</view>
<template name="healthySelect">
<healthy-select question="{{question}}" answer="{{answer}}" site="{{site}}" bindquesCallback="quesCallback"></healthy-select>
</template>
<template name="healthySex">
<healthy-sex question="{{question}}" answer="{{answer}}" site="{{site}}" bindquesCallback="quesCallback"></healthy-sex>
</template>
<template name="healthyAge">
<healthy-age question="{{question}}" answer="{{answer}}" site="{{site}}" bindquesCallback="quesCallback"></healthy-age>
</template>
<template name="healthyHeight">
<healthy-height question="{{question}}" answer="{{answer}}" site="{{site}}" bindquesCallback="quesCallback"></healthy-height>
</template>
<view class="contentWrapper">
<block wx:for="{{questionList}}">
<template is="{{index==currentQuestionIndex ? (questionType[item.type] ? questionType[item.type] : 'healthyHeight') : ''}}" data="{{question:item,answer:answerList[currentQuestionIndex],site:currentQuestionIndex}}"></template>
</block>
<view class="opts">
<text class="text up active" wx:if="{{currentQuestionIndex!=0}}" bindtap="prveQuestion">上一题</text>
<text class="text next active" wx:if="{{currentQuestionIndex+1 != questionList.length}}" bindtap="nextQuestion">下一题</text>
</view>
<view class="send" bindtap="sendPost" wx:if="{{currentQuestionIndex+1 == questionList.length}}">提交</view>
</view>