尚籌網(wǎng)-7.Menu樹形結(jié)構(gòu)的維護

1 建模

1.1 創(chuàng)建數(shù)據(jù)庫

CREATE TABLE t_menu (
    id INT (11) NOT NULL auto_increment,
    pid INT (11),
    `name` VARCHAR (200),
    url VARCHAR (200),
    icon VARCHAR (200),
    PRIMARY KEY (id)
);
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('1',NULL,'系統(tǒng)權(quán)限菜單','glyphicon glyphicon-th-list',NULL);
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('2','1','控制面板','glyphicon glyphicon-dashboard','main.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('3','1','權(quán)限管理','glyphicon glyphicon glyphicon-tasks',NULL);
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('4','3','用戶維護','glyphicon glyphicon-user','user/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('5','3','角色維護','glyphicon glyphicon-king','role/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('6','3','許可維護','glyphicon glyphicon-lock','permission/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('7','1','業(yè)務(wù)審核','glyphicon glyphicon-ok',NULL);
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('8','7','實名認證審核','glyphicon glyphicon-check','auth_cert/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('9','7','廣告審核','glyphicon glyphicon-check','auth_adv/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('10','7','項目審核','glyphicon glyphicon-check','auth_project/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('11','1','業(yè)務(wù)管理','glyphicon glyphicon-th-large',NULL);
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('12','11','資質(zhì)維護','glyphicon glyphicon-picture','cert/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('13','11','分類管理','glyphicon glyphicon-equalizer','certtype/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('14','11','流程管理','glyphicon glyphicon-random','process/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('15','11','廣告管理','glyphicon glyphicon-hdd','advert/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('16','11','消息模板','glyphicon glyphicon-comment','message/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('17','11','項目分類','glyphicon glyphicon-list','projectType/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('18','11','項目標(biāo)簽','glyphicon glyphicon-tags','tag/index.htm');
insert into `t_menu` (`id`, `pid`, `name`, `icon`, `url`) values('19','1','參數(shù)管理','glyphicon glyphicon-list-alt','param/index.htm');

1.2 形成樹形結(jié)構(gòu)的關(guān)鍵依據(jù)

在數(shù)據(jù)庫表中通過pid字段稚茅,讓當(dāng)前記錄指向它的父節(jié)點的記錄怎棱,從而形成樹形結(jié)構(gòu)九默。

一條記錄關(guān)聯(lián)了同一個表中的其他記錄蒸殿,稱之為自關(guān)聯(lián)择克。

1.3 逆向工程

<table tableName="t_menu" domainObjectName="Menu" />

生成的Menu實體類需要做一些修改

// 對應(yīng)數(shù)據(jù)庫表主鍵
private Integer id;
// 對應(yīng)父節(jié)點id(如果pid為null恬总,則說明當(dāng)前節(jié)點是根節(jié)點)
private Integer pid;
// 節(jié)點名稱
private String name;
// 節(jié)點對應(yīng)的URL地址
private String url;
// 節(jié)點的圖標(biāo)
private String icon;
// 當(dāng)前節(jié)點的子節(jié)點集合,設(shè)置默認值是為了避免組裝節(jié)點時空指針異常
private List<Menu> children = new ArrayList<>();
// 控制節(jié)點展開還是折疊肚邢,設(shè)置為true是讓整個樹形菜單默認展開
private Boolean open = true;

2 在頁面顯示樹形結(jié)構(gòu)

2.1 后端操作

把樹形結(jié)構(gòu)組裝好壹堰,具體來說是:給前端返回根節(jié)點對象。在根節(jié)點中包含子節(jié)點骡湖,子節(jié)點中再包含下一級的子節(jié)點贱纠。

handler方法中的具體操作:

@RequestMapping("/menu/get/whole/tree")
public ResultEntity<Menu> getWholeTree() {  
    // 1.查詢所有的樹形節(jié)點用于組裝
    List<Menu> menuList = menuService.getAll(); 
    // 2.將List<Menu>轉(zhuǎn)換為Map<Menu的id,Menu>
    Map<Integer,Menu> menuMap = new HashMap<>();    
    for (Menu menu : menuList) {
        Integer id = menu.getId();
        menuMap.put(id, menu);
    }   
    // 3.聲明變量用于存儲根節(jié)點對象
    Menu rootNode = null;   
    // 4.遍歷List<Menu>
    for (Menu menu : menuList) {        
        // 5.獲取當(dāng)前Menu對象的pid屬性
        Integer pid = menu.getPid();        
        // 6.判斷pid是否為null
        if(pid == null) {           
            // 7.如果pid為null,說明當(dāng)前節(jié)點是根節(jié)點响蕴,所以賦值
            rootNode = menu;            
            // 8.根節(jié)點沒有父節(jié)點谆焊,所以不必找父節(jié)點組裝,本次for循環(huán)停止執(zhí)行浦夷,繼續(xù)執(zhí)行下一次循環(huán)
            continue ;
        }       
        // 9.既然pid不為null辖试,那么我們根據(jù)這個pid查找當(dāng)前節(jié)點的父節(jié)點。
        Menu father = menuMap.get(pid); 
        // 10.組裝:將menu添加到maybeFather的子節(jié)點集合中
        father.getChildren().add(menu);
    }   
    return ResultEntity.successWithData(rootNode);
}

service方法:

@Override
public List<Menu> getAll() {
    return menuMapper.selectByExample(new MenuExample());
}

2.2 前端操作

2.2.1 創(chuàng)建menu-page.jsp

主體內(nèi)容如下:

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-th-list"></i> 權(quán)限菜單列表
        <div style="float: right; cursor: pointer;" data-toggle="modal"
             data-target="#myModal">
            <i class="glyphicon glyphicon-question-sign"></i>
        </div>
    </div>
    <div class="panel-body">
        <ul id="treeDemo" class="ztree"></ul>
    </div>
</div>

配置view-controller跳轉(zhuǎn)到menp-page.jsp

<mvc:view-controller path="/menu/to/page.html" view-name="menu-page"/>

sidebar中的超鏈接也做相應(yīng)調(diào)整

<li style="height: 30px;"><a href="menu/to/page.html"><i class="glyphicon glyphicon-lock"></i> 菜單維護</a></li>

2.2.2 加入zTree環(huán)境

<script type="text/javascript" src="ztree/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="script/my-menu.js"></script>

2.2.3 顯示樹形結(jié)構(gòu)

$(function(){
    // setting對象中包含zTree的設(shè)置屬性
    var setting = {
        "view": {
            "addDiyDom": showMyIcon
        },
        "data": {
            "key": {
                "url": "notExistsProperty" // 阻止點擊節(jié)點后跳轉(zhuǎn)
            }
        }
    };  
    // 發(fā)送Ajax請求獲取zNodes數(shù)據(jù)
    $.ajax({
        "url":"menu/get/whole/tree.json",
        "type":"post",
        "dataType":"json",
        "success":function(response){           
            var result = response.result;           
            if(result == "SUCCESS") {
                // 用于顯示樹形結(jié)構(gòu)的節(jié)點數(shù)據(jù)
                var zNodes = response.data;                     
                // 執(zhí)行樹形結(jié)構(gòu)的初始操作
                $.fn.zTree.init($("#treeDemo"), setting, zNodes);
            }           
            if(result == "FAILED") {
                layer.msg("加載菜單數(shù)據(jù)失斉罐孝!原因是:"+response.message);
            }
        },
        "error":function(response){
            layer.msg("加載菜單數(shù)據(jù)失敗肥缔!原因是:"+response.message);
        }
    });
});

2.2.4 聲明函數(shù)將圖標(biāo)修改為自定義圖標(biāo)

// 由setting.view.addDiyDom屬性引用莲兢,負責(zé)顯示自定義圖標(biāo)
// treeId是<ul id="treeDemo" class="ztree"></ul>的id屬性值
// treeNode對應(yīng)每一個樹形節(jié)點
function showMyIcon(treeId, treeNode) { 
    // 獲取當(dāng)前節(jié)點的id
    var currentNodeId = treeNode.tId;   
    // 獲取新的class值用于替換
    var newClass = treeNode.icon;   
    // 在當(dāng)前節(jié)點id之后附加“_ico”得到目標(biāo)span的id
    var targetSpanId = currentNodeId + "_ico";  
    // 將目標(biāo)span的舊class移除,添加新class
    $("#"+targetSpanId)
        .removeClass()
        .addClass(newClass)
        .css("background","");
}

附:節(jié)點圖標(biāo)修改前后HTML代碼變化

<span 
    id="treeDemo_4_ico" 
    title="" 
    treenode_ico="" 
    class="button ico_docu" 
    style="background:url(glyphicon glyphicon-user) 0 0 no-repeat;">
</span>

<span 
    id="treeDemo_2_ico" 
    title="" 
    treenode_ico="" 
    class="glyphicon glyphicon-dashboard" 
    style="background:url(glyphicon glyphicon-dashboard) 0 0 no-repeat;">
</span>

2.2.5 節(jié)點結(jié)構(gòu)

<li 節(jié)點>
    <span 展開折疊部分圖標(biāo)></span>
    <a 節(jié)點內(nèi)容>
        <span 節(jié)點的具體圖標(biāo)></span>
        <span>節(jié)點文本內(nèi)容</span>
    </a>
    <ul 子節(jié)點></ul>
</li>

id結(jié)構(gòu):treeDemo_節(jié)點序號_節(jié)點具體部件

id="treeDemo_3_ul" id="treeDemo_3_ico"

2.2.6 阻止點擊節(jié)點后跳轉(zhuǎn)

使用了setting.data.key.url屬性辫继。

2.3 封裝函數(shù)實現(xiàn)生成樹形結(jié)構(gòu)操作

function initWholeTree() {
    // setting對象中包含zTree的設(shè)置屬性
    var setting = {
        "view": {
            "addDiyDom": showMyIcon
        },
        "data": {
            "key": {
                "url": "notExistsProperty" // 阻止點擊節(jié)點后跳轉(zhuǎn)
            }
        }
    };
    // 發(fā)送Ajax請求獲取zNodes數(shù)據(jù)
    $.ajax({
        "url":"menu/get/whole/tree.json",
        "type":"post",
        "dataType":"json",
        "success":function(response){           
            var result = response.result;           
            if(result == "SUCCESS") {
                // 用于顯示樹形結(jié)構(gòu)的節(jié)點數(shù)據(jù)
                var zNodes = response.data;                     
                // 執(zhí)行樹形結(jié)構(gòu)的初始操作
                $.fn.zTree.init($("#treeDemo"), setting, zNodes);
            }           
            if(result == "FAILED") {
                layer.msg("加載菜單數(shù)據(jù)失斉俗慈!原因是:"+response.message);
            }
        },
        "error":function(response){
            layer.msg("加載菜單數(shù)據(jù)失敼每怼!原因是:"+response.message);
        }
    });
}

3 生成按鈕組

3.1 生成按鈕組規(guī)則

3.1.1 根節(jié)點(level 0)

  • 增加子節(jié)點

3.1.2 level為1的有子節(jié)點的節(jié)點

  • 增加子節(jié)點
  • 修改

3.1.3 level為1的無子節(jié)點的節(jié)點

  • 增加子節(jié)點
  • 刪除
  • 修改

3.1.4 level為2的節(jié)點

  • 刪除
  • 修改

3.2 設(shè)計按鈕組所在span的id

  • 規(guī)則:treeDemo_序號_btnGrp
  • 舉例:treeDemo_20_btnGrp

3.3 各個按鈕HTML標(biāo)簽

<span id="treeDemo_20_btnGrp">
    <a onclick="showAddModal(this)" 
       id="19" 
       class="btn btn-info dropdown-toggle btn-xs" 
       style="margin-left:10px;padding-top:0px;" 
       title="添加子節(jié)點">
        &nbsp;&nbsp;<i class="fa fa-fw fa-plus rbg"></i>
    </a>
    <a onclick="showEditModal(this)" 
       id="19" 
       class="btn btn-info dropdown-toggle btn-xs" 
       style="margin-left:10px;padding-top:0px;" 
       title="編輯節(jié)點">
        &nbsp;&nbsp;<i class="fa fa-fw fa-edit rbg"></i>
    </a>
    <a onclick="showConfirmModal(this)" 
       id="19" 
       class="btn btn-info 
              dropdown-toggle btn-xs" 
       style="margin-left:10px;padding-top:0px;" 
       title="刪除節(jié)點">
        &nbsp;&nbsp;<i class="fa fa-fw fa-times rbg"></i>
    </a>
</span>

3.4 聲明函數(shù)生成按鈕組

// 專門生成按鈕組的函數(shù)
function generateBtnGrp(treeNode) { 
    // 獲取當(dāng)前節(jié)點的id(HTML中l(wèi)i標(biāo)簽的id)
    var treeNodeId = treeNode.tId;  
    // 獲取當(dāng)前節(jié)點在數(shù)據(jù)庫中的id值
    // Menu實體類中的屬性闺阱,都可以通過treeNode以“.屬性名”的方式直接訪問
    var menuId = treeNode.id;   
    // 組裝按鈕組所在的span的id
    var btnGrpSpanId = treeNodeId + "_btnGrp";  
    // 生成span標(biāo)簽對應(yīng)的jQuery對象
    var $span = $("<span id='"+btnGrpSpanId+"'></span>");   
    // 獲取當(dāng)前節(jié)點的level值
    var level = treeNode.level; 
    // 聲明三種按鈕
    var addBtn = "<a onclick='showAddModal(this)' id='"+menuId+"' class='btn btn-info dropdown-toggle btn-xs' style='margin-left:10px;padding-top:0px;' title='添加子節(jié)點'>&nbsp;&nbsp;<i class='fa fa-fw fa-plus rbg'></i></a>";
    var editBtn = "<a onclick='showEditModal(this)' id='"+menuId+"' class='btn btn-info dropdown-toggle btn-xs' style='margin-left:10px;padding-top:0px;' title='編輯節(jié)點'>&nbsp;&nbsp;<i class='fa fa-fw fa-edit rbg'></i></a>";
    var removeBtn = "<a onclick='showConfirmModal(this)' id='"+menuId+"' class='btn btn-info dropdown-toggle btn-xs' style='margin-left:10px;padding-top:0px;' title='刪除節(jié)點'>&nbsp;&nbsp;<i class='fa fa-fw fa-times rbg'></i></a>"; 
    // 根據(jù)level進行判斷
    if(level == 0) {
        $span.append(addBtn);
    }   
    if(level == 1) {        
        if(treeNode.children.length > 0) {          
            $span.append(addBtn+" "+editBtn);           
        } else {            
            $span.append(addBtn+" "+editBtn+" "+removeBtn);         
        }       
    }   
    if(level == 2) {
        $span.append(editBtn+" "+removeBtn);        
    }
    return $span;
}

3.5 addHoverDom(treeId, treeNode)函數(shù)

// 在鼠標(biāo)移入節(jié)點范圍時添加自定義控件
function addHoverDom(treeId, treeNode) {
    // 在執(zhí)行添加前炮车,先進行判斷,如果已經(jīng)添加過酣溃,就停止執(zhí)行
    // 組裝按鈕組所在的span標(biāo)簽的id
    var btnGrpSpanId = treeNode.tId + "_btnGrp";
    var btnGrpSpanLength = $("#"+btnGrpSpanId).length;
    if(btnGrpSpanLength > 0) {
        return ;
    }
    // 由于按鈕組是放在當(dāng)前節(jié)點中的超鏈接(a標(biāo)簽)后面瘦穆,所以先定位到a標(biāo)簽
    // 按id生成規(guī)則組裝a標(biāo)簽的id
    var anchorId = treeNode.tId + "_a";
    // 調(diào)用已封裝函數(shù)生成按鈕組
    var $btnGrpSpan = generateBtnGrp(treeNode);
    // 在a標(biāo)簽后面追加按鈕組
    $("#"+anchorId).after($btnGrpSpan);
}

3.6 removeHoverDom(treeId, treeNode)函數(shù)

// 在鼠標(biāo)移出節(jié)點范圍時刪除自定義控件
function removeHoverDom(treeId, treeNode) {
    // 組裝按鈕組所在的span標(biāo)簽的id
    var btnGrpSpanId = treeNode.tId + "_btnGrp";
    // 刪除對應(yīng)的元素
    $("#"+btnGrpSpanId).remove();
}

3.7 加入add和remove的setting

var setting = {
    "view": {
        "addDiyDom": showMyIcon,
        "addHoverDom": addHoverDom,
        "removeHoverDom": removeHoverDom
    },
    "data": {
        "key": {
            "url": "notExistsProperty" // 阻止點擊節(jié)點后跳轉(zhuǎn)
        }
    }
};

4 添加子節(jié)點

4.1 準備模態(tài)框

模態(tài)框的HTML代碼,參考下面文件的代碼:

include-modal-menu-add.jsp

<%@ include file="/WEB-INF/include-modal-menu-add.jsp" %>

4.2 showAddModal()函數(shù)

// 在點擊添加按鈕時執(zhí)行這個函數(shù)赊豌,打開模態(tài)框
function showAddModal(currentBtn) {
    // 打開模態(tài)框
    $("#menuAddModal").modal("show");   
    // 將當(dāng)前節(jié)點的id存入全局變量
    window.menuId = currentBtn.id;
}

4.3 給保存按鈕綁定單擊響應(yīng)函數(shù)

$("#menuAddBtn").click(function(){  
    // 收集表單填寫的數(shù)據(jù)
    var name = $.trim($("#menuAddModal [name='name']").val());
    var url = $.trim($("#menuAddModal [name='url']").val());
    var icon = $("#menuAddModal [name='icon']:checked").val();  
    if(name == null || name == "") {
        layer.msg("請?zhí)顚懖藛雾椕Q扛或!");
        return ;
    }   
    if(url == null || url == "") {
        layer.msg("請?zhí)顚懖藛雾棇?yīng)的訪問地址!");
        return ;
    }   
    // 發(fā)送Ajax請求
    $.ajax({
        "url":"menu/save.json",
        "type":"post",
        "dataType":"json",
        "data":{
            "name":name,
            "url":url,
            "pid":window.menuId,    // 當(dāng)前操作的節(jié)點是新節(jié)點的父節(jié)點
            "icon":icon
        },
        "success":function(response){           
            var result = response.result;           
            if(result == "SUCCESS") {
                layer.msg("操作成功碘饼!");             
                initWholeTree();
            }           
            if(result == "FAILED") {
                layer.msg(response.message);
            }           
        },
        "error":function(response){
            layer.msg(response.message);
        }
    }); 
    $("#menuAddModal").modal("hide");
});

4.4 后端代碼

@RequestMapping("/menu/save")
public ResultEntity<String> saveMenu(Menu menu) {
    menuService.saveMenu(menu); 
    return ResultEntity.successWithoutData();
}

5 更新節(jié)點

5.1 準備模態(tài)框

include-modal-menu-edit.jsp

<%@ include file="/WEB-INF/include-modal-menu-edit.jsp" %>

5.2 showEditModal()函數(shù)

// 在點擊編輯按鈕時執(zhí)行這個函數(shù)熙兔,打開模態(tài)框
function showEditModal(currentBtn) {
    // 打開模態(tài)框
    $("#menuEditModal").modal("show");
    // 獲取當(dāng)前節(jié)點的id存入全局變量
    window.menuId = currentBtn.id;
    // 發(fā)送請求查詢Menu對象
    $.ajax({
        "url":"menu/get/"+window.menuId+".json",
        "type":"get",
        "dataType":"json",
        "success":function(response) {
            var result = response.result;
            if(result == "SUCCESS") {
                // 從響應(yīng)數(shù)據(jù)中獲取Menu對象
                var menu = response.data;
                // 獲取各個屬性值
                var name = menu.name;
                var url = menu.url;
                var icon = menu.icon;
                // 設(shè)置各個對應(yīng)的表單項
                $("#menuEditModal [name='name']").val(name);
                $("#menuEditModal [name='url']").val(url);
                // radio需要讓value值和后端查詢到的icon一致的設(shè)置為被選中
                $("#menuEditModal [name='icon'][value='"+icon+"']").attr("checked",true);
            }
            if(result == "FAILED") {
                layer.msg(response.message);
            }
        },
        "error":function(response) {
            layer.msg(response.message);
        }
    });
}

handler

@RequestMapping("/menu/get/{menuId}")
public ResultEntity<Menu> getMenuById(@PathVariable("menuId") Integer menuId){
    Menu menu = menuService.getMenuById(menuId);
    return ResultEntity.successWithData(menu);
}

service

@Override
public Menu getMenuById(Integer menuId) {
    return menuMapper.selectByPrimaryKey(menuId);
}

5.3 給更新按鈕綁定單擊響應(yīng)函數(shù)

$("#menuEditBtn").click(function(){
    // 收集表單填寫的數(shù)據(jù)
    var name = $.trim($("#menuEditModal [name='name']").val());
    var url = $.trim($("#menuEditModal [name='url']").val());
    var icon = $("#menuEditModal [name='icon']:checked").val();
    if(name == null || name == "") {
        layer.msg("請?zhí)顚懖藛雾椕Q悲伶!");
        return ;
    }
    if(url == null || url == "") {
        layer.msg("請?zhí)顚懖藛雾棇?yīng)的訪問地址!");
        return ;
    }
    // 發(fā)送Ajax請求
    $.ajax({
        "url":"menu/update.json",
        "type":"post",
        "dataType":"json",
        "data":{
            "id":window.menuId,
            "name":name,
            "url":url,
            "icon":icon
        },
        "success":function(response){
            var result = response.result;
            if(result == "SUCCESS") {
                layer.msg("操作成功住涉!");
                initWholeTree();
            }
            if(result == "FAILED") {
                layer.msg(response.message);
            }
        },
        "error":function(response){
            layer.msg(response.message);
        }
    });
    $("#menuEditModal").modal("hide");
});

5.4 執(zhí)行更新的后端代碼

handler

@RequestMapping("/menu/update")
public ResultEntity<String> updateMenu(Menu menu){
    menuService.updateMenu(menu);
    return ResultEntity.successWithoutData();
}

service

@Override
public void updateMenu(Menu menu) {
    menuMapper.updateByPrimaryKey(menu);
}

MenuMapper.xml

<update id="updateByPrimaryKey" parameterType="com.rgh.crowd.funding.entity.Menu" >
    update t_menu
    set
    name = #{name,jdbcType=VARCHAR},
    url = #{url,jdbcType=VARCHAR},
    icon = #{icon,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
</update>

注意:把SQL中的pid修改去掉麸锉,不改變節(jié)點的父節(jié)點。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末舆声,一起剝皮案震驚了整個濱河市花沉,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌媳握,老刑警劉巖善涨,帶你破解...
    沈念sama閱讀 221,695評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件普监,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機仑扑,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,569評論 3 399
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來蚊荣,“玉大人侥猩,你說我怎么就攤上這事“澹” “怎么了闹瞧?”我有些...
    開封第一講書人閱讀 168,130評論 0 360
  • 文/不壞的土叔 我叫張陵,是天一觀的道長展辞。 經(jīng)常有香客問我奥邮,道長,這世上最難降的妖魔是什么罗珍? 我笑而不...
    開封第一講書人閱讀 59,648評論 1 297
  • 正文 為了忘掉前任洽腺,我火速辦了婚禮,結(jié)果婚禮上覆旱,老公的妹妹穿的比我還像新娘蘸朋。我一直安慰自己,他們只是感情好扣唱,可當(dāng)我...
    茶點故事閱讀 68,655評論 6 397
  • 文/花漫 我一把揭開白布藕坯。 她就那樣靜靜地躺著,像睡著了一般噪沙。 火紅的嫁衣襯著肌膚如雪炼彪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,268評論 1 309
  • 那天正歼,我揣著相機與錄音辐马,去河邊找鬼。 笑死局义,一個胖子當(dāng)著我的面吹牛喜爷,可吹牛的內(nèi)容都是我干的膜楷。 我是一名探鬼主播,決...
    沈念sama閱讀 40,835評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼贞奋,長吁一口氣:“原來是場噩夢啊……” “哼赌厅!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起轿塔,我...
    開封第一講書人閱讀 39,740評論 0 276
  • 序言:老撾萬榮一對情侶失蹤特愿,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后勾缭,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體揍障,經(jīng)...
    沈念sama閱讀 46,286評論 1 318
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,375評論 3 340
  • 正文 我和宋清朗相戀三年俩由,在試婚紗的時候發(fā)現(xiàn)自己被綠了毒嫡。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,505評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡幻梯,死狀恐怖兜畸,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情碘梢,我是刑警寧澤咬摇,帶...
    沈念sama閱讀 36,185評論 5 350
  • 正文 年R本政府宣布,位于F島的核電站煞躬,受9級特大地震影響肛鹏,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜恩沛,卻給世界環(huán)境...
    茶點故事閱讀 41,873評論 3 333
  • 文/蒙蒙 一在扰、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧雷客,春花似錦芒珠、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,357評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至呈宇,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間局雄,已是汗流浹背甥啄。 一陣腳步聲響...
    開封第一講書人閱讀 33,466評論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留炬搭,地道東北人蜈漓。 一個月前我還...
    沈念sama閱讀 48,921評論 3 376
  • 正文 我出身青樓穆桂,卻偏偏與公主長得像,于是被迫代替她去往敵國和親融虽。 傳聞我的和親對象是個殘疾皇子享完,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,515評論 2 359

推薦閱讀更多精彩內(nèi)容

  • ??DOM(文檔對象模型)是針對 HTML 和 XML 文檔的一個 API(應(yīng)用程序編程接口)般又。 ??DOM 描繪...
    霜天曉閱讀 3,655評論 0 7
  • 1. 權(quán)限驗證 2. 給Admin分配Role 2.1 創(chuàng)建中間表 ※說明:不做逆向工程,直接使用SQL操作巍佑。 2...
    彈鋼琴的崽崽閱讀 287評論 0 5
  • 寫在前面的話 代碼中的# > 表示的是輸出結(jié)果 輸入 使用input()函數(shù) 用法 注意input函數(shù)輸出的均是字...
    FlyingLittlePG閱讀 2,771評論 0 8
  • feisky云計算茴迁、虛擬化與Linux技術(shù)筆記posts - 1014, comments - 298, trac...
    不排版閱讀 3,867評論 0 5
  • 程序設(shè)計中常使用樹型結(jié)構(gòu)來表征某些數(shù)據(jù)的關(guān)聯(lián)關(guān)系,如上下級萤衰、欄目結(jié)構(gòu)堕义、商品分類、菜單脆栋、回復(fù)等倦卖。 分類的層級關(guān)系可以...
    JunChow520閱讀 4,106評論 4 3