|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<!-- @click="autoplay" @touchstart="autoplay" -->
|
|
|
<div class="home">
|
|
|
- <audio v-if="audio" class="audio" id="audio1" :src="audio" preload ref="musicBg" @ended="overAudio"></audio>
|
|
|
+ <audio v-if="audio" class="audio" id="audio1" :src="fixUrl(audio)" preload ref="musicBg" @ended="overAudio"></audio>
|
|
|
<div class="content" v-if="(!audio && fixIcon.length > 0) || (audio && fixIcon.length > 1)"
|
|
|
:class="{ isMobileCon: isMobile }">
|
|
|
<div v-if="!isMobile && lengthShow" @click="slideto('slidePrev')" class="swiper-button-prev"></div>
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
this.active = id;
|
|
|
},
|
|
|
async getData() {
|
|
|
- let url = `data/${this.id
|
|
|
+ let url = `/data/${this.id
|
|
|
}/hot/js/data.js?time=${Math.random()}`;
|
|
|
let result = (await this.$http.get(url)).data;
|
|
|
this.data = result[this.m];
|
|
@@ -251,23 +251,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- fixUrl(item) {
|
|
|
- let condition =
|
|
|
- item.indexOf("http://") > -1 || item.indexOf("https://") > -1;
|
|
|
- if (this.isMobile) {
|
|
|
- if (
|
|
|
- item.indexOf("mp.weixin.qq.com/mp/") > -1 &&
|
|
|
- this.active === "iframe"
|
|
|
- ) {
|
|
|
- return `https://www.4dmodel.com/SuperTwo/hot_online1/linktoWC.html?url=${encodeURIComponent(
|
|
|
- item
|
|
|
- )}`;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!condition) {
|
|
|
- return "https://" + item;
|
|
|
- }
|
|
|
- return item;
|
|
|
+ fixUrl(url) {
|
|
|
+ const resUrl = url;
|
|
|
+ if (url.includes("https://super.4dage.com")) {
|
|
|
+ return url.replace("https://super.4dage.com", "");
|
|
|
+ } else if (url.includes("http://super.4dage.com")) {
|
|
|
+ return url.replace("http://super.4dage.com", "");
|
|
|
+ } else return resUrl;
|
|
|
},
|
|
|
slideto(action) {
|
|
|
this.swiper[action]();
|