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