发表于: 2018-06-10 23:31:47

1 768


今天完成的事情:

今天主要是做了几个页面。

<div class="main">
   <h1>注册页面</h1>
   <div class="sap_tabs">
       <div id="horizontableTab" align="center">
           <ul class="resp-tabs-list">
               <li class="reps-tabs-item" aria-controls="tab_item-0" role="tab">
                   <span onclick="click1()" >手机注册</span>
               </li>
               <li class="reps-tabs-item" aria-controls="tab_item-1" role="tab">
                   <span onclick="click2()" >邮箱注册</span>
               </li>
           </ul>
           <div class="resp-tabs-container">
               <div class="tab1 reps-tab-content" aria-labelledby="tab_item-0" >
                   <div class="facts">
                       <div class="register">
                           <form:form name="registration" action="/registration/registerProcess" method="post">
                               用户名:<input name="username" type="text"><br>
                               密码:<input name="password" type="text" ><br>
                               手机号:<input id="phoneNumber" type="text" name="phone"><br>
                               验证码:<input type="text" name="captcha"><button href="/shortMessage">获取验证码</button>
                               <input type="submit" value="注册">
                           </form:form>
                       </div>
                   </div>
               </div>
               <div class="tab2 reps-tab-content" aria-labelledby="tab_item-1">
                   <div class="facts">
                       <div class="register2">
                           <form:form name="registration" action="/registration/registerProcess" method="post">
                               用户名:<input name="username" type="text" ><br>
                               密码:<input name="password" type="text" ><br>
                               邮箱:<input type="email" name="email"><br>
                               <input type="submit" value="注册">
                           </form:form>
                       </div>
                   </div>
               </div>
           </div>
       </div>
   </div>
</div>
<script>
   var table1 = document.getElementsByClassName('tab1')[0];
   var table2 = document.getElementsByClassName('tab2')[0];
   console.log(table1);
   console.log(table2);
   function click1() {
       table1.style.display = 'block';
       table2.style.display = 'none';
   }
   function  click2() {
       table1.style.display = 'none';
       table2.style.display = 'block';
   }
</script>

CSS

.tab2{
       display: none;
   }
</style>

个人页面

<tiles:putAttribute name="body">
   <c:if test="${empty signedUser}">
       <div align="center">
           <p>
                   当前还没有报名课程。<br>
               快去<a href="/u/signin">报名</a> 吧,选择一个职业,加入修真院,找个师兄,带你入门。
</p>
       </div>
   </c:if>
   <c:if test="${!empty signedUser.course}">
       <div align="center">
           ${signedUser.name}的个人主页<br>
               ${signedUser.username}<br>

       所学课程:${signedUser.course}
       </div>
   </c:if>


</tiles:putAttribute>

通过cookie里的id,获取信息,以及所选择的课程。

<select id="getById" resultType="SignedUser">
   select users.username,users.name, t_course.course, users.createdAt from users,t_course where users.courseId=t_course.courseId and users.id=#{id};
</select>

明天的计划:

完成注册时候,验证码后端接口的调用,图片上传。

遇到的问题:

没有。

收获:

mybatis联表查询。


返回列表 返回列表
评论

    分享到