From 3bbfedb6d8a0be0a44e47477d0e31c2e8364a6de Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Fri, 29 Jul 2022 09:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/src/app.config.js | 3 +- weapp/src/config.js | 7 +- weapp/src/packages/video/index.config.js | 3 + weapp/src/packages/video/index.jsx | 85 ++++++++++++++++++++++++ weapp/src/packages/video/index.scss | 28 ++++++++ weapp/src/pages/home/index.jsx | 4 +- 6 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 weapp/src/packages/video/index.config.js create mode 100644 weapp/src/packages/video/index.jsx create mode 100644 weapp/src/packages/video/index.scss diff --git a/weapp/src/app.config.js b/weapp/src/app.config.js index db0918a6..a846996f 100644 --- a/weapp/src/app.config.js +++ b/weapp/src/app.config.js @@ -10,7 +10,8 @@ export default { 'patrol/index', 'patrolView/index', 'changePassword/index', - 'changePassword/success/index' + 'changePassword/success/index', + 'video/index', ] }], permission: { diff --git a/weapp/src/config.js b/weapp/src/config.js index 0182ed94..9648c0ca 100644 --- a/weapp/src/config.js +++ b/weapp/src/config.js @@ -8,9 +8,10 @@ const baseConfig = { }; const development = { - baseUrl: 'https://c5a6-117-90-37-10.ap.ngrok.io', - webUrl: 'https://smartwater.anxinyun.cn', - pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c', + baseUrl: 'http://221.230.55.29:31919', + // baseUrl: 'https://c5a6-117-90-37-10.ap.ngrok.io', + // webUrl: 'https://smartwater.anxinyun.cn', + // pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c', imgUrl: 'http://test.resources.anxinyun.cn/', // requestCache: true, //开启异步请求缓存 ...baseConfig diff --git a/weapp/src/packages/video/index.config.js b/weapp/src/packages/video/index.config.js new file mode 100644 index 00000000..1490b5e0 --- /dev/null +++ b/weapp/src/packages/video/index.config.js @@ -0,0 +1,3 @@ +export default { + navigationBarTitleText: '视频监控' +} \ No newline at end of file diff --git a/weapp/src/packages/video/index.jsx b/weapp/src/packages/video/index.jsx new file mode 100644 index 00000000..adc835ef --- /dev/null +++ b/weapp/src/packages/video/index.jsx @@ -0,0 +1,85 @@ +import React, { useState, useEffect } from 'react' +import Taro from '@tarojs/taro' +import { View, Image, Input, Picker, LivePlayer } from '@tarojs/components' +import request from '@/services/request' +import './index.scss' +import '../patrolView/index.scss' +import patrolIcon from '../../static/img/patrolView/patrol.svg' +import patrolActiveIcon from '../../static/img/patrolView/patrol-active.svg' +import conserveIcon from '../../static/img/patrolView/conserve.svg' +import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg' +import chevronDown from '../../static/img/patrolView/chevron-down.png' +import searchIcon from '../../static/img/patrolView/search.png' + +function Index() { + const [isBus, setIsBus] = useState(true) + const [filterText, setFilterText] = useState('') + const [videoList, setVideoList] = useState([]) + + useEffect(() => { + getVideoList() + }, []) + + const getVideoList = () => { + let nextVideoList = [] + for (let i = 0; i < 10; i++) { + nextVideoList.push({ title: '视频' + i, url: '链接' + i }) + } + setVideoList(nextVideoList) + } + + const onTypeChange = bool => { + setIsBus(bool) + } + + const handleConfirm = e => { + + } + + const handleInput = e => { + + } + + return ( + + + onTypeChange(true)}> + + 公交 + + + onTypeChange(false)}> + + 道路 + + + + + 路段: + + {'请选择'} + + + + + + + + + + { + videoList && videoList.map(v => { + return ( + + {v.title} + + + ) + }) + } + + + ) +} + +export default Index diff --git a/weapp/src/packages/video/index.scss b/weapp/src/packages/video/index.scss new file mode 100644 index 00000000..b69f8771 --- /dev/null +++ b/weapp/src/packages/video/index.scss @@ -0,0 +1,28 @@ +page { + background-color: #f6f6f6; + + .video-box { + padding-top: 180px; + + .video-card { + background-color: #fff; + height: 488px; + margin-bottom: 20px; + display: flex; + flex-direction: column; + align-items: left; + + .title { + height: 88px; + margin-left: 30px; + display: flex; + align-items: center; + } + + .video { + height: 400px; + width: 100%; + } + } + } +} \ No newline at end of file diff --git a/weapp/src/pages/home/index.jsx b/weapp/src/pages/home/index.jsx index 3df1e359..fde2864b 100644 --- a/weapp/src/pages/home/index.jsx +++ b/weapp/src/pages/home/index.jsx @@ -38,7 +38,9 @@ const Index = () => { } function toVideo() { - + Taro.navigateTo({ + url: '/packages/video/index' + }) } return (