Commit 7d0a3c0f19c7f017a9ce28cb648f2497403351c7

Authored by yvan.ni
1 parent aaed0818

视频回放页面的修复

1.调接口播放视频
2.导航球
3.好物推荐
pages/video/index.js
... ... @@ -59,11 +59,14 @@ Page({
59 59  
60 60 //调用视频接口
61 61 onLoad:function(e){
62   - var r_id=e.roomid,th=this;
63   - getApp().request.get("",{
64   - data:{},
  62 + var r_id=e.roomid,th=this;
  63 + if(!r_id) r_id=1;
  64 + getApp().request.get("/api/wx/weappLiveReplaylist/get?id="+r_id,{
  65 + data:{stoid:getApp().globalData.setting.stoid},
65 66 success:function(res){
66   -
  67 + if(res.data.code==0){
  68 + th.setData({src:res.data.data.media_url})
  69 + }
67 70 }
68 71 })
69 72 },
... ...
pages/video/index.json
1 1 {
2   - "navigationBarTitleText": "视频",
  2 + "navigationBarTitleText": "直播视频回放",
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5   - "goods_recommend":"/components/goods_list/goods_list"
  5 + "goods_recommend":"/components/goods_list/goods_list",
  6 + "nav_box": "/components/nav_box/nav_box"
6 7 }
7 8 }
8 9 \ No newline at end of file
... ...
pages/video/index.wxml
1 1  
2 2 <view class="video">
3 3 <video
4   - src="{{url}}"
  4 + src="{{src}}"
5 5 controls
6 6 show-fullscreen-btn
7 7 show-mute-btn
... ... @@ -41,7 +41,7 @@
41 41  
42 42 </view>
43 43  
44   -
45   -
46 44 <!-- 商品列表组件 -->
47   -<goods_recommend id="goods_list"></goods_recommend>
48 45 \ No newline at end of file
  46 +<goods_recommend id="goods_list"></goods_recommend>
  47 +<!-- 制作一个圆球导航 -->
  48 +<nav_box></nav_box>
49 49 \ No newline at end of file
... ...