提交 f94c93c7 作者: chenkunfeng

地图页面修改布局

上级 0caad718
<template>
<view class="network-list">
<scroll-view 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)">
<image class="item-image" :src="getNetworkLevel(0)"></image>
<!-- 头像 -->
<!-- <image class="item-image" :src="getNetworkLevel(0)" mode="widthFix"></image> -->
<image
class="item-image"
src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/e9381486ae2144058e2743f3a92178ce_mergeImage.png"
mode="widthFix"
/>
<view class="item-content">
<view class="content-title">{{ i.companyName }}</view>
<view class="content-price">
<view class="serve">
<view class="serve-grade">
<view class="serve-text">
<text>服务星级</text>
</view>
<view class="serve-star"
><image
class="star"
referrerpolicy="no-referrer"
src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/f2392cf16e8049878389809ed23b9fd9_mergeImage.png"
/>
<image
class="star"
referrerpolicy="no-referrer"
src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/f2392cf16e8049878389809ed23b9fd9_mergeImage.png"
/>
</view>
</view>
<view class="content-info"> 浏览115 | 交易198 </view>
</view>
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view>
<view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" />
<text>广东省深圳市南山区-打12路深圳国际创新</text>
</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 class="item-distance">据你158m </view>
<!-- <view class="item-action" @click="toCooperation">联系客服派单</view> -->
</view>
</scroll-view>
<scroll-view v-else class="list-view-click" scroll-y>
<view v-for="(i, j) in list" :key="j" class="list-item" @click="handleSelect(j)">
<image
class="item-image"
src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/e9381486ae2144058e2743f3a92178ce_mergeImage.png"
mode="widthFix"
/>
<view class="item-content">
<view class="content-title">{{ i.companyName }}</view>
<view class="serve">
<view class="serve-grade">
<view class="serve-text">
<text>服务星级</text>
</view>
<view class="serve-star">⭐⭐⭐⭐ </view>
</view>
<view class="content-info"> 浏览115 | 交易198 </view>
</view>
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view>
<view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" />
<text>广东省深圳市南山区-打12路深圳国际创新</text>
</view>
</view>
<view class="item-action" @click="toCooperation">联系客服派单</view>
</view>
</scroll-view>
</view>
</template>
<script setup lang="ts">
import { onMounted, PropType } from 'vue'
import weChatSDK from 'z-weixin-ts'
// import weChatSDK from 'z-weixin-ts'
import { InterListType } from '@/api/interface'
import { listCompanyInfoByCoopIdType } from '@/api/interface/common'
......@@ -31,42 +89,46 @@ const props = defineProps({
list: {
type: Array as unknown as PropType<ListType>,
default: () => []
},
isclick: {
type: Boolean,
default: false
}
})
// 事件
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 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 getNetworkLevel = (level: number) => {
// return networkLevelList.find((i) => i.value === level)?.icon || ''
// }
// 网点点击事件
const handleSelect = (j: number) => {
emits('onSelect', props.list[j])
// console.log(props.list[j])
}
const toCooperation = () => {
weChatSDK.miniProgram.navigateTo({
url: '/page-mine/help-center/index'
})
}
// const toCooperation = () => {
// weChatSDK.miniProgram.navigateTo({
// url: '/page-mine/help-center/index'
// })
// }
// 组件挂载
onMounted(() => {
console.log(props.list)
......@@ -74,81 +136,146 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.network-list {
position: fixed;
// top: calc(100vh - 704rpx + 110rpx);
top: 1156rpx;
left: 0;
width: 100%;
.list-view {
position: fixed;
top: calc(100vh - 704rpx + 110rpx);
left: 0;
width: 100%;
//height: calc(100vh - 156rpx - 110rpx - (100vh - 504rpx));
height: calc(100vh - 156rpx - 110rpx - (100vh - 704rpx));
// 屏幕高度 - 搜索 - 底部 - 地图
// 屏幕高度 - 底部 - 搜索 - 地图
height: 212rpx;
overflow-y: auto;
//background-color: lightpink;
background-color: #fff;
.list-item {
z-index: 20;
}
.list-item {
position: relative;
width: 100%;
display: flex;
height: 212rpx;
background: #ffffff;
// background: #f7f6f6;
.item-image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin: 44rpx 26rpx 68rpx 36rpx;
}
.item-content {
position: relative;
width: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
height: 160rpx;
background: #ffffff;
.item-image {
width: 100rpx;
height: 100rpx;
transform: translateY(10rpx);
margin-top: 14rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-size: 20rpx;
font-weight: 400;
color: #888d9c;
line-height: 28rpx;
border-bottom: 1px solid rgb(242, 245, 245);
box-sizing: border-box;
.content-title {
height: 44rpx;
font-size: 32rpx;
font-weight: 600;
color: #000000;
line-height: 44rpx;
max-width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-content {
position: relative;
.content-title {
width: 498rpx;
height: 40rpx;
font-size: 28rpx;
font-weight: 600;
color: #000000;
line-height: 40rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 10rpx;
}
.content-price {
.serve {
display: flex;
font-size: 20rpx;
margin-bottom: 12rpx;
.serve-grade {
display: flex;
justify-content: flex-start;
align-items: center;
.text {
width: 300rpx;
font-size: 26rpx;
font-weight: 500;
color: #828282;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.serve-text {
height: 32rpx;
padding: 0 6rpx;
line-height: 28rpx;
height: 28rpx;
background: linear-gradient(270deg, #fff1ec 0%, #ffffff 54%, #ffe5db 100%);
border-radius: 4rpx;
border: 1rpx solid #ffb099;
text {
font-weight: 500;
color: #fe7512;
}
}
.serve-star {
margin-left: 10rpx;
.num {
color: #ff4900;
image {
width: 56rpx;
height: 28rpx;
}
}
}
.content-info {
margin-left: 10rpx;
font-weight: 400;
color: #939393;
line-height: 28rpx;
}
}
.item-action {
position: absolute;
bottom: 32rpx;
right: 30rpx;
width: 240rpx;
height: 56rpx;
background: #ffece7;
border-radius: 28rpx;
border: 1rpx solid #ffbaa7;
text-align: center;
line-height: 56rpx;
font-size: 26rpx;
.content-type {
font-size: 20rpx;
font-weight: 400;
color: #ff5b2d;
line-height: 28rpx;
margin-bottom: 10rpx;
}
.item-action:active {
filter: brightness(0.86);
.content-location {
display: flex;
align-items: center;
font-size: 20rpx;
image {
width: 16rpx;
height: 22rpx;
margin-right: 6rpx;
}
text {
display: block;
max-width: 420rpx;
line-height: 28rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.item-distance {
position: absolute;
right: 22rpx;
top: 38rpx;
// width: 90rpx;
height: 28rpx;
font-size: 20rpx;
color: #888d9c;
}
}
.list-item:active,
.list-item-click:active {
background: #f7f6f6;
}
.list-view-click {
position: fixed;
bottom: 110rpx;
left: 0;
height: 216rpx;
z-index: 30;
overflow-x: auto;
.list-item {
position: relative;
display: flex;
flex: 0 0 680rpx;
width: 680rpx;
height: 216rpx;
background: #fefffe;
box-shadow: 0rpx 16rpx 32rpx 0rpx rgba(151, 151, 151, 0.5);
border-radius: 24rpx;
margin: 0 16rpx;
}
}
}
</style>
<template>
<view class="network-map-warp">
<view id="map-content" class="map-content"></view>
<view class="network-total">
<view id="map-content" :class="[isclick ? 'map-content-click' : 'map-content']"></view>
<view class="network-return">
<image src="../../static/img/return.png" mode="widthFix" />
</view>
<!-- <view class="network-total">
<image
class="icon"
src="https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/popup-network-point.png"
></image>
<view>服务商158家</view>
</view> -->
<!-- 位置图标 -->
<view class="network-location-click">
<u-icon
size="18"
name="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngb34fee468ca3e624ae37b2ed7f800c2cbc382947577b1daba895ca28cda483d4"
></u-icon>
<text>我的位置</text>
</view>
<view class="network-location">
<!-- 列表图标 -->
<view :class="['network-list-click', isclick ? 'network-list-show' : '']">
<u-icon
size="24"
name="https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/map-marker-location.png"
size="18"
name="https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngf2561f36b7cad7d458a843b0a01249a692737b67280ad7f5a76b94264dabd383"
></u-icon>
<text>列表</text>
</view>
<!-- 入驻飞享云 -->
<view v-if="!isclick" class="network-enter">
<view class="network-enter-super">
<image src="../../static/img/supermen.png" mode="widthFix" />
</view>
<view class="network-enter-text">
<image src="../../static/img/join.png" mode="widthFix" />
<text>享受免费流量扶持3个月</text>
</view>
<view class="network-enter-willjoin">
<image src="../../static/img/will_join.png" mode="widthFix" />
</view>
</view>
<!--切换网点类型-->
<view class="network-type">
<view v-if="!isclick" class="network-type">
<view
v-for="(i, j) in networkTypeList"
:key="j"
......@@ -27,25 +53,30 @@
</view>
</view>
<!--网点搜索-->
<network-select />
<!-- <network-select /> -->
<!--网点列表-->
<network-list v-if="networkList.length !== 0" :list="networkList" @on-select="handleSelect" />
<network-list
v-if="networkList.length !== 0"
:list="networkList"
:isclick="isclick"
@on-select="handleSelect"
/>
<view v-else class="network-none">空空如也</view>
<!--底部操作-->
<network-footer />
<!-- <network-footer /> -->
</view>
</template>
<script>
import { CommonAPI } from '@/api'
import NetworkSelect from './comp/network-select/index.vue'
// import NetworkSelect from './comp/network-select/index.vue'
import NetworkList from './comp/network-list/index.vue'
import NetworkFooter from './comp/network-footer/index.vue'
// import NetworkFooter from './comp/network-footer/index.vue'
export default {
components: {
NetworkSelect,
NetworkList,
NetworkFooter
// NetworkSelect,
NetworkList
// NetworkFooter
},
data() {
return {
......@@ -117,10 +148,11 @@ export default {
layer: null,
parkList: [],
markers: [],
isclick:false,
icon: {
type: 'image',
image: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/b0364bd1-f193-4b93-ac9f-cfb6e2624d6b.png',
size: [30, 30],
image: 'https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dab4b6b6de114edc8b91cd86bc0760c7_mergeImage.png',
size: [24, 24],
anchor: 'bottom-center',
},
};
......@@ -193,6 +225,8 @@ export default {
labelMarker.on('click', (e) => {
// 给marker绑定事件
this.openInfo({...element,...this.networkList[index]});
// 点击点更改布局
this.isclick = true
});
});
......@@ -216,12 +250,23 @@ export default {
// 构建信息窗体中显示的内容
const domStr = `
<div class="map-open-info">
<div class="park-name">${obj.companyName || '-'}</div>
<div class="content">网点位置:${obj.address || '-'}</div>
<div class="content">${contentStr || ''}</div>
<div class="content">服务评分:${starStr}</div>
<div class="info-left">
<div class="park-name">
${obj.companyName || '-'}
</div>
<div class="location">
<span> 飞手团队 | 距你1123.5km </span>
</div>
</div>
<div class="info-right">
<img src="../../static/img/navigation.png" alt="">
<span>导航</span>
</div>
</div>
`;
// <div class="content">网点位置:${obj.address || '-'}</div>
// <div class="content">${contentStr || ''}</div>
// <div class="content">服务评分:${starStr}</div>
const infoWindow = new AMap.InfoWindow({
zIndex: 99999,
offset: [0, -38], // 偏移
......@@ -259,16 +304,35 @@ export default {
.network-map-warp {
height: 100%;
position: relative;
::-webkit-scrollbar {
display: none;
}
.map-content {
//height: calc(100vh - 504rpx);
height: calc(100vh - 704rpx);
// height: calc(100vh - 704rpx);
// height: calc(100vh - 88rpx);
height: 1156rpx;
width: 100%;
z-index: 10;
position: fixed;
top: 0;
left: 0;
}
.map-content-click {
height: 100vh;
z-index: 21;
}
.network-return {
width: 100rpx;
height: 100rpx;
position: fixed;
top: 90rpx;
left: 8rpx;
z-index: 20;
image {
width: 100%;
}
}
.network-total {
z-index: 20;
position: fixed;
......@@ -293,47 +357,143 @@ export default {
margin-right: 6rpx;
}
}
.network-location {
.network-location,
.network-location-click,//点击图标之后
.network-list-click {
position: fixed;
bottom: 804rpx;
left: 24rpx;
width: 60rpx;
height: 60rpx;
background: #ffffff;
border-radius: 8rpx;
bottom: 642rpx;
right: 26rpx;
width: 96rpx;
height: 96rpx;
background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 20;
box-shadow: 4rpx 8rpx 12rpx 0 rgba(135, 135, 135, 0.17);
border: 2rpx solid #ffffff;
image {
width: 36rpx;
height: 36rpx;
}
text {
font-size: 18rpx;
color: #6b6b6b;
line-height: 26rpx;
margin-top: 4rpx;
}
}
.network-location-click {
bottom: 470rpx;
right: 24rpx;
}
.network-list-click {
bottom: 357rpx;
display: none;
}
.network-list-show {
display: flex;
}
.network-location:active {
.network-location:active,
.network-location-click:active,
.network-list-click:active {
filter: brightness(0.86);
}
.network-list-click:active {
filter: brightness(0.86);
}
.network-enter {
position: fixed;
top: 918rpx;
left: 0;
width: 100%;
height: 238rpx;
border-radius: 48rpx 48rpx 0rpx 0rpx;
background: linear-gradient(180deg, #ff5c32 0%, #ff4d15 40%, #fff9f6 100%);
// box-shadow: 0rpx -10rpx 24rpx 0rpx #ffffff, inset 0rpx 2rpx 0rpx 0rpx #ffffff;
z-index: 20;
display: flex;
.network-enter-super {
padding-top: 12rpx;
margin-left: 30rpx;
image {
width: 80rpx;
height: 116rpx;
}
}
.network-enter-text {
padding-top: 20rpx;
margin-left: 12rpx;
image {
width: 160rpx;
height: 42rpx;
display: block;
}
text {
display: block;
width: 318rpx;
height: 42rpx;
line-height: 42rpx;
font-size: 30rpx;
margin-top: 10rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
}
}
.network-enter-willjoin {
padding-top: 22rpx;
margin-left: 82rpx;
image {
width: 198rpx;
height: 108rpx;
}
}
}
.network-type {
position: fixed;
bottom: 730rpx;
top: 1052rpx;
left: 0;
width: 100%;
height: 104rpx;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, #ffffff 100%);
// box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(219, 45, 0, 0.5);
border-radius: 48rpx 48rpx 0rpx 0rpx;
border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.2)) 2 2;
display: flex;
align-items: center;
justify-content: space-around;
z-index: 20;
.type-item {
width: 160rpx;
height: 48rpx;
background: #ffffff;
width: 128rpx;
height: 44rpx;
border-radius: 16rpx;
text-align: center;
line-height: 48rpx;
font-size: 24rpx;
text-align: left;
font-size: 32rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 400;
color: #ff5b2d;
box-shadow: 4rpx 8rpx 12rpx 0 rgba(135, 135, 135, 0.17);
color: #000000;
line-height: 44rpx;
// box-shadow: 4rpx 8rpx 12rpx 0 rgba(135, 135, 135, 0.17);
}
.item-active {
background: #ff5b2d;
color: #ffffff;
line-height: 40rpx;
font-weight: 600;
color: #000000;
position: relative;
}
.item-active::after {
content: '';
display: block;
width: 56rpx;
height: 8rpx;
background: #ff5321;
border-radius: 5rpx;
position: absolute;
top: 64rpx;
left: 50%;
transform: translateX(-50%);
}
.type-item:active {
filter: brightness(0.86);
......@@ -342,14 +502,19 @@ export default {
.network-none {
position: fixed;
left: 0;
bottom: 300rpx;
// bottom: 300rpx;
top: calc(918rpx + 238rpx);
width: 100%;
height: calc(100vh - 44rpx - 238rpx - 918rpx);
line-height: calc(100vh - 44rpx - 238rpx - 918rpx);
font-size: 22rpx;
font-weight: 400;
color: #28292b;
opacity: 0.68;
// opacity: 0.68;
text-align: center;
margin: 150rpx auto;
// margin: 150rpx auto;
background: #fff;
z-index: 20;
}
}
......@@ -365,13 +530,93 @@ export default {
opacity: 0;
}
.amap-info {
border-radius: 30rpx;
overflow: hidden;
}
.amap-info-close {
display: none;
}
.amap-info-outer {
background: none;
}
// .amap-info-contentContainer.bottom-center {
// padding-bottom: 0;
// }
.amap-info-contentContainer:hover .amap-info-outer,
.amap-menu-outer:hover {
box-shadow: 0rpx 16rpx 32rpx 0rpx rgba(151, 151, 151, 0.5);
}
.amap-info-content {
padding: 0;
width: 444rpx;
height: 106rpx;
}
.amap-info-outer {
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(151, 151, 151, 1);
}
.list-view-click {
.uni-scroll-view-content {
display: flex !important;
overflow-x: auto !important;
}
}
.map-open-info {
width: 60vw;
// width: 60vw;
display: flex;
width: 444rpx;
height: 100rpx;
// background: #fefffe;
position: relative;
.park-name {
font-size: 30rpx;
font-weight: bold;
border: 16rpx;
font-family: PingFangSC-Regular, PingFang SC;
.info-left {
flex: 1;
height: 106rpx;
background: #fefffe;
border-bottom-left-radius: 16rpx;
.park-name {
width: 288rpx;
height: 44rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
line-height: 44rpx;
margin: 8rpx 0 4rpx 18rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.location {
span {
font-size: 26rpx;
color: #8c8c8f;
line-height: 36rpx;
margin-left: 18rpx;
}
}
}
.info-right {
flex: 0 0 112rpx;
height: 106rpx;
background: linear-gradient(153deg, #405160 0%, #233240 100%);
border-radius: 0rpx 16rpx 16rpx 0rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
img {
width: 32rpx;
height: 32rpx;
}
span {
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
line-height: 40rpx;
}
}
.content,
......@@ -381,7 +626,6 @@ export default {
font-size: 28rpx;
line-height: 44rpx;
}
.button {
font-size: 26rpx;
font-weight: 500;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论