浏览代码

[直播接口调用修改]

livetest
刘晖 5 年前
父节点
当前提交
3a7fed9dc4
共有 3 个文件被更改,包括 31 次插入2 次删除
  1. +5
    -1
      config/config.js
  2. +14
    -0
      index/user.js
  3. +12
    -1
      project.config.json

+ 5
- 1
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


+ 14
- 0
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个字符,超过部分会被截断)


+ 12
- 1
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
}
]
}
}
}

正在加载...
取消
保存