| | |
| | | * 组件的初始数据 |
| | | */ |
| | | data: { |
| | | mapId: uuid() |
| | | mapId: uuid(), |
| | | marker: [] |
| | | }, |
| | | |
| | | /** |
| | | * 组件的方法列表 |
| | | */ |
| | | methods: { |
| | | addMarker() { |
| | | this.setData({ |
| | | marker: (this.data.data?.values ?? []).map(item => ({ |
| | | id: 4, |
| | | latitude: item.posx, |
| | | longitude: item.posy, |
| | | // iconPath: '/assets/tabbar/yingyongchengxu.png', |
| | | customCallout: { |
| | | anchorY: 0, |
| | | anchorX: 20, |
| | | display: 'ALWAYS', |
| | | }, |
| | | })) |
| | | }) |
| | | // this.data.marker.push({ |
| | | // id: 4, |
| | | // latitude: 23.095994, |
| | | // longitude: 113.325520, |
| | | // iconPath: '/image/location.png', |
| | | // customCallout: { |
| | | // anchorY: 0, |
| | | // anchorX: 20, |
| | | // display: 'ALWAYS', |
| | | // }, |
| | | // }) |
| | | } |
| | | }, |
| | | |
| | | lifetimes: { |
| | |
| | | latitude: this.data.data.maxy |
| | | } |
| | | }) |
| | | this.addMarker(); |
| | | }, 300); |
| | | |
| | | |
| | |
| | | <map id="{{mapId}}"></map> |
| | | <map id="{{mapId}}" markers="{{marker}}"></map> |
| | |
| | | <block wx:if="{{activeChatRoom&& activeChatRoom.isInitial}}"> |
| | | <view class="ml-10 "> |
| | | <view class="robot-tip mt-10 p-20"><text class="font24 "><text style="font-style: italic; line-height: 50rpx;font-size: 28rpx;font-weight: 550;">欢迎来到AI世界, |
| | | </text>你可以和他对话得到想要的答案 |
| | | 试试点击下方问题 |
| | | </text>你可以和他对话得到想要的答案,试试点击下方问题 |
| | | </text> |
| | | </view> |
| | | </view> |