react 返回上一页

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import * as React from 'react'
import { Layout } from 'antd';
import creatHistory from 'history/createHashHistory'  //返回上一页这段代码
const history = creatHistory();//返回上一页这段代码
import './index.less'
const { Header,  Sider, Content } = Layout;
export interface IProps {
    test?: any
    history?:any
     
  }
  interface IState {
     
     
  }
export default class ReachInfos extends React.Component<IProps, IState> {
    constructor(props: IProps) {
      super(props)
    }
    goBackPage = () => {
      history.goBack();  //返回上一页这段代码
       
    }
    render(){
        return (
            <div className="videoDetail">
              <Layout>
                <Header>
                  <div className="headTitle">
                      <span onClick={this.goBackPage} className="goBack"> <返回 </span>
                      <span className="title">视频详情</span>
                  </div>
                </Header>
                <Layout>
                  <Sider>
                    <h4>视频信息:</h4>
 
                    <ul>
                      <li>拍摄时间:</li>
                      <li>2018-10-11</li>
                    </ul>
                    <ul>
                      <li>拍摄地址:</li>
                      <li>雁塔区</li>
                    </ul>
                     
                  </Sider>
                  <Content>
                  <iframe src="http://gbs.liveqing.com:10000/play.html?serial=34020000001110000033&code=34020000001320000101&aspect=fullscreen" width="100%" height="360" allow="autoplay; fullscreen"></iframe>
                    {/* <video autoPlay controls width="100%" src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"></video> */}
                  </Content>
                  <Sider>Sider</Sider>
                </Layout>
                
              </Layout>
            </div>
        )
    }
}

  

posted @   Webwhl  阅读(8366)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 提示词工程——AI应用必不可少的技术
· 地球OL攻略 —— 某应届生求职总结
· 字符编码:从基础到乱码解决
· SpringCloud带你走进微服务的世界
点击右上角即可分享
微信分享提示