修复遮挡地图的bug

parent 857a8640
<template> <template>
<view class="container"> <view class="container">
<Search :showTitle="true" :title="newAddressFlag ? '新增收货地址' : '编辑收货地址'" backgroundBox="white"></Search> <template v-if="showNavBar">
<Search
:showTitle="true"
:title="newAddressFlag ? '新增收货地址' : '编辑收货地址'"
backgroundBox="white"
></Search>
</template>
<view class="content"> <view class="content">
<wd-form ref="reForm" :model="forMData" id="form"> <wd-form ref="reForm" :model="forMData" id="form">
<wd-cell-group> <wd-cell-group>
...@@ -79,6 +86,7 @@ const forMData = ref({ ...@@ -79,6 +86,7 @@ const forMData = ref({
commonAddr: false, commonAddr: false,
}); });
const content = ref([]); const content = ref([]);
const showNavBar = ref(true);
onLoad((options) => { onLoad((options) => {
newAddressFlag.value = options.new; newAddressFlag.value = options.new;
content.value = JSON.parse(options.content); content.value = JSON.parse(options.content);
...@@ -117,7 +125,6 @@ const hdSubmit = async () => { ...@@ -117,7 +125,6 @@ const hdSubmit = async () => {
uni.navigateBack(); uni.navigateBack();
}, },
}); });
} catch (error) { } catch (error) {
console.log(error, 'error'); console.log(error, 'error');
} }
...@@ -137,6 +144,7 @@ function handleSubmit() { ...@@ -137,6 +144,7 @@ function handleSubmit() {
// 重新定位收货地址 // 重新定位收货地址
async function changeLocation() { async function changeLocation() {
showNavBar.value = false;
uni.chooseLocation({ uni.chooseLocation({
success: function (res) { success: function (res) {
// forMData.value.city = res.address; // forMData.value.city = res.address;
...@@ -159,6 +167,9 @@ async function changeLocation() { ...@@ -159,6 +167,9 @@ async function changeLocation() {
}, },
}); });
}, },
complete: (res) => {
showNavBar.value = true;
},
}); });
} }
</script> </script>
......
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