diff --git a/docs/用户自行选择工作类别.doc b/docs/用户自行选择工作类别.doc new file mode 100644 index 0000000..e4f883f Binary files /dev/null and b/docs/用户自行选择工作类别.doc differ diff --git a/test_client/src/settings.js b/test_client/src/settings.js index 0f4a45c..c158b71 100644 --- a/test_client/src/settings.js +++ b/test_client/src/settings.js @@ -1,6 +1,6 @@ module.exports = { - title: '辐射学堂', + title: '安建环培训考试平台', /** * @type {boolean} true | false @@ -12,5 +12,5 @@ module.exports = { * @type {boolean} true | false * @description Whether show the logo in sidebar */ - sidebarLogo: true + sidebarLogo: false } diff --git a/test_mini/app.js b/test_mini/app.js index 05eae33..614fe1f 100644 --- a/test_mini/app.js +++ b/test_mini/app.js @@ -70,9 +70,9 @@ App({ globalData: { userInfo: {}, userinfo: {}, // 服务器传回的消费者信息 - //host: 'https://apitest.ahctc.cn', + host: 'https://apitest.ahctc.cn', mediahost: 'https://apitest.ahctc.cn', - host: 'http://127.0.0.1:8000', + //host: 'http://127.0.0.1:8000', //mediahost: 'http://127.0.0.1:8000', token : '', } diff --git a/test_mini/pages/my/index.wxml b/test_mini/pages/my/index.wxml index 48c0083..4d9e547 100644 --- a/test_mini/pages/my/index.wxml +++ b/test_mini/pages/my/index.wxml @@ -8,7 +8,7 @@ - 账号: + {{userinfo.role_name}}: {{userinfo.username}} 账号: diff --git a/test_mini/pages/workscope/index.js b/test_mini/pages/workscope/index.js index 5359a3b..9bf0f5b 100644 --- a/test_mini/pages/workscope/index.js +++ b/test_mini/pages/workscope/index.js @@ -92,16 +92,31 @@ Page({ chooseWork: function (e) { let work = e.currentTarget.dataset - api.request(`/examtest/workscope/${work.id}/chose/`, 'GET').then(res => { - //选择工作类别 - // that.setData({ - // workData:res.data - // }) - getApp().globalData.userinfo.workscope = res.data.workscope - getApp().globalData.userinfo.workscope_name = res.data.workscope_name - wx.navigateBack({ - }) + wx.showModal({ + title: '提示', + content: '确定修改工作类别吗?', + confirmText: '确定', + cancelText: '取消', + success: function (res) { + if (res.confirm) { + api.request(`/examtest/workscope/${work.id}/chose/`, 'GET').then(res => { + //选择工作类别 + // that.setData({ + // workData:res.data + // }) + wx.showToast({ + title: '成功', + icon:'none' + }) + getApp().globalData.userinfo.workscope = res.data.workscope + getApp().globalData.userinfo.workscope_name = res.data.workscope_name + wx.navigateBack({ + }) + }) + } + } }) + //wx.setStorageSync('nowWork', work) }, diff --git a/test_mini/pages/workscope/index.wxml b/test_mini/pages/workscope/index.wxml index 1d1046b..aedee16 100644 --- a/test_mini/pages/workscope/index.wxml +++ b/test_mini/pages/workscope/index.wxml @@ -8,7 +8,7 @@

{{item.name}}

- 公开可选 + 公开可选 该类别下包含{{item.questioncat.length}}个科目
diff --git a/test_server/init.json b/test_server/init.json new file mode 100644 index 0000000..1474729 --- /dev/null +++ b/test_server/init.json @@ -0,0 +1 @@ +[{"model": "rbac.menu", "pk": 1, "fields": {"create_time": "2020-08-10T02:50:00Z", "update_time": "2020-09-02T04:03:14.146Z", "is_delete": false, "name": "\u5b66\u5458\u76f8\u5173", "type": "menu", "is_frame": false, "sort": 1, "pid": null, "method": "consumer_view"}}, {"model": "rbac.menu", "pk": 2, "fields": {"create_time": "2020-08-10T02:51:00Z", "update_time": "2020-08-10T02:51:42.612Z", "is_delete": false, "name": "\u65b0\u589e\u7528\u6237", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_create"}}, {"model": "rbac.menu", "pk": 3, "fields": {"create_time": "2020-08-10T02:51:00Z", "update_time": "2020-08-10T02:52:17.780Z", "is_delete": false, "name": "\u7f16\u8f91\u7528\u6237", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_update"}}, {"model": "rbac.menu", "pk": 4, "fields": {"create_time": "2020-08-10T02:52:00Z", "update_time": "2020-08-10T02:53:02.801Z", "is_delete": false, "name": "\u5220\u9664\u7528\u6237", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_delete"}}, {"model": "rbac.menu", "pk": 5, "fields": {"create_time": "2020-08-10T02:53:00Z", "update_time": "2020-08-10T02:55:22.206Z", "is_delete": false, "name": "\u89e3\u7ed1\u7528\u6237\u5fae\u4fe1", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_unbind"}}, {"model": "rbac.menu", "pk": 6, "fields": {"create_time": "2020-08-10T02:55:00Z", "update_time": "2020-08-10T02:55:48.745Z", "is_delete": false, "name": "\u5bfc\u5165\u7528\u6237", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_import"}}, {"model": "rbac.menu", "pk": 7, "fields": {"create_time": "2020-08-10T02:55:00Z", "update_time": "2021-03-21T05:22:21.678Z", "is_delete": false, "name": "\u67e5\u770b\u8003\u8bd5\u8bb0\u5f55", "type": "api", "is_frame": false, "sort": 1, "pid": 15, "method": "examtest_view"}}, {"model": "rbac.menu", "pk": 8, "fields": {"create_time": "2020-08-23T12:05:00Z", "update_time": "2020-08-23T12:07:20.329Z", "is_delete": false, "name": "\u5ba2\u6237\u4f01\u4e1a", "type": "menu", "is_frame": false, "sort": 1, "pid": null, "method": "company_view"}}, {"model": "rbac.menu", "pk": 9, "fields": {"create_time": "2020-08-23T12:05:00Z", "update_time": "2020-08-23T12:06:36.041Z", "is_delete": false, "name": "\u65b0\u589e\u516c\u53f8", "type": "api", "is_frame": false, "sort": 1, "pid": 8, "method": "company_create"}}, {"model": "rbac.menu", "pk": 10, "fields": {"create_time": "2020-08-23T12:06:00Z", "update_time": "2020-08-23T12:07:09.921Z", "is_delete": false, "name": "\u7f16\u8f91\u516c\u53f8", "type": "cata", "is_frame": false, "sort": 1, "pid": 8, "method": "company_update"}}, {"model": "rbac.menu", "pk": 11, "fields": {"create_time": "2020-08-26T06:35:00Z", "update_time": "2020-08-26T06:36:53.095Z", "is_delete": false, "name": "\u8ba4\u9886\u5b66\u5458", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_claim"}}, {"model": "rbac.menu", "pk": 12, "fields": {"create_time": "2020-09-02T04:02:00Z", "update_time": "2020-09-02T04:02:59.182Z", "is_delete": false, "name": "\u62a5\u544a\u5355\u67e5\u8be2", "type": "api", "is_frame": false, "sort": 5, "pid": 1, "method": "candidate_search"}}, {"model": "rbac.menu", "pk": 13, "fields": {"create_time": "2020-09-11T03:31:00Z", "update_time": "2020-09-11T03:38:56.321Z", "is_delete": false, "name": "\u5bfc\u51fa\u5b66\u5458", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer__export"}}, {"model": "rbac.menu", "pk": 14, "fields": {"create_time": "2020-12-11T03:07:00Z", "update_time": "2020-12-18T01:52:01.746Z", "is_delete": false, "name": "\u6279\u91cf\u4fee\u6539\u5230\u671f", "type": "api", "is_frame": false, "sort": 1, "pid": 1, "method": "consumer_exceeddates"}}, {"model": "rbac.menu", "pk": 15, "fields": {"create_time": "2021-03-18T13:45:00Z", "update_time": "2021-03-21T05:22:30.987Z", "is_delete": false, "name": "\u8003\u8bd5\u76f8\u5173", "type": "cata", "is_frame": false, "sort": 1, "pid": null, "method": "exam_view"}}, {"model": "rbac.menu", "pk": 16, "fields": {"create_time": "2021-03-18T13:47:00Z", "update_time": "2021-03-18T13:47:44.704Z", "is_delete": false, "name": "\u521b\u5efa\u6b63\u5f0f\u8003\u8bd5", "type": "api", "is_frame": false, "sort": 1, "pid": 15, "method": "exam_create"}}, {"model": "rbac.menu", "pk": 17, "fields": {"create_time": "2021-03-18T13:47:00Z", "update_time": "2021-03-21T05:19:54.699Z", "is_delete": false, "name": "\u7f16\u8f91\u6b63\u5f0f\u8003\u8bd5", "type": "api", "is_frame": false, "sort": 1, "pid": 15, "method": "exam_update"}}, {"model": "rbac.menu", "pk": 18, "fields": {"create_time": "2021-03-18T13:48:00Z", "update_time": "2021-03-18T13:48:39.369Z", "is_delete": false, "name": "\u5220\u9664\u6b63\u5f0f\u8003\u8bd5", "type": "cata", "is_frame": false, "sort": 1, "pid": 15, "method": "exam_delete"}}, {"model": "rbac.menu", "pk": 20, "fields": {"create_time": "2021-03-21T05:19:00Z", "update_time": "2021-03-21T05:23:34.146Z", "is_delete": false, "name": "\u5bfc\u51fa\u8003\u8bd5\u8bb0\u5f55", "type": "api", "is_frame": false, "sort": 1, "pid": 15, "method": "examtest_export"}}, {"model": "rbac.menu", "pk": 21, "fields": {"create_time": "2021-03-21T05:20:00Z", "update_time": "2021-03-21T05:22:04.747Z", "is_delete": false, "name": "\u5220\u9664\u8003\u8bd5\u8bb0\u5f55", "type": "api", "is_frame": false, "sort": 1, "pid": 15, "method": "examtest_delete"}}, {"model": "rbac.role", "pk": 1, "fields": {"create_time": "2020-08-10T02:42:52Z", "update_time": "2021-03-21T05:37:45.317Z", "is_delete": false, "name": "\u666e\u901a\u7ba1\u7406", "desc": "\u53ef\u5bfc\u5165\u7528\u6237\u53ca\u53d1\u5e03\u8003\u8bd5\u7b49", "menus": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21]}}, {"model": "rbac.role", "pk": 2, "fields": {"create_time": "2021-04-05T10:53:53.129Z", "update_time": "2021-04-05T10:53:53.129Z", "is_delete": false, "name": "\u7701\u7ba1\u7406", "desc": "\u67e5\u770b\u672c\u7701\u7684\u4f01\u4e1a\u4ee5\u53ca\u5176\u5458\u5de5\u7684\u7ec3\u4e60\u548c\u8003\u8bd5\u60c5\u51b5", "menus": [1, 7, 8, 12, 15]}}, {"model": "rbac.role", "pk": 3, "fields": {"create_time": "2021-04-05T11:40:26.008Z", "update_time": "2021-04-05T11:40:26.008Z", "is_delete": false, "name": "\u672c\u5355\u4f4d\u7ba1\u7406", "desc": "\u67e5\u770b\u672c\u5355\u4f4d\u5458\u5de5\u7684\u7ec3\u4e60\u548c\u8003\u8bd5\u4fe1\u606f", "menus": [1, 7, 12, 15]}}, {"model": "crm.consumerperm", "pk": 1, "fields": {"create_time": "2020-06-27T07:18:00Z", "update_time": "2020-06-27T13:21:15.155Z", "is_delete": false, "name": "\u6a21\u62df\u8003\u8bd5", "code": "gen_monitest", "pid": null}}, {"model": "crm.consumerperm", "pk": 2, "fields": {"create_time": "2020-06-27T07:19:00Z", "update_time": "2020-06-27T07:21:04.973Z", "is_delete": false, "name": "\u67e5\u770b\u9898\u5e93\u5206\u7c7b", "code": "questioncat_view", "pid": null}}, {"model": "crm.consumerperm", "pk": 3, "fields": {"create_time": "2020-06-27T07:21:00Z", "update_time": "2020-06-27T07:22:28.403Z", "is_delete": false, "name": "\u4e2a\u4eba\u8003\u8bd5\u8bb0\u5f55/\u5206\u6790", "code": "my_examtest", "pid": null}}, {"model": "crm.consumerperm", "pk": 4, "fields": {"create_time": "2020-06-27T12:53:00Z", "update_time": "2020-06-27T12:53:27.834Z", "is_delete": false, "name": "\u4e2a\u4eba\u6536\u85cf\u96c6", "code": "my_collects", "pid": null}}, {"model": "crm.consumerperm", "pk": 5, "fields": {"create_time": "2020-06-27T12:53:00Z", "update_time": "2020-06-27T12:53:46.357Z", "is_delete": false, "name": "\u4e2a\u4eba\u5b66\u79d1", "code": "my_subjects", "pid": null}}, {"model": "crm.consumerperm", "pk": 6, "fields": {"create_time": "2020-06-27T13:21:00Z", "update_time": "2020-06-27T13:22:51.421Z", "is_delete": false, "name": "\u968f\u673a\u7ec3\u4e60", "code": "exercise", "pid": null}}, {"model": "crm.consumerperm", "pk": 7, "fields": {"create_time": "2020-06-27T13:21:00Z", "update_time": "2020-06-27T13:22:32.598Z", "is_delete": false, "name": "\u62bc\u5377\u8003\u8bd5", "code": "paper_view", "pid": null}}, {"model": "crm.consumerperm", "pk": 8, "fields": {"create_time": "2020-06-27T13:26:00Z", "update_time": "2020-06-27T13:26:40.526Z", "is_delete": false, "name": "\u8d44\u6599\u4e0b\u8f7d", "code": "down_material", "pid": null}}, {"model": "crm.consumerperm", "pk": 9, "fields": {"create_time": "2020-06-28T06:26:00Z", "update_time": "2020-06-28T06:27:13.521Z", "is_delete": false, "name": "\u9898\u76ee\u641c\u7d22", "code": "question_view", "pid": null}}, {"model": "crm.consumerperm", "pk": 13, "fields": {"create_time": "2021-03-18T13:49:00Z", "update_time": "2021-03-18T13:49:55.103Z", "is_delete": false, "name": "\u53c2\u52a0\u6b63\u5f0f\u8003\u8bd5", "code": "exam_attend", "pid": null}}, {"model": "crm.consumerrole", "pk": 1, "fields": {"create_time": "2020-06-27T11:59:09Z", "update_time": "2021-04-13T13:22:13.813Z", "is_delete": false, "name": "\u6e38\u5ba2", "description": "", "perms": [1, 2, 3, 4, 8]}}, {"model": "crm.consumerrole", "pk": 2, "fields": {"create_time": "2020-06-27T12:00:00Z", "update_time": "2021-04-13T13:24:12.248Z", "is_delete": false, "name": "\u6ce8\u518c\u7528\u6237", "description": "", "perms": [1, 2, 3, 4, 5, 6, 8]}}, {"model": "crm.consumerrole", "pk": 3, "fields": {"create_time": "2020-06-27T12:00:15Z", "update_time": "2021-03-18T13:50:33.649Z", "is_delete": false, "name": "\u4ed8\u8d39\u5b66\u5458", "description": "", "perms": [1, 2, 3, 4, 5, 6, 8, 9, 13]}}, {"model": "crm.consumerrole", "pk": 4, "fields": {"create_time": "2020-06-28T10:12:16Z", "update_time": "2021-03-18T13:50:38.041Z", "is_delete": false, "name": "\u57f9\u8bad\u73ed\u5b66\u5458", "description": "\u57f9\u8bad\u73ed\u5b66\u5458", "perms": [1, 2, 3, 4, 5, 6, 7, 8, 9, 13]}}] \ No newline at end of file