Web20书城项目用户管理系统设计与实现.pdfVIP

  • 1
  • 0
  • 约1.63万字
  • 约 12页
  • 2026-08-19 发布于北京
  • 举报

Web20书城项目用户管理系统设计与实现.pdf

本章内容

用户登录

用户

用户注销

01‑用户登录功能

需求

使用ajax完成用户登录功

_

代码实现

//login.htmlform

action=loginsuccess.html

@submit.prevent=

loginCheck()/formloginCheck()

{

if

(!this.checkUsername()

||!

this.checkPassword())

{

//表单提交

event.preventDefault();

return;

}

var

_

this

=this;

aos({

method:

post,

url:

user,

params:

{

method:

login,

username:

this.username,

password:

this.password

}

}).then(function

(res)

{

console.log(res);

if

(res.flag)

{

sessionStorage.setItem(estU

文档评论(0)

1亿VIP精品文档

相关文档