Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 907e4152
authored
Jun 04, 2025
by
陈岩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 修复门店热力,区域热力loading bug
1 parent
91d67654
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
h5/src/views/areaHeat/index.vue
h5/src/views/heatMap/index.vue
h5/src/views/areaHeat/index.vue
View file @
907e415
<
template
>
<div>
<div
class=
"heat-map-container"
>
<div
class=
"heat-map"
style=
"background-color: #fff"
>
<div
class=
"canvas"
>
<img
...
...
@@ -7,6 +7,7 @@
class=
"editFloorimg"
id=
"editFloorimg"
style=
"width: 100%"
@
load=
"handleLoad"
/>
<canvas
class=
"canvas-position"
id=
"canvas-position"
></canvas>
</div>
...
...
@@ -58,6 +59,22 @@ const getFloorImage = async () => {
return
""
;
}
};
const
handleLoad
=
()
=>
{
const
domHeight
=
document
.
querySelector
(
".heat-map-container"
)?.
clientHeight
||
0
;
uni
.
postMessage
({
data
:
{
height
:
domHeight
,
type
:
"setHeight"
,
},
});
window
.
postMessage
({
data
:
{
height
:
domHeight
,
type
:
"setHeight"
,
},
});
};
/************** 通道数据相关 **************/
const
channelList
=
ref
([]);
// 渠道列表
...
...
@@ -92,6 +109,8 @@ const getGateStatistics = async () => {
if
(
gateData
.
value
.
length
>
0
)
{
drawAreaCanvas
();
}
const
domHeight
=
document
.
documentElement
.
clientHeight
;
console
.
log
(
domHeight
);
}
}
catch
(
error
)
{
console
.
error
(
"获取区域数据失败:"
,
error
);
...
...
@@ -329,9 +348,8 @@ watch(
z-index
:
1
;
}
.color-legend
{
width
:
auto
;
height
:
auto
;
margin-top
:
20px
;
height
:
70px
;
margin-top
:
30px
;
}
.color-box
{
float
:
left
;
...
...
h5/src/views/heatMap/index.vue
View file @
907e415
...
...
@@ -6,6 +6,7 @@
class=
"editFloorimg"
id=
"editFloorimg"
style=
"width: 100%"
@
load=
"handleLoad"
/>
<div
class=
"canvas-position"
id=
"canvas-position"
></div>
</div>
...
...
@@ -93,6 +94,7 @@ const getHeatMapData = async (params) => {
dealHeatData
();
});
}
else
{
Toast
.
fail
(
"获取热力图数据失败"
);
}
}
catch
(
error
)
{
console
.
error
(
"Error fetching heat map data:"
,
error
);
...
...
@@ -114,6 +116,21 @@ const getFloorImage = async () => {
return
""
;
}
};
const
handleLoad
=
()
=>
{
const
domHeight
=
document
.
querySelector
(
".heat-map"
)?.
clientHeight
||
0
;
uni
.
postMessage
({
data
:
{
height
:
domHeight
+
60
,
type
:
"setHeight"
,
},
});
window
.
postMessage
({
data
:
{
height
:
domHeight
+
60
,
type
:
"setHeight"
,
},
});
};
/************** 热力图相关 **************/
const
heatInstance
=
ref
(
null
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment