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