0
IM JSON建設畫廊應用程序,我需要它是在樹格式,使用jstree擴展IM打造它,我需要的JSON是這種格式:生成樹狀結構的數據庫
$(function() {
$("#demo1").jstree({
"json_data" : {
"data" : [
{
"data" : "A node",
"metadata" : { id : 23 },
"children" : [ "Child 1", "A Child 2" ]
},
{
"attr" : { "id" : "li.node.id1" },
"data" : {
"title" : "Long format demo",
"attr" : { "href" : "#" }
}
}
]
},
"plugins" : [ "themes", "json_data", "ui" ]
}).bind("select_node.jstree", function (e, data) { alert(data.rslt.obj.data("id")); });
});
和IM使用這個數據庫:
的categorys: ID 名 id_father
產品: ID 名 價格 CATEGORY_ID
請使用我的項目的MVC結構,幫助我的傢伙,> _ <,即時通訊和可能做這樣的事情的foreach(modelinstance爲模型)......
的幫助,我真的需要它我不知道怎樣建設