更新商铺入住页

parent e30b0992
......@@ -464,6 +464,11 @@ const getShopInfoByIdFun = async (data) => {
qualifications: item.qualifications,
});
});
try {
xma.setStorageSync('storage_choosedShopInfo', JSON.stringify(choosedShopInfo.value));
} catch (e) {
console.log(e);
}
testFileList.value = choosedShopInfo.value.reduce((obj, item) => {
if (item.qualifications === '') {
obj[item.areaId] = [];
......@@ -487,7 +492,14 @@ const show = ref(false);
// 关闭店铺分类弹出层
const handleClose = () => {
show.value = false;
try {
const value = xma.getStorageSync('storage_choosedShopInfo');
if (value) {
choosedShopInfo.value = JSON.parse(value);
}
} catch (e) {
// error
}
setTimeout(() => {
testFileList.value = choosedShopInfo.value.reduce((obj, item) => {
if (item.qualifications === '') {
......@@ -508,7 +520,11 @@ const originChooseCategoryLength = 0;
// 根据choosedShopInfo,更新categoryShopsList的值
const chooseCategory = () => {
show.value = false;
try {
xma.setStorageSync('storage_choosedShopInfo', JSON.stringify(choosedShopInfo.value));
} catch (e) {
console.log(e);
}
testFileList.value = choosedShopInfo.value.reduce((obj, item) => {
if (item.qualifications === '') {
obj[item.areaId] = [];
......@@ -661,6 +677,19 @@ const submitData = () => {
categoryShops: dealCategoryData.value,
});
}
try {
xma.setStorageSync('storage_choosedShopInfo', {});
xma.showToast({
title: '修改成功',
icon: 'success',
duration: 3000,
success: (res) => {
xma.redirectTo({ url: '/pages/storeEntry/index' });
},
});
} catch (e) {
console.log(e);
}
}
})
.catch((error) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment