敏感词地图
This commit is contained in:
@@ -119,7 +119,7 @@
|
|||||||
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
|
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
|
||||||
|
|
||||||
<div class="map-info" v-if="item.msgType == 'location'">
|
<div class="map-info" v-if="item.msgType == 'location'">
|
||||||
<div :id="`map${index}`" class="map-content"></div>
|
<div :id="item.mapId" class="map-content"></div>
|
||||||
<div class="address-text">
|
<div class="address-text">
|
||||||
<p>{{item.title}}</p>
|
<p>{{item.title}}</p>
|
||||||
<p>{{item.address}}</p>
|
<p>{{item.address}}</p>
|
||||||
@@ -473,11 +473,17 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
this.msgList = res.data.records
|
this.msgList = res.data.records
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
}
|
}
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
@@ -509,9 +515,9 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
if (item.msgType == "image") {
|
if (item.msgType == "image") {
|
||||||
var image = new Image();
|
var image = new Image();
|
||||||
image.crossOrigin = '';
|
image.crossOrigin = '';
|
||||||
@@ -522,6 +528,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.msgList = this.msgCurrent > 1 ? [ ...res.data.records, ...this.msgList]: res.data.records
|
this.msgList = this.msgCurrent > 1 ? [ ...res.data.records, ...this.msgList]: res.data.records
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if(this.msgCurrent == 1) {
|
if(this.msgCurrent == 1) {
|
||||||
@@ -572,11 +584,17 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
this.msgList = [...this.msgList, ...res.data.records]
|
this.msgList = [...this.msgList, ...res.data.records]
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if(this.msgCurrent == 1) {
|
if(this.msgCurrent == 1) {
|
||||||
@@ -593,12 +611,12 @@
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initMap(lng, lat, zoom, index) {
|
initMap(lng, lat, zoom, mapId) {
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
||||||
version: '2.0',
|
version: '2.0',
|
||||||
}).then((AMap) => {
|
}).then((AMap) => {
|
||||||
this.map = new AMap.Map(`map${index}`, {
|
this.map = new AMap.Map(`${mapId}`, {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
zooms: [6, 20],
|
zooms: [6, 20],
|
||||||
center: [lng, lat],
|
center: [lng, lat],
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
|
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
|
||||||
|
|
||||||
<div class="map-info" v-if="item.msgType == 'location'">
|
<div class="map-info" v-if="item.msgType == 'location'">
|
||||||
<div :id="`map${index}`" class="map-content"></div>
|
<div :id="item.mapId" class="map-content"></div>
|
||||||
<div class="address-text">
|
<div class="address-text">
|
||||||
<p>{{item.title}}</p>
|
<p>{{item.title}}</p>
|
||||||
<p>{{item.address}}</p>
|
<p>{{item.address}}</p>
|
||||||
@@ -473,11 +473,17 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
this.msgList = res.data.records
|
this.msgList = res.data.records
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
}
|
}
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
@@ -508,9 +514,9 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
if (item.msgType == "image") {
|
if (item.msgType == "image") {
|
||||||
var image = new Image();
|
var image = new Image();
|
||||||
image.crossOrigin = '';
|
image.crossOrigin = '';
|
||||||
@@ -521,6 +527,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.msgList = this.msgCurrent > 1 ? [ ...res.data.records, ...this.msgList]: res.data.records
|
this.msgList = this.msgCurrent > 1 ? [ ...res.data.records, ...this.msgList]: res.data.records
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if(this.msgCurrent == 1) {
|
if(this.msgCurrent == 1) {
|
||||||
@@ -571,11 +583,17 @@
|
|||||||
if(item.msgType == 'file') {
|
if(item.msgType == 'file') {
|
||||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||||
}
|
}
|
||||||
if(item.msgType == 'location') {
|
// if(item.msgType == 'location') {
|
||||||
this.initMap(item.lng, item.lat, item.zoom, index)
|
// this.initMap(item.lng, item.lat, item.zoom, index)
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
this.msgList = [...this.msgList, ...res.data.records]
|
this.msgList = [...this.msgList, ...res.data.records]
|
||||||
|
this.msgList.map((item, index) => {
|
||||||
|
if (item.msgType == "location") {
|
||||||
|
item.mapId = `map${index}`
|
||||||
|
this.initMap(item.lng, item.lat, item.zoom, item.mapId);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.msgPages = res.data.pages || 2
|
this.msgPages = res.data.pages || 2
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if(this.msgCurrent == 1) {
|
if(this.msgCurrent == 1) {
|
||||||
@@ -592,12 +610,12 @@
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initMap(lng, lat, zoom, index) {
|
initMap(lng, lat, zoom, mapId) {
|
||||||
AMapLoader.load({
|
AMapLoader.load({
|
||||||
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
||||||
version: '2.0',
|
version: '2.0',
|
||||||
}).then((AMap) => {
|
}).then((AMap) => {
|
||||||
this.map = new AMap.Map(`map${index}`, {
|
this.map = new AMap.Map(`${mapId}`, {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
zooms: [6, 20],
|
zooms: [6, 20],
|
||||||
center: [lng, lat],
|
center: [lng, lat],
|
||||||
|
|||||||
Reference in New Issue
Block a user