echoFan 4 anos atrás
pai
commit
c7036ef9a4
7 arquivos alterados com 45 adições e 44 exclusões
  1. 1 1
      README.md
  2. 34 33
      app/router.js
  3. 4 4
      config/config.default.js
  4. 1 1
      config/config.local.js
  5. 3 3
      config/config.prod.js
  6. 1 1
      ecosystem.config.js
  7. 1 1
      package.json

+ 1 - 1
README.md

@@ -13,7 +13,7 @@ see [egg docs][egg] for more detail.
 ```bash
 $ npm i
 $ npm run dev
-$ open http://localhost:8003/
+$ open http://localhost:8080/
 ```
 
 ### Deploy

+ 34 - 33
app/router.js

@@ -8,61 +8,62 @@ module.exports = app => {
   router.get('/', controller.home.index);
 
   // 轮播图设置
-  router.resources("lunbo", "/api/huanqi/lunbo ", controller.lunbo); // index、create、show、destroy
+  router.resources('lunbo', '/api/huanqi/lunbo ', controller.lunbo); // index、create、show、destroy
   router.post(
-    "lunbo",
-    "/api/huanqi/lunbo/update/:id",
+    'lunbo',
+    '/api/huanqi/lunbo/update/:id',
     controller.lunbo.update // update
   );
   // 企业信息表设置
-  router.resources("company", "/api/huanqi/company ", controller.company); // index、create、show、destroy
+  router.resources('company', '/api/huanqi/company ', controller.company); // index、create、show、destroy
   router.post(
-    "company",
-    "/api/huanqi/company/update/:id",
+    'company',
+    '/api/huanqi/company/update/:id',
     controller.company.update // update
   );
-    // 产品表设置
-  router.resources("product", "/api/huanqi/product ", controller.product); // index、create、show、destroy
+  // 产品表设置
+  router.resources('product', '/api/huanqi/product ', controller.product); // index、create、show、destroy
   router.post(
-    "product",
-    "/api/huanqi/product/update/:id",
+    'product',
+    '/api/huanqi/product/update/:id',
     controller.product.update // update
   );
-    // 案例应用表设置
-  router.resources("caseapply", "/api/huanqi/caseapply ", controller.caseapply); // index、create、show、destroy
+  // 案例应用表设置
+  router.resources('caseapply', '/api/huanqi/caseapply ', controller.caseapply); // index、create、show、destroy
   router.post(
-    "caseapply",
-    "/api/huanqi/caseapply/update/:id",
+    'caseapply',
+    '/api/huanqi/caseapply/update/:id',
     controller.caseapply.update // update
-  );  
-    // 热点资讯表设置
-  router.resources("hotspot", "/api/huanqi/hotspot ", controller.hotspot); // index、create、show、destroy
+  );
+  // 热点资讯表设置
+  router.resources('hotspot', '/api/huanqi/hotspot ', controller.hotspot); // index、create、show、destroy
   router.post(
-    "hotspot",
-    "/api/huanqi/hotspot/update/:id",
+    'hotspot',
+    '/api/huanqi/hotspot/update/:id',
     controller.hotspot.update // update
   );
-    // 宣传视频表设置
-  router.resources("video", "/api/huanqi/video ", controller.video); // index、create、show、destroy
+  // 宣传视频表设置
+  router.resources('video', '/api/huanqi/video ', controller.video); // index、create、show、destroy
   router.post(
-    "video",
-    "/api/huanqi/video/update/:id",
+    'video',
+    '/api/huanqi/video/update/:id',
     controller.video.update // update
-  );   
-   // 企业信息表设置
-  router.resources("business", "/api/huanqi/hotspot ", controller.business); // index、create、show、destroy
+  );
+  // 企业信息表设置
+  router.resources('business', '/api/huanqi/hotspot ', controller.business); // index、create、show、destroy
   router.post(
-    "business",
-    "/api/huanqi/business/update/:id",
+    'business',
+    '/api/huanqi/business/update/:id',
     controller.business.update // update
-  );   
-   // 友情链接表设置
-  router.resources("links", "/api/huanqi/links ", controller.links); // index、create、show、destroy
+  );
+  // 友情链接表设置
+  router.resources('links', '/api/huanqi/links ', controller.links); // index、create、show、destroy
   router.post(
-    "links",
-    "/api/huanqi/links/update/:id",
+    'links',
+    '/api/huanqi/links/update/:id',
     controller.links.update // update
   );
+};
 //   // 共通查询单条记录方法
 //   router.get('/api/train/common/findone/:modelname', controller.common.findone);
 //   // 共通批量查询方法

+ 4 - 4
config/config.default.js

@@ -35,7 +35,7 @@ module.exports = appInfo => {
   // add your config here
   config.cluster = {
     listen: {
-      port: 2001,
+      port: 8080,
     },
   };
 
@@ -54,7 +54,7 @@ module.exports = appInfo => {
   // 服务器发布路径
   config.baseUrl = 'http://free.liaoningdoupo.com';
   // 认证回调地址
-  config.authUrl = '/api/train/auth';
+  config.authUrl = '/api/quanqi/auth';
   // 回调地址
   config.redirect_uri = `${config.baseUrl}/weixin`;
   config.redirect_uri_doctor = `${config.baseUrl}/patient/manage`;
@@ -93,7 +93,7 @@ module.exports = appInfo => {
 
   // mongoose config
   config.mongoose = {
-    url: 'mongodb://127.0.0.1:27017/train',
+    url: 'mongodb://127.0.0.1:27017/huanqi',
     options: {
       // user: 'admin',
       // pass: 'admin',
@@ -114,7 +114,7 @@ module.exports = appInfo => {
   config.jwt = {
     ...jwt,
     expiresIn: '1d',
-    issuer: 'train',
+    issuer: 'huanqi',
   };
 
   return {

+ 1 - 1
config/config.local.js

@@ -45,7 +45,7 @@ module.exports = () => {
   // };
 
   config.mongoose = {
-    url: 'mongodb://localhost:27017/train',
+    url: 'mongodb://localhost:27017/huanqi',
     options: {
       // user: 'demo',
       // pass: 'demo',

+ 3 - 3
config/config.prod.js

@@ -20,11 +20,11 @@ module.exports = () => {
   // 服务器发布路径
   config.baseUrl = 'http://free.liaoningdoupo.com';
   // 认证回调地址
-  config.authUrl = '/api/train/auth';
+  config.authUrl = '/api/huanqi/auth';
 
   // mongoose config
   config.mongoose = {
-    url: 'mongodb://127.0.0.1:27017/train',
+    url: 'mongodb://127.0.0.1:27017/huanqi',
     options: {
       user: 'admin',
       pass: 'admin',
@@ -40,7 +40,7 @@ module.exports = () => {
       hostname: '127.0.0.1',
       username: 'visit',
       password: 'visit',
-      vhost: 'train',
+      vhost: 'huanqi',
     },
     app: true,
     agent: true,

+ 1 - 1
ecosystem.config.js

@@ -1,7 +1,7 @@
 /* eslint-disable quotes */
 'use strict';
 
-const app = "vehicle-center";
+const app = "huanqi";
 module.exports = {
   apps: [{
     name: app, // 应用名称

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "vehicle-center",
+  "name": "huanqi",
   "version": "1.0.0",
   "description": "",
   "private": true,