提交 9328a054 作者: 龚洪江

功能:网点页面

上级 7411cd90
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
<view class="network-list"> <view class="network-list">
<scroll-view v-if="!isclick" class="list-view" scroll-y> <scroll-view v-if="!isclick" class="list-view" scroll-y>
<view v-for="(i, j) in list" :key="j" class="list-item" @click="handleSelect(j)"> <view v-for="(i, j) in list" :key="j" class="list-item" @click="handleSelect(j)">
<!-- 头像 -->
<!-- <image class="item-image" :src="getNetworkLevel(0)" mode="widthFix"></image> -->
<image <image
class="item-image" class="item-image"
src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/e9381486ae2144058e2743f3a92178ce_mergeImage.png" src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/e9381486ae2144058e2743f3a92178ce_mergeImage.png"
...@@ -34,18 +32,10 @@ ...@@ -34,18 +32,10 @@
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view> <view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view>
<view class="content-location"> <view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" /> <image src="../../../../static/img/location.png" mode="widthFix" />
<text>广东省深圳市南山区-打12路深圳国际创新</text> <text>{{ i.address }}</text>
</view> </view>
<!-- <view class="content-price">
<u-icon
size="16"
name="https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/popup-network-price.png"
></u-icon>
<view class="text">已交保证金<span class="num">10000元</span></view>
</view> -->
</view> </view>
<view class="item-distance">据你158m </view> <view class="item-distance">据你{{ i.distance }}km </view>
<!-- <view class="item-action" @click="toCooperation">联系客服派单</view> -->
</view> </view>
</scroll-view> </scroll-view>
<scroll-view v-else class="list-view-click" scroll-y> <scroll-view v-else class="list-view-click" scroll-y>
...@@ -69,7 +59,7 @@ ...@@ -69,7 +59,7 @@
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view> <view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view>
<view class="content-location"> <view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" /> <image src="../../../../static/img/location.png" mode="widthFix" />
<text>广东省深圳市南山区-打12路深圳国际创新</text> <text>{{ i.address }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -78,7 +68,6 @@ ...@@ -78,7 +68,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, PropType } from 'vue' import { onMounted, PropType } from 'vue'
// import weChatSDK from 'z-weixin-ts'
import { InterListType } from '@/api/interface' import { InterListType } from '@/api/interface'
import { listCompanyInfoByCoopIdType } from '@/api/interface/common' import { listCompanyInfoByCoopIdType } from '@/api/interface/common'
...@@ -96,37 +85,10 @@ const props = defineProps({ ...@@ -96,37 +85,10 @@ const props = defineProps({
}) })
// 事件 // 事件
const emits = defineEmits(['onSelect']) const emits = defineEmits(['onSelect'])
// 网点等级
// const networkLevelList = [
// {
// value: 0,
// label: '金牌网点',
// icon: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/%E9%87%91%E7%89%8C@2x.png'
// },
// {
// value: 1,
// label: '银牌网点',
// icon: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/%E9%93%B6%E7%89%8C@2x.png'
// },
// {
// value: 2,
// label: '铜牌网点',
// icon: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/%E9%93%9C%E7%89%8C@2x.png'
// }
// ]
// 获取当前网点的等级
// const getNetworkLevel = (level: number) => {
// return networkLevelList.find((i) => i.value === level)?.icon || ''
// }
// 网点点击事件 // 网点点击事件
const handleSelect = (j: number) => { const handleSelect = (j: number) => {
emits('onSelect', props.list[j]) emits('onSelect', props.list[j])
} }
// const toCooperation = () => {
// weChatSDK.miniProgram.navigateTo({
// url: '/page-mine/help-center/index'
// })
// }
// 组件挂载 // 组件挂载
onMounted(() => { onMounted(() => {
console.log(props.list) console.log(props.list)
......
<template> <template>
<view class="network-map-warp"> <view class="network-map-warp">
<view id="map-content" :class="[isclick ? 'map-content-click' : 'map-content']"></view> <view id="map-content" :class="[isclick ? 'map-content-click' : 'map-content']"></view>
<view class="network-return" @click="returns">
<image src="../../static/img/return.png" mode="widthFix" />
</view>
<!-- 位置图标 --> <!-- 位置图标 -->
<view :class="isclick ? 'network-location-click' : 'network-location'"> <view
<!-- <u-icon :class="isclick ? 'network-location-click' : 'network-location'"
size="18" @click="backCurrentLocation"
name="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngb34fee468ca3e624ae37b2ed7f800c2cbc382947577b1daba895ca28cda483d4" >
></u-icon> -->
<image src="../../static/img/mylocation.png" mode="widthFix" /> <image src="../../static/img/mylocation.png" mode="widthFix" />
<text>我的位置</text> <text>我的位置</text>
</view> </view>
<!-- 列表图标 --> <!-- 列表图标 -->
<view :class="['network-list-click', isclick ? 'network-list-show' : '']"> <view
<!-- <u-icon :class="['network-list-click', isclick ? 'network-list-show' : '']"
size="18" @click="showNetWorkList"
name="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngf2561f36b7cad7d458a843b0a01249a692737b67280ad7f5a76b94264dabd383" >
></u-icon> -->
<image src="../../static/img/listicon.png" mode="widthFix" /> <image src="../../static/img/listicon.png" mode="widthFix" />
<text>列表</text> <text>列表</text>
</view> </view>
...@@ -31,7 +26,7 @@ ...@@ -31,7 +26,7 @@
<image src="../../static/img/join.png" mode="widthFix" /> <image src="../../static/img/join.png" mode="widthFix" />
<text>享受免费流量扶持3个月</text> <text>享受免费流量扶持3个月</text>
</view> </view>
<view class="network-enter-willjoin"> <view class="network-enter-willjoin" @click="toJoinPage">
<image src="../../static/img/will_join.png" mode="widthFix" /> <image src="../../static/img/will_join.png" mode="widthFix" />
</view> </view>
</view> </view>
...@@ -47,8 +42,6 @@ ...@@ -47,8 +42,6 @@
{{ i.name }} {{ i.name }}
</view> </view>
</view> </view>
<!--网点搜索-->
<!-- <network-select /> -->
<!--网点列表--> <!--网点列表-->
<network-list <network-list
v-if="networkList.length !== 0" v-if="networkList.length !== 0"
...@@ -57,21 +50,16 @@ ...@@ -57,21 +50,16 @@
@on-select="handleSelect" @on-select="handleSelect"
/> />
<view v-else class="network-none">空空如也</view> <view v-else class="network-none">空空如也</view>
<!--底部操作-->
<!-- <network-footer /> -->
</view> </view>
</template> </template>
<script> <script>
import weChatSDK from 'z-weixin-ts'
import { CommonAPI } from '@/api' import { CommonAPI } from '@/api'
// import NetworkSelect from './comp/network-select/index.vue'
import NetworkList from './comp/network-list/index.vue' import NetworkList from './comp/network-list/index.vue'
// import NetworkFooter from './comp/network-footer/index.vue'
export default { export default {
components: { components: {
// NetworkSelect,
NetworkList NetworkList
// NetworkFooter
}, },
data() { data() {
return { return {
...@@ -129,11 +117,20 @@ export default { ...@@ -129,11 +117,20 @@ export default {
// 网点点击事件 // 网点点击事件
handleSelect(e) { handleSelect(e) {
this.setCenterPoint(e) this.setCenterPoint(e)
// console.log('网点点击事件 --->', e)
}, },
// 返回上一页 // 显示网点列表
returns() { showNetWorkList() {
uni.navigateBack() this.isclick = false
},
// 跳转加盟
toJoinPage() {
weChatSDK.miniProgram.navigateTo({
url: '/page-identity/identity-list/index'
})
},
// 当前位置
backCurrentLocation() {
this.map.setCenter([this.location.lng, this.location.lat])
} }
} }
} }
...@@ -220,11 +217,11 @@ export default { ...@@ -220,11 +217,11 @@ export default {
position: element.position, position: element.position,
icon: this.icon, icon: this.icon,
}); });
console.log('labelMarker',labelMarker)
this.markers.push(labelMarker); this.markers.push(labelMarker);
labelMarker.on('click', (e) => { labelMarker.on('click', (e) => {
// 给marker绑定事件 console.log('执行了--->',e)
this.openInfo({...element,...this.networkList[index]}); this.openInfo({...element,...this.networkList[index]});
// 点击点更改布局
this.isclick = true this.isclick = true
}); });
}); });
...@@ -242,10 +239,6 @@ export default { ...@@ -242,10 +239,6 @@ export default {
}, },
// 在指定位置打开信息窗体 // 在指定位置打开信息窗体
openInfo(obj) { openInfo(obj) {
const starStr = `${new Array(obj.score || 0).fill('⭐').join('')}
<span style="filter:grayscale(1)">${new Array( 5 - obj.score || 0).fill('⭐').join('')}</span>`
const contentStr = obj.content.replace(/;|;/g, `<div />`)
// console.log('点击到此处 --->',contentStr)
// 构建信息窗体中显示的内容 // 构建信息窗体中显示的内容
const domStr = ` const domStr = `
<div class="map-open-info"> <div class="map-open-info">
...@@ -254,7 +247,7 @@ export default { ...@@ -254,7 +247,7 @@ export default {
${obj.companyName || '-'} ${obj.companyName || '-'}
</div> </div>
<div class="location"> <div class="location">
<span class="location-info"> 飞手团队 | 距你1123.5km </span> <span class="location-info"> ${this.networkTypeList[this.currentTypeIndex].name} | 距你${obj.distance}km </span>
</div> </div>
</div> </div>
<div class="info-right"> <div class="info-right">
...@@ -263,23 +256,21 @@ export default { ...@@ -263,23 +256,21 @@ export default {
</div> </div>
</div> </div>
`; `;
// <div class="content">网点位置:${obj.address || '-'}</div>
// <div class="content">${contentStr || ''}</div>
// <div class="content">服务评分:${starStr}</div>
const infoWindow = new AMap.InfoWindow({ const infoWindow = new AMap.InfoWindow({
zIndex: 99999, zIndex: 99999,
offset: [0, -38], // 偏移 offset: [0, -38], // 偏移
content: domStr, // 使用默认信息窗体框样式,显示信息内容 content: domStr, // 使用默认信息窗体框样式,显示信息内容
}); });
infoWindow.open(this.map, obj.position); infoWindow.open(this.map, obj.position);
const navigate = document.querySelector('.navigate');
// const button = document.querySelector('.map-open-info .button'); navigate.onclick = () => {
// button.onclick = () => { weChatSDK.miniProgram.openLocation({
// uni.navigateTo({ latitude: obj.lat,
// url: `/pages/statisticsAdminSingle/index?sysParkId=${obj.sysParkId}`, longitude: obj.lon,
// }); name: obj.companyName,
// this.$ownerInstance.callMethod('goDetails', {sysParkId:obj.sysParkId}) address: obj.address
// } })
}
}, },
removeAllOverlay() { removeAllOverlay() {
// 清除地图上所有添加的覆盖物 // 清除地图上所有添加的覆盖物
...@@ -292,10 +283,10 @@ export default { ...@@ -292,10 +283,10 @@ export default {
}, },
// 设置中心点 // 设置中心点
setCenterPoint(e){ setCenterPoint(e){
console.log('执行到此处 --->',e)
this.map.setCenter([e.lon, e.lat]) this.map.setCenter([e.lon, e.lat])
this.openInfo({position:[e.lon, e.lat],...e}); this.openInfo({position:[e.lon, e.lat],...e});
console.log('执行到此处 --->',e) },
}
}, },
}; };
</script> </script>
...@@ -307,9 +298,6 @@ export default { ...@@ -307,9 +298,6 @@ export default {
display: none; display: none;
} }
.map-content { .map-content {
//height: calc(100vh - 504rpx);
// height: calc(100vh - 704rpx);
// height: calc(100vh - 88rpx);
height: 1052rpx; height: 1052rpx;
width: 100%; width: 100%;
z-index: 10; z-index: 10;
...@@ -444,6 +432,7 @@ export default { ...@@ -444,6 +432,7 @@ export default {
.network-enter-willjoin { .network-enter-willjoin {
padding-top: 22rpx; padding-top: 22rpx;
margin-left: 82rpx; margin-left: 82rpx;
animation: scale-animation 0.638s infinite;
image { image {
width: 198rpx; width: 198rpx;
height: 108rpx; height: 108rpx;
...@@ -645,4 +634,15 @@ export default { ...@@ -645,4 +634,15 @@ export default {
} }
} }
} }
@keyframes scale-animation {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
</style> </style>
src/static/img/join.png

2.2 KB | W: | H:

src/static/img/join.png

5.6 KB | W: | H:

src/static/img/join.png
src/static/img/join.png
src/static/img/join.png
src/static/img/join.png
  • 2-up
  • Swipe
  • Onion skin
src/static/img/location-icon.png

2.2 KB | W: | H:

src/static/img/location-icon.png

5.6 KB | W: | H:

src/static/img/location-icon.png
src/static/img/location-icon.png
src/static/img/location-icon.png
src/static/img/location-icon.png
  • 2-up
  • Swipe
  • Onion skin
src/static/img/location.png

315 Bytes | W: | H:

src/static/img/location.png

600 Bytes | W: | H:

src/static/img/location.png
src/static/img/location.png
src/static/img/location.png
src/static/img/location.png
  • 2-up
  • Swipe
  • Onion skin
src/static/img/navigate.png

346 Bytes | W: | H:

src/static/img/navigate.png

621 Bytes | W: | H:

src/static/img/navigate.png
src/static/img/navigate.png
src/static/img/navigate.png
src/static/img/navigate.png
  • 2-up
  • Swipe
  • Onion skin
src/static/img/supermen.png

4.2 KB | W: | H:

src/static/img/supermen.png

12.8 KB | W: | H:

src/static/img/supermen.png
src/static/img/supermen.png
src/static/img/supermen.png
src/static/img/supermen.png
  • 2-up
  • Swipe
  • Onion skin
src/static/img/will_join.png

5.9 KB | W: | H:

src/static/img/will_join.png

17.4 KB | W: | H:

src/static/img/will_join.png
src/static/img/will_join.png
src/static/img/will_join.png
src/static/img/will_join.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论