atitit.userService 用户系统设计 v5 q330
1. 新特性
v1 基础的版本
V2 添加tokenSrv 使用cookie存储token..原来的session机制不变
V3 重构 商家跟个常见会员的注册,登录..
V4 商家模块 增加手机版本界面
V5 增加注册短信验证机制
改造取回密码,使用短信验证码取回
2. Admin login
http://localhost/login!userLogin.ct
http://localhost/login!userLogin.ct
/wxb_site/src/struts.xml
<package name="llj" extends="default">
<!-- 用户登录使用 -->
<action name="login" class="com.csmy.my.center.action.LoginAction" method="userLogin">
<result name="index" type="redirect">/admin</result>
<result name="login">admin/login/login.jsp</result>
<result name="slogin" type="redirect">/admin</result>
<result name="gindex">index.htm</result>
<result name="system">admin/show_system.jsp</result>
</action>
/**
* 用户登录
*
* @return
* @throws G4Exception
*/
public String userLogin() {
作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
3. 用户注册登录
3.1. <!-- 会员注册使用 --> 商家注册
<servlet>
<servlet-name>register</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.UserRegisterServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>register</servlet-name>
<url-pattern>/user/register/*</url-pattern>
</servlet-mapping>
http://localhost/user/register?reg_user_type=mer
wxb/mregister.jsp
手机ui http://localhost:8080/userPhone4jobusImp/reg.htm
3.2. <!-- 会员登录使用 -->
<servlet>
<servlet-name>userlogin</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.UserLoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>userlogin</servlet-name>
<url-pattern>/user/login</url-pattern>
</servlet-mapping>
http://localhost/user/login
Pc ui::wxb/mregister.jsp
手机ui
file:///D:/workspace/AtiPlatf_cms/WebRoot/user/login.html
3.3. <!-- 会员退出登录 -->
<servlet>
<servlet-name>loginout</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.LoginOutServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>loginout</servlet-name>
<url-pattern>/user/logout</url-pattern>
</servlet-mapping>
3.4. <!-- 进入会员首页 -->
<servlet>
<servlet-name>userindex</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.HomeIndex</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>userindex</servlet-name>
<url-pattern>/user/index</url-pattern>
</servlet-mapping>
3.5. <!-- 进入会员信息 -->
<servlet>
<servlet-name>usersetting</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.UserSettingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>usersetting</servlet-name>
<url-pattern>/user/setting</url-pattern>
</servlet-mapping>
3.6. <!-- 修改会员密码 -->
<servlet>
<servlet-name>changepwd</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.ChangePwdServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>changepwd</servlet-name>
<url-pattern>/user/reset</url-pattern>
</servlet-mapping>
4. 商家体系
<!-- - - - - - - - - - - - - - - - - 商户信息管理使用 - - - - - - - - - -->
4.1. <!-- 商户主页 -->
<servlet>
<servlet-name>CustomerServlet</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.CustomIndex</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CustomerServlet</servlet-name>
<url-pattern>/cust/index/*</url-pattern>
</servlet-mapping>
/customer/custom_index.jsp
4.2. <!-- 商户登录使用 -->
<servlet>
<servlet-name>cuslogin</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.CustomLoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cuslogin</servlet-name>
<url-pattern>/cust/login</url-pattern>
</servlet-mapping>
4.3. <!-- 商户退出登录 -->
<servlet>
<servlet-name>cuslogout</servlet-name>
<servlet-class>com.csmy.my.center.util.servlet.CustomLogOutServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cuslogout</servlet-name>
<url-pattern>/cust/logout</url-pattern>
</servlet-mapping>
5. 参考
/atiPlatf_bet/WEB-INF/web.xml