用户登录、注册、退出
登录代码如下:
<form action="#(CPATH)/user/doLogin" method="post" class="autoAjaxSubmit" data-ok-href="#(CPATH)/ucenter">
<div class="form-group">
<input type="text" class="form-control" name="user" placeholder="用户名">
</div>
<div class="form-group">
<input type="password" class="form-control" name="pwd" placeholder="密码">
</div>
<div class="form-group pt-3">
<button class="btn btn-block btn-primary" type="submit">登录</button>
</div>
</form>
注册代码:
<form action="#(CPATH)/user/doRegister" method="post" class="autoAjaxSubmit" data-ok-function="ok" data-val-function="val">
<div class="form-group">
<input type="text" class="form-control" name="username" placeholder="你的账户名">
</div>
<div class="form-group">
<input type="email" class="form-control" name="email" placeholder="你的邮箱">
</div>
<div class="form-group">
<input type="password" class="form-control" name="pwd" placeholder="密码">
</div>
<div class="form-group">
<input type="password" class="form-control" name="confirmPwd" placeholder="再次输入密码">
</div>
<div class="form-group" style="display: flex">
<input type="text" class="form-control" placeholder="请输入验证码" name="captcha" id="captcha">
<img style="height: 42px;border:1px solid #e8e8e8;margin-left:10px;border-radius: 2px;" src="#(CPATH)/commons/captcha" onclick="this.src='#(CPATH)/commons/captcha?d='+Math.random();"
cdn-exclude id="captchaimg">
</div>
</form>