From 3a7fed9dc4f223e64332f2155884ea4fae67d99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Tue, 19 May 2020 09:54:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=9B=B4=E6=92=AD=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.js | 6 +++++- index/user.js | 14 ++++++++++++++ project.config.json | 13 ++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/config/config.js b/config/config.js index 2b23156..64390b5 100755 --- a/config/config.js +++ b/config/config.js @@ -318,7 +318,11 @@ var config = { //商场信息接口 getMallInfo: "/mall/mallInfo", // 获取楼层楼座数据 - getbuildingfloorlist:"/wxMallBuilding/getbuildingfloorlist" + getbuildingfloorlist:"/wxMallBuilding/getbuildingfloorlist", + // 获取所有直播间和商品信息 + getReplayList:"/live/replayList", + // 获取直播房间回放数据和商品信息 + getRoomList: "/live/roomList" }, weapp: { AppId: weappId diff --git a/index/user.js b/index/user.js index 4fca82a..184a3be 100644 --- a/index/user.js +++ b/index/user.js @@ -96,8 +96,22 @@ Page({ this.getLocation(); this.updateScene(); this.getRoomId(); + this.getRoomList(); console.log(wx.getExtConfigSync()) }, + //获取房间列表 + getRoomList(){ + debugger + Http.get({ + url: config.api.getRoomList, + data: { + token: app.globalData.token, + appId:config.weapp.AppId + } + }).then(res => { + console.log(res) + }) + }, getRoomId() { let roomId = [3] // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取 let customParams = encodeURIComponent(JSON.stringify({ path: 'pages/index/index', pid: 1 })) // 开发者在直播间页面路径上携带自定义参数(如示例中的path和pid参数),后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断) diff --git a/project.config.json b/project.config.json index b6bb9ba..b6bd9e1 100644 --- a/project.config.json +++ b/project.config.json @@ -36,9 +36,20 @@ "currentL": -1, "list": [] }, - "miniprogram": { + "gamePlugin": { "current": -1, "list": [] + }, + "miniprogram": { + "current": -1, + "list": [ + { + "id": -1, + "name": "pages/bargain/bargainDatail/bargainDatail", + "pathName": "pages/bargain/bargainDatail/bargainDatail", + "scene": null + } + ] } } } \ No newline at end of file