From ee5d1510c87dbf40e532ee41ea88d11d445dce77 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 29 十月 2024 21:12:07 +0800
Subject: [PATCH] 更新输出git ;
---
app.js | 10 +++++++++-
public/index.html | 33 +++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/app.js b/app.js
index 22add5d..143f9dc 100644
--- a/app.js
+++ b/app.js
@@ -2,6 +2,7 @@
const bodyParser = require('body-parser');
const mysql = require('mysql2');
const fs = require('fs').promises;
+const fs2=require('fs')
const path = require('path');
const moment = require('moment')
// 转成能识别的url
@@ -46,7 +47,14 @@
return new facebody20191230.default(config);
}
app.get('/',async(req,res)=>{
- res.send('设备交换患者信息333');
+ const filePath = path.join(__dirname, 'public', 'index.html');
+ fs2.readFile(filePath, 'utf8', (err, data) => {
+ if (err) {
+ res.status(500).send('Error reading file');
+ return;
+ }
+ res.send(data);
+ });
})
// 定义 /webuser 路由处理器 用患者code 换信息
app.post('/webuser', async (req, res) => {
diff --git a/public/index.html b/public/index.html
new file mode 100644
index 0000000..666635f
--- /dev/null
+++ b/public/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>聊天机器人</title>
+ <style>
+ body, html {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+ iframe {
+ width: 100%;
+ height: 100%;
+ min-height: 700px;
+ border: none;
+ }
+ </style>
+</head>
+<body>
+ <iframe
+ src="https://udify.app/chatbot/irsmISE8DBCWAhxz"
+ style="width: 100%; height: 100%; min-height: 700px"
+ frameborder="0"
+ allow="microphone">
+ </iframe>
+</body>
+</html>
\ No newline at end of file
--
Gitblit v1.8.0