Procházet zdrojové kódy

增加题库菜单、增加题库网关配置

asd123a20 před 3 roky
rodič
revize
4a8c011bc3

+ 2 - 0
pm2-start-all.sh

@@ -55,5 +55,7 @@ cd ..
 cd service-wx
 pm2 start ./server.js --name service-wx --watch
 cd ..
+cd service-question-bank
+pm2 start ./server.js --name service-question-bank --watch
 pm2 startup 
 pm2 save

+ 1 - 0
service-gateway/config/config.default.js

@@ -61,6 +61,7 @@ module.exports = appInfo => {
     activity: 'http://127.0.0.1:9015',
     importExport: 'http://127.0.0.1:9016',
     reader: 'http://127.0.0.1:9017',
+    question: 'http://127.0.0.1:9018',
   };
   // 限制文件大小
   config.multipart = {

+ 54 - 0
service-gateway/config/question.js

@@ -0,0 +1,54 @@
+'use strict';
+
+module.exports = [
+  // 题库
+  {
+    url: '/api/question/bank/create',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/bank/update',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/bank/delete/:id',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/bank/query',
+    jwt: false,
+    issuer: [ 'naf' ],
+    log: false,
+  },
+  // 试卷
+  {
+    url: '/api/question/paper/create',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/paper/update',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/paper/delete/:id',
+    jwt: true,
+    issuer: [ 'naf' ],
+    log: true,
+  },
+  {
+    url: '/api/question/paper/query',
+    jwt: false,
+    issuer: [ 'naf' ],
+    log: false,
+  },
+];

+ 9 - 0
service-naf/config/menu.js

@@ -193,5 +193,14 @@ const data = [
     parentCode: null,
     icon: 'el-icon-star-on',
   },
+  // 题库
+  {
+    module: 'problem',
+    path: '/problem/home',
+    title: '问题管理',
+    code: 'problemHome',
+    parentCode: null,
+    icon: 'el-icon-star-on',
+  },
 ];
 module.exports.data = data;