提交 5c5a4bc3 authored 作者: 吴强's avatar 吴强

更新图标,更新基地选择

上级 09f0a8af
<resources>
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey"></string>
<string name="app_name">bolanManagerApp</string>
<string name="app_name">深圳棚改云</string>
</resources>
......@@ -16,7 +16,6 @@ const findTarget = (list, dmpath) => {
return list[i];
} else {
const data = findTarget(list[i].children, dmpath);
// console.log(data);
if (data) {
return data;
}
......@@ -28,22 +27,21 @@ const createData = async (list, dmpath, payload) => {
// 根据path用fetchDomains 查出children
let childrens = [];
let pathArray;
if (dmpath !== '/' || dmpath.split('/').length === 3) {
if (dmpath !== '/' && dmpath.split('/').length !== 4) {
childrens = await fetchDomains(dmpath);
console.info('ChildRen-------------------------');
console.info(childrens);
console.info('ChildRen------------------------');
if (childrens.length !== 0) {
const childrenPath = childrens[0].path;
pathArray = [...payload, childrenPath];
console.info(pathArray);
pathArray = [...payload, ''];
} else {
pathArray = [...payload];
}
} else {
pathArray = [...payload];
}
const cols = pathArray.length;
const childrenData = [];
if (childrens.length !== 0) {
childrenData.push({ label: '请选择', value: '', children: [] });
childrens.map(({ name, path }) => {
childrenData.push({ label: name, value: path, children: [] });
return childrenData;
......@@ -52,9 +50,13 @@ const createData = async (list, dmpath, payload) => {
// 根据path在list查出需要添加children的对象target
const findData = findTarget(list, dmpath);
findData.children = childrenData;
const data = list;
console.log(list);
return { data, pathArray, cols };
// if (childrens.length !== 0) {
// await createData(list, pathArray[pathArray.length - 1], pathArray);
// return { data, pathArray, cols: pathArray.length };
// } else {
// console.info('xxxxx');
return { data: list, pathArray, cols: pathArray.length };
// }
};
export default {
......@@ -123,6 +125,10 @@ export default {
},
*getUserInfo(ignored, { put, call }) {
const userInfo = yield call(getUser);
const domain = yield call(getDomain);
console.info(domain.path);
const list = yield call(fetchDomains, domain.path, true);
console.info(list[0].name);
yield put({ type: 'queryUserInfo', payload: userInfo });
},
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论