From a56c5470e23cebd04685eda47cfcacd85572a318 Mon Sep 17 00:00:00 2001 From: Wayne Date: Mon, 4 Dec 2023 06:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=A8=8A=E9=8C=84=20-=20=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E9=A1=9E=E5=88=A5=E5=BE=8C=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Address/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/Address/index.vue b/src/views/Address/index.vue index e078278..462f2e8 100644 --- a/src/views/Address/index.vue +++ b/src/views/Address/index.vue @@ -24,9 +24,12 @@ onMounted(async () => { addressList.value = res.data; } - res = await getUserCateList(); + getUserCateList(); +}); + +const getUserCateList = async () => { + let res = await getUserCateList(); if (res.code === 200) { - console.log('res.data', res.data) columns.value = [columns.value[0], ...res.data]; columns2.value = [columns2.value[0], ...res.data]; if(res.data.length > 0){ @@ -35,8 +38,7 @@ onMounted(async () => { modalForm.value.sort = [_.cloneDeep(defaultCate)]; } } -}); - +} // START: 通訊錄類別 const fieldValue = ref('全部-全部'); const showCatePicker = ref(false); @@ -101,6 +103,7 @@ const onChangeCateConfirm = async (value) => { let res = await setUserFaviCate({ uf_user_id: changeUserId.value,cate_id : value.selectedValues[1] }); if (res.code === 200) { + getUserCateList(); showSuccessToast('更新成功') } else { showToast('更新失敗')