地图修改
This commit is contained in:
parent
29c4358361
commit
37e1f65dc6
|
|
@ -17,6 +17,7 @@ const webViewUrl = ref('')
|
|||
const webViewKey = ref(0) // 用于强制重新渲染 web-view
|
||||
const memberStore = useMemberStore()
|
||||
|
||||
|
||||
// 获取项目列表信息
|
||||
const getProjectList = async () => {
|
||||
const { data: res } = await getAllProjectListApi()
|
||||
|
|
@ -110,7 +111,22 @@ const handleWebViewMessage = (event) => {
|
|||
projectId: projectInfo.proId,
|
||||
token: memberStore.token,
|
||||
},
|
||||
(result) => { },
|
||||
(result) => {
|
||||
console.log("收到原生回调:", result);
|
||||
|
||||
// 增加非空判断
|
||||
if (!result) return;
|
||||
|
||||
// 根据原生传回的 status 字段判断逻辑
|
||||
if (result.status === 'closed') {
|
||||
console.log("监听到三维模型关闭");
|
||||
uni.$u.toast('三维模型已关闭');
|
||||
// 在这里处理你需要的业务逻辑,比如刷新列表
|
||||
}
|
||||
else if (result.status === 'success') {
|
||||
// 处理保存成功的逻辑
|
||||
}
|
||||
},
|
||||
)
|
||||
} else {
|
||||
uni.$u.toast('该工程暂无模型数据')
|
||||
|
|
@ -139,6 +155,7 @@ const buildProjectInfo = (items) => {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
getProjectList().then(() => {
|
||||
if (projectList.value.length > 0) {
|
||||
|
|
@ -152,4 +169,5 @@ onLoad(() => {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
|||
1349
src/static/map.html
1349
src/static/map.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue