answer.wxml 1.7 KB
<view class="answer" wx:for="{{list}}" wx:for-index="index">
    <view class="answer_left" wx:if="{{index+1<9}}">0{{index+1}}</view>
    <view class="answer_left" wx:else>{{index+1}}</view>
    <view class="answer_right">
        <view class="answer_question">{{item.title}}</view>
        <radio-group bindchange="radioChange">
            <view class="flexs" wx:for="{{item.options_array}}" wx:for-index="idx" wx:for-item="second">
                <view class="answer_answer">
                    <radio value="{{second+','+index+','+idx}}" checked=''>{{second}}</radio>
                    <block wx:if="{{showAnswer}}">
                        {{answer[index]}}
                        <image src="/imgs/zhengque-5@2x.png" wx:if="{{item.answer==idx}}"></image>
                        <image src="/imgs/cuowu-3@2x.png" wx:if='{{item.choose==idx}}'></image>
                    </block>
                </view>

            </view>
        </radio-group>

    </view>
</view>
<view class="shengqin">
    <button bindtap="getcomfirm">确认</button>
</view>

<!-- 答案 -->
<!-- <view class="answer" wx:for="{{list}}" wx:for-index="index">
    <view class="answer_left" wx:if="{{item.id<9}}">0{{item.id}}</view>
    <view class="answer_left" wx:else>{{item.id}}</view>
    <view class="answer_right">
        <view class="answer_question">{{item.title}}</view>
        <radio-group bindchange="radioChange">
            <view class="flexs" wx:for="{{item.options_array}}" wx:for-index="idx" wx:for-item="second">
                <view class="answer_answer">
                    <radio value="{{second+','+index}}" checked='{{item.choose}}'>{{second}}</radio>
                    
                </view>

            </view>
        </radio-group>

    </view>
</view> -->