Merge pull request 'xbx' (#25) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/25
This commit is contained in:
luyuan 2020-08-08 18:35:18 +08:00
commit 084826e144
2 changed files with 25 additions and 11 deletions

View File

@ -18,5 +18,7 @@ export default {
<style lang="scss">
/*每个页面公共css */
/* #ifndef APP-PLUS-NVUE */
@import 'uview-ui/index.scss';
/* #endif*/
</style>

View File

@ -5,7 +5,7 @@
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
:style="{'height':height + 'px'}"
></live-pusher>
<div class="bottom" :style="{'height':height + 'px'}" v-if="show" @click="show = false">
<div class="bottom" :style="{'height':height }" v-if="show" @click="show = false">
<div class="tanchuceng" @click="zuzhi">
<div class="head">
<div style="flex-direction: row;align-items:center">
@ -319,17 +319,27 @@
},
onReady() {
// 注意需要在onReady中 或 onLoad 延时
this.context = uni.createLivePusherContext("livePusher", this);
this.startPreview()
let that = this
setTimeout(()=>{
uni.getSystemInfo({
success(a){
console.log(a.windowHeight)
console.log(a.windowHeight,1212)
that.height = a.windowHeight
// that.start()
setTimeout(()=>{
that.context = uni.createLivePusherContext("livePusher", that);
that.startPreview()
},500)
}
})
},500)
},
onLoad(a){
@ -519,6 +529,7 @@
},
statechange(e) {
console.log("statechange:" + JSON.stringify(e));
console.log(e)
},
netstatus(e) {
// console.log("netstatus:" + JSON.stringify(e));
@ -527,6 +538,7 @@
console.log("error:" + JSON.stringify(e));
},
start: function() {
console.log("开始")
console.log(this.url)
this.context.start({
success: (a) => {