公寓小程序端前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
4.1 KiB

<view style="height: 100vh;overflow: hidden;">
<van-search model:value="{{ searckKey }}" bind:search="handelSearch" placeholder="输入关键字" background="rgba(0,0,0,0)" shape="round"/>
<view class="tab flex ">
<view wx:for="{{tabList}}" wx:key="index" class="{{active === index?'active':''}} item" data-value="{{item.value}}" bind:tap="onClickTab">
<text>{{item.name}}</text>
</view>
</view>
<view class="all">
<map id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="{{scale}}" markers="{{markers}}" bindmarkertap="markertap" circles="{{circles}}">
</map>
<movable-area class="movable-area">
<movable-view class="movable-view" direction="all" x="280" y="500" bind:tap="onClikTab" wx:if="{{active!==1}}">
<view class="content flex flex-center-i">
<image src="{{!showModal?'../../images/map/list.png':'../../images/map/address.png'}}" class="icon-30" style="margin-right: 10rpx;" mode=""/>
<text style="color: #666666;">{{!showModal?'查看列表':'查看地图'}}</text>
</view>
</movable-view>
<movable-view class="movable-view flex flex-center-i" direction="all" x="280" y="500" wx:if="{{active===1}}">
<image src="../../images/map/toCommunity.png" class="toCommunity" bind:tap="toMyCommunity" mode=""/>
</movable-view>
</movable-area>
</view>
<view>
<van-popup round custom-style="height: 60%;border-radius:0;padding:0 20rpx 20rpx;box-sizing: border-box;background-color: #f3f3f5;" position="bottom" show="{{ showModal }}" bind:close="onClose" overlay="false">
<scroll-view bind:scrolltolower="scrolltolower" scroll-y class="tab_content" wx:if="{{list}}" style="overflow: hidden;">
<view class="map_item flex flex-center-i" bind:tap="toDetail" data-obj="{{item}}" data-type="{{item.type}}" data-id="{{item.id}}" wx:for="{{list}}" wx:key="index">
<image src="{{(item.attrs && item.attrs.length > 0) ? item.attrs[0].url : 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png'}}" mode="" class="left_image" />
<view class="flex flex-1 flex-y flex-sb">
<view class="font-size-30 font-bold ellipsis">{{item.name}}</view>
<view class="{{item.type === 'relaxation'?'tag-g':item.type === '志愿阵地'?'tag-b':item.type === '志愿组织'?'tag-r':'tag-g'}} tag font-size-20 ">{{item.type}}</view>
<view class="font-size-26">距我{{item.distance}}km</view>
</view>
<view class="flex flex-y flex-center-j" bind:tap="routePlanning" data-item="{{item}}">
<image src="../../images/map/navigation.png" mode="" class="navigation"/>
<text class="color-gray font-size-20">导航</text>
</view>
</view>
<view style="height: 120rpx;width: 100%;"></view>
</scroll-view>
<van-empty description="暂无数据" wx:else/>
</van-popup>
<van-popup round custom-style="height: 500rpx;border-radius:0;padding:0 20rpx 20rpx;box-sizing: border-box;background-color: #f3f3f5;" position="bottom" show="{{ showModalDetail }}" bind:close="onClose" overlay="false">
<view class="map_item flex flex-center-i" data-type="{{item.type}}" bind:tap="toDetail" data-id="{{item.id}}" data-obj="{{item}}" wx:for="{{detailList}}" wx:key="index">
<image src="{{(item.attrs&&item.attrs.length()>0)?attrs[0].url:'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png'}}" mode="" class="left_image" />
<view class="flex flex-1 flex-y flex-sb">
<view class="font-size-30 font-bold ellipsis">{{item.name}}</view>
<view class="tag font-size-20 ">{{item.type === "relaxation"?'休闲娱乐':item.type === "position"?'志愿阵地':item.type === "org"?'志愿组织':''}}</view>
<view class="font-size-26">距我{{item.distance}}km</view>
</view>
<view class="flex flex-y flex-center-j" bind:tap="routePlanning" data-item="{{item}}">
<image src="../../images/map/navigation.png" mode="" class="navigation"/>
<text class="color-gray font-size-20">导航</text>
</view>
</view>
<view style="height: 120rpx;width: 100%;"></view>
</van-popup>
</view>
</view>