diff --git a/lijunjie.html b/lijunjie.html
new file mode 100644
index 0000000000000000000000000000000000000000..45680729d1f412b9563e21bc8af587d6f2fa94e2
--- /dev/null
+++ b/lijunjie.html
@@ -0,0 +1,219 @@
+
+
+
+
+ 轮播图
+
+
+
+
+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
+
+
+
+
+
diff --git a/lijunjie.js b/lijunjie.js
new file mode 100644
index 0000000000000000000000000000000000000000..89c30daf2b3035ea9220d818367d88853c507751
--- /dev/null
+++ b/lijunjie.js
@@ -0,0 +1,108 @@
+const cityData = [
+ {
+ parentValue: 1,
+ value: 11,
+ label: '北京市',
+ },
+ {
+ parentValue: 11,
+ value: 111,
+ label: '东城区'
+ },
+ {
+ parentValue: 11,
+ value: 112,
+ label: '西城区'
+ },
+ {
+ parentValue: 1,
+ value: 12,
+ label: '上海市',
+ },
+ {
+ parentValue: 12,
+ value: 121,
+ label: '黄浦区'
+ },
+ {
+ parentValue: 12,
+ value: 122,
+ label: '徐汇区'
+ },
+ {
+ parentValue: 1,
+ value: 13,
+ label: '广东省',
+ },
+ {
+ parentValue: 13,
+ value: 131,
+ label: '广州市',
+ },
+ {
+ parentValue: 131,
+ value: 1311,
+ label: '天河区'
+ },
+ {
+ parentValue: 131,
+ value: 1312,
+ label: '越秀区'
+ },
+ {
+ parentValue: 132,
+ value: 1321,
+ label: '南山区'
+ },
+ {
+ parentValue: 132,
+ value: 1322,
+ label: '罗湖区'
+ },
+ {
+ value: 1,
+ label: '中国',
+ },
+ {
+ parentValue: 13,
+ value: 132,
+ label: '深圳市',
+ }
+]
+
+// 具体实现
+const getArea = (data) => {
+ const result = [];
+
+ // 找到根节点并添加到结果中
+ const root = data.find(item => !item.parentValue);
+ if (root) {
+ const rootNode = {
+ id: root.value,
+ title: root.label,
+ child: []
+ };
+ result.push(rootNode);
+
+ // 递归查找子节点
+ const findChildren = (parent) => {
+ const children = data.filter(item => item.parentValue === parent.id);
+ children.forEach(item => {
+ const node = {
+ id: item.value,
+ title: item.label,
+ child: []
+ };
+ parent.child.push(node);
+ findChildren(node);
+ });
+ };
+
+ findChildren(rootNode);
+ }
+
+ return result;
+}
+
+const result = getArea(cityData);
+console.log(JSON.stringify(result, null, 2));
\ No newline at end of file