From db467815ddc7db5baefb746eb67c57528dc44a77 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 13 Jan 2026 16:38:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E5=9C=B0=E5=9D=80=EF=BC=8C=E9=80=89=E6=8B=A9=E7=BB=8F?= =?UTF-8?q?=E7=BA=AC=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AddressSelect/index.vue | 161 ++++++ .../applyments/components/selectAddress.vue | 89 +++- src/views/shop/list/components/addShop.vue | 471 ++++++++++++------ 3 files changed, 543 insertions(+), 178 deletions(-) create mode 100644 src/components/AddressSelect/index.vue diff --git a/src/components/AddressSelect/index.vue b/src/components/AddressSelect/index.vue new file mode 100644 index 0000000..448a345 --- /dev/null +++ b/src/components/AddressSelect/index.vue @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + diff --git a/src/views/applyments/components/selectAddress.vue b/src/views/applyments/components/selectAddress.vue index 651cbdd..310e0f1 100644 --- a/src/views/applyments/components/selectAddress.vue +++ b/src/views/applyments/components/selectAddress.vue @@ -1,13 +1,40 @@ - - + + - - + + - - + + @@ -26,23 +53,31 @@ const provCode = defineModel("provCode", { }); // 监听省份code变化 -watch(provCode, async (n, o) => { - await getRegionAjax() - if (n && n !== undefined) { - provChange(n, true) +watch( + provCode, + async (n, o) => { + await getRegionAjax(); + if (n && n !== undefined) { + provChange(n, true); - // 监听市区code变化 - watch(cityCode, async (n, o) => { - if (n !== undefined && n) { - cityChange(n, true) - } - }, { - immediate: true // 可选:初始化立即执行,验证是否监听到初始值 - }) + // 监听市区code变化 + watch( + cityCode, + async (n, o) => { + if (n !== undefined && n) { + cityChange(n, true); + } + }, + { + immediate: true, // 可选:初始化立即执行,验证是否监听到初始值 + } + ); + } + }, + { + immediate: true, // 可选:初始化立即执行,验证是否监听到初始值 } -}, { - immediate: true // 可选:初始化立即执行,验证是否监听到初始值 -}) +); const cityCode = defineModel("cityCode", { type: String, @@ -69,10 +104,10 @@ const area = defineModel("area", { default: "", }); -const wxProvinceCode = defineModel('wxProvinceCode', { +const wxProvinceCode = defineModel("wxProvinceCode", { type: String, - default: '' -}) + default: "", +}); // 省份变化 e code isEcho是否回显 function provChange(e: string, isEcho: boolean = false) { @@ -100,7 +135,7 @@ function cityChange(e: string, isEcho: boolean = false) { city.value = cityObj ? cityObj.regionName : ""; if (cityObj && cityObj.children) { areaList.value = cityObj.children; - wxProvinceCode.value = cityObj.wxProvinceCode + wxProvinceCode.value = cityObj.wxProvinceCode; } } @@ -116,7 +151,7 @@ async function getRegionAjax() { const res = await getRegion(); provList.value = res; } catch (error) { - console.error('获取省市区数据失败:', error); + console.error("获取省市区数据失败:", error); } } @@ -127,4 +162,4 @@ async function getRegionAjax() { align-items: center; gap: 14px; } - \ No newline at end of file + diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index e8ae3f5..2da4003 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -1,86 +1,181 @@ - - - - - - - - - 单店 - 连锁店 - 加盟店 - - - - - - - 是 - 否 - - - - - - - - - - - - - - - - - - - - 先付费 - 后付费 - - - - - - - 不可直接管理 - 直接管理 - - - - - - - 试用 - 正式 - - - - - 注:输入有效激活码表示添加的同时直接激活该店铺。 - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 先付费 + 后付费 + + + + + + + + 不可直接管理 + 直接管理 + + + + + + + + 试用 + 正式 + + + + + 注:输入有效激活码表示添加的同时直接激活该店铺。 + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + 打开地图复制坐标 + + + + + + + + + + + + + + + 开启 + 关闭 + + + + + + + + + + + + + + + 搜索 + + + + + + {{ item.name }} + + + + + + + + {{ item.name }}-{{ item.address }} + 经纬度:{{ item.location.lng }},{{ item.location.lat }} + + + 选择 + + + + + + + + + - - - - - + + + + + + +