回答正确!
回答有误!
正确答案是{{tm_current.right}},你的答案是{{tm_current.user_answer}}
diff --git a/pages/collect/main.wxss b/pages/collect/main.wxss
index e21ba24..e04f315 100644
--- a/pages/collect/main.wxss
+++ b/pages/collect/main.wxss
@@ -27,5 +27,4 @@
font-weight: 500;
font-size: 30rpx;
padding: 5rpx 10rpx;
-}
-
+}
\ No newline at end of file
diff --git a/pages/cuoti/index.js b/pages/cuoti/index.js
index 6b3fa5d..7688d8f 100644
--- a/pages/cuoti/index.js
+++ b/pages/cuoti/index.js
@@ -2,10 +2,6 @@
const api = require("../../utils/request.js");
var util = require('../../utils/util.js')
Page({
-
- /**
- * 页面的初始数据
- */
data: {
ctms: [],
tm_index: 0,
@@ -17,7 +13,7 @@ Page({
domain:getApp().globalData.mediahost,
},
radioChange: function (e) {
- var that = this
+ var that = this;
that.data.currentTm['user_answer'] = e.detail.value
that.data.ctms[that.data.tm_index] = that.data.currentTm
that.showAnswer()
@@ -28,9 +24,6 @@ Page({
that.data.ctms[that.data.tm_index] = that.data.currentTm
},
- /**
- * 生命周期函数--监听页面加载
- */
onLoad: function () {
var that = this
try {
@@ -68,8 +61,7 @@ Page({
})
}else{
that.showTm(that.data.tm_index)
- }
-
+ }
},
onUnload: function () {
try {
@@ -77,20 +69,6 @@ Page({
} catch (e) { }
},
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
showTm: function (index) {
var that = this
var currentTm = that.data.ctms[index]
@@ -158,11 +136,19 @@ Page({
})
},
showOptions: function () {
- let currentTm = this.data.currentTm
+ let currentTm = this.data.currentTm;
+ // debugger;
+ console.log(currentTm)
let options = []
for (let key in currentTm.options) {
let option = {}
- option.key = key
+ option.key = key;
+ if(currentTm.right==option.key){
+ option.right = true;
+ }else{
+ option.right = false;
+ }
+
option.value = '' + currentTm.options[key].toString() + '
'
if (currentTm.user_answer && this.data.moShi == '看题模式') {
if (key == currentTm.user_answer || currentTm.user_answer.indexOf(key) != -1) {
diff --git a/pages/cuoti/index.wxml b/pages/cuoti/index.wxml
index 8990694..1deb504 100644
--- a/pages/cuoti/index.wxml
+++ b/pages/cuoti/index.wxml
@@ -18,7 +18,7 @@