收废品 發表於 2021-11-22 11:11:00

Node.js实现前后端交互——用户登陆

<p>  最近学习了一点Node.js的后端知识,于是作为一个学习前端方向的我开始了解后端,话不多说,开始介绍。首先,如果你想要更好的理解这篇博客,你需要具备html,css,javascript和Node.js基础以及少许的SQL数据库知识。接下我们开始这个小项目。</p>
<p>一、项目需求</p>
<p>  要求用户进入登陆界面,输入用户名和密码后,后端获取用户输入的表单信息,通过从数据库查找,如果正确,跳转登陆成功页面。</p>
<p>  ps:注释写的比较详细了,不明白的地方请多看注释。当然,我也非常欢迎你留言询问,但是这不是一个快速解决问题的办法。</p>
<p>二,开始撸代码</p>
<p>  1,创建前端页面(CSS样式此处省略)</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">form </span><span style="color: rgba(255, 0, 0, 1)">method</span><span style="color: rgba(0, 0, 255, 1)">="post"</span><span style="color: rgba(255, 0, 0, 1)"> action</span><span style="color: rgba(0, 0, 255, 1)">="http://localhost:8080/"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
                <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">input </span><span style="color: rgba(255, 0, 0, 1)">type</span><span style="color: rgba(0, 0, 255, 1)">="text"</span><span style="color: rgba(255, 0, 0, 1)"> required</span><span style="color: rgba(0, 0, 255, 1)">="required"</span><span style="color: rgba(255, 0, 0, 1)"> id</span><span style="color: rgba(0, 0, 255, 1)">="use_name"</span><span style="color: rgba(255, 0, 0, 1)"> placeholder</span><span style="color: rgba(0, 0, 255, 1)">="请输入用户名"</span><span style="color: rgba(255, 0, 0, 1)"> name</span><span style="color: rgba(0, 0, 255, 1)">="user_name"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
                <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">input </span><span style="color: rgba(255, 0, 0, 1)">type</span><span style="color: rgba(0, 0, 255, 1)">="password"</span><span style="color: rgba(255, 0, 0, 1)"> required</span><span style="color: rgba(0, 0, 255, 1)">="required"</span><span style="color: rgba(255, 0, 0, 1)"> id</span><span style="color: rgba(0, 0, 255, 1)">="pwd"</span><span style="color: rgba(255, 0, 0, 1)"> placeholder</span><span style="color: rgba(0, 0, 255, 1)">="请输入密码"</span><span style="color: rgba(255, 0, 0, 1)"> name</span><span style="color: rgba(0, 0, 255, 1)">="user_pwd"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
          <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">button </span><span style="color: rgba(255, 0, 0, 1)">type</span><span style="color: rgba(0, 0, 255, 1)">="submit"</span><span style="color: rgba(255, 0, 0, 1)"> class</span><span style="color: rgba(0, 0, 255, 1)">="but"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>登陆<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">button</span><span style="color: rgba(0, 0, 255, 1)">&gt;<br></span><span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">form</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span></pre>
</div>
<p>创建表单,使用post提交方式,提交地址为自己的主机,因为我是做的本地测试环境。</p>
<p>  登陆成功页面success.html</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 255, 1)">&lt;!</span><span style="color: rgba(255, 0, 255, 1)">DOCTYPE html</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">html </span><span style="color: rgba(255, 0, 0, 1)">lang</span><span style="color: rgba(0, 0, 255, 1)">="en"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">head</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
    <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">meta </span><span style="color: rgba(255, 0, 0, 1)">charset</span><span style="color: rgba(0, 0, 255, 1)">="UTF-8"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
    <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">title</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>登录成功页面<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">title</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
    <span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">style</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
      <span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 128, 0, 1)">/*</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 128, 0, 1)">成功页面的样式</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 128, 0, 1)">*/</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(128, 0, 0, 1)">
      .success </span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">{</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(255, 0, 0, 1)">
            text-align</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">:</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 255, 1)"> center</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">;</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(255, 0, 0, 1)">
            color</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">:</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 255, 1)"> #3e8e41</span><span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">;</span>
      <span style="background-color: rgba(245, 245, 245, 1); color: rgba(0, 0, 0, 1)">}</span>
    <span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">style</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">head</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">body</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">h1 </span><span style="color: rgba(255, 0, 0, 1)">class</span><span style="color: rgba(0, 0, 255, 1)">="success"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>恭喜!登录成功!<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">h1</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;</span><span style="color: rgba(128, 0, 0, 1)">img </span><span style="color: rgba(255, 0, 0, 1)">src</span><span style="color: rgba(0, 0, 255, 1)">="img/keyboard_coffee.jpg"</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">body</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span>
<span style="color: rgba(0, 0, 255, 1)">&lt;/</span><span style="color: rgba(128, 0, 0, 1)">html</span><span style="color: rgba(0, 0, 255, 1)">&gt;</span></pre>
</div>
<p>&nbsp;</p>
<p>  2、Node.js后端获取用户输入数据</p>
<p>  (1)引入模块,此时需要你的电脑上面以及安装了<strong>Node.js环境</strong>,安装方法请自行百度。</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> 引入http模块</span>
const http = require('http'<span style="color: rgba(0, 0, 0, 1)">);
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">引入处理请求参数模块</span>
const queryString = require('querystring'<span style="color: rgba(0, 0, 0, 1)">);
const fs </span>= require('fs'<span style="color: rgba(0, 0, 0, 1)">);
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">引入第三方mime模块</span>
const mime = require('mime'<span style="color: rgba(0, 0, 0, 1)">);
const path </span>= require("path"<span style="color: rgba(0, 0, 0, 1)">);</span></pre>
</div>
<p>(2)获取用户输入的数据</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//创建</span><span style="color: rgba(0, 128, 0, 1)">sever网站服务器对象</span>
let sever =<span style="color: rgba(0, 0, 0, 1)"> http.createServer();
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">为服务器对象绑定请求事件,当客户端有请求时触发</span>
sever.on('request', <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (request, response) {</span>
    <span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)"> POST参数是通过事件的方式接收的
    * data当请求参数传递的时候触发的事件
    * end   当参数传递完成的时候触发end事件
    </span><span style="color: rgba(0, 128, 0, 1)">*/</span><span style="color: rgba(0, 0, 0, 1)">
    let postParams </span>= '';<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">定义空字符串用于接收post参数</span><span style="color: rgba(0, 128, 0, 1)">
//</span><span style="color: rgba(0, 128, 0, 1)">绑定data触发事件</span>
    request.on('data', <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (params) {
      postParams </span>= postParams + params;   <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">拼接post参数</span>
<span style="color: rgba(0, 0, 0, 1)">    });
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">绑定data触发事件</span>
    request.on('end', <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> () {
      </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> 把postParams字符串处理为对象,用querystring模块中的parse()方法</span>
      <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> console.log(queryString.parse(postParams));</span>
      <span style="color: rgba(0, 128, 0, 1)">//获取具体数值,如用户名。 注意:此处的user_name必须和前端HTML代码中的name="user_name"一致的。</span>
      let username =<span style="color: rgba(0, 0, 0, 1)"> queryString.parse(postParams).user_name;
      let userpwd </span>= queryString.parse(postParams).user_pwd;<br>}</pre>
</div>
<p>至此,我们已经获得了用户输入的数据,并存放在了我们定义的变量username和userpwd中,用于下面与从数据库获取到的用户名和用户密码比较。</p>
<p>(3)从SQL数据库获取用户的信息(我用的是MySQL数据库。我用的数据库管理软件是DBeaver,因为它免费哈哈哈)</p>
<p>  看一下我预先准备好的数据库中的数据表。数据库名test(后面数据库封装的配置项里可以看到),数据表名userinfo</p>
<p><img src="https://img2020.cnblogs.com/blog/1824602/202111/1824602-20211122104559216-664719596.png" alt="" loading="lazy"></p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> 数据库查询实例。我是根据用户名username去数据库中查询。</span><span style="color: rgba(0, 128, 0, 1)">
//</span><span style="color: rgba(0, 128, 0, 1)">调用自定义封装的链接数据库模块</span>
const connection = require("./mysql.js"<span style="color: rgba(0, 0, 0, 1)">);
connection.query(</span>"select * from userinfo where userName=?", , <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (result, filed) {
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">result是mysql查询返回的原始数据。查询语句中的‘?’是占位符,用于将SQL查询语句替换为‘[]’中的值。</span>
            <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">处理mysql返回的类似json格式的数组,处理为json数据</span>
            let resultJson =<span style="color: rgba(0, 0, 0, 1)"> JSON.stringify(result);
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">JSON.parse()用来解析JSON字符串</span>
            let dataJson =<span style="color: rgba(0, 0, 0, 1)"> JSON.parse(resultJson);
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">获得解析后的具体数值</span>
            let name = dataJson.userName;
            let pwd </span>= dataJson.userPwd;
      </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">比较数据库获到的用户信息和用户表单输入的是否一致,一致则跳转成功页面,findPage()为自定义的页面跳转函数</span>
            <span style="color: rgba(0, 0, 255, 1)">if</span> (pwd === userpwd &amp;&amp; name ===<span style="color: rgba(0, 0, 0, 1)"> username) {
                console.log(</span>"密码正确!"<span style="color: rgba(0, 0, 0, 1)">);
                findPage(</span>'/success.html'<span style="color: rgba(0, 0, 0, 1)">, response);
            } </span><span style="color: rgba(0, 0, 255, 1)">else</span><span style="color: rgba(0, 0, 0, 1)"> {
                console.log(</span>"密码错误!"<span style="color: rgba(0, 0, 0, 1)">);
                response.end(</span>'&lt;h1&gt;密码错误!&lt;/h1&gt;'<span style="color: rgba(0, 0, 0, 1)">)
            }
      });
</span><span style="color: rgba(0, 128, 0, 1)">/*</span><span style="color: rgba(0, 128, 0, 1)">*
* 访问本地静态资源的函数
</span><span style="color: rgba(0, 128, 0, 1)">*/</span>
<span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> findPage(url, res) {
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> static为拼接后的静态资源绝对路径</span>
    const static =<span style="color: rgba(0, 0, 0, 1)"> path.join(__dirname, url);
    </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)"> 异步读取本地文件</span>
    <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">获取文件的类型,使用mime模块的getType()方法</span>
    let fileType = mime.getType(static)   <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">获取文件的类型,使用mime模块的getType()方法</span>
    <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">读取文件</span>
    fs.readFile(static, <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (err, result) {
      </span><span style="color: rgba(0, 0, 255, 1)">if</span> (!<span style="color: rgba(0, 0, 0, 1)">err) {</span>
<span style="color: rgba(0, 0, 0, 1)">            res.end(result);
      }
      
    });
}</span></pre>
</div>
<p>(4)数据库模块封装</p>
<p>因为如果在使用中每次都写一堆代码用于数据库链接之类的操作,机会显得很冗余,于是我参考其他博友的代码对数据库链接操作分为两个文件进行封装</p>
<p>数据库配置封装文件 mysql.config.js</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">配置链接数据库参数</span>
module.exports =<span style="color: rgba(0, 0, 0, 1)"> {
    host: </span>'localhost'<span style="color: rgba(0, 0, 0, 1)">,
    port: </span>3306,<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">端口号</span>
    database: 'test',<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">数据库名</span>
    user: 'root',<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">数据库用户名</span>
    password: '123456'<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">数据库密码</span>
};</pre>
</div>
<p>数据库链接封装文件&nbsp;mysql.js</p>
<div class="cnblogs_code">
<pre>let mysql = require('mysql');<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">引入mysql模块</span>
let databaseConfig = require('./mysql.config');<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">引入数据库配置模块中的数据</span><span style="color: rgba(0, 128, 0, 1)">
//</span><span style="color: rgba(0, 128, 0, 1)">向外暴露方法</span>
module.exports =<span style="color: rgba(0, 0, 0, 1)"> {
    query: </span><span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (sql, params, callback) {
      </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">每次使用的时候需要创建链接,数据操作完成之后要关闭连接</span>
      let connection =<span style="color: rgba(0, 0, 0, 1)"> mysql.createConnection(databaseConfig);
      connection.connect(</span><span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (err) {
            </span><span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (err) {
                console.log(</span>'数据库链接失败'<span style="color: rgba(0, 0, 0, 1)">);
                </span><span style="color: rgba(0, 0, 255, 1)">throw</span><span style="color: rgba(0, 0, 0, 1)"> err;
            }
            </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">开始数据操作</span>
            <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">传入三个参数,第一个参数sql语句,第二个参数sql语句中需要的数据,第三个参数回调函数</span>
            connection.query(sql, params, <span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (err, results, fields) {
                </span><span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (err) {
                  console.log(</span>'数据操作失败'<span style="color: rgba(0, 0, 0, 1)">);
                  </span><span style="color: rgba(0, 0, 255, 1)">throw</span><span style="color: rgba(0, 0, 0, 1)"> err;
                }
                </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">将查询出来的数据返回给回调函数</span>
                callback &amp;&amp;<span style="color: rgba(0, 0, 0, 1)"> callback(results, fields);
                </span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">results作为数据操作后的结果,fields作为数据库连接的一些字段</span>
                <span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">停止链接数据库,必须再查询语句后,要不然一调用这个方法,就直接停止链接,数据操作就会失败</span>
                connection.end(<span style="color: rgba(0, 0, 255, 1)">function</span><span style="color: rgba(0, 0, 0, 1)"> (err) {
                  </span><span style="color: rgba(0, 0, 255, 1)">if</span><span style="color: rgba(0, 0, 0, 1)"> (err) {
                        console.log(</span>'关闭数据库连接失败!'<span style="color: rgba(0, 0, 0, 1)">);
                        </span><span style="color: rgba(0, 0, 255, 1)">throw</span><span style="color: rgba(0, 0, 0, 1)"> err;
                  }
                });
            });
      });
    }
};</span></pre>
</div>
<pre>上面的两个文件已经在数据库查询实例中const connection = require("./mysql.js"<span>);调用了。<br><br>至此我们的使用node.js进行MySQL数据库查询,实现用户登陆的功能已经完成了</span></pre>
<p> 在此感谢教会我数据库操作封装的博主大佬,他的文章链接放在这里了(11条消息) Node连接MySQL并封装其增删改查_wilL-my的博客-CSDN博客</p>
<div class="cnblogs_Highlighter">
<pre class="brush:html;gutter:true;">https://blog.csdn.net/qq_31754523/article/details/99172420
</pre>
</div>
<p>  </p>
<p>&nbsp;</p>

</div>
<div id="MySignature" role="contentinfo">
    <div style="box-shadow:1px 1px 1px 2px var(--theme-primary-4);padding:15px 10px;line-height:1.5;border-radius:10px;">
    <p style="font-weight:bold;color:#ff6b81;">时间仓促,如有错误欢迎指出,欢迎在评论区讨论,如对您有帮助还请点个推荐、关注支持一下</p>
    <p style="font-weight:bold;"><span style="color:#0984e3;">作者:</span>莫颀</p>
    <p style="font-weight:bold;"><span style="color:#0984e3;">出处:</span>https://www.cnblogs.com/bokemoqi/p/15587693.html</p>
    <p>本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文链接,否则保留追究法律责任的权利。</p>
    <p>若内容有侵犯您权益的地方,请公告栏处联系本人,本人定积极配合处理解决。</p>
</div><br><br>
来源:https://www.cnblogs.com/bokemoqi/p/15587693.html
頁: [1]
查看完整版本: Node.js实现前后端交互——用户登陆