Pārlūkot izejas kodu

test: 测试修改的curl路径

lanjianrong 3 gadi atpakaļ
vecāks
revīzija
148063990f
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 1 1
      app/controller/login_controller.js
  2. 2 2
      app/service/project.js

+ 1 - 1
app/controller/login_controller.js

@@ -385,7 +385,7 @@ module.exports = app => {
                 const pa = await ctx.service.projectAccount.getAccountInfoByAccountWithPid(data.account, project.id);
                 if (!pa ) throw '该账号不存在,请联系管理员';
                 const manager = await ctx.service.manager.getDataById(project.manager_id)
-                const { is_admin: isAdmin, account_group: accountGroup, ...otherObj} = pa
+                const { is_admin: isAdmin, account_group: accountGroup, ...otherObj } = pa
                 response.data = {
                   account: { ...otherObj, accountGroup, isAdmin},
                   project: {

+ 2 - 2
app/service/project.js

@@ -199,7 +199,7 @@ module.exports = app => {
          */
         verifyManagementProject(token) {
             return new Promise((resolve, reject) => {
-                this.ctx.curl(`${app.config.env === 'local' ? 'http://pmqa.smartcost.com.cn' : 'http://pm.6jlzf.cn'}/api/external/jl/calibration`, {
+                this.ctx.curl(`${app.config.env === 'prod' ? 'http://pm.6jlzf.cn' : 'http://pmqa.smartcost.com.cn'}/api/external/jl/calibration`, {
                     method: 'POST',
                     // dateType: 'json',
                     encoding: 'utf8',
@@ -227,7 +227,7 @@ module.exports = app => {
         async addProjectFromManagement() {
             const token = this.ctx.helper.createJWT({ account: this.ctx.session.sessionUser.account, code: this.ctx.session.sessionProject.code });
             return new Promise((resolve, reject) => {
-                this.ctx.curl(`${app.config.env === 'local' ? 'http://pmqa.smartcost.com.cn' : 'http://pm.6jlzf.cn'}/api/external/jl/project/add`, {
+                this.ctx.curl(`${app.config.env === 'prod' ? 'http://pm.6jlzf.cn' : 'http://pmqa.smartcost.com.cn'}/api/external/jl/project/add`, {
                     method: 'POST',
                     encoding: 'utf8',
                     data: { token },