Kaynağa Gözat

修改公共页面

wanghui 7 yıl önce
ebeveyn
işleme
155ab7c09d

+ 2 - 2
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -688,9 +688,9 @@
     from 
     	user
     where 
-    	username = ${username} 
+    	username = #{username} 
 	    <if test="type != null">
-	    	and type = ${type}
+	    	and type = #{type}
 	    </if>
 	    and source = 0
   </select>

+ 21 - 23
src/main/webapp/WEB-INF/views/common.html

@@ -18,30 +18,28 @@
             <div>
                 <a href="#">网站导航</a>
             </div>
-            <div>
-                <ul>
-                    <li>
-                        <a href="javascript:void(0)" class="head_login">登录</a>
-                    </li>
-                    <li>
-                        <a th:href="@{/user/signIn}">注册</a>
-                    </li>
-                    <li th:if="${isLogin}">
-                        <a th:href="@{/user/account/index.html#techList}">我的订单</a>
-                    </li>
-                    <li th:if="${isLogin}">
-                        <a th:href="@{/user/account/index.html#collection}">我的关注</a>
-                    </li>
-                    <li th:if="${isLogin}">
-                        <a href="#">我的消息</a>
-                    </li>
-                </ul>
-            </div>
-            <div class="colorRed">
-                全国统一服务热线:400-8800-962
+				<div>
+					<ul>
+						<li>
+							<a th:href="@{/user/signIn}">注册</a>
+							<a th:href="${basePath + '/user/signIn.html'}"> 
+								<img th:src="${portalHost+'/img/index_resiter.png'}" alt="" />
+							</a> 
+							<a href="javascript:;" class="head_login">登录</a>
+						</li>
+						<li th:if="${isLogin}">
+							<a th:href="${basePath + (isAdmin? '/admin/index.html':'/user/account/index.html')}"
+								th:text="${#strings.isEmpty(userName)?'个人中心':userName}">个人中心</a>
+							<a th:href="${basePath + '/user/logout'}">退出</a>
+						</li>
+					</ul>
+				</div>
+				<div class="colorRed">
+                	全国统一服务热线:400-8800-962
             </div>
         </div>
     </div>
+    
     <!-- search -->
     <div class="topNav">
     <div class="container">
@@ -65,13 +63,13 @@
                           <a th:href="@{/portal/technologyTrading/demand}">技术需求</a>
                     </li>
                     <li>
-                        <a href="#">智库咨询</a>
+                        <a href="@{/portal/thinkTank/index.html}">智库咨询</a>
                         <ol class="subnavigation">
                             <li>
                                 <a th:href="@{/portal/thinkTank/policyList}">智政</a>
                             </li>
                             <li>
-                                <a href="/portal/thinkTank/index.html#zizone">智者</a>
+                                <a href="@{/portal/thinkTank/index.html#zizone}">智者</a>
                             </li>
                         </ol>
                     </li>