| | |
| | | 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 |
| | |
| | | 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) => { |
| New file |
| | |
| | | <!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> |