Commit f751e35fbab64ae3a8abf346f872448898eb1aba
1 parent
646f8784
好物推荐
Showing
4 changed files
with
100 additions
and
3 deletions
pages/video/index.js
@@ -48,5 +48,24 @@ Page({ | @@ -48,5 +48,24 @@ Page({ | ||
48 | text: this.inputValue, | 48 | text: this.inputValue, |
49 | color: getRandomColor() | 49 | color: getRandomColor() |
50 | }) | 50 | }) |
51 | + }, | ||
52 | + onShow:function(){ | ||
53 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | ||
54 | + goods_list.init(); | ||
55 | + setTimeout(function() { | ||
56 | + goods_list.get_list(); | ||
57 | + }, 300) | ||
58 | + }, | ||
59 | + | ||
60 | + //调用视频接口 | ||
61 | + onLoad:function(e){ | ||
62 | + var r_id=e.roomid,th=this; | ||
63 | + getApp().request.get("",{ | ||
64 | + data:{}, | ||
65 | + success:function(res){ | ||
66 | + | ||
67 | + } | ||
68 | + }) | ||
69 | + | ||
51 | } | 70 | } |
52 | }) | 71 | }) |
53 | \ No newline at end of file | 72 | \ No newline at end of file |
pages/video/index.json
1 | { | 1 | { |
2 | "navigationBarTitleText": "视频", | 2 | "navigationBarTitleText": "视频", |
3 | - "enablePullDownRefresh": false | 3 | + "enablePullDownRefresh": false, |
4 | + "usingComponents": { | ||
5 | + "goods_recommend":"/components/goods_list/goods_list" | ||
6 | + } | ||
4 | } | 7 | } |
5 | \ No newline at end of file | 8 | \ No newline at end of file |
pages/video/index.wxml
1 | 1 | ||
2 | <view class="video"> | 2 | <view class="video"> |
3 | <video | 3 | <video |
4 | - src="http://1258344707.vod2.myqcloud.com/1b87576bvodcq1258344707/54fc82435285890799847056279/playlist_eof.m3u8" | 4 | + src="{{url}}" |
5 | controls | 5 | controls |
6 | show-fullscreen-btn | 6 | show-fullscreen-btn |
7 | show-mute-btn | 7 | show-mute-btn |
@@ -10,5 +10,38 @@ | @@ -10,5 +10,38 @@ | ||
10 | binderror="error" | 10 | binderror="error" |
11 | bindpause="pause" | 11 | bindpause="pause" |
12 | bindtimeupdate="timeupdate"></video> | 12 | bindtimeupdate="timeupdate"></video> |
13 | +</view> | ||
13 | 14 | ||
14 | -</view> | ||
15 | \ No newline at end of file | 15 | \ No newline at end of file |
16 | + | ||
17 | + <!-- 标题 --> | ||
18 | + <view class="title"> | ||
19 | + <!-- 中文名标题 --> | ||
20 | + <view class="China flex-level"> | ||
21 | + <view class="line flex-vertical"> | ||
22 | + <view class="one"></view> | ||
23 | + <view class="two"></view> | ||
24 | + <view class="three"></view> | ||
25 | + </view> | ||
26 | + | ||
27 | + <view class="Recommend flex-level" bindtap="requestList">好物推荐</view> | ||
28 | + | ||
29 | + <view class="line flex-vertical"> | ||
30 | + <view class="three"></view> | ||
31 | + <view class="two"></view> | ||
32 | + <view class="one"></view> | ||
33 | + </view> | ||
34 | + </view> | ||
35 | + | ||
36 | + <!-- 英文标题 --> | ||
37 | + <view class="english flex-center"> | ||
38 | + <view class="silk"></view> | ||
39 | + <view class="esh five-level-word">GOOD HOT THING</view> | ||
40 | + <view class="silk"></view> | ||
41 | + </view> | ||
42 | + | ||
43 | + </view> | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | +<!-- 商品列表组件 --> | ||
48 | +<goods_recommend id="goods_list"></goods_recommend> | ||
16 | \ No newline at end of file | 49 | \ No newline at end of file |
pages/video/index.wxss
@@ -4,4 +4,46 @@ | @@ -4,4 +4,46 @@ | ||
4 | 4 | ||
5 | video { | 5 | video { |
6 | width: 100%; | 6 | width: 100%; |
7 | +} | ||
8 | + | ||
9 | +/* 热门好物 */ | ||
10 | + | ||
11 | +.title .China { | ||
12 | + width: 100%; | ||
13 | + margin-top: 10rpx; | ||
14 | + margin-bottom: 10rpx; | ||
15 | + line-height: 0rpx; | ||
16 | +} | ||
17 | + | ||
18 | +.title .China .line view { | ||
19 | + width: 2rpx; | ||
20 | +} | ||
21 | + | ||
22 | +.title .China .line { | ||
23 | + height: 40rpx; | ||
24 | + color: rgb(51, 51, 51); | ||
25 | +} | ||
26 | + | ||
27 | +.title .China .line view { | ||
28 | + border-left: 3rpx solid #000; | ||
29 | + margin-left: 5rpx; | ||
30 | +} | ||
31 | + | ||
32 | +.title .China .line .one { | ||
33 | + height: 23rpx; | ||
34 | +} | ||
35 | + | ||
36 | +.title .China .line .two { | ||
37 | + height: 15rpx; | ||
38 | +} | ||
39 | + | ||
40 | +.title .China .line .three { | ||
41 | + height: 18rpx; | ||
42 | +} | ||
43 | + | ||
44 | +.title .China .Recommend { | ||
45 | + margin: 0rpx 20rpx; | ||
46 | + font-size: 28rpx; | ||
47 | + line-height: 39rpx; | ||
48 | + font-weight: bold; | ||
7 | } | 49 | } |
8 | \ No newline at end of file | 50 | \ No newline at end of file |