Authored by 邱骏

修改getBase64Image接口

... ... @@ -337,7 +337,7 @@ const shoes = {
};
let canUpdate = false;
for (let i = 0; i < list.length; i ++) {
for (let i = 0; i < list.length; i++) {
newScoreInfo.score += parseInt(list[i].isCorrect, 10) ? 10 : 0;
newScoreInfo.playTime += list[i].time;
newScoreInfo.clickTimes += list[i].cts || 1;
... ... @@ -345,10 +345,10 @@ const shoes = {
if (newScoreInfo.score > scoreInfo.score) { // 分数比原来高的情况
canUpdate = true;
} else if (newScoreInfo.score === scoreInfo.score){ // 分数和原来相同时,看点击次数多少
} else if (newScoreInfo.score === scoreInfo.score) { // 分数和原来相同时,看点击次数多少
if (newScoreInfo.clickTimes < scoreInfo.clickTimes) { // 点击次数少于原来
canUpdate = true;
} else if (newScoreInfo.clickTimes === scoreInfo.clickTimes){ // 点击次数等于原来,看时间长短
} else if (newScoreInfo.clickTimes === scoreInfo.clickTimes) { // 点击次数等于原来,看时间长短
if (newScoreInfo.playTime < scoreInfo.playTime) {
canUpdate = true;
}
... ... @@ -546,7 +546,7 @@ const shoes = {
});
},
async getImageData(req, res) {
async getImageData(req, res, next) {
let pic_url = req.query.image;
... ... @@ -581,7 +581,7 @@ const shoes = {
data: result
});
}).catch(err => {
return res.json(err);
next(err);
});
},
... ...