@@ -39,20 +39,20 @@ App({ |
||
39 | 39 |
onLaunch() {}, |
40 | 40 |
|
41 | 41 |
onShow(options) { |
42 |
- // wx.navigateTo({ |
|
43 |
- // url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=31` |
|
44 |
- // }) |
|
42 |
+ console.log(options) |
|
45 | 43 |
if ( |
46 | 44 |
options.scene === 1007 || |
47 | 45 |
options.scene === 1008 || |
48 |
- options.scene === 1044 |
|
46 |
+ options.scene === 1044 || |
|
47 |
+ options.scene === 1058 |
|
49 | 48 |
) { |
50 | 49 |
livePlayer |
51 | 50 |
.getShareParams() |
52 | 51 |
.then(res => { |
53 | 52 |
network.liveLogin({ |
54 | 53 |
share_openid: res.share_openid, |
55 |
- room_id: res.room_id |
|
54 |
+ room_id: res.room_id, |
|
55 |
+ scene: options.scene |
|
56 | 56 |
}) |
57 | 57 |
}) |
58 | 58 |
.catch(err => { |
@@ -6,7 +6,8 @@ |
||
6 | 6 |
"template/resultView/resultView", |
7 | 7 |
"pages/live/anchorHome/anchorHome", |
8 | 8 |
"pages/live/order/order", |
9 |
- "template/contactView/contactView" |
|
9 |
+ "template/contactView/contactView", |
|
10 |
+ "template/liveView/liveView" |
|
10 | 11 |
], |
11 | 12 |
"window": { |
12 | 13 |
"backgroundTextStyle": "dark", |
@@ -78,11 +78,18 @@ |
||
78 | 78 |
"scene": null |
79 | 79 |
}, |
80 | 80 |
{ |
81 |
- "id": -1, |
|
82 |
- "name": "pages/commodity/commodity", |
|
83 |
- "pathName": "pages/commodity/commodity", |
|
84 |
- "query": "", |
|
81 |
+ "id": 3, |
|
82 |
+ "name": "template/liveView/liveView", |
|
83 |
+ "pathName": "template/liveView/liveView", |
|
84 |
+ "query": "room_id=32", |
|
85 | 85 |
"scene": null |
86 |
+ }, |
|
87 |
+ { |
|
88 |
+ "id": 4, |
|
89 |
+ "name": "__plugin__/wx2b03c6e691cd7370/pages/live-player-plugin", |
|
90 |
+ "pathName": "__plugin__/wx2b03c6e691cd7370/pages/live-player-plugin", |
|
91 |
+ "query": "room_id=32&type=10", |
|
92 |
+ "scene": 1058 |
|
86 | 93 |
} |
87 | 94 |
] |
88 | 95 |
} |
@@ -0,0 +1,25 @@ |
||
1 |
+const app = getApp() |
|
2 |
+ |
|
3 |
+Page({ |
|
4 |
+ /** |
|
5 |
+ * 页面的初始数据 |
|
6 |
+ */ |
|
7 |
+ data: {}, |
|
8 |
+ |
|
9 |
+ /** |
|
10 |
+ * 生命周期函数--监听页面加载 |
|
11 |
+ */ |
|
12 |
+ onLoad(options) { |
|
13 |
+ wx.hideHomeButton() |
|
14 |
+ const { scene } = wx.getLaunchOptionsSync() |
|
15 |
+ app.network.liveLogin({ |
|
16 |
+ share_openid: '', |
|
17 |
+ room_id: options.room_id, |
|
18 |
+ scene |
|
19 |
+ }) |
|
20 |
+ |
|
21 |
+ wx.redirectTo({ |
|
22 |
+ url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${options.room_id}` |
|
23 |
+ }) |
|
24 |
+ } |
|
25 |
+}) |
@@ -0,0 +1,3 @@ |
||
1 |
+{ |
|
2 |
+ "usingComponents": {} |
|
3 |
+} |
@@ -0,0 +1 @@ |
||
1 |
+ |
@@ -0,0 +1 @@ |
||
1 |
+/* template/liveView/liveView.wxss */ |