|
@@ -1,5 +1,5 @@
|
|
|
import { Random } from 'mockjs'
|
|
|
-import { post } from '@/api/http'
|
|
|
+import { post } from '@/api/http'
|
|
|
//----------
|
|
|
// 使用 Mock 測試
|
|
|
|
|
@@ -100,17 +100,17 @@ for (var i = 1; i <= 30; i++) {
|
|
|
|
|
|
'rightAns|1': ['A', 'B', 'C', 'D'],
|
|
|
'MyAns|1': ['A', 'B', 'C', 'D', ''],
|
|
|
- 'ansDesc': localStorage.getItem('lang')=='tw'?[Random.cparagraph(1, 3), Random.cparagraph(1, 3), Random.cparagraph(1, 3), Random.cparagraph(1, 3)]:[Random.paragraph(1, 3), Random.paragraph(1, 3), Random.paragraph(1, 3), Random.paragraph(1, 3)],
|
|
|
+ 'ansDesc': localStorage.getItem('lang') == 'tw' ? [Random.cparagraph(1, 3), Random.cparagraph(1, 3), Random.cparagraph(1, 3), Random.cparagraph(1, 3)] : [Random.paragraph(1, 3), Random.paragraph(1, 3), Random.paragraph(1, 3), Random.paragraph(1, 3)],
|
|
|
'qtype|1': ['單選', '多選'],
|
|
|
- 'questionDesc': localStorage.getItem('lang')=='tw'?Random.cparagraph(1, 8):Random.paragraph(1, 8),
|
|
|
- 'relatedQ1': localStorage.getItem('lang')=='tw'?Random.cparagraph(1, 8):Random.paragraph(1, 8),
|
|
|
- 'relatedQ2': localStorage.getItem('lang')=='tw'?Random.cparagraph(1, 8):Random.paragraph(1, 8),
|
|
|
+ 'questionDesc': localStorage.getItem('lang') == 'tw' ? Random.cparagraph(1, 8) : Random.paragraph(1, 8),
|
|
|
+ 'relatedQ1': localStorage.getItem('lang') == 'tw' ? Random.cparagraph(1, 8) : Random.paragraph(1, 8),
|
|
|
+ 'relatedQ2': localStorage.getItem('lang') == 'tw' ? Random.cparagraph(1, 8) : Random.paragraph(1, 8),
|
|
|
"rightrate|1-100": 100,
|
|
|
'img1|1-10': 'https://source.unsplash.com/random/300x200/?water',
|
|
|
'img2|1-10': 'https://source.unsplash.com/random/300x200/?line',
|
|
|
"haveImgAns|1-2": true,
|
|
|
- 'AnsImgs|1-10':'https://source.unsplash.com/random/300x200/?green',
|
|
|
-
|
|
|
+ 'AnsImgs|1-10': 'https://source.unsplash.com/random/300x200/?green',
|
|
|
+
|
|
|
});
|
|
|
|
|
|
|
|
@@ -194,37 +194,37 @@ export default {
|
|
|
},
|
|
|
//查詢學生端活動信息
|
|
|
getActivityInfo: function (data) {
|
|
|
- return post('/student/stu-activity',data)
|
|
|
+ return post('/student/stu-activity', data)
|
|
|
},
|
|
|
//查詢學生端投票活动
|
|
|
getVoteInfo: function (data) {
|
|
|
- return post('/common/vote/find-id',data)
|
|
|
+ return post('/common/vote/find-id', data)
|
|
|
},
|
|
|
//查詢學生端个人投票结果
|
|
|
getVoteResult: function (data) {
|
|
|
- return post('/common/vote/decided',data)
|
|
|
+ return post('/common/vote/decided', data)
|
|
|
},
|
|
|
//查詢活动投票结果
|
|
|
getVoteRecord: function (data) {
|
|
|
- return post('/common/vote/record',data)
|
|
|
+ return post('/common/vote/record', data)
|
|
|
},
|
|
|
//提交投票结果数据
|
|
|
sendVoteResult: function (data) {
|
|
|
- return post('/common/vote/decide',data)
|
|
|
+ return post('/common/vote/decide', data)
|
|
|
+ },
|
|
|
+ //查詢學生端问卷活动
|
|
|
+ getSurveyInfo: function (data) {
|
|
|
+ return post('/common/survey/find-id', data)
|
|
|
+ },
|
|
|
+
|
|
|
+ //查詢學生端问卷活动
|
|
|
+ answerSurvey: function (data) {
|
|
|
+ return post('/common/survey/answer', data)
|
|
|
+ },
|
|
|
+
|
|
|
+ isAnswerd: function (data) {
|
|
|
+ return post('/common/survey/answered', data)
|
|
|
},
|
|
|
- //查詢學生端问卷活动
|
|
|
- getSurveyInfo: function (data) {
|
|
|
- return post('/common/survey/find-id',data)
|
|
|
- },
|
|
|
-
|
|
|
- //查詢學生端问卷活动
|
|
|
- answerSurvey: function (data) {
|
|
|
- return post('/common/survey/answer',data)
|
|
|
- },
|
|
|
-
|
|
|
- isAnswerd: function (data) {
|
|
|
- return post('/common/survey/answered',data)
|
|
|
- },
|
|
|
|
|
|
// 删除不存在的投票和问卷
|
|
|
delActivity: function (data) {
|
|
@@ -241,22 +241,22 @@ export default {
|
|
|
return post("/student/get-school-info", data)
|
|
|
},
|
|
|
|
|
|
- // 获取教室关联的学生(教师端)
|
|
|
+ // 获取教室关联的学生(教师端接口)
|
|
|
getClassroomStudent: function (data) {
|
|
|
return post('/school/classroom/find-students', data)
|
|
|
},
|
|
|
|
|
|
- // 根据stulist ids换取详细信息(教师端)
|
|
|
+ // 根据stulist ids换取详细信息(教师端接口)
|
|
|
findListSummary: function (data) {
|
|
|
return post('/school/course/get-summary-list', data)
|
|
|
},
|
|
|
|
|
|
- // 根据学生id换取详细信息(教师端)
|
|
|
+ // 根据学生id换取详细信息(教师端接口)
|
|
|
findStuSummary: function (data) {
|
|
|
return post('/student/get-summary-student', data)
|
|
|
},
|
|
|
|
|
|
- // 获取教师列表(教师端)
|
|
|
+ // 获取教师列表(教师端接口)
|
|
|
getSchoolTeacher: function (data) {
|
|
|
return post('/school/teacher/get-teacher-all', data)
|
|
|
},
|