فهرست منبع

登陆分出来,增加分页

nn 8 سال پیش
والد
کامیت
c64d21c16d
6فایلهای تغییر یافته به همراه278 افزوده شده و 130 حذف شده
  1. 71 0
      css/U_BS_L.css
  2. 31 75
      css/feedback.css
  3. 45 0
      js/U_BS_L.js
  4. 121 16
      js/feedback.js
  5. 9 39
      login.html
  6. 1 0
      management.html

+ 71 - 0
css/U_BS_L.css

@@ -0,0 +1,71 @@
+/* login */
+.U_BS_L {
+    display: flex;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    background: url(../images/backgroundBanner.jpg) no-repeat top/cover padding-box border-box;
+    background-size: cover;
+}
+.U_BS_L_H_Form {
+    padding: 75px;
+    /* box-shadow: #dbdbdb 2px 0 37px 2px; */
+    background: #fff;
+    border: 1px solid #e7e7e7;
+    border-radius: 20px;
+    text-align: center;
+}
+.U_BS_L_H_Form h4 {
+    margin-bottom: 70px;
+    font-size: 22px;
+    font-weight: normal;
+    font-stretch: normal;
+    color: #828283;
+}
+.form-control {
+    display: block;
+    width: 275px;
+    height: 35px;
+    padding: 6px 12px;
+    font-size: 14px;
+    line-height: 1.42857143;
+    color: #b7b7b7;
+    background-color: #fff;
+    border: solid 1px rgba(77, 77, 77, 0.2);
+    border-radius: 15px;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
+    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+}
+.form-control::-webkit-input-placeholder {
+    color:    #b7b7b7;
+}
+.form-control:-moz-placeholder {
+   color:    #b7b7b7;
+}
+.form-control::-moz-placeholder {
+   color:    #b7b7b7;
+}
+.form-control:-ms-input-placeholder {
+   color:    #b7b7b7;
+}
+.U_BS_L_Info {
+    display: block;
+    height: 20px;
+    padding: 10px 3px;
+    color: #e4393c;
+    font-size: 14px;
+    text-align: left;
+}
+.U_BS_L_Submit {
+    width: 100%;
+    height: 49px;
+    border-radius: 20px;
+    border: 0;
+    background: #5ea7fd;
+    color: #fff;
+    outline:none;
+}
+/* login end */

+ 31 - 75
css/feedback.css

@@ -15,6 +15,7 @@ ul,li{
     margin: 0;
     padding: 0;
     list-style: none;
+    text-align: center;
 }
 button:focus,button{    
     outline: none;
@@ -36,77 +37,6 @@ body {
     margin: 0;
     overflow-y: hidden;
 }
-/* login */
-.coupleLoginItem {
-    display: flex;
-    height: 100%;
-    justify-content: center;
-    align-items: center;
-    background: url(../images/backgroundBanner.jpg) no-repeat top/cover padding-box border-box;
-    background-size: cover;
-}
-.coupleForm {
-    padding: 75px;
-    /* box-shadow: #dbdbdb 2px 0 37px 2px; */
-    background: #fff;
-    border: 1px solid #e7e7e7;
-    border-radius: 20px;
-    text-align: center;
-}
-.coupleForm h4 {
-    margin-bottom: 70px;
-    font-size: 22px;
-    font-weight: normal;
-    font-stretch: normal;
-    color: #828283;
-}
-.form-control {
-    display: block;
-    width: 275px;
-    height: 35px;
-    padding: 6px 12px;
-    font-size: 14px;
-    line-height: 1.42857143;
-    color: #b7b7b7;
-    background-color: #fff;
-    border: solid 1px rgba(77, 77, 77, 0.2);
-    border-radius: 15px;
-    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
-    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
-}
-.form-control::-webkit-input-placeholder {
-    color:    #b7b7b7;
-}
-.form-control:-moz-placeholder {
-   color:    #b7b7b7;
-}
-.form-control::-moz-placeholder {
-   color:    #b7b7b7;
-}
-.form-control:-ms-input-placeholder {
-   color:    #b7b7b7;
-}
-.coupleItemInfo {
-    display: block;
-    height: 20px;
-    padding: 10px 3px;
-    color: #e4393c;
-    font-size: 14px;
-    text-align: left;
-}
-.loginSubmit {
-    width: 100%;
-    height: 49px;
-    border-radius: 20px;
-    border: 0;
-    background: #5ea7fd;
-    color: #fff;
-    outline:none;
-}
-/* login end */
 .informationtHeader{
     height: 30px;
     width: 100%;
@@ -134,11 +64,13 @@ body {
 div.informationtPermissions{
     width: 450px;
 }
-.informationtPermissions, .informationtAddUser, .informationtcreateItem,.informationDetailed {
+.informationtPermissions, .informationtAddUser, .informationtcreateItem, .informationDetailed {
     display: none;
-    position: relative;
+    position: absolute;
+    left: 50%;
+    top: 30%;
     width: 370px;
-    margin: 40px auto;
+    margin-left: -185px;
     padding: 0 20px;
     background: #fff;
     color: #000;
@@ -146,6 +78,7 @@ div.informationtPermissions{
     box-shadow: 2px 2px 13px #acacac;
     -moz-box-shadow: 2px 2px 13px #acacac;
     -webkit-box-shadow: 2px 2px 13px #acacac;
+    z-index: 999;
 }
 .informationDetailed .infoItem{
     position: relative;
@@ -330,10 +263,33 @@ tbody td{
     max-width: 700px;
     width: 50%;
 }
-
 .informationtInfo .tbMain .trCoupleTime{
     width: 150px;
 }
+.informationtPaging ul *{
+    display: inline-block;
+    color: #428bca;
+    display: inline-block;
+    height: 25px;
+    line-height: 25px;
+    padding: 0 5px;
+    border: 1px solid #ddd;
+    margin: 0 2px;
+    border-radius: 4px;
+    vertical-align: middle;
+}
+.informationtPaging ul *:hover{
+    text-decoration: none;
+    border: 1px solid #428bca;
+}
+.informationtPaging {
+    display: none;
+}
+.informationtPaging .active{
+    color: #fff;
+    background-color: #428bca;
+    border: 1px solid #428bca;
+}
 .permissionsMembers .tbMain tr td:first-child, .AddUserMembers .tbMain tr td:first-child{
     display: none;
 }

+ 45 - 0
js/U_BS_L.js

@@ -0,0 +1,45 @@
+Namespace.register("U.BS.L");//注册命名空间
+U.BS.L.Bind=function(){
+    U.BS.L.submit.onclick=function(){
+        U.UF.CD.loadAjaxCrossDomain(function () {
+            U.A.Request(US.AUTH, ["UserLogin", U.BS.L.a.value,  U.BS.L.p.value],function(r){
+                if(r!=false){
+                    var key = r;
+                    U.A.Request(US.AUTH, ["GetUserLoginData", U.BS.L.a.value], function(r){
+                        if(r.value!=false){
+                            U.A.Request(U.BS.L.Cd,[U.BS.L.Db,U.BS.L.SqlName,"InsertUser",key.value[0].UserId,key.value[0].UserName],function (r){})
+                            U.BS.L.Callback({url: U.BS.L.url.substring(U.BS.L.url.lastIndexOf('=')+1, U.BS.L.url.length)});
+                        }else{
+                            U.BS.L.pInfo.innerText = "请输入正确的账号密码!"
+                        }
+                    })
+                }else{
+                    return false;
+                }
+            });
+        });
+    }
+}
+U.BS.L.Callback=function(data){
+    console.log(data.url);
+    window.location.href = data.url;
+}
+U.BS.L.Return=function(){
+    if(window.event.keyCode == "13"){
+        U.BS.L.submit.onclick();
+    }else{
+        return false;
+    }
+}
+U.BS.L.Init=function () {
+    U.BS.L.a = $(".U_BS_L_a")[0];
+    U.BS.L.p = $(".U_BS_L_p")[0];
+    U.BS.L.pInfo = $(".U_BS_L_pInfo")[0];
+    U.BS.L.submit = $(".U_BS_L_Submit")[0];
+    U.BS.L.url = window.location.search;
+    U.BS.L.Cd = "http://cd.1473.cn/net";//cd.1473
+    U.BS.L.Db = "db.1473.cn";//db.1473
+    U.BS.L.SqlName = "UseStudio_FeedBack";//数据库名
+    U.UF.Cookie.del("usestudiosso");
+    U.BS.L.Bind();
+}();

+ 121 - 16
js/feedback.js

@@ -6,18 +6,18 @@ Feedback.Bind=function(JurisdictionName) {
             for(var i=0;i<r.value.length;i++){
                 var li=$$("li", {
                     "className": "asideItem","productId":r.value[i].ProductId
-                    }, Feedback.ul);
+                    }, Feedback.asideMenuUl);
                 var span=$$("span", {
                     "className": "asideItemText","innerText":r.value[i].ProductName
                     }, li);
-                Feedback.ul.onclick = function(ev) {//点击项目列表
+                Feedback.asideMenuUl.onclick = function(ev) {//点击项目列表
                     ev = ev || event;
                     var target = ev.target || ev.srcElement;
                     var icon=$$("i", {"className": "active",});
-                    for(var i=0;i<Feedback.ul.children.length;i++){
-                       if(Feedback.ul.children[i].children.length>=2){
-                        Feedback.ul.children[i].setAttribute("class","asideItem");
-                        Feedback.ul.children[i].removeChild(Feedback.ul.children[i].children[1])
+                    for(var i=0;i<Feedback.asideMenuUl.children.length;i++){
+                       if(Feedback.asideMenuUl.children[i].children.length>=2){
+                        Feedback.asideMenuUl.children[i].setAttribute("class","asideItem");
+                        Feedback.asideMenuUl.children[i].removeChild(Feedback.asideMenuUl.children[i].children[1])
                        }
                     }
                     Feedback.logoTitle.innerHTML = "反馈后台信息管理"+":"+target.innerText;
@@ -43,7 +43,7 @@ Feedback.Bind=function(JurisdictionName) {
                     Feedback.displayItem();
                     Feedback.itemOperation(productId,JurisdictionName);
                     Feedback.createInfo(productId);
-                    Feedback.OnclickTime(productId,'30days');
+                    Feedback.InfoPaging(productId,'30days');
                 };
             }
         }
@@ -143,8 +143,103 @@ Feedback.OnclickdelITem=function(productId){//删除该项目
         })
     }
 }
-Feedback.OnclickTime=function(id,time){//点击时间对应获取信息
-    U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time],function (r){//获取产品的反馈信息
+Feedback.InfoPaging=function(id,time){
+    Feedback.nowPage=1;
+    Feedback.OnclickTime(id,time,"0","10");
+    Feedback.displayItem();
+    Feedback.informationtPaging.style.display="block";
+    var pageUp = Feedback.nowPage-1;//上一页
+    var pageDown = Feedback.nowPage+1;//下一页
+    var ul=$$("ul", {}, Feedback.informationtPaging);
+    var up=$$("span", {
+        "className":"pageUp","innerText":"上一页"
+    }, ul);
+    var li1=$$("li", {
+        "className":"paging active","innerText":Feedback.nowPage
+    }, ul);
+    var li2=$$("li", {
+        "className":"paging","innerText":Feedback.nowPage+1
+    }, ul);
+    var li3=$$("li", {
+        "className":"paging","innerText":Feedback.nowPage+2
+    }, ul);
+    var down=$$("span", {
+        "className":"pageDown","innerText":"下一页"
+    }, ul);
+    U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time,"0","-1"],function (r){//获取产品的数目
+        Feedback.totalPage=Math.ceil(r.value.length/10);
+        var pagesize=$$("span", {
+            "innerText":"共"+Feedback.totalPage+"页"
+        }, Feedback.informationtPaging.children[0]);
+        if(Feedback.totalPage==0){
+            Feedback.displayItem();
+        }
+        if(Feedback.totalPage==2){
+            ul.children[3].style.display="none";
+        }
+    })
+    var liLength=Feedback.totalPage;
+    classPaging=function(){
+        for(var i=0;i<3;i++){
+            if(ul.children[i+1].className.length>=2){
+                ul.children[i+1].setAttribute("class","paging");
+            }
+        }
+    }
+    ul.onclick = function(ev,a) {//点击分页
+        ev = ev || event;
+        var target = ev.target || ev.srcElement;
+        if(target.tagName=="LI"){
+            classPaging();
+            target.setAttribute("class","paging active");
+            Feedback.nowPage = parseInt(target.innerHTML);
+            Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
+        }
+    }
+    up.onclick = function() {//点击上页
+        if(ul.children[1].className=="paging active"&&ul.children[1].innerText==1){
+            return false;
+        }
+        var previousElementSibling = $(".informationtPaging .active")[0].previousElementSibling;
+        classPaging();
+        Feedback.nowPage = Feedback.nowPage-1;
+        if(ul.children[1].innerHTML>Feedback.nowPage){
+            ul.children[1].innerHTML=Feedback.nowPage;
+            ul.children[2].innerHTML=Feedback.nowPage+1;
+            ul.children[3].innerHTML=Feedback.nowPage+2;
+            ul.children[1].setAttribute("class","paging active");
+            
+        }else{
+            previousElementSibling.setAttribute("class","paging active");
+        }
+        Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
+        
+    }
+    down.onclick = function(ev) {//点击下页
+        ev = ev || event;
+        var target = ev.target || ev.srcElement;
+        if(Feedback.nowPage==Feedback.totalPage||Feedback.nowPage>Feedback.totalPage){
+            return false;
+        }else{
+            
+        }
+        var nextElementSibling = $(".informationtPaging .active")[0].nextElementSibling;
+        classPaging();
+        Feedback.nowPage = Feedback.nowPage+1;
+        if(ul.children[3].innerHTML<Feedback.nowPage){
+            ul.children[1].innerHTML=Feedback.nowPage-2;
+            ul.children[2].innerHTML=Feedback.nowPage-1;
+            ul.children[3].innerHTML=Feedback.nowPage;
+            ul.children[3].setAttribute("class","paging active");
+        }else{
+            nextElementSibling.setAttribute("class","paging active");
+        }
+        Feedback.OnclickTime(id,time,(Feedback.nowPage-1)*10,10);
+    }
+
+}
+Feedback.OnclickTime=function(id,time,page,dpage){//点击时间对应获取信息
+    U.A.Request(Feedback.Cd,[Feedback.Db,Feedback.SqlName,"GetFeedback",id,time,page,dpage],function (r){//获取产品的反馈信息
         if(r.value){
             if(Feedback.informationtInfo.firstChild !== null){
                 Feedback.informationtInfo.removeChild(Feedback.informationtInfo.firstChild);
@@ -231,16 +326,16 @@ Feedback.createInfo=function(productId){//创建项目日期分类
         "className":"timeSequence"
         },Feedback.informationtTime);
     var oneDay=$$("button", {
-        "className": "timeItem","innerText":"今天","onclick":"Feedback.OnclickTime('"+productId+"','today')"
+        "className": "timeItem","innerText":"今天","onclick":"Feedback.InfoPaging('"+productId+"','today')"
         },timeSequence);
     var threeDay=$$("button", {
-        "className": "timeItem","innerText":"最近三天","onclick":"Feedback.OnclickTime('"+productId+"','3days')"
+        "className": "timeItem","innerText":"最近三天","onclick":"Feedback.InfoPaging('"+productId+"','3days')"
         },timeSequence);
     var oneWeek=$$("button", {
-        "className": "timeItem","innerText":"最近一周","onclick":"Feedback.OnclickTime('"+productId+"','7days')"
+        "className": "timeItem","innerText":"最近一周","onclick":"Feedback.InfoPaging('"+productId+"','7days')"
         },timeSequence)
     var oneMonth=$$("button", {
-        "className": "timeItem","innerText":"最近一月","onclick":"Feedback.OnclickTime('"+productId+"','30days')"
+        "className": "timeItem","innerText":"最近一月","onclick":"Feedback.InfoPaging('"+productId+"','30days')"
         },timeSequence)
 }
 Feedback.getUserRow = function(h,productId,span){//创建表格下用户数据库循环数据(添加该项目用户权限)
@@ -444,6 +539,10 @@ Feedback.displayItem=function(){
     if(Feedback.informationDetailed.firstChild){
         Feedback.OnclickdisplayItem(Feedback.informationDetailed.className);
     }
+    if(Feedback.informationtPaging.firstChild){
+        Feedback.OnclickdisplayItem(Feedback.informationtPaging.className);
+    }
+    
 }
 Feedback.Init=function () {
     Feedback.informationtSet = $(".informationtSet")[0]//获取管理员设置
@@ -451,15 +550,22 @@ Feedback.Init=function () {
     Feedback.informationHeaderRight = $(".informationHeaderRight")[0];//头部右侧
     Feedback.informationtcreateItem = $(".informationtcreateItem")[0]//获取创建项目
     Feedback.userName = $(".userName")[0]//获取用户名
-    Feedback.ul = $(".asideMenu ul")[0];//获取项目列表ul
+    Feedback.asideMenuUl = $(".asideMenu ul")[0];//获取项目列表ul
     Feedback.timeSequence = $(".timeSequence")[0]//反馈时间段
     Feedback.logoTitle = $(".logoTitle")[0]//反馈标题位置
     Feedback.mainCouple = $(".mainCouple")[0];
     Feedback.informationtInfo = $(".informationtInfo")[0];//获取反馈信息
     Feedback.informationtTime = $(".informationtTime")[0];//获取反馈时间
+    Feedback.informationtPaging = $(".informationtPaging")[0];//获取分页
+    // Feedback.informationtPagingUl = $(".informationtPaging ul")[0];//获取分页ul
+    // Feedback.informationtPagingLi = $(".informationtPaging ul li");//获取分页li
+    // Feedback.informationtPagingSpan = $(".informationtPaging ul span");//获取分页上下页
+    // Feedback.informationtPagingActive = $(".informationtPaging .active")[0];//当前页码
+    Feedback.totalPage = 0;//总页数
     Feedback.informationtAddUser = $(".informationtAddUser")[0];//添加用户项目权限
     Feedback.informationDetailed = $(".informationDetailed")[0];//反馈查看更多
-    Feedback.Cd = "http://cd.1473.cn/net";//cd.1473
+    Feedback.nowPage=1;//分页当前页
+    Feedback.Cd = "http://cd.1473.cn/php";//cd.1473
     Feedback.Db = "db.1473.cn";//db.1473
     Feedback.SqlName = "UseStudio_FeedBack";//数据库名
     Feedback.UserId = U.UF.Cookie.get("usestudiosso","userid")[0];//用户id
@@ -467,5 +573,4 @@ Feedback.Init=function () {
         Feedback.Bind(r.value[0].JurisdictionName);//得到用户权限信息
     });
     Feedback.mainCoupleHeight();
-   
 }();

+ 9 - 39
login.html

@@ -6,54 +6,24 @@
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>反馈登陆</title>
     <link rel="stylesheet" href="./css/uform.css">
+    <link rel="stylesheet" href="./css/U_BS_L.css">
     <link rel="stylesheet" href="./css/feedback.css">
 
 
 </head>
 <body>
-<div class="coupleLoginItem" onkeydown="on_return();">
-    <form class="coupleForm">
+<div class="U_BS_L" onkeydown="U.BS.L.Return()">
+    <form class="U_BS_L_H_Form">
         <img src="./images/logo.png" alt="logo">
         <h4>有思后台系统</h4>
-        <input type="text" class="account form-control" placeholder="用户名/手机号/邮箱" maxlength="30">
-        <div class="coupleItemInfo"></div>
-        <input type="password" class="password form-control" placeholder="密码" maxlength="32">
-        <div class="coupleItemInfo passwordInfo"></div>
-        <button type="button" class="loginSubmit" onclick="UserLogin()">登陆</button>
+        <input type="text" class="U_BS_L_a form-control" placeholder="用户名/手机号/邮箱" maxlength="30">
+        <div class="U_BS_L_Info"></div>
+        <input type="password" class="U_BS_L_p form-control" placeholder="密码" maxlength="32">
+        <div class="U_BS_L_Info U_BS_L_pInfo"></div>
+        <button type="button" class="U_BS_L_Submit">登陆</button>
     </form>
 </div>
 </body>
 <script src="./js/uform.js"></script>
-<!-- <script src="http://www.1473.cn/uform.js"></script> -->
-<script>
-
-UserLogin = function(){
-    var account = $(".account")[0].value;
-    var password = $(".password")[0].value;
-    var passwordInfo = $(".passwordInfo")[0];
-    U.UF.Cookie.del("usestudiosso");
-    U.UF.CD.loadAjaxCrossDomain(function () {
-        U.A.Request(US.AUTH, ["UserLogin", account, password],function(r){
-            console.log(r);
-            var key = r;
-            U.A.Request(US.AUTH, ["GetUserLoginData", account], function(r){
-                console.log(r);
-                if(r.value!=false){
-                    U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_FeedBack","InsertUser",key.value[0].UserId,key.value[0].UserName],function (r){})
-                    window.location.href="http://feedback.1473.cn/management.html"
-                }else{
-                    passwordInfo.innerText = "请输入正确的账号密码!"
-                }
-            })
-        });
-    });
-}
-on_return = function(){
-    if(window.event.keyCode == "13"){
-        UserLogin();
-    }else{
-        return false;
-    }
-}
-</script>
+<script src="./js/U_BS_L.js"></script>
 </html>

+ 1 - 0
management.html

@@ -32,6 +32,7 @@
      <div class="informationtBody">
          <div class="informationtTime"></div>
          <div class ="informationtInfo"></div>
+         <div class="informationtPaging"></div>
      </div>
 </section>
 <script src="./js/uform.js"></script>