Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
h5-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
h5-ci-test
Commits
89889b1f
提交
89889b1f
authored
7月 12, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:问题修复
上级
82697bdf
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
38 行删除
+43
-38
index.vue
pages/network/index.vue
+43
-38
没有找到文件。
pages/network/index.vue
浏览文件 @
89889b1f
...
...
@@ -16,7 +16,7 @@
<view
class=
"websit-node-list-search"
>
<pick-region
@
getRegion=
"handleGetRegion"
>
<view
class=
"location-select"
>
<view>
深圳
</view>
<view>
{{
location
.
city
}}
</view>
<image
src=
"../../static/images/icon-down.png"
/>
</view
></pick-region>
...
...
@@ -73,7 +73,7 @@ export default {
let
str
=
this
.
getQueryString
(
"location"
)
||
JSON
.
stringify
(
this
.
locationData
);
this
.
location
=
JSON
.
parse
(
str
);
uni
.
showToast
({
title
:
'哈哈哈
'
,
title
:
this
.
location
.
location
.
lng
+
'
'
,
icon
:
'none'
})
},
...
...
@@ -83,22 +83,6 @@ export default {
return
str
.
substring
(
0
,
3
)
+
'****'
+
str
.
substring
(
str
.
length
-
4
,
str
.
length
)
}
},
onReachBottom
()
{
if
(
this
.
currentTipIndex
!=
0
)
{
if
(
this
.
query
.
pageNo
*
this
.
query
.
pageSize
<
this
.
total
)
{
switch
(
this
.
currentTipIndex
)
{
case
1
:
this
.
query
.
pageNo
++
this
.
getFlyerDotList
()
break
;
case
2
:
this
.
query
.
pageNo
++
this
.
getDeviceDotList
()
break
;
}
}
}
},
methods
:
{
toAddWebsit
()
{
wx
.
miniProgram
.
navigateTo
({
...
...
@@ -113,7 +97,9 @@ export default {
}
return
null
;
},
handleGetRegion
(
address
){
this
.
location
.
city
=
address
[
1
].
name
===
'市辖区'
?
address
[
0
].
name
:
address
[
1
].
name
}
}
}
</
script
>
...
...
@@ -205,29 +191,22 @@ export default {
data
:
{
lat
:
this
.
location
.
location
.
lat
,
lon
:
this
.
location
.
location
.
lng
,
pageNo
:
1
,
pageSize
:
9999
}
})
if
(
res
.
result
)
{
let
nodeList
=
res
.
result
.
reduce
((
pre
,
cur
)
=>
{
let
list
=
cur
.
locationList
.
filter
((
item
)
=>
{
item
.
grade
=
'4.'
+
this
.
RandomNum
(
5
,
9
)
item
.
day
=
this
.
RandomNum
(
1
,
10
)
item
.
count
=
this
.
RandomNum
(
4
,
5
)
*
10
return
item
.
range
>=
100
});
pre
.
push
(...
list
);
return
pre
;
},
[]);
this
.
websitList
=
nodeList
.
map
((
v
)
=>
({
if
(
res
.
result
.
list
)
{
this
.
websitList
=
res
.
result
.
list
.
map
((
v
)
=>
({
addressDescImg
:
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/774dec69-bf56-4dd9-9c3f-aaa33bc47bcd.png'
,
address
:
v
.
dizhi
,
distance
:
v
.
range
address
:
v
.
address
,
distance
:
v
.
distance
,
lat
:
v
.
lat
,
lon
:
v
.
lon
}))
console
.
log
(
"网点列表数据--->"
,
this
.
websitList
)
this
.
markers
=
nodeList
.
map
((
item
,
index
)
=>
{
this
.
markers
=
this
.
websitList
.
map
((
item
,
index
)
=>
{
return
{
id
:
index
,
lnglat
:
[
item
.
jd
,
item
.
wd
],
lnglat
:
[
item
.
lon
,
item
.
lat
],
style
:
0
};
});
...
...
@@ -256,7 +235,7 @@ export default {
case
3
:
this
.
query
.
pageNo
=
1
this
.
query
.
pageSize
=
9999
await
this
.
get
DeviceDotList
()
await
this
.
get
Maintenance
()
this
.
massMarks
.
setData
(
this
.
markers
)
break
;
}
...
...
@@ -299,7 +278,7 @@ export default {
})
if
(
res
.
result
.
list
)
{
this
.
websitList
=
res
.
result
.
list
.
map
((
v
)
=>
({
addressDescImg
:
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/
774dec69-bf56-4dd9-9c3f-aaa33bc47bcd
.png'
,
addressDescImg
:
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/
3f8d885a-40ab-41ae-b64d-0494d6d80de9
.png'
,
address
:
v
.
uavName
,
distance
:
v
.
distance
}))
...
...
@@ -312,6 +291,32 @@ export default {
});
}
},
// 维修网点
async
getMaintenance
(){
let
res
=
await
this
.
$httpRequest
({
url
:
this
.
$api
.
maintenanceList
,
method
:
'get'
,
data
:
{
lat
:
this
.
location
.
location
.
lat
,
lon
:
this
.
location
.
location
.
lng
,
...
this
.
query
}
})
if
(
res
.
result
.
list
)
{
this
.
websitList
=
res
.
result
.
list
.
map
((
v
)
=>
({
addressDescImg
:
'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/774dec69-bf56-4dd9-9c3f-aaa33bc47bcd.png'
,
address
:
v
.
name
,
distance
:
v
.
distance
,
}))
this
.
markers
=
res
.
result
.
list
.
map
((
item
,
index
)
=>
{
return
{
id
:
index
,
lnglat
:
[
item
.
lon
,
item
.
lat
],
style
:
1
};
});
}
},
RandomNum
(
minNum
,
maxNum
)
{
return
parseInt
(
Math
.
random
()
*
(
maxNum
-
minNum
+
1
)
+
minNum
,
10
);
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论