no message
parent
586e9f5916
commit
086a613da6
|
@ -70,7 +70,7 @@ class Doc extends \Core\Controller
|
|||
if (sizeof($this->params) == 3) {
|
||||
$limit = $this->params[0];
|
||||
$offset = $this->params[1];
|
||||
$type = $this->params[3];
|
||||
$type = $this->params[2];
|
||||
}
|
||||
$docModel = new Models\Doc();
|
||||
$typedoc = $docModel->pageDoc($limit, $offset, $type);
|
||||
|
|
|
@ -95,11 +95,14 @@
|
|||
</div>
|
||||
<script src="/api/App/Views/blog/js/bootstrap-treeview.js"></script>
|
||||
<script type="text/javascript">
|
||||
globalposx = 0;
|
||||
baseUrl = "";
|
||||
chosetype = 0;
|
||||
function changepage(data) {
|
||||
console.log(data.innerText);
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: baseUrl + "Doc/typedoc/" + "/5/0/" + data.innerText,
|
||||
url: baseUrl + "Doc/typedoc" + "/5/" + ((data.innerText-1)*5) + "/" + chosetype,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
beforeSend: function (xhr) {
|
||||
|
@ -107,6 +110,7 @@
|
|||
},
|
||||
success: function (resp) {
|
||||
len = resp.data.length;
|
||||
$("#docshow").empty();
|
||||
for (i = 0;i < len;i++){
|
||||
insertobj = " <div class=\"panel panel-default\" id=\"doc_id_" + resp.data[i].id + "\"> " +
|
||||
" <div class=\"panel-heading\" style=\"font-size: 20px ; background: #1d5987;color: white\">" + resp.data[i].title + "</div>\n" +
|
||||
|
@ -114,7 +118,6 @@
|
|||
resp.data[i].content +
|
||||
" </div>\n" +
|
||||
" </div>"
|
||||
console.log(insertobj);
|
||||
$("#docshow").append(insertobj);
|
||||
}
|
||||
}
|
||||
|
@ -122,6 +125,7 @@
|
|||
}
|
||||
function loadtypedoc(data){
|
||||
console.log(data.href.split("#")[1].split("doc_type_")[1]);
|
||||
chosetype = data.href.split("#")[1].split("doc_type_")[1];
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: baseUrl + "Doc/typeCount/" + data.href.split("#")[1].split("doc_type_")[1],
|
||||
|
@ -147,9 +151,30 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: baseUrl + "Doc/typedoc" + "/5/0/" + chosetype,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
beforeSend: function (xhr) {
|
||||
//xhr.setRequestHeader("x-requested-with","DESKTOP_WEB");
|
||||
},
|
||||
success: function (resp) {
|
||||
len = resp.data.length;
|
||||
$("#docshow").empty();
|
||||
for (i = 0;i < len;i++){
|
||||
insertobj = " <div class=\"panel panel-default\" id=\"doc_id_" + resp.data[i].id + "\"> " +
|
||||
" <div class=\"panel-heading\" style=\"font-size: 20px ; background: #1d5987;color: white\">" + resp.data[i].title + "</div>\n" +
|
||||
" <div class=\"panel-body\">\n" +
|
||||
resp.data[i].content +
|
||||
" </div>\n" +
|
||||
" </div>"
|
||||
$("#docshow").append(insertobj);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
globalposx = 0;
|
||||
baseUrl = "";
|
||||
|
||||
function startRequest()
|
||||
{
|
||||
if(globalposx > 250){
|
||||
|
|
Loading…
Reference in New Issue