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.
 

85 lines
6.2 KiB

<view>
<camera wx:if="{{resolution}}" mode="scanCode" device-position="back" flash="{{flash}}" frame-size="{{frameSize}}" style="z-index:0;position:fixed;top:0;width:100%;height:100%;" binderror="handleNoCamera" resolution="{{resolution}}">
</camera>
<canvas bindtap="clickScreen" bindtouchmove="touchMove" bindtouchcancel="touchCancel" bindtouchstart="touchStart" bindtouchend="touchEnd" style="z-index:1;position:fixed;top:0;width:100%;height:100%;" type="webgl" id="webgl" canvas-id="webgl"></canvas>
</view>
<view>
<canvas type="2d" id="capture" style="width: 1px; height: 1px;">
</canvas>
</view>
<image wx:if="{{state===states.selectFloor||state===states.startScan||state===states.fail5s||state===states.inNav}}" style="top:{{safeTop + 10}}px" class="logo" src='./logo.png'></image>
<view wx:if="{{state===states.selectFloor||state===states.startScan||state===states.fail5s||state===states.inNav}}" style="top:{{safeTop + 9}}px;color: {{state===states.inNav?'#000':'#fff'}}" class="title">无锡荟聚</view>
<image wx:if="{{showTabs}}" bindtap="handleToMap" class="tomap" style="top:{{safeTop + 60}}px" src="./tomap.png">
</image>
<button wx:if="{{state!==states.successPrompt&&!promptStateMap[state]&&point!==null}}" open-type="share" class="share" style="top:{{safeTop + 60}}px;">
</button>
<image wx:if="{{state!==states.successPrompt&&!promptStateMap[state]&&point!==null}}" src="/pages/index/share.png" style="top:{{safeTop + 60}}px;" class="share-img"></image>
<view wx:if="{{state===states.selectFloor}}" class="floor-modal">
<view class="content">
<image class="bg" src="./floor-bg.png" mode="widthFix"></image>
<text>为了更精确定位
请选择您当前所在楼层</text>
<view class="floors">
<view class="tabs">
<view class="tab {{selectMall?'active':''}}" bindtap="setSelectMall">商场</view>
<view class="tab {{!selectMall?'active':''}}" bindtap="setSelectPark">停车场</view>
</view>
<scroll-view class="list" scroll-y style="height: {{windowHeight - 152 - 120 - 96 - 30 - 50 - 77}}px">
<view class="item {{item.floorId===floorId?'active':''}}" id="{{index}}" wx:for="{{selectMall? filteredMallFloors:filteredParkFloors}}" wx:key="floorId" bindtap="setFloor">
{{item.name}}</view>
</scroll-view>
<button bindtap="requestLocation" loading="{{!inited}}" class="btn {{(inited && floorOrder!==null)? '' : 'disabled'}}">开始导航</button>
</view>
</view>
</view>
<view wx:if="{{false&&(floorId==='B3'||floorId==='B2'||floorId==='B1')&&(state===states.startScan||state===states.fail5s)}}" class="zzcImg">
<image src="/pages/index/mask.png" class="zzcimg_ys"></image>
<cover-view wx:if="{{flash_isFilter}}" class="scan_lo_tow" style="width:{{parkWidth}}px;height:{{parkHeight-10}}px;top:{{parkTop}}px;left:{{parkLeft}}px;">
<cover-image class="scan_img trans-y" src="https://ar-fm.cdn.bcebos.com/lktools/880c9ef27944354288b11f2abed8fba7cb82d559"></cover-image>
</cover-view>
<view class="scanning_textnl" style="top:{{safeTop + 94}}px;">
<view> {{state===states.startScan?'开始定位':'努力定位中'}}</view>
<view> {{state===states.startScan?'请摆正手机扫描临近车位号':'再试试扫描其他车位号'}} </view>
</view>
<view class="scanning_tip" style="top:{{safeTop + 170}}px;">
示例
<image src='./scanning-tip.png'></image>
</view>
<view class="scanning_text" style="width:100%;top:{{parkTop +80}}px;left:0;right:0;">
您身边的车位号置于此区域,并对齐扫描边缘
</view>
<view class="flashlightBtn" bindtap="flashlightBtn">
<image src="{{flash == 'on'? '/pages/index/flashon.png':'/pages/index/flashoff.png'}}" class="on_img"></image>
</view>
</view>
<view wx:if="{{(floorId==='B3'||floorId==='B2'||floorId==='B1'||floorId==='F1'||floorId==='F2'||floorId==='F3')&&(state===states.startScan||state===states.fail5s)}}" class="scan-modal">
<image class="corner" src="./corner.png"></image>
<image class="corner lb" src="./corner.png"></image>
<image class="corner tl" src="./corner.png"></image>
<image class="corner tr" src="./corner.png"></image>
<view class="scaner">
<view class="bg"></view>
</view>
<view class="title">
{{state===states.startScan?'开始定位':'努力定位中'}}
</view>
<view class="meta">
{{state===states.startScan?'请抬起手机,缓慢扫描周围环境。':'请扫描其他区域试试'}}
</view>
<view class="btn" bindtap="exit">返回</view>
</view>
<prompt wx:if="{{!!promptStateMap[state]}}" icon="{{promptStateMap[state].icon}}" title="{{state===states.arriveElevator?'请乘坐直梯至'+nextFloor.name:state ===states.arriveEscalator?'请乘坐扶梯至'+nextFloor.name:promptStateMap[state].title}}" meta="{{(state===states.arriveElevator||state===states.arriveEscalator)&&(nextFloor.name==='-3F'||nextFloor.name==='-2F'||nextFloor.name==='-1F')?'离开电梯厅后重新扫描':promptStateMap[state].meta}}" btn1="{{((state===states.arriveElevator||state ===states.arriveEscalator)&&nextNextFloor)?'已到达目标'+(nextNextFloor.isPark?'停车场':'商场'):promptStateMap[state].btn1}}" btn2="{{promptStateMap[state].btn2}}" btn3="{{promptStateMap[state].btn3}}" bindbtn="handlePromptBtn"></prompt>
<view wx:if="{{state===states.successPrompt}}" class="success-prompt">
<image src="./success.png"></image>
<view class="title"> 定位成功 </view>
<view class="meta"> 请跟随路线指示行走 </view>
</view>
<nav wx:if="{{showTabs&&tab===1}}" end="{{arriveEnd}}" icon="{{navIcon}}" t1="{{msgTop}}" t2="{{msgBottomLeft}} {{msgBottomRight}}" progress="{{(totalDistance-distance)/totalDistance}}" bindexit="handleNavExit">
</nav>
<image wx:if="{{state===states.inNav&&leftYaw===false&&rightYaw===true}}" class="leftyaw" src="./leftyaw.png"></image>
<image wx:if="{{state===states.inNav&&leftYaw===true&&rightYaw===false}}" class="rightyaw" src="./rightyaw.png"></image>
<map2d hidden="{{!(showTabs&&tab===0)}}" floororder="{{floorOrder}}" loc="{{lastLoc}}" searchType="{{searchType}}" bindmap="handleMap" bindpoint="handlePoint"></map2d>
<destination wx:if="{{showTabs&&tab===2&&shop}}" shop="{{shop}}"></destination>
<tabs wx:if="{{showTabs}}" floor="{{floorName}}" tab="{{tab}}" bindrelocate="handleRelocate" bindchange="handleTabChange" bindtomap="handleToMap"></tabs>