@@ -22,21 +22,40 @@ app.routerInterceptor.checkLoginStatus({ |
||
22 | 22 |
|
23 | 23 |
getData(options) { |
24 | 24 |
const { room_id } = options |
25 |
+ const { anchor_id } = options |
|
25 | 26 |
const that = this |
26 |
- app.network.post({ |
|
27 |
- url: app.urls.LIVE.ROOM_ANCHOR, |
|
28 |
- data: { |
|
29 |
- room_id |
|
30 |
- }, |
|
31 |
- success(res) { |
|
32 |
- const { anchor, rooms } = res.data |
|
33 |
- WxParse.wxParse('intro', 'html', anchor.anchor_intro, that, 5) |
|
34 |
- that.setData({ |
|
35 |
- anchor, |
|
36 |
- rooms, |
|
37 |
- isLodding: true |
|
38 |
- }) |
|
39 |
- } |
|
40 |
- }) |
|
27 |
+ if (room_id !== undefined) { |
|
28 |
+ app.network.post({ |
|
29 |
+ url: app.urls.LIVE.ROOM_ANCHOR, |
|
30 |
+ data: { |
|
31 |
+ room_id |
|
32 |
+ }, |
|
33 |
+ success(res) { |
|
34 |
+ const { anchor, rooms } = res.data |
|
35 |
+ WxParse.wxParse('intro', 'html', anchor.anchor_intro, that, 5) |
|
36 |
+ that.setData({ |
|
37 |
+ anchor, |
|
38 |
+ rooms, |
|
39 |
+ isLodding: true |
|
40 |
+ }) |
|
41 |
+ } |
|
42 |
+ }) |
|
43 |
+ } else { |
|
44 |
+ app.network.post({ |
|
45 |
+ url: app.urls.LIVE.ANCHOR_DETAIL, |
|
46 |
+ data: { |
|
47 |
+ anchor_id |
|
48 |
+ }, |
|
49 |
+ success(res) { |
|
50 |
+ const { anchor, rooms } = res.data |
|
51 |
+ WxParse.wxParse('intro', 'html', anchor.anchor_intro, that, 5) |
|
52 |
+ that.setData({ |
|
53 |
+ anchor, |
|
54 |
+ rooms, |
|
55 |
+ isLodding: true |
|
56 |
+ }) |
|
57 |
+ } |
|
58 |
+ }) |
|
59 |
+ } |
|
41 | 60 |
} |
42 | 61 |
}) |
@@ -81,7 +81,7 @@ |
||
81 | 81 |
"id": 3, |
82 | 82 |
"name": "template/liveView/liveView", |
83 | 83 |
"pathName": "template/liveView/liveView", |
84 |
- "query": "room_id=32", |
|
84 |
+ "query": "room_id=17", |
|
85 | 85 |
"scene": null |
86 | 86 |
}, |
87 | 87 |
{ |
@@ -90,6 +90,13 @@ |
||
90 | 90 |
"pathName": "__plugin__/wx2b03c6e691cd7370/pages/live-player-plugin", |
91 | 91 |
"query": "room_id=32&type=10", |
92 | 92 |
"scene": 1058 |
93 |
+ }, |
|
94 |
+ { |
|
95 |
+ "id": 5, |
|
96 |
+ "name": "pages/live/anchorHome/anchorHome", |
|
97 |
+ "pathName": "pages/live/anchorHome/anchorHome", |
|
98 |
+ "query": "room_id=33", |
|
99 |
+ "scene": null |
|
93 | 100 |
} |
94 | 101 |
] |
95 | 102 |
} |
@@ -10,6 +10,7 @@ module.exports = { |
||
10 | 10 |
ORDER_CANCEL: `${config.baseURL}/api/pay/wx/order/cancel`, |
11 | 11 |
|
12 | 12 |
LIVE: { |
13 |
+ ANCHOR_DETAIL: `${config.baseURL}/api/live/anchor/detail`, |
|
13 | 14 |
GOODS_DETAIL: `${config.baseURL}/api/live/goods/detail`, |
14 | 15 |
ORDER_CREATE: `${config.baseURL}/api/live/order/create`, |
15 | 16 |
ORDER_CANCEL: `${config.baseURL}/api/live/order/cancel`, |