12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <!-- 顶部红色主题标题 -->
- <view class="header">
- <image src="/images/red1.JPG" ></image>
- <text class="title">红色知识问答</text>
- </view>
- <!-- 题目卡片 -->
- <view class="card">
- <view class="question-box">
- <text class="category">{{question.category}}</text>
- <text class="question-text">{{question.text}}</text>
- </view>
- <!-- 选项按钮 -->
- <view class="options">
- <block wx:for="{{options}}" wx:key="index">
- <view
- class="option {{selectedIndex === index ? 'selected' : ''}}"
- bindtap="selectOption"
- data-index="{{index}}"
- >
- <text class="option-key">{{item.key}}</text>
- <text class="option-value">{{item.value}}</text>
- </view>
- </block>
- </view>
- </view>
- <!-- 底部积分和提交 -->
- <view class="footer">
- <view class="score">
- <image src="/images/star.png" class="star"></image>
- <text>当前积分: {{score}}</text>
- </view>
- <button class="submit-btn" bindtap="submitAnswer">提交答案</button>
- </view>
- <!-- 结果弹窗 -->
- <modal wx:if="{{showResult}}" class="result-modal">
- <view class="modal-content {{isCorrect ? 'correct' : 'wrong'}}">
- <image src="{{isCorrect ? '/images/success.png' : '/images/fail.png'}}"></image>
- <text>{{resultText}}</text>
- <text class="explanation">答案解析: {{explanation}}</text>
- <button bindtap="nextQuestion">下一题</button>
- </view>
- </modal>
|