Commit a72668cf by 李伟康

提交代码

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