|
@@ -2,8 +2,8 @@
|
|
|
<view class="index-box box-border-box flex-common-css" @click.stop="play()">
|
|
<view class="index-box box-border-box flex-common-css" @click.stop="play()">
|
|
|
<view class="flex-justify-space box-border-box plr-32">
|
|
<view class="flex-justify-space box-border-box plr-32">
|
|
|
<image class="logo-img" src="@/static/img/c-logo.png" mode="scaleToFill"></image>
|
|
<image class="logo-img" src="@/static/img/c-logo.png" mode="scaleToFill"></image>
|
|
|
-<!-- <image class="music-img" :class="isPlay?'music-anumation':''" src="@/static/img/c-music.png" mode="scaleToFill" @click.stop="musicPause()"></image>-->
|
|
|
|
|
- <mumu-music musicSrc='https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3'></mumu-music>
|
|
|
|
|
|
|
+ <image class="music-img" v-if="!isIos" :class="isPlay?'music-anumation':'music-anumation'" src="@/static/img/c-music.png" mode="scaleToFill" @click.stop="musicPause()"></image>
|
|
|
|
|
+ <mumu-music v-else ref="musicObj" musicSrc='https://jhxcnc.oss-cn-chengdu.aliyuncs.com/mp3/4272600974.mp3'></mumu-music>
|
|
|
</view>
|
|
</view>
|
|
|
<swiper class="swiper" :vertical='true' @change="swiperChange">
|
|
<swiper class="swiper" :vertical='true' @change="swiperChange">
|
|
|
<!-- 邀请函 -->
|
|
<!-- 邀请函 -->
|
|
@@ -14,7 +14,7 @@
|
|
|
<view class="fs-48 fc-f text-align-center mb-16 wow animate__animated animate__bounceInLeft">
|
|
<view class="fs-48 fc-f text-align-center mb-16 wow animate__animated animate__bounceInLeft">
|
|
|
振合网科技集团实体联盟</view>
|
|
振合网科技集团实体联盟</view>
|
|
|
<view class="fs-32 fc-f text-align-center mb-72 wow animate__animated animate__bounceInRight">未来已来
|
|
<view class="fs-32 fc-f text-align-center mb-72 wow animate__animated animate__bounceInRight">未来已来
|
|
|
- 一触即发</view>
|
|
|
|
|
|
|
+ 一触即发1</view>
|
|
|
<image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png"
|
|
<image class="img-xian wow animate__animated animate__bounceInUp" src="@/static/img/xian.png"
|
|
|
mode="scaleToFill"></image>
|
|
mode="scaleToFill"></image>
|
|
|
<image class="name-text wow animate__animated animate__bounceInLeft"
|
|
<image class="name-text wow animate__animated animate__bounceInLeft"
|
|
@@ -161,6 +161,7 @@
|
|
|
} from '@/api/user.js';
|
|
} from '@/api/user.js';
|
|
|
import tools from "@/service/tools";
|
|
import tools from "@/service/tools";
|
|
|
import wxJs from "jweixin-module"
|
|
import wxJs from "jweixin-module"
|
|
|
|
|
+ import { useBgMusic } from '@/uni_modules/y-bg-music/js_sdk';
|
|
|
export default {
|
|
export default {
|
|
|
components: {},
|
|
components: {},
|
|
|
data() {
|
|
data() {
|
|
@@ -179,6 +180,7 @@
|
|
|
audioServe: undefined,
|
|
audioServe: undefined,
|
|
|
isPlay: false,
|
|
isPlay: false,
|
|
|
isAutoPlay: false,
|
|
isAutoPlay: false,
|
|
|
|
|
+ isIos: true,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onshow() {
|
|
onshow() {
|
|
@@ -190,7 +192,18 @@
|
|
|
if (isWeiXin) {
|
|
if (isWeiXin) {
|
|
|
this.getJsConfig()
|
|
this.getJsConfig()
|
|
|
}
|
|
}
|
|
|
- this.musicPlay()
|
|
|
|
|
|
|
+ const isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
|
|
|
+ this.isIos=isiOS
|
|
|
|
|
+ if (isiOS) {
|
|
|
|
|
+ console.log('This is an iOS device');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.audioServe = useBgMusic({
|
|
|
|
|
+ src: './static/mp3/4272600974.mp3',
|
|
|
|
|
+ loop: 999, // 循环次数
|
|
|
|
|
+ controls:false // 显示右上角控制元素
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
musicPlay() {
|
|
musicPlay() {
|
|
@@ -232,12 +245,12 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
musicPause() {
|
|
musicPause() {
|
|
|
- if (this.audioServe) {
|
|
|
|
|
- this.audioServe.pause();
|
|
|
|
|
- this.audioServe.onPause(() => {
|
|
|
|
|
- this.isPlay = false;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.audioServe) {
|
|
|
|
|
+ // this.audioServe.pause();
|
|
|
|
|
+ // this.audioServe.onPause(() => {
|
|
|
|
|
+ // this.isPlay = false;
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
getJsConfig() {
|
|
getJsConfig() {
|
|
@@ -256,6 +269,7 @@
|
|
|
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
|
|
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
|
|
|
})
|
|
})
|
|
|
wxJs.ready(() => {
|
|
wxJs.ready(() => {
|
|
|
|
|
+
|
|
|
//自定义“分享给朋友”
|
|
//自定义“分享给朋友”
|
|
|
// this.musicPlay()
|
|
// this.musicPlay()
|
|
|
wxJs.updateAppMessageShareData({
|
|
wxJs.updateAppMessageShareData({
|
|
@@ -277,6 +291,11 @@
|
|
|
// 设置成功
|
|
// 设置成功
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ if(this.audioServe){
|
|
|
|
|
+ this.audioServe.play();
|
|
|
|
|
+ }else if (!this.isIos){
|
|
|
|
|
+ this.$refs.musicObj.playTo()
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|