mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-27 01:30:51 +00:00
Merge branch 'develop' of https://gitee.com/xiongxyang/novel-plus into develop
This commit is contained in:
commit
16fdd1678e
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -234,6 +234,12 @@ public class UserController extends BaseController {
|
||||
return ResultBean.fail(ResponseStatus.NO_LOGIN);
|
||||
}
|
||||
userService.updateUserInfo(userDetails.getId(),user);
|
||||
if(user.getNickName() != null){
|
||||
userDetails.setNickName(user.getNickName());
|
||||
Map<String, Object> data = new HashMap<>(1);
|
||||
data.put("token", jwtTokenUtil.generateToken(userDetails));
|
||||
return ResultBean.ok(data);
|
||||
}
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
|
@ -1,37 +1,42 @@
|
||||
package com.java2nb.novel.core.wrapper;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* XSS过滤处理
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
|
||||
{
|
||||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
/**
|
||||
* 假如有有html 代码是自己传来的 需要设定对应的name 不过滤
|
||||
*/
|
||||
private static final List<String> noFilterNames = Arrays.asList("content");
|
||||
|
||||
/**
|
||||
* @param request
|
||||
*/
|
||||
public XssHttpServletRequestWrapper(HttpServletRequest request)
|
||||
{
|
||||
public XssHttpServletRequestWrapper(HttpServletRequest request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getParameterValues(String name)
|
||||
{
|
||||
public String[] getParameterValues(String name) {
|
||||
String[] values = super.getParameterValues(name);
|
||||
if (values != null)
|
||||
{
|
||||
if (!noFilterNames.contains(name) && values != null) {
|
||||
int length = values.length;
|
||||
String[] escapseValues = new String[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
// 防xss攻击和过滤前后空格
|
||||
escapseValues[i] = values[i].replaceAll("<","<").replaceAll(">",">");
|
||||
for (int i = 0; i < length; i++) {
|
||||
escapseValues[i] = values[i].replaceAll("<", "<").replaceAll(">", ">");
|
||||
}
|
||||
return escapseValues;
|
||||
}
|
||||
return super.getParameterValues(name);
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ xss:
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接 (多个用逗号分隔)
|
||||
urlPatterns: /book/addBookComment,/user/addFeedBack
|
||||
urlPatterns: /book/addBookComment,/user/addFeedBack,/author/addBook,/author/addBookContent,/author/register.html
|
||||
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{website.name}"></title>
|
||||
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
|
||||
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
|
||||
<link rel="stylesheet" href="/css/read.css" />
|
||||
@ -74,7 +74,7 @@
|
||||
<div class="readWrap">
|
||||
<div class="bookNav">
|
||||
<a href="/" >首页 </a>> <a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}">
|
||||
</a>> <a th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}">
|
||||
</a>> <a th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}">
|
||||
|
||||
</a>
|
||||
</div>
|
||||
@ -82,11 +82,11 @@
|
||||
<div class="textbox cf">
|
||||
|
||||
<div class="book_title">
|
||||
<h1 th:text="${bookIndex.indexName}">
|
||||
<h1 th:utext="${bookIndex.indexName}">
|
||||
</h1>
|
||||
<div class="textinfo">
|
||||
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
|
||||
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'" th:text="${book.authorName}"></a><span th:text="'字数:'+${bookIndex.wordCount}"></span><span th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'" th:utext="${book.authorName}"></a><span th:text="'字数:'+${bookIndex.wordCount}"></span><span th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="txtwrap" th:if="${needBuy}">
|
||||
|
@ -2,7 +2,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
|
||||
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||
<meta name="description"
|
||||
@ -23,7 +23,7 @@
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="nav_sub">
|
||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>
|
||||
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>
|
||||
</div>
|
||||
<div class="channelWrap channelBookInfo cf">
|
||||
<div class="bookCover cf">
|
||||
@ -31,8 +31,8 @@
|
||||
th:attr="alt=${book.bookName}"/></a>
|
||||
<div class="book_info">
|
||||
<div class="tit">
|
||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
||||
th:text="${book.authorName}+' 著'"></a>
|
||||
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
||||
th:utext="${book.authorName}+' 著'"></a>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
|
||||
@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<ul class="list cf">
|
||||
<li>
|
||||
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:text="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:utext="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||
<span class="black9 fr"
|
||||
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</li>
|
||||
@ -143,7 +143,7 @@
|
||||
<div class="msg">
|
||||
<span class="icon_qyzz">签约作家</span>
|
||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:text="${book.authorName}"></a></h4>
|
||||
th:utext="${book.authorName}"></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author_intro cf">
|
||||
|
@ -2,7 +2,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
||||
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
|
||||
@ -17,7 +17,7 @@
|
||||
<div class="main box_center cf">
|
||||
<div class="nav_sub">
|
||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>><a
|
||||
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
|
||||
</div>
|
||||
<div class="channelWrap channelChapterlist cf mb50">
|
||||
@ -26,11 +26,11 @@
|
||||
<div class="bookCover cf">
|
||||
<div class="book_info1">
|
||||
<div class="tit">
|
||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
||||
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<span>作者:<a href="javascript:void(0)" th:text="${book.authorName}"></a></span>
|
||||
<span>作者:<a href="javascript:void(0)" th:utext="${book.authorName}"></a></span>
|
||||
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
|
||||
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
|
||||
th:case="*">已完结</em></span>
|
||||
@ -45,9 +45,9 @@
|
||||
<div class="dirList">
|
||||
<ul th:each="bookIndex : ${bookIndexList}">
|
||||
<li><a th:if="${bookIndex.isVip} != '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" >
|
||||
<span th:text="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
|
||||
<span th:utext="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
|
||||
</a>
|
||||
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:text="${bookIndex.indexName}">
|
||||
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:utext="${bookIndex.indexName}">
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="box_center cf">
|
||||
<div class="copyright">
|
||||
<ul >
|
||||
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="javascript:layer.alert('待开通,敬请期待!');" >作家专区</a></li>
|
||||
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="/author/index.html" >作家专区</a></li>
|
||||
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved '+#{website.name}+'版权所有'"></li>
|
||||
|
||||
</ul>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
|
||||
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:text="${book.bookName}+${bookIndex.indexName}"></title>
|
||||
<title th:utext="${book.bookName}+${bookIndex.indexName}"></title>
|
||||
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${bookIndex.indexName}">
|
||||
|
||||
@ -183,7 +183,7 @@
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:text="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:utext="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</a>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:text="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
|
||||
<title th:utext="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
|
||||
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节,'+${book.bookName}+'免费阅读,'+${book.bookName}+'TXT下载'">
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon" th:text="${book.bookName}"></b>
|
||||
<b class="layui-icon" th:utext="${book.bookName}"></b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
</div>
|
||||
<div style="position:relative;padding: 10px 20px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #4c6978;" th:text="'作者:'+ ${book.authorName}"></div></a>
|
||||
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #4c6978;" th:utext="'作者:'+ ${book.authorName}"></div></a>
|
||||
<a th:href="'/book/book_ranking.html?catId='+${book.catId}"><div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.catName}"></div></a>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus==0?'连载':'完结'}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:text="${book.bookName}+'最新免费章节目录列表'"></title>
|
||||
<title th:utext="${book.bookName}+'最新免费章节目录列表'"></title>
|
||||
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节'">
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:text="${book.bookName}"></b></a>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
<div class="layui-colla-content layui-show indexP layui-row">
|
||||
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
|
||||
<a th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:text="${index.indexName}">
|
||||
<a th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
|
||||
|
||||
</a>
|
||||
</p>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改昵称_'+#{website.name}"></title>
|
||||
@ -24,21 +25,26 @@
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<div class="my_info_txt">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTI5MzkzMzQyMw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZLj1Uo6akAHRsP9HH/tJWCPmjwlzm9tv02sZRfbbCnBA" />
|
||||
</div>
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||
value="/wEPDwUKMTI5MzkzMzQyMw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZLj1Uo6akAHRsP9HH/tJWCPmjwlzm9tv02sZRfbbCnBA"/>
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6C876674" />
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAO8SPdUDpH0Q7nHjeqbvI7ld2C+OxfjpZOniBJbql7XdnRgTJ25FWigbeFr84Vgoxdi/cg2vS37N0KER6F1nyr1wKHztnXmDR5zls+9dCeAZg==" />
|
||||
</div>
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474" maxlength="20" id="txtNiceName" class="s_input" placeholder="" /></li>
|
||||
<li><i class="tit"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
||||
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6C876674"/>
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
|
||||
value="/wEdAAO8SPdUDpH0Q7nHjeqbvI7ld2C+OxfjpZOniBJbql7XdnRgTJ25FWigbeFr84Vgoxdi/cg2vS37N0KER6F1nyr1wKHztnXmDR5zls+9dCeAZg=="/>
|
||||
</div>
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474"
|
||||
maxlength="20" id="txtNiceName" class="s_input"
|
||||
placeholder=""/></li>
|
||||
<li><i class="tit"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
||||
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改"
|
||||
id="btn" class="s_btn btn_red"/></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,14 +63,13 @@
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if(data.data.nickName){
|
||||
if (data.data.nickName) {
|
||||
$("#txtNiceName").val(data.data.nickName);
|
||||
}else{
|
||||
} else {
|
||||
$("#txtNiceName").val(data.data.username);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
@ -78,23 +83,26 @@
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
function updateName() {
|
||||
var nickname = $("#txtNiceName").val();
|
||||
if(nickname.isBlank()){
|
||||
if (nickname.isBlank()) {
|
||||
$("#LabErr").html("昵称不能为空!");
|
||||
return;
|
||||
}
|
||||
if(!nickname.isNickName()){
|
||||
if (!nickname.isNickName()) {
|
||||
$("#LabErr").html("昵称格式不正确!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/updateUserInfo",
|
||||
data: {'nickName':nickname},
|
||||
data: {'nickName': nickname},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
$.cookie('Authorization', data.data.token, {path: '/'});
|
||||
window.location.href = '/user/setup.html';
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user