|
@@ -23,6 +23,7 @@ import AndroidUtil from "../../util/AndroidUtil";
|
|
import BasePage from "../BasePage";
|
|
import BasePage from "../BasePage";
|
|
import CourseTitle from "./CourseTitle";
|
|
import CourseTitle from "./CourseTitle";
|
|
import ScheduleFlatItem from "./ScheduleFlatItem";
|
|
import ScheduleFlatItem from "./ScheduleFlatItem";
|
|
|
|
+import CusVideo from "./CusVideo";
|
|
const instructions = Platform.select({
|
|
const instructions = Platform.select({
|
|
ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
|
|
ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
|
|
android:
|
|
android:
|
|
@@ -32,6 +33,20 @@ const instructions = Platform.select({
|
|
|
|
|
|
type Props = {};
|
|
type Props = {};
|
|
export default class SchedulePage extends BasePage {
|
|
export default class SchedulePage extends BasePage {
|
|
|
|
+ constructor(props) {
|
|
|
|
+ super(props);
|
|
|
|
+ this.state = {
|
|
|
|
+ videoImg_flex: 1,
|
|
|
|
+ videoImg_width: "100%",
|
|
|
|
+ videoImg_height: "100%",
|
|
|
|
+ video_flex: 0,
|
|
|
|
+ video_width: "0%",
|
|
|
|
+ video_height: "0%",
|
|
|
|
+ video_uri:
|
|
|
|
+ "http://efunvideo.ai160.com/vs2m/056/05602002/05602002001/05602002001.m3u8"
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+
|
|
render() {
|
|
render() {
|
|
return (
|
|
return (
|
|
<View
|
|
<View
|
|
@@ -46,17 +61,15 @@ export default class SchedulePage extends BasePage {
|
|
<CourseTitle
|
|
<CourseTitle
|
|
width={this.getWindowWidth()}
|
|
width={this.getWindowWidth()}
|
|
title="第12周 爱上幼儿园"
|
|
title="第12周 爱上幼儿园"
|
|
- // backPress={() => this.goBack()}
|
|
|
|
- backPress={() => alert("点击返回")}
|
|
|
|
|
|
+ backPress={() => this.goBack()}
|
|
|
|
+ // backPress={() => alert("点击返回")}
|
|
sharedpress={() => alert("点击分享")}
|
|
sharedpress={() => alert("点击分享")}
|
|
/>
|
|
/>
|
|
</View>
|
|
</View>
|
|
<View
|
|
<View
|
|
style={{
|
|
style={{
|
|
flex: 281,
|
|
flex: 281,
|
|
- width: "100%",
|
|
|
|
- justifyContent: "center",
|
|
|
|
- alignItems: "center"
|
|
|
|
|
|
+ width: "100%"
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
<Image
|
|
<Image
|
|
@@ -65,9 +78,18 @@ export default class SchedulePage extends BasePage {
|
|
"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg"
|
|
"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg"
|
|
}}
|
|
}}
|
|
style={{
|
|
style={{
|
|
- flex: 1,
|
|
|
|
- width: "100%",
|
|
|
|
- height: "100%"
|
|
|
|
|
|
+ flex: this.state.videoImg_flex,
|
|
|
|
+ width: this.state.videoImg_width,
|
|
|
|
+ height: this.state.videoImg_height
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ <CusVideo
|
|
|
|
+ //无法切换视频
|
|
|
|
+ uri={this.state.video_uri}
|
|
|
|
+ style={{
|
|
|
|
+ flex: this.state.video_flex,
|
|
|
|
+ width: this.state.video_width,
|
|
|
|
+ height: this.state.video_height
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
</View>
|
|
</View>
|
|
@@ -99,35 +121,71 @@ export default class SchedulePage extends BasePage {
|
|
typecolor: "#74E0FF",
|
|
typecolor: "#74E0FF",
|
|
typename: "习惯养成",
|
|
typename: "习惯养成",
|
|
videoname: "碗里不剩一粒米",
|
|
videoname: "碗里不剩一粒米",
|
|
- videourl: "xxxx"
|
|
|
|
|
|
+ videourl: "碗里不剩一粒米xxxx"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
key: 2,
|
|
key: 2,
|
|
typecolor: "#FB5B76",
|
|
typecolor: "#FB5B76",
|
|
typename: "品格礼仪",
|
|
typename: "品格礼仪",
|
|
videoname: "我有很多朋友",
|
|
videoname: "我有很多朋友",
|
|
- videourl: "xxxx"
|
|
|
|
|
|
+ videourl: "我有很多朋友xxxx"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
key: 3,
|
|
key: 3,
|
|
typecolor: "#EC48E1",
|
|
typecolor: "#EC48E1",
|
|
typename: "自我保护",
|
|
typename: "自我保护",
|
|
videoname: "小猫喵喵叫",
|
|
videoname: "小猫喵喵叫",
|
|
- videourl: "xxxx"
|
|
|
|
|
|
+ videourl: "小猫喵喵叫xxxx"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
key: 4,
|
|
key: 4,
|
|
typecolor: "#39D6B9",
|
|
typecolor: "#39D6B9",
|
|
typename: "亲子游戏",
|
|
typename: "亲子游戏",
|
|
videoname: "安静的睡前游戏-全家人都睡了",
|
|
videoname: "安静的睡前游戏-全家人都睡了",
|
|
- videourl: "xxxx"
|
|
|
|
|
|
+ videourl: "安静的睡前游戏xxxx"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
key: 5,
|
|
key: 5,
|
|
typecolor: "#3397F0",
|
|
typecolor: "#3397F0",
|
|
typename: "欢乐音乐",
|
|
typename: "欢乐音乐",
|
|
videoname: "小鸡捉虫子",
|
|
videoname: "小鸡捉虫子",
|
|
- videourl: "xxxx"
|
|
|
|
|
|
+ videourl: "小鸡捉虫子xxxx"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 11,
|
|
|
|
+ typecolor: "#74E0FF",
|
|
|
|
+ typename: "习惯养成",
|
|
|
|
+ videoname: "碗里不剩一粒米",
|
|
|
|
+ videourl: "碗里不剩一粒米xxxx"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 12,
|
|
|
|
+ typecolor: "#FB5B76",
|
|
|
|
+ typename: "品格礼仪",
|
|
|
|
+ videoname: "我有很多朋友",
|
|
|
|
+ videourl: "我有很多朋友xxxx"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 13,
|
|
|
|
+ typecolor: "#EC48E1",
|
|
|
|
+ typename: "自我保护",
|
|
|
|
+ videoname: "小猫喵喵叫",
|
|
|
|
+ videourl: "小猫喵喵叫xxxx"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 14,
|
|
|
|
+ typecolor: "#39D6B9",
|
|
|
|
+ typename: "亲子游戏",
|
|
|
|
+ videoname: "安静的睡前游戏-全家人都睡了",
|
|
|
|
+ videourl: "安静的睡前游戏xxxx"
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 15,
|
|
|
|
+ typecolor: "#3397F0",
|
|
|
|
+ typename: "欢乐音乐",
|
|
|
|
+ videoname: "小鸡捉虫子",
|
|
|
|
+ videourl:
|
|
|
|
+ "http://efunvideo.ai160.com/vs2m/056/05602002/05602002001/05602002001.m3u8"
|
|
}
|
|
}
|
|
]}
|
|
]}
|
|
/>
|
|
/>
|
|
@@ -141,7 +199,21 @@ export default class SchedulePage extends BasePage {
|
|
width={this.getWindowWidth() * 0.95}
|
|
width={this.getWindowWidth() * 0.95}
|
|
height={60}
|
|
height={60}
|
|
data={data}
|
|
data={data}
|
|
|
|
+ onPress={() => this.aa(data.videourl)}
|
|
/>
|
|
/>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ aa(url) {
|
|
|
|
+ alert(url);
|
|
|
|
+ this.setState({
|
|
|
|
+ videoImg_flex: 0,
|
|
|
|
+ videoImg_width: "0%",
|
|
|
|
+ videoImg_height: "0%",
|
|
|
|
+ video_flex: 1,
|
|
|
|
+ video_width: "100%",
|
|
|
|
+ video_height: "100%",
|
|
|
|
+ video_uri: url
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|