Commit a72668cf by 李伟康

提交代码

1 parent 32b6c480
......@@ -94,6 +94,7 @@
height: 82px;
border-radius: 2px;
position: relative;
&:last-of-type {
margin-right: 16px;
}
......@@ -108,14 +109,24 @@
background: #E9E8EC;
border: 1px solid transparent;
box-sizing: border-box;
img{
img {
object-fit: contain;
}
.line {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 13%;
background: linear-gradient(360deg, #292929 0%, #474747 100%);
}
}
}
.active {
.mask{
.mask {
border-color: #FC5B32;
}
}
......@@ -128,8 +139,9 @@
height: 192px;
margin: 0 auto !important;
}
.active{
.mask{
.active {
.mask {
border-color: transparent;
}
}
......@@ -198,7 +210,8 @@
.icon-address {
margin: 0 auto;
}
.auth-text{
.auth-text {
font-size: 8px;
}
}
......
......@@ -11,6 +11,14 @@ export function Audio (url, callBack) {
} else this._playSourceNode()
}
}
this.stopVideo = function(){
if (typeof this.sourceNode == 'object') {
if (this.isPlayingBGM || off) {
this.sourceNode.stop()
this.isPlayingBGM = false
}
}
}
this._playSourceNode = function () {
const audioContext = this.audioContext
audioContext.resume()
......@@ -26,7 +34,7 @@ export function Audio (url, callBack) {
const audioContext = this.audioContext
const xhr = new XMLHttpRequest()
let _this = this
xhr.open('GET', audioUrl, true)
xhr.open('GET', `${audioUrl}?v=${Date.now()}`, true)
xhr.responseType = 'arraybuffer'
xhr.onreadystatechange = () => {
if (xhr.status < 400 && xhr.status >= 200 && xhr.readyState === 4) {
......
......@@ -66,6 +66,7 @@
<div class="mask">
<img src="https://img02.glsx.com.cn/weapp/resource/h5/images/video-poster.png" />
<div :class="['sprite-icon xy-center',detail.activityVideos.length == 1 ?'icon-big-play':'icon-play']"></div>
<div class="line"></div>
</div>
</div>
</template>
......@@ -229,8 +230,6 @@ export default {
}
},
activated () {
console.log('--------------------')
// if(window.$AUDIO) window.$AUDIO.toggleBGM()
let jsApiList = ['getLocation', 'openLocation', 'getNetworkType', 'onMenuShareAppMessage', 'launchMiniprogram', 'updateAppMessageShareData']
wxConfig.init(jsApiList).then(() => {
wxConfig.ready(() => {
......@@ -238,6 +237,9 @@ export default {
})
})
},
deactivated(){
window.$AUDIO.stopVideo()
},
mounted () {
let _this = this
window.addEventListener('scroll', _this.debounce(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!