会员中心

main
tamguo 7 years ago
parent 097d3244a4
commit c7d78cd045

@ -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.servlet.ModelAndView;
import com.tamguo.modules.member.service.IMemberService;
import com.tamguo.utils.ShiroUtils;
/**
* -
*
* @author tamguo
*
*/
@Controller
public class IndexController {
@Autowired
IMemberService iMemberService;
@RequestMapping(value = "/index.html", method = RequestMethod.GET)
public ModelAndView index(ModelAndView model){
model.setViewName("index");
model.addObject("member", iMemberService.selectById(ShiroUtils.getMemberId()));
return model;
}
}

@ -57,7 +57,7 @@ public class LoginController {
subject.login(token);
session.setAttribute("currMember", ShiroUtils.getMember());
response.sendRedirect("member/index.html");
response.sendRedirect("index.html");
return null;
} catch (UnknownAccountException e) {
result = Result.result(201, null, "用户名或密码有误,请重新输入或找回密码");

File diff suppressed because one or more lines are too long

@ -0,0 +1,393 @@
body {
font-family: "Microsoft Yahei";
color: #333;
background: #f5f5f6;
}
body {
position: relative;
height: auto;
min-height: 100%;
}
.cnav {
height: 98px;
width: 100%;
background-size: cover;
background-color: #826a6a;
}
.cnav_b {
position: relative;
margin: 0 auto;
left: 50px;
height: 98px;
}
.public {
width: 1098px;
margin: 0px auto;
}
.cnav_left {
float: left;
width: 162px;
height: 54px;
margin: 22px 0 0 46px;
font-size: 18px;
color: #fff;
line-height: 54px;
background: url(../../images/member/index/top-kaos.png) no-repeat;
padding-left: 55px;
}
.cnav_right {
float: left;
width: 720px;
height: 5px;
background: url(../../images/member/index/project-cnav.png) repeat-x;
margin: 47px 0 0 0;
}
.cnav_right ul {
position: absolute;
top: 30px;
left: 230px;
}
.cnav_right ul li {
width: 120px;
height: 50px;
float: left;
font-size: 14px;
color: #fff;
text-align: center;
line-height: 12px;
margin-left: 32px;
}
.cnav_right ul li .Cnav_t {
background: url(../../images/member/index/project-candidate.png) no-repeat -54px 0;
width: 37px;
height: 37px;
line-height: 37px;
margin: 0 auto;
}
.cnav_right ul li span {
font-size: 12px;
font-weight: bold;
width: 27px;
height: 27px;
color: #29bdb9;
display: block;
margin: 5px auto 5px auto;
text-align: center;
line-height: 27px;
background: url(../../images/member/index/project-candidate.png) no-repeat -26px 0;
}
.examContent {
background: #f5f5f6;
padding-top: 10px;
overflow: hidden;
padding-bottom: 200px;
}
.examContent>h2 {
background: white;
text-align: center;
height: 60px;
line-height: 60px;
font-weight: normal;
font-size: 20px;
}
.examContent .newsLeft, .examContent .newsR {
float: left;
padding: 10px;
background: white;
margin-top: 10px;
}
.examContent .newsLeft {
width: 31%;
}
.examContent .newsLeft .baseNews {
font-size: 14px;
margin-bottom: 10px;
}
.examContent .newsLeft h3 {
font-size: 16px;
color: #555;
font-weight: normal;
}
.examContent .newsLeft h3 i {
width: 7px;
height: 10px;
display: inline-block;
background: url(../../images/member/index/icon.png) no-repeat -87px -85px;
margin: 0px 4px;
position: relative;
top: -2px;
margin-left: 0px;
}
.examContent .newsLeft .baseNews>div {
border: 1px solid white;
width: 320px;
height: 100px;
background: #f5f5f5;
text-align: center;
line-height: 100px;
margin-top: 10px;
padding-left: 20px;
}
.examContent .newsLeft .baseNews>div span {
width: 117px;
height: 60px;
line-height: 56px;
background: whitesmoke;
display: inline-block;
position: relative;
}
.examContent .newsLeft .baseNews>div .logoV img {
max-height: 100%;
max-width: 100%;
border-radius: 55px;
}
.examContent .newsLeft .baseNews>div a {
display: none;
display: inline-block;
float: right;
position: relative;
top: 30px;
left: -10px;
color: #2abcb8;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fa-pencil:before {
content: "\f040";
}
.examContent .newsLeft .baseNews ul {
overflow: hidden;
padding: 25px 0px;
padding-left: 14px;
padding-bottom: 14px;
}
.examContent .newsLeft .baseNews ul li {
float: left;
width: 25%;
}
.examContent .newsLeft .baseNews ul li>div.li-p {
background: rgb(253, 199, 125);
border: 1px solid rgb(253, 199, 125);
}
.examContent .newsLeft .baseNews ul li>div {
width: 65px;
height: 65px;
border-radius: 50%;
border: 1px solid #52cdc8;
text-align: center;
background: #52cdc8;
cursor: pointer;
margin-bottom: 12px;
}
.examContent .newsLeft .baseNews ul li>span {
margin-left: 2px;
}
img, input, fieldset {
border: 0 none;
vertical-align: middle;
}
.well {
height: 10px;
background: #f5f5f6;
width: 340px;
position: relative;
left: -10px;
}
.examContent .newsLeft .userNews {
margin-top: 10px;
}
.examContent .newsLeft h3 {
font-size: 16px;
color: #555;
font-weight: normal;
}
.examContent .newsLeft h3 i {
width: 7px;
height: 10px;
display: inline-block;
background: url(../../images/member/index/icon.png) no-repeat -87px -85px;
margin: 0px 4px;
position: relative;
top: -2px;
margin-left: 0px;
}
.examContent .newsLeft .userNews ul {
margin-top: 10px;
}
.examContent .newsLeft .userNews ul li {
height: 60px;
margin-bottom: 10px;
background: #f5f5f6;
line-height: 60px;
font-size: 14px;
padding-left: 20px;
}
.examContent .newsLeft .userNews>a {
font-size: 14px;
display: block;
text-align: center;
padding: 10px;
background: #2abcb8;
color: white;
}
.examContent .newsLeft>span {
display: block;
text-align: center;
padding: 10px;
color: #2abcb8;
}
.examContent .newsR {
width: 66.2%;
margin-left: 10px;
padding: 0px;
}
.examContent .newsR .topNews {
background: #f5f5f5;
overflow: hidden;
}
.examContent .newsR .topNews ul, .examContent .newsR .topNews .newExam {
float: left;
width: 50%;
overflow: hidden;
}
.examContent .newsR .topNews ul li:nth-child(1) {
background: rgb(114, 214, 212);
}
.examContent .newsR .topNews ul li {
float: left;
width: 47%;
margin-bottom: 10px;
margin-right: 10px;
text-align: center;
color: white;
font-size: 14px;
height: 140px;
}
.examContent .newsR .topNews ul li>span>b {
font-size: 22px;
margin-top: 4px;
display: inline-block;
}
.examContent .newsR .topNews ul li:nth-child(2) {
background: rgb(81, 194, 238);
}
.examContent .newsR .topNews ul li:nth-child(3) {
background: rgb(253, 199, 125);
}
.examContent .newsR .topNews ul li:nth-child(4) {
background: rgb(132, 219, 174);
}
.examContent .newsR .topNews .newExam {
background: rgb(235, 255, 254);
border: 2px dashed #2abcb8;
box-sizing: border-box;
text-align: center;
height: 288px;
}
.examContent .newsR .topNews ul, .examContent .newsR .topNews .newExam {
float: left;
width: 50%;
overflow: hidden;
}
.examContent .newsR .topNews .newExam div.add-p {
width: 145px;
height: 145px;
background: #ebfffe;
border-radius: 50%;
position: relative;
left: 50%;
transform: translateX(-50%);
top: 62px;
cursor: pointer;
}
.examContent .newsR .topNews .newExam>a {
color: #2abcb8;
font-size: 15px;
position: relative;
top: 80px;
}
.examContent .newsR .examTable {
padding: 10px;
min-height: 456px;
}
.examContent .newsR .examTable>h4 {
font-size: 16px;
}
.examTable h4 {
font-weight: normal;
color: #555;
}
.examContent .newsR .examTable>h4 i {
width: 7px;
height: 10px;
display: inline-block;
background: url(../../images/member/index/icon.png) no-repeat -87px -85px;
margin: 0px 4px;
position: relative;
top: -2px;
margin-left: 0px;
}
.examContent .newsR .examTable table {
width: 100%;
margin-top: 8px;
}
.examContent .newsR .examTable table thead {
background: #f5f5f5;
}
.examTable table tr th {
font-weight: normal;
color: #555;
}
.examContent .newsR .examTable .textNone {
text-align: center;
height: 289px;
padding-top: 80px;
}
body .footer {
position: absolute;
bottom: 0px;
width: 100%;
overflow: hidden;
z-index: 0;
}
.footer {
height: 173px;
background: #838485;
margin-top: 37px;
color: #f3f3f5;
}
.public {
width: 1098px;
margin: 0px auto;
}
.footer-left {
width: 794px;
float: left;
padding-left: ;
padding-top: 35px;
}
.footer-logo {
float: left;
padding: 0px 0px 0px 0px;
width: 208px;
}
.footer-txt {
overflow: hidden;
font-size: 14px;
line-height: 32px;
}
.footer-txt a {
color: #f3f3f5;
}
.footer-right table {
width: 100%;
line-height: 26px;
text-align: center;
}

@ -0,0 +1,133 @@
.head {
height: 59px;
background: #ffffff;
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
}
.head .head-bar {
height: 59px;
}
.head .logo {
padding-top: 0px;
float: left;
display: -webkit-box;
line-height: 59px;
}
.head .logo a {
max-width: 120px;
height: 55px;
line-height: 55px;
text-align: center;
display: block;
}
.head .logo img {
float: none;
max-height: 100%;
max-width: 100%;
}
.head .logo p {
float: none;
line-height: 59px;
padding-left: 12px;
}
.head .logo p span {
color: #666666;
font-size: 14px;
height: 16px;
line-height: 16px;
display: inline-block;
padding-left: 10px;
border-left: 1px solid #ececec;
}
.head .nav {
margin-left: 50px;
float: left;
padding-top: 16px;
}
.head .nav li.active {
border-bottom: 2px solid #29bdb9;
font-weight: bold;
}
.head .nav li {
padding: 0px 3px 6px;
float: left;
margin-right: 40px!important;
}
.head .nav li.active a {
color: #333333;
}
.mguser {
display: inline-block;
float: right;
position: relative;
}
.mguser-box {
height: 60px;
line-height: 60px;
position: relative;
}
.mguser-cnt {
position: absolute;
width: 110px;
top: 59px;
background: rgb(161, 163, 162);
padding-bottom: 2px;
display: none;
z-index: 100;
right: 0px;
}
.mguser-cnt li a {
height: 32px;
display: block;
text-align: center;
line-height: 32px;
color: #FFFFFF;
}
.head .nav li a {
display: block;
color: #666666;
font-size: 18px;
}
.mguser-box a {
border-bottom: 1px solid white;
height: 48px;
padding-left: 11px;
padding-right: 27px;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
position: relative;
left: 7px;
}
.mguser-box p {
min-width: inherit;
margin-right: 2px;
line-height: 60px;
float: left;
font-size: 14px;
color: #999;
padding-left: 5px;
max-width: 60px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.headlogotable {
float: left;
}
.hgimg {
width: 30px;
height: 30px;
float: left;
margin-top: 13px;
border-radius: 50%;
position: relative;
left: 5px;
}
.mguser-box i {
border: none;
font-size: 25px;
position: absolute;
right: 5px;
top: 0px;
}

@ -83,7 +83,7 @@ var vm = new Vue({
if(response.data.code == 200){
vm.loading = false;
vm.$message({message: "注册成功",duration:500,type: 'success',onClose:function(){
window.location.href = "member/index.html";
window.location.href = "index.html";
}});
}else{
vm.loading = false;

@ -0,0 +1,13 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<div class="footer" th:fragment="footer">
<div class="public">
<div class="footer-left" style="width:60%">
<div class="footer-logo" style="margin-top: -5px;padding-top:0px;"><img th:src="${domainName + 'images/logo.png'}" style=" position: relative;left: -32px;top: 2px;width:200px;height:50px;"></div>
<div class="footer-txt">
<a target="_blank" th:href="${domainName}">关于我们</a> |
<a target="_blank" th:href="${domainName}">联系我们</a> |
<a target="_blank" th:href="${domainName}">免责声明</a><br>Copyright © tamguo.com<br><span class="inputSpan">All Rights Reversed 沪ICP备14022608号-1</span></div>
</div>
</div>
</div>

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="Zh-hans" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>会员中心 - 探果网</title>
<link rel="stylesheet" th:href="${domainName + 'css/reset.css'}" />
<link rel="stylesheet" th:href="${domainName + 'css/iconfont.css'}" />
<link rel="stylesheet" th:href="${domainName + 'css/member/index.css'}" />
<link rel="stylesheet" th:href="${domainName + 'css/member/memberMain.css'}" />
<link type="favicon" rel="shortcut icon" th:href="${domainName + 'images/favicon.png'}" />
</head>
<body>
<!-- 头部-->
<div class="head" th:fragment="memberHeader">
<div class="head-bar public">
<div class="logo">
<a target="_blank" th:href="${domainName}">
<img th:src="${domainName + 'images/logo_731bc32.png'}">
</a>
<p><span>考试中心</span></p>
</div>
<ul class="nav">
<li class="active"><a th:href="${domainName + 'member/index.html'}">首页</a></li>
<li><a th:href="${domainName + 'member/paper.html'}">试卷</a></li>
<li><a th:href="${domainName + 'member/account.html'}">帐号</a></li>
</ul>
<div class="mguser">
<div class="mguser-box">
<span th:text="${member.username}">tamguo</span>
<a th:href="${domainName + 'logout.html'}">退出</a>
</div>
</div>
</div>
</div>
<!--主体-->
<div class="cnav">
<div class="public cnav_b">
<div class="cnav_left">
探果五步曲
</div>
<div class="cnav_right">
<ul>
<li><span class="Cnav_t">1</span><b>新建试卷</b></li>
<li><span>2</span>添加子卷</li>
<li><span>3</span>添加试题</li>
<li><span>4</span>发布试卷</li>
<li><span>5</span>等待收益</li>
</ul>
</div>
</div>
</div>
<div class="PCshow hide" style="display: block;">
<div class="examContent public">
<h2>
<img th:src="${domainName + 'images/member/index/face-xiao.png'}"
style="position: relative; top: -2px;"> &nbsp;<span
style="letter-spacing: 4px;">
<b id="userName" style="font-weight: normal; color: #2abcb8" th:text="${member.nickName}">tamguo</b>,您好!欢迎来到探果网会员中心
</span>
</h2>
<!-- 左侧基本信息项 -->
<div class="newsLeft">
<div class="baseNews">
<h3><i></i> 基本信息</h3>
<div id="borderBox">
<table style="float: left;">
<tbody><tr>
<td>
<span class="logoV">
<img th:src="${domainName + member.avatar}">
</span>
</td>
</tr>
</tbody></table>
<b th:title="${member.username}" style="font-size: 16px; margin-left: 14px;float: left;display: inline-block;font-weight: normal;max-width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" th:text="${member.username}">盘诚软件</b>
<a style="font-size: 12px;" th:href="${domainName + 'member/account.html'}"><i class="iconfont icon-icon_edit"></i> 编辑</a>
</div>
<p style="clear: both;height: 0px;"></p>
</div>
<div class="well"></div>
<div class="userNews">
<h3><i></i> 账户信息</h3>
<ul>
<li style="padding-left: 21px;">积分:
<b style="margin-left:14px;color:#009688;" id="examCandsNum" th:text="${member.point + ' '}">1000</b>
</li>
<li style="padding-left: 24px;">余额:<b style="margin-left: 19px;color:#009688;" th:text="${#numbers.formatDecimal(member.amount,1,2) + ' '}">50</b></li>
<li style="padding-left: 21px;">最近登录时间:<b style="margin-left: 13px;" th:text="${#dates.format(member.lastLoginTime * 1000, 'yyyy/MM/ss HH:mm')}">2018-04-27 10:32</b></li>
</ul>
<a th:href="${domainName}" target="_blank" id="addMoney">我的钱包</a>
</div>
</div>
<!-- 右侧信息显示 -->
<div class="newsR">
<div class="topNews" id="numList1">
<ul>
<li>
<img th:src="${domainName + 'images/member/index/peneil.png'}" style="margin-top: 26px;position: relative;top: -4px;"><br>
<span><b id="datab1" th:text="${member.downNum}">0</b></span><br>
<span>下载总数</span>
</li>
<li>
<img th:src="${domainName + 'images/member/index/paperm.png'}" style="margin-top: 26px;position: relative;top: -4px;"><br>
<span><b id="datab2" th:text="${member.paperNum}">1</b></span><br>
<span>试卷总数</span>
</li>
<li>
<img th:src="${domainName + 'images/member/index/peoplem.png'}" style="margin-top: 26px;position: relative;top: -4px;"><br>
<span><b id="datab3" th:text="${member.hitsNum}">0</b></span><br>
<span>阅读总数</span>
</li>
<li>
<img th:src="${domainName + 'images/member/index/testnew.png'}" style="margin-top: 26px;position: relative;top: -6px;"><br>
<span><b id="datab4" th:text="${member.questionNum}">19</b></span><br>
<span>试题总数</span>
</li>
</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>
</div>
<a th:href="${domainName + 'member/paper.html'}">开始新建试卷</a>
</div>
</div>
</div>
</div>
</div>
<!-- 尾部-->
<div th:replace="include/footer :: footer"></div>
</body>
</html>
Loading…
Cancel
Save