From 3201880517461c03b69959947814c5bb32841e50 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Fri, 23 Oct 2020 06:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=A8=A1=E5=BC=8F=E5=92=8C=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +++- routes/project/info.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 8871f7e..141d51f 100644 --- a/app.js +++ b/app.js @@ -25,8 +25,10 @@ app.use(express.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); +console.debug(`webClient:${process.env.webClient}`) + app.use(cors({ - origin:[process.env.webClient], + origin:[process.env.webClient,process.env.devClient], credentials:true })) app.use('/', indexRouter); diff --git a/routes/project/info.js b/routes/project/info.js index 68b5f88..a92a4f6 100644 --- a/routes/project/info.js +++ b/routes/project/info.js @@ -41,7 +41,7 @@ router.get('/member', function (req, res, next) { company:()=>Mock.Random.word(), department:()=>Mock.Random.word(), specialty:()=>Mock.Random.word(), - time:()=>Mock.Random.datetime(), + time:()=>Mock.Random.date(), note:()=>Mock.Random.sentence(3, 5) }) res.json(data)