- 新增 `kefu.vue` 客服组件,支持用户联系客服 - 优化 `createOrder.vue` 页面,移除 `num` 字段并调整价格计算逻辑 - 在 `productDetail.vue` 页面中注释掉部分服务信息展示 - 更新 `userShopCommission.vue` 组件,将“佣金”改为“积分” - 在 `QuickOrderEntry.vue` 组件中新增 `bottom` 属性,支持自定义底部位置 - 优化 `individualTeam.vue` 页面,将“佣金”改为“积分” - 在 `runningWater.vue` 页面中调整标题和内容,将“佣金”改为“积分” - 更新 `store.js`,恢复退出登录的确认弹窗功能 - 在 `firmOrder.vue` 页面中优化商品图片和名称的展示逻辑 - 新增 `productList.vue` 页面的搜索功能,支持按材料名称搜索 - 优化 `tree.js` 工具函数,调整代码格式 - 在 `category.vue` 页面中新增分类标签切换功能 - 更新 `center.vue` 页面,移除部分功能入口并优化布局 - 优化 `productItem.vue` 组件,调整样式并支持隐藏按钮 - 在 `submit.vue` 组件中新增客服按钮并优化提交按钮样式 - 更新 `index.vue` 页面,优化搜索框交互并移除地址展示 - 在 `systemSet.vue` 页面中调整样式和布局 - 新增 `kefu.svg` 图标文件,用于客服按钮展示master
| @ -0,0 +1,63 @@ | |||
| <template> | |||
| <view class="float-button"> | |||
| <!-- <button type="default" open-type="contact" class="kf-btn"> | |||
| <img src="../../static/images/details/kefu.svg" style="width: 26px;height: 36px;" alt="kefu" | |||
| srcset=""> | |||
| </button> --> | |||
| <button open-type="contact" class="kf-btn"> | |||
| <img src="@/static/image/base/kefu.svg" style="width: 26px;height: 36px;" alt="kefu" srcset=""> | |||
| </button> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| data() { | |||
| return { | |||
| }; | |||
| }, | |||
| methods: { | |||
| // openCustomerService() { | |||
| // uni.openCustomerServiceChat({ | |||
| // //企业微信的企业id | |||
| // corpId: 'wwccd9a21f09fed62d', | |||
| // extInfo: { | |||
| // //客服链接 | |||
| // url: 'https://work.weixin.qq.com/kfid/kfc09f128696578f66d' | |||
| // }, | |||
| // success: (e) => { | |||
| // console.log('e', e) | |||
| // }, | |||
| // fail: (err) => { | |||
| // console.log('err', err) | |||
| // } | |||
| // }) | |||
| // } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss"> | |||
| .float-button { | |||
| position: fixed; | |||
| bottom: 150px; | |||
| /* 距离底部的距离 */ | |||
| right: 10px; | |||
| /* 距离右侧的距离 */ | |||
| width: 50px; | |||
| /* 按钮的宽度 */ | |||
| height: 50px; | |||
| /* 按钮的高度 */ | |||
| /* 其他样式 */ | |||
| .kf-btn { | |||
| background-color: rgba(255, 255, 255, 1); | |||
| height: 52px; | |||
| width: 52px; | |||
| border-radius: 50%; | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| } | |||
| </style> | |||
| @ -1,115 +1,127 @@ | |||
| <template> | |||
| <view class="page"> | |||
| <navbar title='系统设置' leftClick @leftClick="$utils.navigateBack"/> | |||
| <view class="frame"> | |||
| <view class="content" v-for="(item, index) in list" :key="index"> | |||
| <view class="title">{{ item.title }}</view> | |||
| <view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)"> | |||
| <view class="key"> | |||
| <view class="img"> | |||
| <img :src="item2.leftIcon" style="width: 100%; height: 100%;"/> | |||
| </view> | |||
| <view class="text"> | |||
| {{ item2.text }} | |||
| </view> | |||
| </view> | |||
| <view class="value"> | |||
| {{ item2.rightIcon }} | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class="page"> | |||
| <navbar title='系统设置' leftClick @leftClick="$utils.navigateBack" /> | |||
| <view class="frame"> | |||
| <view class="content" v-for="(item, index) in list" :key="index"> | |||
| <view class="title">{{ item.title }}</view> | |||
| <view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)"> | |||
| <view class="key"> | |||
| <view class="img"> | |||
| <img :src="item2.leftIcon" style="width: 100%; height: 100%;" /> | |||
| </view> | |||
| <view class="text"> | |||
| {{ item2.text }} | |||
| </view> | |||
| </view> | |||
| <view class="value"> | |||
| {{ item2.rightIcon }} | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| // import topbar from "@/components/base/topbar.vue"; | |||
| // import tabber from "@/components/base/tabbar.vue"; | |||
| export default { | |||
| name: "systemSet", | |||
| // components: {tabber, topbar}, | |||
| data() { | |||
| return { | |||
| list: [ | |||
| { | |||
| title: `账号设置`, | |||
| itemList: [ | |||
| {leftIcon: "../static/center/1.svg", text: `切换账号`, rightIcon: ">"}, | |||
| ] | |||
| }, | |||
| { | |||
| title: `系统设置`, | |||
| itemList: [ | |||
| {leftIcon: "../static/center/1.svg", text: `清理缓存`, rightIcon: ">"}, | |||
| {leftIcon: "../static/center/2.svg", text: `版本更新`, rightIcon: ">"}, | |||
| {leftIcon: "../static/center/2.svg", text: `退出登录`, rightIcon: ">"}, | |||
| ] | |||
| }, | |||
| ], | |||
| } | |||
| }, | |||
| methods: { | |||
| tapItem(item, index) { | |||
| } | |||
| }, | |||
| } | |||
| // import topbar from "@/components/base/topbar.vue"; | |||
| // import tabber from "@/components/base/tabbar.vue"; | |||
| export default { | |||
| name: "systemSet", | |||
| // components: {tabber, topbar}, | |||
| data() { | |||
| return { | |||
| list: [ | |||
| { | |||
| title: `账号设置`, | |||
| itemList: [{ | |||
| leftIcon: "../static/center/1.svg", | |||
| text: `切换账号`, | |||
| rightIcon: ">" | |||
| }, ] | |||
| }, | |||
| { | |||
| title: `系统设置`, | |||
| itemList: [{ | |||
| leftIcon: "../static/center/1.svg", | |||
| text: `清理缓存`, | |||
| rightIcon: ">" | |||
| }, | |||
| { | |||
| leftIcon: "../static/center/2.svg", | |||
| text: `版本更新`, | |||
| rightIcon: ">" | |||
| }, | |||
| { | |||
| leftIcon: "../static/center/2.svg", | |||
| text: `退出登录`, | |||
| rightIcon: ">" | |||
| }, | |||
| ] | |||
| }, | |||
| ], | |||
| } | |||
| }, | |||
| methods: { | |||
| tapItem(item, index) { | |||
| } | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped lang="scss"> | |||
| .page { | |||
| background-color: #FFF; | |||
| height: 100vh; | |||
| .frame { | |||
| padding: 40rpx; | |||
| .content { | |||
| margin-bottom: 40rpx; | |||
| .title { | |||
| font-size: 30rpx; | |||
| color: #b0b0b0; | |||
| } | |||
| .item { | |||
| display: flex; | |||
| justify-content: space-between; | |||
| align-items: center; | |||
| padding: 20rpx 40rpx; | |||
| .key { | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| color: #333333; | |||
| font-size: 32rpx; | |||
| .img { | |||
| width: 40rpx; | |||
| height: 40rpx; | |||
| } | |||
| .text { | |||
| margin-left: 20rpx; | |||
| } | |||
| } | |||
| .value { | |||
| color: #999999; | |||
| font-size: 36rpx; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| .page { | |||
| background-color: #FFF; | |||
| height: 100vh; | |||
| .frame { | |||
| padding: 40rpx; | |||
| .content { | |||
| margin-bottom: 40rpx; | |||
| .title { | |||
| font-size: 30rpx; | |||
| color: #b0b0b0; | |||
| } | |||
| .item { | |||
| display: flex; | |||
| justify-content: space-between; | |||
| align-items: center; | |||
| padding: 20rpx 40rpx; | |||
| .key { | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| color: #333333; | |||
| font-size: 32rpx; | |||
| .img { | |||
| width: 40rpx; | |||
| height: 40rpx; | |||
| } | |||
| .text { | |||
| margin-left: 20rpx; | |||
| } | |||
| } | |||
| .value { | |||
| color: #999999; | |||
| font-size: 36rpx; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -1,77 +1,157 @@ | |||
| <template> | |||
| <view class="submit"> | |||
| <view class="" | |||
| @click="$emit('share')"> | |||
| <uv-icon | |||
| size="40rpx" | |||
| name="share-square"></uv-icon> | |||
| <view class=""> | |||
| <!-- 联系客服 --> | |||
| <!-- <view @click="$emit('service')" class="service-icon"> | |||
| <image src="@/pages_order/static/productDetail/service.png" mode="widthFix" class="service-icon-img"> | |||
| </image> | |||
| <view class="title"> | |||
| 客服 | |||
| </view> | |||
| </view> | |||
| <!-- <view class="" | |||
| @click="$utils.navigateTo('/index/cart')"> | |||
| <uv-icon | |||
| size="40rpx" | |||
| name="shopping-cart"></uv-icon> | |||
| <view class=""> | |||
| 购物车 | |||
| </view> | |||
| </view> --> | |||
| <view class="btn" | |||
| @click="$emit('submit')"> | |||
| {{ submiitTitle }} | |||
| <button | |||
| open-type="contact" | |||
| class="service-icon"> | |||
| <uv-icon | |||
| name="kefu-ermai" | |||
| size="45rpx" | |||
| ></uv-icon> | |||
| <view class="title"> | |||
| 客服 | |||
| </view> | |||
| </button> | |||
| <view class="submit-btn"> | |||
| <!-- <view class="l" | |||
| @click="!disabled && $emit('addCart')" | |||
| :class="{'disabled': disabled}"> | |||
| {{ disabled ? '库存不足' : '加入购物车' }} | |||
| </view> --> | |||
| <view class="r" | |||
| @click="!disabled && $emit('submit')" | |||
| :class="{'disabled': disabled}"> | |||
| {{ disabled ? '库存不足' : submiitTitle }} | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </template> | |||
| <script> | |||
| export default { | |||
| name:"submit", | |||
| props : { | |||
| submiitTitle : { | |||
| default : '立即购买', | |||
| type : String, | |||
| name: "submit", | |||
| props: { | |||
| submiitTitle: { | |||
| default: '立即购买', | |||
| type: String, | |||
| }, | |||
| detail: { | |||
| default: {} | |||
| }, | |||
| disabled: { | |||
| type: Boolean, | |||
| default: false | |||
| } | |||
| }, | |||
| data() { | |||
| return { | |||
| } | |||
| }, | |||
| methods: { | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .submit{ | |||
| position: fixed; | |||
| bottom: 0; | |||
| left: 0; | |||
| width: 100vw; | |||
| background-color: #fff; | |||
| height: 100rpx; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| font-size: 24rpx; | |||
| .btn{ | |||
| background: $uni-color; | |||
| width: 600rpx; | |||
| height: 80rpx; | |||
| color: #fff; | |||
| border-radius: 40rpx; | |||
| font-size: 28rpx; | |||
| } | |||
| view{ | |||
| width: 100rpx; | |||
| margin: 0 10rpx; | |||
| .submit { | |||
| position: fixed; | |||
| bottom: 0; | |||
| left: 0; | |||
| width: 100vw; | |||
| background-color: #fff; | |||
| height: 120rpx; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| flex-direction: column; | |||
| font-size: 24rpx; | |||
| padding: 0rpx 20rpx; | |||
| box-sizing: border-box; | |||
| // 联系客服 | |||
| .service-icon { | |||
| padding: 0; | |||
| margin: 0; | |||
| background-color: transparent; | |||
| display: flex; | |||
| flex-direction: column; | |||
| justify-content: center; | |||
| margin: 0 20rpx; | |||
| flex-shrink: 0; | |||
| align-items: center; | |||
| &::after{ | |||
| border: 0; | |||
| } | |||
| .service-icon-img { | |||
| width: 45rpx; | |||
| height: 45rpx; | |||
| } | |||
| .title { | |||
| font-size: 26rpx; | |||
| color: #666666; | |||
| line-height: 40rpx; | |||
| } | |||
| } | |||
| .give{ | |||
| background: rgba($uni-color, 0.1); | |||
| padding: 6rpx 20rpx; | |||
| border-radius: 15rpx; | |||
| .title{ | |||
| color: $uni-color; | |||
| } | |||
| } | |||
| .submit-btn { | |||
| width: calc(100% - 140rpx); | |||
| height: 80rpx; | |||
| color: #fff; | |||
| border-radius: 40rpx; | |||
| font-size: 28rpx; | |||
| margin-left: 40rpx; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| overflow: hidden; | |||
| border: 1rpx solid $uni-color; | |||
| .l { | |||
| flex: 1; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| color: $uni-color; | |||
| } | |||
| .r { | |||
| background: $uni-color; | |||
| flex: 1; | |||
| height: 100%; | |||
| display: flex; | |||
| justify-content: center; | |||
| align-items: center; | |||
| &.disabled { | |||
| background: #cccccc; | |||
| cursor: not-allowed; | |||
| } | |||
| } | |||
| .l.disabled { | |||
| color: #999999; | |||
| cursor: not-allowed; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| </style> | |||
| @ -0,0 +1,27 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="26" height="36" viewBox="0 0 26 36" fill="none"> | |||
| <path d="M16.7473 21.7889L13.252 24.5688L9.75669 21.7889C9.75669 21.7889 1.2894 18.4022 3.0651 8.16351C4.1866 1.70318 9.7193 0.0195768 13.0464 0C16.3735 0 21.9062 1.6836 23.009 8.14394C24.7847 18.4022 16.7473 21.7889 16.7473 21.7889Z" fill="#484848"/> | |||
| <path d="M13.2148 2.0179C13.3831 2.0179 13.4765 2.03748 13.4765 2.03748C13.4765 2.03748 20.4298 1.01948 22.4859 11.3169C23.1588 11.4147 23.3644 10.8666 23.3644 10.8666C23.3644 10.8666 22.5793 1.03906 13.4765 1.03906H13.2148V2.0179Z" fill="#74797D"/> | |||
| <path d="M22.8597 12.1529C23.4204 12.3095 23.5886 13.2101 23.2335 14.1497C22.8784 15.0894 22.112 15.7159 21.5512 15.5397C20.9905 15.3831 20.8223 14.4825 21.1774 13.5429C21.5326 12.6228 22.2802 11.9963 22.8597 12.1529Z" fill="#FFDDB8"/> | |||
| <path d="M3.5698 12.1169C3.00906 12.2735 2.84083 13.1936 3.19597 14.1333C3.5698 15.073 4.31747 15.719 4.87821 15.5428C5.43896 15.3862 5.60719 14.4661 5.25205 13.5264C4.9156 12.5867 4.14924 11.9407 3.5698 12.1169Z" fill="#F5D4B1"/> | |||
| <path d="M13.0278 36.0007H25.9437C25.9437 36.0007 25.3082 28.2091 16.4858 26.9954C14.0746 26.8388 13.0278 26.8975 13.0278 26.8975V36.0007Z" fill="#3B5E7C"/> | |||
| <path d="M12.9721 36.0007H0.112305C0.112305 36.0007 0.747819 28.2091 9.55156 26.9954C11.9441 26.8388 12.9908 26.8975 12.9908 26.8975V36.0007H12.9721Z" fill="#283F53"/> | |||
| <path d="M9.79443 21.9453H16.5982V32.8887H9.79443V21.9453Z" fill="#FFDDB8"/> | |||
| <path d="M9.79443 22.0254H16.5982V23.846L9.79443 27.409V22.0254Z" fill="#E5C6A5"/> | |||
| <path d="M13.0278 35.9807H15.1774C15.4577 35.5892 18.8222 27.6801 18.8035 27.5627C18.7848 27.4844 14.3923 28.3066 14.3923 28.3066L13.0278 27.4844V35.9807Z" fill="white"/> | |||
| <path d="M14.187 34.6906C14.187 34.6906 14.2805 35.6499 15.0095 34.7689C15.7384 33.888 13.2524 29.9922 13.2524 29.9922L14.187 34.6906Z" fill="#3B5E7C"/> | |||
| <path d="M13.2714 35.98H11.1219C10.8415 35.5689 7.47699 27.6795 7.49568 27.562C7.51437 27.4837 12.019 28.2864 12.019 28.2864L13.2714 27.6207V35.98Z" fill="#E0ECFF"/> | |||
| <path d="M16.7475 25.5078L19.0652 27.1523C19.0652 27.1523 19.1213 31.792 19.0652 31.6158C19.0092 31.4396 13.1587 27.6025 13.1587 27.6025L16.7475 25.5078Z" fill="white"/> | |||
| <path d="M13.4013 29.9922C13.4013 29.9922 10.9341 33.888 11.663 34.7689C12.392 35.6499 12.4855 34.6906 12.4855 34.6906L13.4013 29.9922Z" fill="#283F53"/> | |||
| <path d="M9.58877 25.5078L7.27102 27.1523C7.27102 27.1523 7.21494 31.792 7.27102 31.6158C7.32709 31.4396 13.1776 27.6025 13.1776 27.6025L9.58877 25.5078Z" fill="white"/> | |||
| <path d="M13.1777 30.4014C13.1777 30.4014 16.5235 32.9072 16.5609 31.2628V28.4437C16.5609 28.4437 16.2805 27.6607 15.0282 28.4437C13.2712 29.4617 13.1777 29.54 13.1777 29.54V30.4014Z" fill="#3B5E7C"/> | |||
| <path d="M13.3641 30.3819C13.3641 30.3819 10.0183 32.9073 9.98096 31.2629V28.4047C9.98096 28.4047 10.2613 27.6216 11.5137 28.4047C13.2707 29.4422 13.3641 29.501 13.3641 29.501V30.3819Z" fill="#283F53"/> | |||
| <path d="M3.5514 29.5195V35.9994H0C0.0186916 35.9994 0.35514 32.2603 3.5514 29.5195ZM26 35.9994H22.4486V29.5195C25.6449 32.2603 26 35.9994 26 35.9994Z" fill="#E0ECFF"/> | |||
| <path d="M5.66355 18.8499C7.15887 21.4928 11.9439 23.2155 13.1215 23.2742V5.2832C8.11214 5.2832 4.46729 9.31602 4.46729 14.2885C4.46729 15.9721 4.91588 17.4991 5.66355 18.8499Z" fill="#F5D4B1"/> | |||
| <path d="M20.5605 18.8499C19.0465 21.4928 14.2054 23.2155 13.0278 23.2742V5.2832C18.0933 5.2832 21.7755 9.31602 21.7755 14.2885C21.7755 15.9721 21.3269 17.5187 20.5605 18.8499Z" fill="#FFDDB8"/> | |||
| <path d="M16.4107 4.54303C16.4107 4.54303 12.0181 9.94622 4.59757 12.3737C2.95271 9.86791 3.32655 7.2642 3.32655 7.2642C3.32655 7.2642 9.77514 2.48747 16.4107 4.54303Z" fill="#484848"/> | |||
| <path d="M17.0091 20.1831C17.0091 20.1831 21.2334 18.4016 22.3175 16.1895C23.0278 16.3265 22.8409 16.6789 22.8409 16.6789C22.8409 16.6789 21.2708 18.8127 17.2895 20.7117C15.7194 21.1032 17.0091 20.1831 17.0091 20.1831Z" fill="#91959B"/> | |||
| <path d="M23.1773 10.808C21.4577 10.6123 21.6446 12.3546 21.4203 14.371C21.196 16.3874 20.6539 17.9535 22.3548 18.1493C24.0745 18.3451 25.6446 16.8377 25.8689 14.8017C26.1119 12.7853 24.8969 11.0038 23.1773 10.808Z" fill="#484848"/> | |||
| <path d="M2.95314 10.808C4.67276 10.6123 4.48585 12.3546 4.71015 14.371C4.93445 16.3874 5.49519 17.9535 3.77557 18.1493C2.05594 18.3451 0.485849 16.8377 0.261549 14.8017C0.0372504 12.7853 1.2522 11.0038 2.95314 10.808Z" fill="#333333"/> | |||
| <path d="M15.5332 19.4589C16.4865 19.3023 17.365 19.6547 17.5145 20.2811C17.664 20.888 17.0098 21.5341 16.0566 21.6907C15.1033 21.8473 14.2248 21.4949 14.0753 20.8684C13.9444 20.2616 14.5986 19.6351 15.5332 19.4589Z" fill="#484848"/> | |||
| <path d="M13.2711 2.0179C13.1029 2.0179 13.0094 2.03748 13.0094 2.03748C13.0094 2.03748 6.03747 0.999908 4.00009 11.3169C3.32719 11.4147 3.12158 10.8666 3.12158 10.8666C3.12158 10.8666 3.90663 1.03906 13.0094 1.03906H13.2711V2.0179Z" fill="#5F6366"/> | |||
| </svg> | |||
| @ -1,43 +1,43 @@ | |||
| export function handleTree(data, id, parentId, children) { | |||
| let config = { | |||
| id: id || 'id', | |||
| parentId: parentId || 'parentId', | |||
| childrenList: children || 'children' | |||
| }; | |||
| let config = { | |||
| id: id || 'id', | |||
| parentId: parentId || 'parentId', | |||
| childrenList: children || 'children' | |||
| }; | |||
| var childrenListMap = {}; | |||
| var nodeIds = {}; | |||
| var tree = []; | |||
| var childrenListMap = {}; | |||
| var nodeIds = {}; | |||
| var tree = []; | |||
| for (let d of data) { | |||
| let parentId = d[config.parentId]; | |||
| if (childrenListMap[parentId] == null) { | |||
| childrenListMap[parentId] = []; | |||
| } | |||
| nodeIds[d[config.id]] = d; | |||
| childrenListMap[parentId].push(d); | |||
| } | |||
| for (let d of data) { | |||
| let parentId = d[config.parentId]; | |||
| if (childrenListMap[parentId] == null) { | |||
| childrenListMap[parentId] = []; | |||
| } | |||
| nodeIds[d[config.id]] = d; | |||
| childrenListMap[parentId].push(d); | |||
| } | |||
| for (let d of data) { | |||
| let parentId = d[config.parentId]; | |||
| if (nodeIds[parentId] == null) { | |||
| tree.push(d); | |||
| } | |||
| } | |||
| for (let d of data) { | |||
| let parentId = d[config.parentId]; | |||
| if (nodeIds[parentId] == null) { | |||
| tree.push(d); | |||
| } | |||
| } | |||
| for (let t of tree) { | |||
| adaptToChildrenList(t); | |||
| } | |||
| for (let t of tree) { | |||
| adaptToChildrenList(t); | |||
| } | |||
| function adaptToChildrenList(o) { | |||
| if (childrenListMap[o[config.id]] !== null) { | |||
| o[config.childrenList] = childrenListMap[o[config.id]]; | |||
| } | |||
| if (o[config.childrenList]) { | |||
| for (let c of o[config.childrenList]) { | |||
| adaptToChildrenList(c); | |||
| } | |||
| } | |||
| } | |||
| return tree; | |||
| function adaptToChildrenList(o) { | |||
| if (childrenListMap[o[config.id]] !== null) { | |||
| o[config.childrenList] = childrenListMap[o[config.id]]; | |||
| } | |||
| if (o[config.childrenList]) { | |||
| for (let c of o[config.childrenList]) { | |||
| adaptToChildrenList(c); | |||
| } | |||
| } | |||
| } | |||
| return tree; | |||
| } | |||