Ver código fonte

1.后台用户列表
2.前台个人头像修改

2510966293@qq.com 4 anos atrás
pai
commit
4bc4640897

+ 1 - 1
src/main/java/com/yc/education/mapper/UsersMapper.java

@@ -50,6 +50,6 @@ public interface UsersMapper extends MyMapper<Users> {
 
 
     //查询全部
-    @Select("select  * from users where isdel = 1")
+    @Select("select  * from users where isdel = 0")
     List<Users> findall();
 }

+ 1 - 1
src/main/webapp/WEB-INF/jsp/admin/adminuser.jsp

@@ -45,7 +45,7 @@
 			<span class="l">
 
 			</span>
-        <span class="r">共有数据:<strong>7${pageInfo.total }</strong> 条</span>
+        <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
     </div>
     <div class="mt-20">
         <table class="table table-border table-bordered table-bg table-hover table-sort">

+ 12 - 5
src/main/webapp/WEB-INF/jsp/basic.jsp

@@ -199,9 +199,16 @@ To change this template use File | Settings | File Templates.
                                                         <label class="form-label"> 头像 </label>
                                                     </td>
                                                     <td>
-                                                        <div id="tx" class="act-avatar"
-                                                             style="background: url('${users.tximg}') center center no-repeat/100% auto;">
-                                                        </div>
+                                                        <c:if test="${users.tximg == null || users.tximg == ''}">
+                                                            <div id="tx" class="act-avatar"
+                                                                 style="background: url('www.baidu.com/img/bd_logo1.png') center center no-repeat/100% auto;">
+                                                            </div>
+                                                        </c:if>
+                                                        <c:if test="${users.tximg != null && users.tximg != ''}">
+                                                            <div id="tx" class="act-avatar"
+                                                                 style="background: url('${users.tximg}') center center no-repeat/100% auto;">
+                                                            </div>
+                                                        </c:if>
                                                         <input type="file" name="img" id="tximg"/>
                                                         <input hidden name="tximg" id="tximgs"/>
                                                     </td>
@@ -438,7 +445,7 @@ To change this template use File | Settings | File Templates.
         $("#tximg").change(function () {
             $.ajaxFileUpload({
                 fileElementId: 'tximg',
-                url: 'uploadImage',
+                url: 'uploadImages',
                 dataType: 'text',
                 data: {},
                 async: true,
@@ -457,7 +464,7 @@ To change this template use File | Settings | File Templates.
             $("#tximg").change(function () {
                 $.ajaxFileUpload({
                     fileElementId: 'tximg',
-                    url: 'uploadImage',
+                    url: 'uploadImages',
                     dataType: 'text',
                     data: {},
                     async: true,