|
@@ -10,31 +10,30 @@ Page({
|
|
|
data: {
|
|
|
mistakesData: [],
|
|
|
animationData: {},
|
|
|
- flag: [],
|
|
|
+ flags: [],
|
|
|
exponentData: [],
|
|
|
course: ['语文', '数学'],
|
|
|
courseIndex: 0,
|
|
|
flag: true,
|
|
|
switchs: true,
|
|
|
errorData: {},
|
|
|
- errImgW: '',
|
|
|
- errImgH: '',
|
|
|
+ errImgW: [],
|
|
|
+ errImgH: [],
|
|
|
},
|
|
|
|
|
|
- particulars: function (e) {
|
|
|
- let flage = e.currentTarget.dataset.flag;
|
|
|
- let index = e.currentTarget.dataset.index;
|
|
|
+ particulars: function ({ currentTarget }) {
|
|
|
+ //console.log(currentTarget.dataset.flag, currentTarget.dataset.index);
|
|
|
+ let flage = currentTarget.dataset.flag;
|
|
|
+ let index = currentTarget.dataset.index;
|
|
|
if(flage){
|
|
|
- this.util('60rpx');
|
|
|
- this.data.flag[index] = false;
|
|
|
+ this.data.flags[index] = false;
|
|
|
this.setData({
|
|
|
- flag: this.data.flag,
|
|
|
+ flags: this.data.flags,
|
|
|
})
|
|
|
} else {
|
|
|
- this.data.flag[index] = true;
|
|
|
- this.util('164rpx');
|
|
|
+ this.data.flags[index] = true;
|
|
|
this.setData({
|
|
|
- flag: this.data.flag,
|
|
|
+ flags: this.data.flags,
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -43,13 +42,16 @@ Page({
|
|
|
imageLoad: function (e) {
|
|
|
let height = e.detail.height;
|
|
|
let width = e.detail.width;
|
|
|
+ this.data.errImgW.push(width);
|
|
|
+ this.data.errImgH.push(height);
|
|
|
+ //console.log(height, width)
|
|
|
//设置图片宽度
|
|
|
//const imgW = width * .9;
|
|
|
//设置图片高度
|
|
|
//const imgH = imgW * (height / width);
|
|
|
this.setData({
|
|
|
- errImgW: width + 'rpx',
|
|
|
- errImgH: height + 'rpx'
|
|
|
+ errImgW: this.data.errImgW,
|
|
|
+ errImgH: this.data.errImgH
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -96,10 +98,10 @@ Page({
|
|
|
})
|
|
|
|
|
|
for(let item of res.data.data.list) {
|
|
|
- //this.data.flag.push(false);
|
|
|
+ this.data.flags.push(false);
|
|
|
}
|
|
|
this.setData({
|
|
|
- flag: this.data.flag
|
|
|
+ flags: this.data.flags
|
|
|
})
|
|
|
})
|
|
|
//用户答题指数
|