Browse Source

地图bug修改

dev
396316021 1 year ago
parent
commit
e5425fa1cb
  1. 12
      components/MzMap/index.vue
  2. 10
      pages/Index/components/HomePage/index.vue
  3. 15
      pages/Index/components/ShopPage/index.vue
  4. 1
      pages/Index/index.vue
  5. 34
      pages/Report/qrcode.vue

12
components/MzMap/index.vue

@ -90,11 +90,6 @@ export default {
let that = this;
that.delMarkers().then((res) => {
that.coordinates.map((item,index) => {
that.markerIds.push(index);
return item;
});
that.addMarkers();
});
},
@ -128,9 +123,12 @@ export default {
let data = p;
delete data.width;
delete data.height;
that.markerIds.push(p.id);
console.log(p)
console.log(typeof p.id)
markers.push(
Object.assign({}, {
id:i,
id:p.id,
iconPath: p.iconPath?p.iconPath:that.mapIcon,
width: uni.$u.getPx(width?width:'50rpx'),
height: uni.$u.getPx(height?height:'50rpx'),
@ -152,7 +150,7 @@ export default {
let that = this
let id = e.markerId;
console.log(e)
let coordinate = that.coordinates[id];
let coordinate = that.coordinates.find(line => line.id === id);
this.mapContext.moveToLocation({
latitude: coordinate.latitude,
longitude: coordinate.longitude,

10
pages/Index/components/HomePage/index.vue

@ -20,7 +20,7 @@
</u-row>
<!-- 轮播结束-->
<!-- 最新资讯开始-->
<u-cell-group :border="false">
<u-cell-group :border="false" v-if="showContent">
<u-cell
:rightIconStyle="{
fontSize:'28rpx'
@ -281,6 +281,7 @@ export default {
MzCard
},
data: {
showContent:false,
modalShow:false,
modalContent:'',
title: '暖新人',
@ -489,7 +490,12 @@ export default {
this.getGoods();
this.getWebConfig();
this.getActivity()
this.getProject()
this.getProject();
let now = new Date().getTime();
let targetTime = new Date('2024/01/19 19:00').getTime();
if (now > targetTime) {
this.showContent = true;
}
},
updated() {

15
pages/Index/components/ShopPage/index.vue

@ -96,7 +96,7 @@
<view class="map-container" :style="{display:((tabCheck === 'room')?'flex':'none')}" >
<view class="top-map" :style="{marginTop:size.height+'px'}" v-if="(tabCheck === 'room')">
<view id="map" class="map">
<view id="map" class="map" v-if="showMap">
<MzMap :coordinates="roomCoordinate" @markerTap="markerTap" @tap="mapTap"></MzMap>
</view>
@ -592,6 +592,7 @@ export default {
},
mapData:{},
userInfo:{},
showMap:false,
}
},
onReady() {
@ -639,6 +640,7 @@ export default {
this.list2 = [];
this.roomCoordinate = [];
}
this.showMap = false;
if (this.status === 'nomore') {
return false;
}
@ -648,6 +650,7 @@ export default {
res.data.map(item => {
const coordinate = item.coordinate.split(',');
data.push({
id:item.id,
latitude:parseFloat(coordinate[1]),
longitude:parseFloat(coordinate[0]),
width:'88rpx',
@ -660,6 +663,7 @@ export default {
if (res.data.length === 0) {
this.status = 'nomore'
}
this.showMap = true;
})
this.pages.page++;
@ -742,9 +746,11 @@ export default {
markerTap(e) {
let that = this
let id = e.markerId;
this.mapData = that.listWater[id];
console.log(e)
this.mapData = that.listWater.find(line => id === line.id);
this.popMapShow = true;
console.log(that.listWater)
},
mapTap() {
this.popMapShow = false;
@ -1001,6 +1007,7 @@ export default {
.pop-container {
position: relative;
top:100rpx;
background: {
color: #fff;
};
@ -1019,8 +1026,8 @@ export default {
.pop-add {
position: absolute;
bottom: -15rpx;
left: 20%;
top: -15rpx;
left: 50%;
width: 30rpx;
height: 30rpx;
transform: rotateZ(45deg);

1
pages/Index/index.vue

@ -76,6 +76,7 @@ export default {
},
data() {
return {
showContent:false,
modalShow: false,
modalContent: '暂未开启,敬请期待',
marginTop: 0,

34
pages/Report/qrcode.vue

@ -31,22 +31,22 @@
class="img"
:custom-style="{margin:'auto auto'}"
></u-image>
<view class="qrcode-content row">
<view class="qrcode-main">
<!-- <uv-qrcode ref="qrcode" value="https://baidu.com" size="360rpx" :start="false"></uv-qrcode>-->
<u-image
:show-loading="true"
:src="staticImage.qrcode"
width="400"
height="400"
radius="10"
mode="widthFix"
class="img"
:custom-style="{flex:'0 0 100%'}"
></u-image>
<!-- <u-text text="请扫码签到" size="32" color="#020B18" align="center" :custom-style="{marginTop:'96rpx'}"></u-text>-->
</view>
</view>
<!-- <view class="qrcode-content row">-->
<!-- <view class="qrcode-main">-->
<!--&lt;!&ndash; <uv-qrcode ref="qrcode" value="https://baidu.com" size="360rpx" :start="false"></uv-qrcode>&ndash;&gt;-->
<!-- <u-image-->
<!-- :show-loading="true"-->
<!-- :src="staticImage.qrcode"-->
<!-- width="400"-->
<!-- height="400"-->
<!-- radius="10"-->
<!-- mode="widthFix"-->
<!-- class="img"-->
<!-- :custom-style="{flex:'0 0 100%'}"-->
<!-- ></u-image>-->
<!--&lt;!&ndash; <u-text text="请扫码签到" size="32" color="#020B18" align="center" :custom-style="{marginTop:'96rpx'}"></u-text>&ndash;&gt;-->
<!-- </view>-->
<!-- </view>-->
</view>
</view>
</template>
@ -68,7 +68,7 @@ export default {
loading: true,
staticImage: {
background: imghost + '/report-bg.png',
qrcodeBackground: imghost + '/report-qrcode-bg.png',
qrcodeBackground: imghost + '/report-qrcode-bg-20240313.png',
qrcode: imghost + '/report-qrcode-20231115.png',
},
user: {

Loading…
Cancel
Save