diff --git a/pages/plugins/live/pull/components/goods/goods.vue b/pages/plugins/live/pull/components/goods/goods.vue index c822e092..4d79a9d2 100644 --- a/pages/plugins/live/pull/components/goods/goods.vue +++ b/pages/plugins/live/pull/components/goods/goods.vue @@ -2,7 +2,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -132,7 +132,15 @@ export default { propLiveRoomId: { type: Number, default: 0 - } + }, + propWindowWidth: { + type: Number, + default: 0 + }, + propWindowHeight: { + type: Number, + default: 0 + }, }, data() { return { @@ -145,9 +153,6 @@ export default { //#region 打开商品弹出框 popup_goods_show: false, good_list: [], - // 获取屏幕大小, 这个组件需要再vue页面和nvue页面使用,所以不能设置为100%,需要获取固定屏幕大小 - windowWidth: 0, - windowHeight: 0, //#endregion //#region 商品列表处理 @@ -176,10 +181,12 @@ export default { good_style() { // 判断是否是弹出框形式 if (!this.propIsGoodsPopup) { - return `width:${ this.windowWidth }px;height: ${ this.windowHeight }px;`; + return `width:${ this.propWindowWidth }px;height: ${ this.propWindowHeight }px;`; } else { + console.log(this.propWindowHeight); + // 如果是弹出框模式的就不全屏显示 - return `width:${ this.windowWidth }px;height: ${ this.windowHeight - 300}px;`; + return `width:${ this.propWindowWidth }px;height: ${ this.propWindowHeight - 300}px;`; } }, //#endregion @@ -219,9 +226,6 @@ export default { //#endregion }, mounted() { - const data = uni.getWindowInfo(); - this.windowWidth = data.windowWidth; - this.windowHeight = data.windowHeight; // 初始化商品列表 this.init(); diff --git a/pages/plugins/live/pull/components/live-content/live-content.vue b/pages/plugins/live/pull/components/live-content/live-content.vue index 1f46283c..50eea6a7 100644 --- a/pages/plugins/live/pull/components/live-content/live-content.vue +++ b/pages/plugins/live/pull/components/live-content/live-content.vue @@ -156,7 +156,7 @@ - + diff --git a/pages/plugins/live/pull/components/popup/popup.vue b/pages/plugins/live/pull/components/popup/popup.vue index fb46ad1a..dadea702 100644 --- a/pages/plugins/live/pull/components/popup/popup.vue +++ b/pages/plugins/live/pull/components/popup/popup.vue @@ -619,6 +619,8 @@