|
|
@@ -186,7 +186,7 @@ export default {
|
|
|
|
|
|
mode: 2,
|
|
|
|
|
|
- hotspotRawData: null,
|
|
|
+ baseHotData: null,
|
|
|
hotspotDetail: null,
|
|
|
|
|
|
// ------- ?
|
|
|
@@ -295,7 +295,8 @@ export default {
|
|
|
|
|
|
// 全部热点数据
|
|
|
kankan.store.on("tags", (tags) => {
|
|
|
- this.baseHotData = tags.tags
|
|
|
+ this.baseHotData = tags.tags.reverse()
|
|
|
+ console.log('baseHotData: ', this.baseHotData)
|
|
|
})
|
|
|
|
|
|
// 热点
|
|
|
@@ -324,12 +325,44 @@ export default {
|
|
|
// setTimeout(() => {
|
|
|
// this.$refs.RbottomRef.opMusic(false)
|
|
|
// }, 200)
|
|
|
+ console.log(e.data)
|
|
|
+ const example1 = {
|
|
|
+ content: "<p>《胡乔木为他题词“浩气长存”》</p>",
|
|
|
+ icon: "http://4dkk.4dage.com/v4/sdk/4.2.0/images/tag_icon_default.svg",
|
|
|
+ media: {
|
|
|
+ image: [
|
|
|
+ { src: "q0AbKQ789922.jpeg" },
|
|
|
+ { src: "kfhFHmL789632.jpeg" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ sid: "WfndN9Z789888",
|
|
|
+ title: "陈处泰",
|
|
|
+ type: "image",
|
|
|
+ }
|
|
|
+
|
|
|
+ const example2 = {
|
|
|
+ content: "<p>汪裕先烈士狱中致姐姐的信</p>",
|
|
|
+ media: {
|
|
|
+ image: [
|
|
|
+ { src: "q0AbKQ789922.jpeg" },
|
|
|
+ { src: "kfhFHmL789632.jpeg" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ sid: "XQT0F8570262",
|
|
|
+ title: "汪裕先&27&show",
|
|
|
+ type: "image"
|
|
|
+ }
|
|
|
|
|
|
if (e.data.title.split("&")[1]) { // 如果是多个热点合并
|
|
|
let hotspotList = []
|
|
|
- this.hotspotRawData.forEach((item) => {
|
|
|
+ this.baseHotData.forEach((item) => {
|
|
|
if (item.title.split("&")[1] === e.data.title.split("&")[1]) {
|
|
|
hotspotList.push(item)
|
|
|
+ if (item.media && item.media.image && item.media.image.length > 1) {
|
|
|
+ item.media.image.forEach((p, pI) => {
|
|
|
+ if (pI !== 0) hotspotList.push({ ...item, media: { image: [p] } })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
let obj = {
|
|
|
@@ -342,6 +375,7 @@ export default {
|
|
|
obj[hotspot.type].push(hotspot)
|
|
|
})
|
|
|
this.hotspotDetail = obj
|
|
|
+ console.log(this.hotspotDetail)
|
|
|
} else { // 单个热点
|
|
|
this.hotspotDetail = { [e.data.type]: [e.data] }
|
|
|
}
|