|
@@ -182,21 +182,19 @@ const onClickTagInfo = (el) => {
|
|
|
type: "goodlist",
|
|
|
data: item,
|
|
|
});
|
|
|
- } else if (item.type == "waterfall") {
|
|
|
- store.commit("tag/setTagClickType", {
|
|
|
- type: "waterfall",
|
|
|
- data: item,
|
|
|
- });
|
|
|
}
|
|
|
};
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- apis.burying_point({type:0});
|
|
|
+ apis.burying_point({ type: 0 });
|
|
|
app = createApp({
|
|
|
num: browser.getURLParam("m"),
|
|
|
dom: scene$.value,
|
|
|
mobile: true,
|
|
|
isLoadTags: false,
|
|
|
+ scene: {
|
|
|
+ markerURL: "https://eurs3.4dkankan.com/cdf/file/43aa29799bfd472298a47cc6370b10cc.png",
|
|
|
+ },
|
|
|
});
|
|
|
app.use("MinMap", { theme: { camera_fillStyle: "#ED5D18" } });
|
|
|
app.use("Tag");
|
|
@@ -204,21 +202,7 @@ onMounted(async () => {
|
|
|
.use("TagView", {
|
|
|
render(data) {
|
|
|
if (data.type == "waterfall") {
|
|
|
- let arr = data.products.map((item) => item.price);
|
|
|
- let priceMin = Math.min.apply(null, arr)
|
|
|
- let priceMax = Math.max.apply(null, arr)
|
|
|
- let price = priceMin==priceMax ? priceMax : `${priceMin}-${priceMax}`
|
|
|
- let range = `${data.products[0].symbol} ${price}`;
|
|
|
- return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
|
- <div class="tag-body">
|
|
|
- <div data-id="${data.sid}" class="tag-commodity">
|
|
|
- <div style="background-image:url(${data.products[0].pic})" class='tag-avatar'>
|
|
|
- </div>
|
|
|
- <p class="tag-title">${data.title}</p>
|
|
|
- <p class="tag-info">${range} | 查看 ></p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- `;
|
|
|
+ return `<span class="tag-icon waterfall animate" style="background-image:url({{icon}})"></span>`;
|
|
|
} else if (data.type == "coupon") {
|
|
|
return `<span class="tag-icon coupon animate" style="background-image:url({{icon}})"></span>`;
|
|
|
} else if (data.type == "applet_link") {
|
|
@@ -232,9 +216,9 @@ onMounted(async () => {
|
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>`;
|
|
|
} else if (data.type == "commodity") {
|
|
|
let arr = data.products.map((item) => item.price);
|
|
|
- let priceMin = Math.min.apply(null, arr)
|
|
|
- let priceMax = Math.max.apply(null, arr)
|
|
|
- let price = priceMin==priceMax ? priceMax : `${priceMin}-${priceMax}`
|
|
|
+ let priceMin = Math.min.apply(null, arr);
|
|
|
+ let priceMax = Math.max.apply(null, arr);
|
|
|
+ let price = priceMin == priceMax ? priceMax : `${priceMin}-${priceMax}`;
|
|
|
let range = `${data.products[0].symbol} ${price}`;
|
|
|
return `<span class="tag-icon animate" style="background-image:url({{icon}})"></span>
|
|
|
<div class="tag-body">
|
|
@@ -261,10 +245,14 @@ onMounted(async () => {
|
|
|
type: "treasure",
|
|
|
data: tag,
|
|
|
});
|
|
|
- apis.burying_point({type:2});
|
|
|
-
|
|
|
+ apis.burying_point({ type: 2 });
|
|
|
+ } else if (tag.type == "waterfall") {
|
|
|
+ store.commit("tag/setTagClickType", {
|
|
|
+ type: "waterfall",
|
|
|
+ data: tag,
|
|
|
+ });
|
|
|
} else if (tag.type == "applet_link") {
|
|
|
- browser.openLink(tag.hotContent.liveLink)
|
|
|
+ browser.openLink(tag.hotContent.liveLink);
|
|
|
} else if (tag.type == "link_scene") {
|
|
|
let sceneFirstView = tag.hotContent.sceneFirstView;
|
|
|
window.location.href = "".concat(window.location.pathname, "?").concat(`m=${sceneFirstView.num}&novideo=1&${sceneFirstView.sceneview}`);
|
|
@@ -274,12 +262,12 @@ onMounted(async () => {
|
|
|
|
|
|
view.on("focus", (e) => {
|
|
|
document.querySelectorAll("[xui_tags_view] >div").forEach((el) => {
|
|
|
- if (el.getAttribute("data-tag-type") == "commodity" || el.getAttribute("data-tag-type") == "waterfall") {
|
|
|
+ if (el.getAttribute("data-tag-type") == "commodity") {
|
|
|
el.querySelector(".tag-body").classList.remove("show");
|
|
|
el.style.zIndex = "auto";
|
|
|
}
|
|
|
});
|
|
|
- if (e.data.type == "commodity" || e.data.type == "waterfall") {
|
|
|
+ if (e.data.type == "commodity") {
|
|
|
e.target.style.zIndex = "999";
|
|
|
e.target.querySelector(".tag-body").classList.add("show");
|
|
|
e.target.querySelector(".tag-commodity").removeEventListener("click", onClickTagInfo);
|
|
@@ -336,12 +324,12 @@ onMounted(async () => {
|
|
|
store.commit("setFlying", false);
|
|
|
store.commit("setPanoId", targetPano.id);
|
|
|
if (app.Scene.isCurrentPanoHasVideo) {
|
|
|
- apis.burying_point({type:5});
|
|
|
+ apis.burying_point({ type: 5 });
|
|
|
}
|
|
|
});
|
|
|
|
|
|
app.Camera.on("pano.chosen", (pano) => {
|
|
|
- apis.burying_point({type:4});
|
|
|
+ apis.burying_point({ type: 4 });
|
|
|
});
|
|
|
app.store.on("tour", async (tour) => {
|
|
|
app.TourManager.load(tour);
|
|
@@ -372,12 +360,11 @@ onMounted(async () => {
|
|
|
|
|
|
app.render();
|
|
|
|
|
|
- document.addEventListener('visibilitychange',()=>{
|
|
|
+ document.addEventListener("visibilitychange", () => {
|
|
|
if (document.hidden) {
|
|
|
- apis.burying_point({type:1});
|
|
|
+ apis.burying_point({ type: 1 });
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
@@ -525,6 +512,11 @@ onMounted(async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .waterfall {
|
|
|
+ width: 70px !important;
|
|
|
+ height: 70px !important;
|
|
|
+ }
|
|
|
+
|
|
|
.applet_link {
|
|
|
width: 64px !important;
|
|
|
height: 64px !important;
|