diff --git a/.trae/rules/project_rules.md b/.trae/rules/project_rules.md index b35b1f2..02ef5ef 100644 --- a/.trae/rules/project_rules.md +++ b/.trae/rules/project_rules.md @@ -1,4 +1,13 @@ 1. 本项目是用Uni APP构建的 2. 务必保证代码可维护性,做好模块划分 3. 不要过度理解需求,尽量保持需求的简单性 -4. 保持最小修改,不要大刀阔斧的改动代码 \ No newline at end of file +4. 保持最小修改,不要大刀阔斧的改动代码 +5. 接口的返回格式统一为 + ```json + { + "code": 0, + "msg": "success", + "data": {} + } + ``` + 我给你描述的返回值均是指data字段 \ No newline at end of file diff --git a/config.js b/config.js index 630c7fe..4eca334 100644 --- a/config.js +++ b/config.js @@ -8,7 +8,9 @@ const config = { getCategoryQuestion: '/qgdzs/open/category/question', answerCategoryQuestion: '/qgdzs/open/category/answer', getQuicklyQuestion: '/qgdzs/open/quickly/question', - answerQuicklyQuestion: '/qgdzs/open/quickly/answer' + answerQuicklyQuestion: '/qgdzs/open/quickly/answer', + getPointInfo: '/qgdzs/auth/point/info', + getPointRecord: '/qgdzs/auth/point/record' }, timeout: 30000 } diff --git a/pages.json b/pages.json index f4f3ad7..bc2163c 100644 --- a/pages.json +++ b/pages.json @@ -43,11 +43,23 @@ "navigationBarTitleText": "类目题目" } }, + { + "path": "pages/records/records", + "style": { + "navigationBarTitleText": "答题记录" + } + }, { "path": "pages/quick/quick", "style": { "navigationBarTitleText": "快速答题" } + }, + { + "path": "pages/point-record/point-record", + "style": { + "navigationBarTitleText": "学识分记录" + } } ], "globalStyle": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 30e2da0..967589d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,98 +1,58 @@ diff --git a/pages/point-record/point-record.vue b/pages/point-record/point-record.vue new file mode 100644 index 0000000..f11c98f --- /dev/null +++ b/pages/point-record/point-record.vue @@ -0,0 +1,357 @@ + + + + + \ No newline at end of file diff --git a/pages/records/records.vue b/pages/records/records.vue new file mode 100644 index 0000000..d405d3e --- /dev/null +++ b/pages/records/records.vue @@ -0,0 +1,658 @@ + + + + + \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index e20e95b..55ef488 100644 --- a/utils/api.js +++ b/utils/api.js @@ -254,6 +254,26 @@ const api = { }) }, + getPointInfo() { + return request({ + url: config.api.getPointInfo, + method: 'POST', + noAuthModal: true + }) + }, + + getPointRecord(page = 1, pageSize = 10) { + return request({ + url: config.api.getPointRecord, + method: 'POST', + data: { + page, + page_size: pageSize + }, + noAuthModal: true + }) + }, + getAllCategory() { return request({ url: config.api.getAllCategory,