Commit d9978c332a44d74c6a675f27c8157a19cdf5a8d3

Authored by season
1 parent 7d0a3c0f

修改回放

Showing 2 changed files with 12 additions and 30 deletions
app.json
1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/video/index", 3 +
4 "pages/index/index/index", 4 "pages/index/index/index",
5 "pages/goods/categoryList/categoryList", 5 "pages/goods/categoryList/categoryList",
6 "pages/cart/cart/cart", 6 "pages/cart/cart/cart",
@@ -82,7 +82,8 @@ @@ -82,7 +82,8 @@
82 "pages/user/assistance/task_assistance", 82 "pages/user/assistance/task_assistance",
83 "pages/user/assistance/friend_assistance", 83 "pages/user/assistance/friend_assistance",
84 "pages/user/assistance/assistance_success", 84 "pages/user/assistance/assistance_success",
85 - "pages/user/assistance/assistance" 85 + "pages/user/assistance/assistance",
  86 + "pages/video/index"
86 87
87 ], 88 ],
88 "permission": { 89 "permission": {
pages/video/index.js
1 -function getRandomColor () {  
2 - let rgb = []  
3 - for (let i = 0 ; i < 3; ++i){  
4 - let color = Math.floor(Math.random() * 256).toString(16)  
5 - color = color.length == 1 ? '0' + color : color  
6 - rgb.push(color)  
7 - }  
8 - return '#' + rgb.join('')  
9 -}  
10 -  
11 Page({ 1 Page({
12 onReady: function (res) { 2 onReady: function (res) {
13 - this.videoContext = wx.createVideoContext('myVideo')  
14 - },  
15 - inputValue: '',  
16 - data: {  
17 - src: '',  
18 - danmuList: [  
19 - {  
20 - text: '第 1s 出现的弹幕',  
21 - color: '#ff0000',  
22 - time: 1  
23 - },  
24 - {  
25 - text: '第 3s 出现的弹幕',  
26 - color: '#ff00ff',  
27 - time: 3  
28 - }]  
29 - }, 3 +
  4 + },
30 bindInputBlur: function(e) { 5 bindInputBlur: function(e) {
31 this.inputValue = e.detail.value 6 this.inputValue = e.detail.value
32 }, 7 },
@@ -57,9 +32,15 @@ Page({ @@ -57,9 +32,15 @@ Page({
57 }, 300) 32 }, 300)
58 }, 33 },
59 34
  35 + //---------分享配置--------
  36 + onShareAppMessage: function (e) {
  37 + return {
  38 + title: "直播视频回放",
  39 + }
  40 + },
60 //调用视频接口 41 //调用视频接口
61 onLoad:function(e){ 42 onLoad:function(e){
62 - var r_id=e.roomid,th=this; 43 + var r_id=e.id,th=this;
63 if(!r_id) r_id=1; 44 if(!r_id) r_id=1;
64 getApp().request.get("/api/wx/weappLiveReplaylist/get?id="+r_id,{ 45 getApp().request.get("/api/wx/weappLiveReplaylist/get?id="+r_id,{
65 data:{stoid:getApp().globalData.setting.stoid}, 46 data:{stoid:getApp().globalData.setting.stoid},