会员中心

main
tamguo 7 years ago
parent 66a56894d8
commit 7cf4e9d15f

@ -0,0 +1,22 @@
package com.tamguo.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
* Controller -
*
* @author tamguo
*
*/
@Controller
public class IndexController {
@RequestMapping(path= {"index" , "/"})
public ModelAndView index(ModelAndView model) {
model.setViewName("index");
return model;
}
}

@ -1,102 +0,0 @@
package com.tamguo.web.member;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.Condition;
import com.tamguo.common.utils.Result;
import com.tamguo.modules.book.model.BookEntity;
import com.tamguo.modules.book.model.DocumentEntity;
import com.tamguo.modules.book.model.enums.DocumentStatusEnum;
import com.tamguo.modules.book.service.IBookCategoryService;
import com.tamguo.modules.book.service.IBookService;
import com.tamguo.modules.book.service.IDocumentService;
@Controller(value="memberBookController")
@RequestMapping(value="member/book")
public class BookController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
IBookService iBookService;
@Autowired
IBookCategoryService iBookCategoryService;
@Autowired
IDocumentService iDocumentService;
@RequestMapping(value="list.html" , method = RequestMethod.GET)
public ModelAndView bookList(ModelAndView model) {
model.setViewName("member/book/list");
return model;
}
@SuppressWarnings("unchecked")
@RequestMapping(value="getBookList" , method = RequestMethod.POST)
@ResponseBody
public Result getBookList(Integer pageNo , Integer pageSize) {
try {
List<BookEntity> bookList = iBookService.selectList(Condition.create().eq("owner", "tamguo"));
return Result.result(0, bookList, "查询成功!");
} catch (Exception e) {
logger.error(e.getMessage() , e );
return Result.failResult("查询失败");
}
}
@RequestMapping(value = "edit", method = RequestMethod.GET)
public ModelAndView edit(String bookId , ModelAndView model) {
model.setViewName("member/book/edit");
model.addObject("bookId", bookId);
return model;
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "getDocumentList", method = RequestMethod.POST)
@ResponseBody
public Result getDocumentList(String id) {
Map<String, Object> map = new HashMap<>();
try {
BookEntity book = iBookService.selectById(id);
List<DocumentEntity> documentList = iDocumentService.selectList(Condition.create().eq("book_id", id).eq("status", DocumentStatusEnum.NORMAL.getValue()));
map.put("documentList", this.processDocumentList(documentList));
map.put("book", book);
} catch (Exception e) {
logger.error(e.getMessage() , e );
return Result.failResult("查询失败");
}
return Result.successResult(map);
}
private JSONArray processDocumentList(List<DocumentEntity> documentList) {
JSONArray entitys = new JSONArray();
for(int i=0 ; i<documentList.size() ; i ++) {
DocumentEntity doc = documentList.get(i);
JSONObject entity = new JSONObject();
entity.put("id", doc.getId());
entity.put("text", doc.getName());
entity.put("parent", "0".equals(doc.getParentId()) ? "#" : doc.getParentId());
entity.put("identify", doc.getId());
entity.put("version", doc.getCreateDate().getTime());
JSONObject attr = new JSONObject();
attr.put("is_open", "0".equals(doc.getIsOpen()) ? false : true);
entity.put("a_attr", attr);
entitys.add(entity);
}
return entitys;
}
}

@ -1,211 +0,0 @@
package com.tamguo.web.member;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.baomidou.mybatisplus.mapper.Condition;
import com.tamguo.common.utils.DateUtil;
import com.tamguo.common.utils.Result;
import com.tamguo.modules.book.model.DocumentEntity;
import com.tamguo.modules.book.model.FileEntity;
import com.tamguo.modules.book.model.FileUploadEntity;
import com.tamguo.modules.book.model.enums.BizTypeEnum;
import com.tamguo.modules.book.model.enums.FileUploadStatusEnum;
import com.tamguo.modules.book.service.IDocumentService;
import com.tamguo.modules.book.service.IFileEntityService;
import com.tamguo.modules.book.service.IFileUploadService;
import com.tamguo.utils.FileMd5Utils;
@Controller
@RequestMapping(value="member/document")
public class DocumentController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
IDocumentService iDocumentService;
@Autowired
IFileEntityService iFileEntityService;
@Autowired
IFileUploadService iFileUploadService;
@Value("${file.storage.path}")
private String fileStoragePath;
@Value("${domain.name}")
private String domainName;
@SuppressWarnings("unchecked")
@RequestMapping(value = "{id}" , method = RequestMethod.GET)
@ResponseBody
public Result getDocument(@PathVariable String id) {
DocumentEntity document = null;
try {
document = iDocumentService.selectById(id);
// 查询附件
List<FileUploadEntity> fileUploads = iFileUploadService.selectList(Condition.create().eq("biz_key", document.getId()).eq("biz_type", BizTypeEnum.DOCUMENT.getValue()));
if(!CollectionUtils.isEmpty(fileUploads)) {
for(int i=0 ; i<fileUploads.size() ; i++) {
FileUploadEntity fileUpload = fileUploads.get(i);
FileEntity fileEntity = iFileEntityService.selectOne(Condition.create().eq("file_id", fileUpload.getFileId()));
fileUpload.setFilePath(domainName + "files/" + fileEntity.getFilePath());
fileUpload.setFileSize(fileEntity.getFileSize());
}
document.setFileUploads(fileUploads);
}
} catch (Exception e) {
logger.error(e.getMessage() , e );
return Result.failResult("查询失败");
}
return Result.successResult(document);
}
/**
*
*/
@RequestMapping(value = "modify" , method = RequestMethod.POST)
@ResponseBody
public Result modify(DocumentEntity document) {
try {
iDocumentService.modify(document);
} catch (Exception e) {
logger.error(e.getMessage() , e );
return Result.failResult("保存失败");
}
return Result.successResult("保存成功");
}
/**
*
*/
@RequestMapping(value = "create" , method = RequestMethod.POST)
@ResponseBody
public Result create(DocumentEntity document) {
try {
iDocumentService.create(document);
} catch (Exception e) {
logger.error(e.getMessage() , e );
return Result.failResult("保存失败");
}
return Result.successResult(document);
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "uploadImage" , method = RequestMethod.POST)
@ResponseBody
public Result uploadImage(@RequestParam("editormd-image-file") MultipartFile file, String bookId , HttpServletRequest request) {
try {
String fileMd5 = FileMd5Utils.getMD5((FileInputStream)file.getInputStream());
FileEntity sysFile = iFileEntityService.selectOne(Condition.create().eq("file_md5", fileMd5));
if(sysFile != null) {
sysFile.setFilePath(domainName + "files/" + sysFile.getFilePath());
return Result.successResult(sysFile);
}
String filePath = fileStoragePath + "book/" + DateUtil.fomatDate(new Date(), "yyyyMM") + "/" + bookId;
File dest = new File(filePath);
if(!dest.exists()) {
dest.mkdirs();
}
// save 文件
FileUtils.writeByteArrayToFile(new File(filePath + "/" + file.getOriginalFilename()) , file.getBytes());
FileEntity fileEntity = new FileEntity();
fileEntity.setFileContentType(file.getContentType());
fileEntity.setFileExtension(file.getOriginalFilename());
fileEntity.setFileMd5(FileMd5Utils.getMD5((FileInputStream)file.getInputStream()));
fileEntity.setFileSize(file.getSize());
fileEntity.setFilePath("book/" + DateUtil.fomatDate(new Date(), "yyyyMM") + "/" + bookId + "/" + file.getOriginalFilename());
iFileEntityService.insert(fileEntity);
fileEntity.setFilePath(domainName + "files/" + fileEntity.getFilePath());
return Result.successResult(fileEntity);
} catch (IOException e) {
e.printStackTrace();
return Result.failResult("上传失败");
}
}
/**
*
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "uploadFile" , method = RequestMethod.POST)
@ResponseBody
public Result uploadFile(@RequestParam("editormd-file-file") MultipartFile file , String documentId , String bookId , HttpServletRequest request) {
try {
String fileMd5 = FileMd5Utils.getMD5((FileInputStream)file.getInputStream());
FileEntity sysFile = iFileEntityService.selectOne(Condition.create().eq("file_md5", fileMd5));
// 文件不存在
if(sysFile == null) {
String filePath = fileStoragePath + "book/" + DateUtil.fomatDate(new Date(), "yyyyMM") + "/" + bookId;
File dest = new File(filePath);
if(!dest.exists()) {
dest.mkdirs();
}
// save 文件
FileUtils.writeByteArrayToFile(new File(filePath + "/" + file.getOriginalFilename()) , file.getBytes());
sysFile = new FileEntity();
sysFile.setFileContentType(file.getContentType());
sysFile.setFileExtension(file.getOriginalFilename());
sysFile.setFileMd5(FileMd5Utils.getMD5((FileInputStream)file.getInputStream()));
sysFile.setFileSize(file.getSize());
sysFile.setFilePath("book/" + DateUtil.fomatDate(new Date(), "yyyyMM") + "/" + bookId + "/" + file.getOriginalFilename());
iFileEntityService.insert(sysFile);
}
// 创建上传记录
FileUploadEntity fileUpload = new FileUploadEntity();
fileUpload.setBizKey(documentId);
fileUpload.setBizType(BizTypeEnum.DOCUMENT);
fileUpload.setCreateBy("system");
fileUpload.setCreateDate(new Date());
fileUpload.setFileId(sysFile.getFileId());
fileUpload.setFileName(sysFile.getFileExtension());
fileUpload.setFileType(file.getContentType());
fileUpload.setUpdateBy("system");
fileUpload.setUpdateDate(new Date());
fileUpload.setStatus(FileUploadStatusEnum.NORMAL);
iFileUploadService.insert(fileUpload);
fileUpload.setFilePath(domainName + "files/" + sysFile.getFilePath());
fileUpload.setFileSize(sysFile.getFileSize());
return Result.successResult(fileUpload);
} catch (IOException e) {
e.printStackTrace();
return Result.failResult("上传失败");
}
}
/**
*
*/
@RequestMapping(value = "removeFile" , method = RequestMethod.POST)
@ResponseBody
public Result removeFile(String id) {
try {
iFileUploadService.deleteById(id);
} catch (Exception e) {
return Result.result(1, null, "删除失败");
}
return Result.result(0, null, "删除成功");
}
}

@ -1,91 +0,0 @@
package com.tamguo.web.member;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.baomidou.mybatisplus.mapper.Condition;
import com.tamguo.common.utils.Result;
import com.tamguo.modules.book.model.DocumentEntity;
import com.tamguo.modules.book.model.enums.DocumentStatusEnum;
import com.tamguo.modules.book.service.IDocumentService;
@Controller
@RequestMapping(value="member/document")
public class HistoryDocController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IDocumentService iDocumentService;
/**
*
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "history" , method = RequestMethod.POST)
public ModelAndView history(String id , ModelAndView model) {
model.setViewName("member/book/history");
DocumentEntity document = iDocumentService.selectById(id);
model.addObject("document", document);
model.addObject("historyList", iDocumentService.selectList(Condition.create().eq("batch_no", document.getBatchNo()).eq("status", DocumentStatusEnum.HISTORY.getValue()).orderDesc(Arrays.asList("create_date"))));
return model;
}
/**
*
*/
@RequestMapping(value = "history/delete" , method = RequestMethod.POST)
@ResponseBody
public Result delete(String id) {
try {
iDocumentService.deleteById(id);
} catch (Exception e) {
logger.error(e.getMessage() , e);
return Result.failResult("删除失败!");
}
return Result.successResult("删除成功!");
}
/**
*
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "history/restore" , method = RequestMethod.POST)
@ResponseBody
public Result restore(String id) {
try {
DocumentEntity history = iDocumentService.selectById(id);
String content = history.getContent();
String markdown = history.getMarkdown();
DocumentEntity document = iDocumentService.selectOne(Condition.create().eq("batch_no", history.getBatchNo()).eq("status", DocumentStatusEnum.NORMAL.getValue()));
document.setContent(content);
document.setMarkdown(markdown);
document.setCover("no");
iDocumentService.modify(document);
return Result.successResult(document);
} catch (Exception e) {
logger.error(e.getMessage() , e);
return Result.failResult("恢复失败!");
}
}
@SuppressWarnings("unchecked")
@RequestMapping(value = "history/compare/{id}" , method = RequestMethod.POST)
@ResponseBody
public ModelAndView compare(@PathVariable String id , ModelAndView model) {
model.setViewName("member/book/compare");
DocumentEntity history = iDocumentService.selectById(id);
model.addObject("history", history);
model.addObject("document", iDocumentService.selectOne(Condition.create().eq("status", DocumentStatusEnum.NORMAL.getValue()).eq("batch_no", history.getBatchNo())));
return model;
}
}

@ -1,29 +0,0 @@
package com.tamguo.web.member;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.tamguo.modules.member.model.MemberEntity;
import com.tamguo.modules.member.service.IMemberService;
@Controller
@RequestMapping(value="member")
public class MemberController {
@Autowired
IMemberService iMemberService;
@RequestMapping("index.html")
public ModelAndView index(HttpServletRequest request , ModelAndView model) {
model.setViewName("member/index");
MemberEntity currMember = (MemberEntity) request.getSession().getAttribute("currMember");
MemberEntity member = iMemberService.selectById(currMember.getId());
model.addObject("member", member);
return model;
}
}

@ -23,6 +23,7 @@ public class ThymeleafConfig implements EnvironmentAware{
Map<String, Object> vars = new HashMap<>();
vars.put("domainName", env.getProperty("domain.name"));
vars.put("bookDomainName", env.getProperty("book.domain.name"));
vars.put("tamguoDomainName", env.getProperty("tamguo.domain.name"));
vars.put("PAPER_TYPE_ZHENTI", SystemConstant.ZHENGTI_PAPER_ID);
vars.put("PAPER_TYPE_MONI", SystemConstant.MONI_PAPER_ID);
vars.put("PAPER_TYPE_YATI", SystemConstant.YATI_PAPER_ID);

@ -20,7 +20,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(memberInterceptor).addPathPatterns("/**").excludePathPatterns("/login.html","/register.html","/password/**","/captcha.jpg" , "/submitLogin.html" , "/miniLogin.html","/static/**");
registry.addInterceptor(memberInterceptor).addPathPatterns("/**").excludePathPatterns("/login.html","/register.html","/password/**","/captcha.jpg" , "/submitLogin.html" , "/miniLogin.html","/static/**","/sendFindPasswordSms","/subRegister");
}
@Override

@ -43,7 +43,7 @@ public class RegisterController {
return iMemberService.checkMobile(mobile);
}
@RequestMapping(value = "/subRegister.html", method = RequestMethod.POST)
@RequestMapping(value = "/subRegister", method = RequestMethod.POST)
@ResponseBody
public Result subRegister(@RequestBody MemberEntity member , HttpSession session){
Result result = iMemberService.register(member);

@ -0,0 +1,30 @@
package com.tamguo.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.aliyuncs.exceptions.ClientException;
import com.tamguo.common.utils.Result;
import com.tamguo.modules.sys.service.ISmsService;
@Controller
public class SmsController {
@Autowired
ISmsService iSmsService;
@RequestMapping(value = {"sendFindPasswordSms"}, method = RequestMethod.GET)
@ResponseBody
public Result sendFindPasswordSms(String mobile){
try {
return iSmsService.sendFindPasswordSms(mobile);
} catch (ClientException e) {
e.printStackTrace();
}
return Result.result(500, null, "");
}
}

@ -1,5 +1,6 @@
domain.name=http://localhost:8084/
book.domain.name=http://localhost:8083/
tamguo.domain.name=http://localhost:8081/
server.port=8084
jasypt.encryptor.password=tamguo

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -63,9 +63,6 @@ var vm = new Vue({
verifyCode:[
{ required: true, message: '请输入验证码', trigger: 'blur' },
],
kemuId:[
{required: true, message: '请选择科目', trigger: 'change'}
],
email:[
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
@ -78,11 +75,10 @@ var vm = new Vue({
this.$refs[formName].validate((valid) => {
if (valid) {
vm.loading = true;
vm.member.subjectId = vm.member.kemuId[0];
axios({method: 'post',url: mainHttp + 'subRegister.html',data: vm.member}).then(function(response){
axios({method: 'post',url: mainHttp + 'subRegister',data: vm.member}).then(function(response){
if(response.data.code == 200){
vm.loading = false;
vm.$message({message: "注册成功",duration:500,type: 'success',onClose:function(){
vm.$message({message: "注册成功",duration:100,type: 'success',onClose:function(){
window.location.href = "index.html";
}});
}else{
@ -100,16 +96,11 @@ var vm = new Vue({
resetForm(formName) {
this.$refs[formName].resetFields();
},
getCourses:function(){
axios.get(mainHttp + 'subject/getSubjectTree.html').then(function(response){
vm.courses = response.data.result;
});
},
sendSms:function(){
// 校验成功才能发送短信
vm.$refs['member'].validateField('mobile',function(message){
if(message == ""){
axios.get(mainHttp + 'sms/sendFindPasswordSms.html?mobile='+vm.member.mobile).then(function(response){
axios.get(mainHttp + 'sendFindPasswordSms?mobile='+vm.member.mobile).then(function(response){
if(response.data.code == 200){
vm.$message({message: response.data.message,type: 'success'});
}else{
@ -121,4 +112,3 @@ var vm = new Vue({
}
}
});
vm.getCourses();

@ -41,7 +41,7 @@
<div class="head" th:fragment="memberHeader">
<div class="head-bar public">
<div class="logo">
<a target="_blank" th:href="${domainName}">
<a th:href="${tamguoDomainName}">
<img th:src="${domainName + 'static/images/logo_731bc32.png'}">
</a>
<p><span>考试中心</span></p>

@ -14,10 +14,10 @@
<div class="head" th:fragment="memberHeader">
<div class="head-bar public">
<div class="logo">
<a target="_blank" th:href="${domainName}">
<a th:href="${tamguoDomainName}">
<img th:src="${domainName + 'static/images/logo_731bc32.png'}">
</a>
<p><span>考试中心</span></p>
<p><span>会员中心</span></p>
</div>
<ul class="nav">
<li class="active"><a th:href="${domainName + 'index.html'}">首页</a></li>
@ -69,7 +69,7 @@
<tbody><tr>
<td>
<span class="logoV">
<img th:src="${domainName + member.avatar}">
<img th:src="${domainName +'static'+ member.avatar}">
</span>
</td>
</tr>
@ -119,9 +119,9 @@
</ul>
<div class="newExam">
<div class="add-p">
<a th:href="${domainName + 'member/paper.html'}"><i class="iconfont icon-jia" style="font-size:130px;"></i></a>
<a th:href="${domainName + 'booklist.html'}"><i class="iconfont icon-jia" style="font-size:130px;"></i></a>
</div>
<a th:href="${domainName + 'member/paper.html'}">开始新建试卷</a>
<a th:href="${domainName + 'booklist.html'}">开始新建试卷</a>
</div>
</div>
</div>

@ -17,7 +17,7 @@
<div id="head">
<div class="mod-header">
<a th:href="${domainName}" style="display: block;">
<img th:src="${domainName + 'images/logo_731bc32.png'}" alt="logo"></a>
<img th:src="${domainName + 'static/images/logo_731bc32.png'}" alt="logo"></a>
</div>
</div>
<div id="nav">
@ -34,12 +34,6 @@
<el-form-item label="用戶名" prop="username">
<el-input v-model="member.username"></el-input>
</el-form-item>
<el-form-item label="类型" prop="kemuId">
<el-cascader
:options="courses"
v-model="member.kemuId">
</el-cascader>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="member.mobile"></el-input>
</el-form-item>

@ -23,6 +23,7 @@ public class ThymeleafConfig implements EnvironmentAware{
Map<String, Object> vars = new HashMap<>();
vars.put("domainName", env.getProperty("domain.name"));
vars.put("adminDomain", env.getProperty("admin.domain.name"));
vars.put("memberDomain", env.getProperty("member.domain.name"));
vars.put("PAPER_TYPE_ZHENTI", SystemConstant.ZHENGTI_PAPER_ID);
vars.put("PAPER_TYPE_MONI", SystemConstant.MONI_PAPER_ID);
vars.put("PAPER_TYPE_YATI", SystemConstant.YATI_PAPER_ID);

@ -3,6 +3,8 @@ package com.tamguo.web.interceptor;
import java.net.URLEncoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
@ -18,6 +20,9 @@ public class MemberInterceptor extends HandlerInterceptorAdapter{
/** 登录URL */
private String loginUrl = DEFAULT_LOGIN_URL;
@Value("${member.domain.name}")
private String memberDomainName;
/**
*
*
@ -43,9 +48,9 @@ public class MemberInterceptor extends HandlerInterceptorAdapter{
} else {
if (request.getMethod().equalsIgnoreCase("GET")) {
String redirectUrl = request.getQueryString() != null ? request.getRequestURI() + "?" + request.getQueryString() : request.getRequestURI();
response.sendRedirect(request.getContextPath() + loginUrl + "?" + REDIRECT_URL_PARAMETER_NAME + "=" + URLEncoder.encode(redirectUrl, "UTF-8"));
response.sendRedirect(memberDomainName + loginUrl + "?" + REDIRECT_URL_PARAMETER_NAME + "=" + URLEncoder.encode(redirectUrl, "UTF-8"));
} else {
response.sendRedirect(request.getContextPath() + loginUrl);
response.sendRedirect(memberDomainName + request.getContextPath() + loginUrl);
}
return false;
}

@ -1,5 +1,6 @@
domain.name=http://localhost:8081/
admin.domain.name=http://localhost:8081/
member.domain.name=http://localhost:8084/
server.port=8081
jasypt.encryptor.password=tamguo

@ -11,9 +11,9 @@
<i th:if="${session.currMember != null}" class="photo-icon iconfont icon-down" style="transform: rotate(0deg);"></i>
</div>
<ul th:class="${currMember == null} ? 'login-option dis-none' : 'login-option'" id="loginOptionUl">
<li><a th:href="${domainName + 'member/index.html'}" title="我的首页">我的首页</a></li>
<li><a th:href="${domainName + 'member/index.html'}" title="账号设置">账号设置</a></li>
<li><a th:href="${domainName + 'logout.html'}" title="退出">退出</a></li>
<li><a th:href="${memberDomain + 'index.html'}" title="我的首页">我的首页</a></li>
<li><a th:href="${memberDomain + 'index.html'}" title="账号设置">账号设置</a></li>
<li><a th:href="${memberDomain + 'logout.html'}" title="退出">退出</a></li>
</ul>
</div>
<ul class="contain-ul">

@ -32,7 +32,7 @@
<p id="TANGRAM__PSP_25__submitWrapper" class="pass-form-item pass-form-item-submit">
<input id="TANGRAM__PSP_25__submit" type="submit" value="登录" class="pass-button pass-button-submit">
<a class="pass-sms-btn pass-link" title="短信快捷登录" data-type="sms" id="TANGRAM__PSP_25__smsSwitchWrapper">短信快捷登录</a>
<a class="pass-fgtpwd pass-link" th:href="${domainName + 'password/find.html'}" target="_blank">忘记密码?</a>
<a class="pass-fgtpwd pass-link" th:href="${memberDomain + 'password/find.html'}" target="_blank">忘记密码?</a>
</p>
</form>
</div>
@ -79,7 +79,7 @@
</div>
</div>
</div>
<a class="pass-reglink pass-link" th:href="${domainName + 'register.html'}" target="_blank">立即注册</a>
<a class="pass-reglink pass-link" th:href="${memberDomain + 'register.html'}" target="_blank">立即注册</a>
</div>
</div>
</div>

Loading…
Cancel
Save