From cff59588438d41215d3b8ee4eee2aa5b1623aa03 Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Mon, 11 Oct 2021 14:10:57 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index/index.vue | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/pages/index/index/index.vue b/pages/index/index/index.vue index 4117356..bd3d8c0 100644 --- a/pages/index/index/index.vue +++ b/pages/index/index/index.vue @@ -74,7 +74,7 @@ - + 直播间 @@ -152,7 +152,8 @@ show_ad: false, // 是否显示ad广告 ad_modal_list: [], // ad广告列表 nav_bg_color: 'rgba(255,255,255,0)' ,// 导航背景颜色 - car_num: 0 + car_num: 0, + live_roomid: 0 }; }, // 注册组件 @@ -189,14 +190,14 @@ } }, onShow(e) { - + this.getLiveRoom(); this.isLogin=!!this.$cookieStorage.get('user_token') let toekn = this.$cookieStorage.get('user_token'); if (toekn) { this.getUserInfo(); - this.getcarNum() + this.getcarNum(); } @@ -266,15 +267,28 @@ onPullDownRefresh(){ wx.showLoading(); this.queryMicroData(); + this.getLiveRoom(); }, // 方法,需要将小程序的方法都放到这个里面 methods: { goLive() { - this.$msg('敬请期待!'); - return - // wx.navigateTo({ - // url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=1` - // }) + // this.$msg('敬请期待!'); + // return + wx.navigateTo({ + url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=`+this.live_roomid + }) + }, + //获取直播房间号 + getLiveRoom(){ + this.$http.get({ + api: '/api/live' + }).then(res => { + console.log('=======',res.data.data) + if(res.data.data != null) { + this.live_roomid = res.data.data.number + } + uni.stopPullDownRefresh(); + }); }, getAlertAd(){ this.$http.get({ From 8aff2d95c88d80d9fee53284a441780c003e5a9b Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Mon, 11 Oct 2021 14:13:05 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index/index/index.vue b/pages/index/index/index.vue index bd3d8c0..dedfcef 100644 --- a/pages/index/index/index.vue +++ b/pages/index/index/index.vue @@ -285,7 +285,7 @@ }).then(res => { console.log('=======',res.data.data) if(res.data.data != null) { - this.live_roomid = res.data.data.number + this.live_roomid = res.data.data.number; } uni.stopPullDownRefresh(); }); From 8ac41fc494d9045cd013c4af90872eed7b680748 Mon Sep 17 00:00:00 2001 From: Enzo <1284707383@qq.com> Date: Mon, 11 Oct 2021 14:55:54 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/article/details.vue | 44 ++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/pages/article/details.vue b/pages/article/details.vue index c846790..34acc92 100644 --- a/pages/article/details.vue +++ b/pages/article/details.vue @@ -1,22 +1,22 @@