|
@@ -156,7 +156,7 @@ export default {
|
|
commonTime: 0, //计时器获取反应时间
|
|
commonTime: 0, //计时器获取反应时间
|
|
cumulation: 0, //累加器
|
|
cumulation: 0, //累加器
|
|
examImgUrl: "", //展示图片
|
|
examImgUrl: "", //展示图片
|
|
- arrList: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], //取样数组
|
|
|
|
|
|
+ arrList: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10"], //取样数组
|
|
randomArr: [], //从十个人中随机获取3个人
|
|
randomArr: [], //从十个人中随机获取3个人
|
|
resultData: [
|
|
resultData: [
|
|
// {
|
|
// {
|
|
@@ -177,6 +177,8 @@ export default {
|
|
{ name: "悲伤", val: "sad" },
|
|
{ name: "悲伤", val: "sad" },
|
|
{ name: "惊讶", val: "surprise" },
|
|
{ name: "惊讶", val: "surprise" },
|
|
],
|
|
],
|
|
|
|
+
|
|
|
|
+ baseUrlPort: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 页面初始化函数
|
|
// 页面初始化函数
|
|
@@ -187,6 +189,7 @@ export default {
|
|
this.testMode = this.$route.query.testMode;
|
|
this.testMode = this.$route.query.testMode;
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.baseUrlPort = window.location.origin
|
|
// this.imgListSerialize();
|
|
// this.imgListSerialize();
|
|
//进入页面即初始化开始测试
|
|
//进入页面即初始化开始测试
|
|
console.log(this.testMode);
|
|
console.log(this.testMode);
|
|
@@ -307,7 +310,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-happy-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`, //图片地址
|
|
});
|
|
});
|
|
//害怕
|
|
//害怕
|
|
this.resultData.push({
|
|
this.resultData.push({
|
|
@@ -316,7 +319,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-fear-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`,
|
|
});
|
|
});
|
|
//生气
|
|
//生气
|
|
this.resultData.push({
|
|
this.resultData.push({
|
|
@@ -325,7 +328,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-angry-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`,
|
|
});
|
|
});
|
|
//厌恶
|
|
//厌恶
|
|
this.resultData.push({
|
|
this.resultData.push({
|
|
@@ -334,7 +337,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-disgust-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`,
|
|
});
|
|
});
|
|
// 悲伤
|
|
// 悲伤
|
|
this.resultData.push({
|
|
this.resultData.push({
|
|
@@ -343,7 +346,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-sad-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`,
|
|
});
|
|
});
|
|
// 惊讶
|
|
// 惊讶
|
|
this.resultData.push({
|
|
this.resultData.push({
|
|
@@ -352,7 +355,7 @@ export default {
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
userSelectEmoType: "", //用户选择的情绪类型
|
|
responseTime: "", //反应时(ms)
|
|
responseTime: "", //反应时(ms)
|
|
correct: "", //用户反映正确性 True, False
|
|
correct: "", //用户反映正确性 True, False
|
|
- imgUrl: `http://localhost:8080/static/assets/ETBnew/${item}-surprise-${rank + 1}.jpg`, //图片地址
|
|
|
|
|
|
+ imgUrl: `${this.baseUrlPort}/static/assets/ETBnew/${ (Number(item) > 5 ? 'm' : 'f') + item}-happy-${rank > 8 ? rank + 1 : '0' + (rank + 1)}.jpg`,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|