Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client-taro
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9f545820
authored
Dec 27, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改流程
parent
24f55c42
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
141 additions
and
110 deletions
+141
-110
src/app.tsx
+2
-6
src/common/index.ts
+10
-4
src/pages/home/device/device_list/index.tsx
+2
-6
src/pages/home/device/group_list/index.tsx
+2
-5
src/pages/home/device/index.tsx
+2
-6
src/pages/home/device/modal/index.tsx
+0
-1
src/pages/home/device/shop_list/index.tsx
+2
-5
src/pages/home/film/index.tsx
+2
-6
src/pages/home/film/schedule_list/index.tsx
+2
-5
src/pages/home/tempaltes/collection.tsx
+3
-5
src/pages/home/tempaltes/conpoments/temp_detail_content/index.scss
+21
-0
src/pages/home/tempaltes/conpoments/temp_detail_content/index.tsx
+32
-7
src/pages/home/tempaltes/conpoments/temp_item/index.tsx
+18
-16
src/pages/home/tempaltes/conpoments/temp_item2/index.tsx
+18
-16
src/pages/home/tempaltes/film_detail.tsx
+3
-7
src/pages/home/tempaltes/film_edit.tsx
+1
-1
src/pages/home/tempaltes/film_edit_info.tsx
+0
-1
src/pages/home/tempaltes/index.tsx
+3
-5
src/pages/home/tempaltes/scss/detail.scss
+3
-2
src/pages/home/user/index.tsx
+3
-5
src/pages/system/wifi_list/index.tsx
+12
-1
No files found.
src/app.tsx
View file @
9f545820
...
...
@@ -6,7 +6,7 @@ import Index from './pages/index'
import
configStore
from
'./store'
import
token
from
'./common/token'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./app.scss'
// import 'taro-ui/dist/style/index.scss'
...
...
@@ -115,11 +115,7 @@ class App extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
// constructor(props: any) {
// super(props)
...
...
src/common/index.ts
View file @
9f545820
export
const
FETCH_TIME_OUT
=
5000
//
export const BASE_URL = 'https://server.bdideal.com'
//
export const WEBVIEW_URL = 'https://visual.bdideal.com'
export
const
BASE_URL
=
'https://dev-server.bdideal.com'
export
const
WEBVIEW_URL
=
'https://dev-visual.bdideal.com'
export
const
BASE_URL
=
'https://server.bdideal.com'
export
const
WEBVIEW_URL
=
'https://visual.bdideal.com'
//
export const BASE_URL = 'https://dev-server.bdideal.com'
//
export const WEBVIEW_URL = 'https://dev-visual.bdideal.com'
// export const WEBVIEW_URL = 'http://127.0.0.1:8080'
/** 蓝牙的服务 uuid */
...
...
@@ -20,3 +20,9 @@ export const POST_WIFI_PASS_ID = '000088A2-0000-1000-8000-00805F9B34FB'
/** 提交WiFi密码特征值 uuid */
export
const
DEVICE_TOKEN_ID
=
'0000888A-0000-1000-8000-00805F9B34FB'
export
const
DEVICE_TOKEN_TOKEN
=
'000088A3-0000-1000-8000-00805F9B34FB'
export
const
defaultShareMessage
=
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'万屏互联新视界'
}
src/pages/home/device/device_list/index.tsx
View file @
9f545820
...
...
@@ -10,7 +10,7 @@ import DeviceItem from '@/conpoments/device_item'
import
{
getFilmList
}
from
'@/actions/asyncCounter'
import
{
showMyToast
,
getBLEState
,
getBLEData
}
from
'@/common/utils'
import
Ble
from
'@/common/bluetooth'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./index.scss'
export
interface
IDeviceItem
{
filmId
:
any
...
...
@@ -214,11 +214,7 @@ class MyDevice extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imgUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
render
()
{
...
...
src/pages/home/device/group_list/index.tsx
View file @
9f545820
...
...
@@ -6,6 +6,7 @@ import Taro, { Component, Config } from '@tarojs/taro'
import
{
View
,
Text
,
Input
,
Image
}
from
'@tarojs/components'
import
Modal
from
'@/conpoments/modal'
import
{
showMyToast
}
from
'@/common/utils'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./index.scss'
export
interface
IDeviceItem
{
...
...
@@ -69,11 +70,7 @@ class DeviceGroup extends Component {
this
.
getDate
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
componentDidShow
()
{
this
.
page
=
1
...
...
src/pages/home/device/index.tsx
View file @
9f545820
...
...
@@ -7,7 +7,7 @@ import Taro, { Component, Config } from '@tarojs/taro'
import
Modal
from
'./modal/index'
import
'./index.scss'
import
{
View
,
Image
}
from
'@tarojs/components'
import
{
defaultShareMessage
}
from
'@/common/index'
type
PageStateProps
=
{}
type
PageDispatchProps
=
{}
...
...
@@ -46,11 +46,7 @@ class Device extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
componentDidMount
()
{
Taro
.
setNavigationBarTitle
({
...
...
src/pages/home/device/modal/index.tsx
View file @
9f545820
...
...
@@ -48,7 +48,6 @@ class Modal extends Component {
onClose
,
marginTop
=
'-50px'
}
=
this
.
props
console
.
log
(
onCancel
,
onClose
,
onConfirm
)
return
(
<
View
className=
"modal"
onClick=
{
this
.
cancel
}
>
<
View
className=
"modal-wrapper"
style=
{
{
marginTop
}
}
>
...
...
src/pages/home/device/shop_list/index.tsx
View file @
9f545820
...
...
@@ -8,6 +8,7 @@ import { View, Text } from '@tarojs/components'
import
DeviceItem
from
'@/conpoments/shop_device_item'
import
{
getShopDeviceList
}
from
'@/actions/asyncCounter'
import
{
showMyToast
}
from
'@/common/utils'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./index.scss'
export
interface
IDeviceItem
{
...
...
@@ -138,11 +139,7 @@ class MyDevice extends Component {
})
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
shouldComponentUpdate
(
nextProps
:
IProps
,
_nextState
)
{
const
{
list
}
=
this
.
props
...
...
src/pages/home/film/index.tsx
View file @
9f545820
...
...
@@ -3,7 +3,7 @@ import ScheduleList from './schedule_list'
import
{
ComponentClass
}
from
'react'
import
{
AtTabs
,
AtTabsPane
}
from
'taro-ui'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./index.scss'
import
{
View
}
from
'@tarojs/components'
...
...
@@ -41,11 +41,7 @@ class Device extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
changePage
=
value
=>
{
...
...
src/pages/home/film/schedule_list/index.tsx
View file @
9f545820
...
...
@@ -5,6 +5,7 @@ import { showMyToast } from '@/common/utils'
import
ListView
from
'@/conpoments/list_view'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
{
AtSwipeAction
}
from
'taro-ui'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./index.scss'
...
...
@@ -57,11 +58,7 @@ class Schedule extends Component {
}
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
async
componentWillMount
()
{
this
.
getData
()
...
...
src/pages/home/tempaltes/collection.tsx
View file @
9f545820
...
...
@@ -9,6 +9,8 @@ import Taro, { Component, Config } from '@tarojs/taro'
import
CollectionTtem
from
'@/conpoments/collection_item'
import
TempDetail
from
'./detail'
import
events
from
'@/common/events'
import
{
defaultShareMessage
}
from
'@/common/index'
import
'./scss/index.scss'
type
PageStateProps
=
{
...
...
@@ -83,11 +85,7 @@ class Collection extends Component {
this
.
getData
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
componentDidShow
()
{
this
.
isShow
=
true
...
...
src/pages/home/tempaltes/conpoments/temp_detail_content/index.scss
View file @
9f545820
...
...
@@ -26,4 +26,25 @@
justify-content
:
space-between
;
}
}
.no-films-container
{
.no-films-icon
{
width
:
201
.5px
;
display
:
block
;
height
:
128
.5px
;
margin
:
0
auto
;
}
.no-films-tips
{
padding-top
:
10px
;
line-height
:
40px
;
font-size
:
28px
;
color
:
rgba
(
102
,
102
,
102
,
1
);
text-align
:
center
;
.yellow
{
color
:
#ff9110
;
}
}
}
}
src/pages/home/tempaltes/conpoments/temp_detail_content/index.tsx
View file @
9f545820
import
TempItem
from
'../temp_item2'
import
DetailTop
from
'../detail_top'
import
{
View
,
Text
}
from
'@tarojs/components'
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
Taro
from
'@tarojs/taro'
import
'./index.scss'
interface
IProps
{
detailData
:
any
filmDataList
:
any
[]
templateId
?:
string
onCreate
?:
()
=>
void
}
export
default
function
TempDetailContent
(
props
:
IProps
)
{
const
{
detailData
,
filmDataList
,
templateId
}
=
props
console
.
log
(
templateId
,
'TempDetailContent'
)
//
console.log(templateId, 'TempDetailContent')
if
(
!
templateId
)
{
return
null
}
...
...
@@ -21,10 +22,34 @@ export default function TempDetailContent(props: IProps) {
<
DetailTop
{
...
Object
.
assign
(
detailData
,
{
templateId
})}
templateId2=
{
templateId
}
/>
<
View
className=
"temp-detail-list"
>
<
Text
className=
"temp-detail-list-title"
>
创建过的作品(
{
filmDataList
.
length
}
)
</
Text
>
<
View
className=
"temp-detail-list-content"
>
{
filmDataList
&&
filmDataList
.
map
(
item
=>
<
TempItem
{
...
item
}
key=
{
item
.
templateId
}
/>)
}
</
View
>
{
filmDataList
&&
filmDataList
.
length
&&
(
<
View
>
<
Text
className=
"temp-detail-list-title"
>
创建过的作品(
{
filmDataList
.
length
}
)
</
Text
>
<
View
className=
"temp-detail-list-content"
>
{
filmDataList
&&
filmDataList
.
map
(
item
=>
<
TempItem
{
...
item
}
key=
{
item
.
templateId
}
/>)
}
</
View
>
</
View
>
)
}
{
(
!
filmDataList
||
!
filmDataList
.
length
)
&&
(
<
View
className=
"no-films-container"
onClick=
{
()
=>
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=${templateId}`
})
}
}
>
<
Image
className=
"no-films-icon"
src=
"http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/no-films.png"
/>
<
View
className=
"no-films-tips"
>
<
View
>
该模版下您未创建作
}
品
</
View
>
您可通过点击上方
<
Text
className=
"yellow"
>
+号
</
Text
>
创建作品
</
View
>
<
/
View
>
)}
</
View
>
<
/
View
>
)
...
...
src/pages/home/tempaltes/conpoments/temp_item/index.tsx
View file @
9f545820
...
...
@@ -33,22 +33,24 @@ class TempItem extends Component {
title
:
'加载中'
,
mask
:
true
})
api
.
tempalte
.
getTempalteFilmCount
(
templateId
)
.
then
(
res
=>
{
if
(
res
.
data
===
0
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
templateId
}
`
})
}
else
{
// Taro.navigateTo({ url: `/pages/home/tempaltes/detail?templateId=${templateId}` })
events
.
emit
(
'detailShow'
,
templateId
)
}
this
.
isload
=
false
Taro
.
hideLoading
()
})
.
catch
(()
=>
{
this
.
isload
=
false
Taro
.
hideLoading
()
})
events
.
emit
(
'detailShow'
,
templateId
)
Taro
.
hideLoading
()
// api.tempalte
// .getTempalteFilmCount(templateId)
// .then(res => {
// if (res.data === 0) {
// Taro.navigateTo({ url: `/pages/home/tempaltes/film_detail?templateId=${templateId}` })
// } else {
// // Taro.navigateTo({ url: `/pages/home/tempaltes/detail?templateId=${templateId}` })
// events.emit('detailShow', templateId)
// }
// this.isload = false
// Taro.hideLoading()
// })
// .catch(() => {
// this.isload = false
// Taro.hideLoading()
// })
}
}
else
{
setTimeout
(()
=>
{
...
...
src/pages/home/tempaltes/conpoments/temp_item2/index.tsx
View file @
9f545820
...
...
@@ -32,22 +32,24 @@ class TempItem extends Component {
title
:
'加载中'
,
mask
:
true
})
api
.
tempalte
.
getTempalteFilmCount
(
templateId
)
.
then
(
res
=>
{
if
(
res
.
data
===
0
)
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/film_detail?templateId=
${
templateId
}
`
})
}
else
{
Taro
.
navigateTo
({
url
:
`/pages/home/tempaltes/detail?templateId=
${
templateId
}
`
})
events
.
emit
(
'detailShow'
,
templateId
)
}
this
.
isload
=
false
Taro
.
hideLoading
()
})
.
catch
(()
=>
{
this
.
isload
=
false
Taro
.
hideLoading
()
})
events
.
emit
(
'detailShow'
,
templateId
)
Taro
.
hideLoading
()
// api.tempalte
// .getTempalteFilmCount(templateId)
// .then(res => {
// if (res.data === 0) {
// Taro.navigateTo({ url: `/pages/home/tempaltes/film_detail?templateId=${templateId}` })
// } else {
// Taro.navigateTo({ url: `/pages/home/tempaltes/detail?templateId=${templateId}` })
// events.emit('detailShow', templateId)
// }
// this.isload = false
// Taro.hideLoading()
// })
// .catch(() => {
// this.isload = false
// Taro.hideLoading()
// })
}
}
else
{
setTimeout
(()
=>
{
...
...
src/pages/home/tempaltes/film_detail.tsx
View file @
9f545820
...
...
@@ -6,8 +6,9 @@ import DeviceItem from '@/conpoments/device_item'
import
{
showMyToast
}
from
'@/common/utils'
import
Modal
from
'@/conpoments/modal'
import
token
from
'@/common/token'
import
{
WEBVIEW_URL
}
from
'@/common/index'
import
{
WEBVIEW_URL
,
defaultShareMessage
}
from
'@/common/index'
import
'./scss/film_detail.scss'
import
api
from
'@/api/index'
type
PageStateProps
=
{}
...
...
@@ -165,18 +166,13 @@ class FilmDetail extends Component {
Taro
.
hideLoading
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
render
()
{
const
{
filmInfo
,
filmList
,
showModal
,
filmId
}
=
this
.
state
const
templateId
=
this
.
$router
.
params
.
templateId
filmInfo
.
templateName
=
filmInfo
.
filmName
filmInfo
.
templateDescribe
=
filmInfo
.
filmDescribe
console
.
log
(
'film-detailRender'
)
return
(
<
View
className=
"film-detail"
>
{
/* <View className="film-detail-scroll">
...
...
src/pages/home/tempaltes/film_edit.tsx
View file @
9f545820
...
...
@@ -242,7 +242,7 @@ class FilmDetail extends Component {
filmInfo
.
templateName
=
filmInfo
.
filmName
filmInfo
.
templateDescribe
=
filmInfo
.
filmDescribe
const
pageList
=
filmData
.
pageList
||
[]
console
.
log
(
'film-edit render'
,
filmInfo
)
//
console.log('film-edit render', filmInfo)
return
(
<
View
className=
"film-detail"
>
<
View
className=
"film-detail-scroll"
>
...
...
src/pages/home/tempaltes/film_edit_info.tsx
View file @
9f545820
...
...
@@ -115,7 +115,6 @@ class FilmDetail extends Component {
const
{
filmInfo
,
filmList
,
showModal
,
filmId
}
=
this
.
state
filmInfo
.
templateName
=
filmInfo
.
filmName
filmInfo
.
templateDescribe
=
filmInfo
.
filmDescribe
console
.
log
(
'film-detailRender'
)
return
(
<
View
className=
"film-detail"
>
<
View
className=
"film-modal"
>
...
...
src/pages/home/tempaltes/index.tsx
View file @
9f545820
...
...
@@ -7,6 +7,8 @@ import HomeItem from './conpoments/home_item'
import
{
View
,
Image
,
ScrollView
,
Text
}
from
'@tarojs/components'
import
Api
from
'@/api/index'
import
'./scss/index.scss'
import
{
defaultShareMessage
}
from
'@/common/index'
import
events
from
'@/common/events'
type
PageStateProps
=
{
list
:
any
[]
...
...
@@ -90,11 +92,7 @@ class Tempaltes extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
componentDidHide
()
{
...
...
src/pages/home/tempaltes/scss/detail.scss
View file @
9f545820
...
...
@@ -55,12 +55,13 @@
.top-bar-container
{
position
:
absolute
;
left
:
2
6px
;
left
:
1
6px
;
top
:
116px
;
height
:
55px
;
width
:
3
7px
;
width
:
4
7px
;
.close
{
left
:
10px
;
position
:
absolute
;
top
:
31px
;
width
:
37px
;
...
...
src/pages/home/user/index.tsx
View file @
9f545820
...
...
@@ -4,6 +4,7 @@ import { View, Text, Image, ScrollView, Button } from '@tarojs/components'
import
api
from
'@/api/index'
import
'./index.scss'
import
token
from
'@/common/token'
import
{
defaultShareMessage
}
from
'@/common/index'
type
PageStateProps
=
{}
...
...
@@ -39,11 +40,7 @@ class User extends Component {
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
return
defaultShareMessage
}
componentWillMount
()
{
...
...
@@ -88,6 +85,7 @@ class User extends Component {
render
()
{
let
{
avatarUrl
,
nickName
,
userPhone
,
vipState
,
vipTime
}
=
this
.
state
vipTime
=
vipTime
?
vipTime
:
''
return
(
<
ScrollView
scrollY
className=
"user"
>
<
View
className=
"user-top-info"
>
...
...
src/pages/system/wifi_list/index.tsx
View file @
9f545820
...
...
@@ -66,6 +66,7 @@ class WifiList extends Component {
protected
bluetoothCode
=
''
protected
initLoading
=
true
protected
timer
:
any
=
null
protected
resettimer
:
any
=
null
protected
activeWLAN
:
IWifiListItem
constructor
(
props
:
any
)
{
super
(
props
)
...
...
@@ -192,6 +193,10 @@ class WifiList extends Component {
})
}
if
(
state
===
'PWDFAILED'
||
state
===
'FAILED'
||
state
===
'NETFAILED'
)
{
clearTimeout
(
this
.
resettimer
)
this
.
resettimer
=
null
clearTimeout
(
this
.
timer
)
this
.
timer
=
null
if
(
recordObj
[
this
.
activeWLAN
.
ssid
])
{
await
api
.
common
.
deleteMyequipmentWifi
(
this
.
activeWLAN
.
ssid
)
wifiList
.
unshift
(
this
.
activeWLAN
)
...
...
@@ -287,6 +292,9 @@ class WifiList extends Component {
this
.
cancelModal
()
try
{
Taro
.
showLoading
({
title
:
'连接中...'
})
this
.
resettimer
=
setTimeout
(()
=>
{
Ble
.
postWifiPassword
(
id
,
password
,
deviceId
)
},
15000
)
this
.
timer
=
setTimeout
(()
=>
{
if
(
!
this
.
deviceToken
)
{
Taro
.
hideLoading
()
...
...
@@ -294,7 +302,9 @@ class WifiList extends Component {
title
:
'请重新扫码连接!'
,
icon
:
'none'
})
Taro
.
navigateBack
()
setTimeout
(()
=>
{
Taro
.
navigateBack
()
},
2000
)
}
clearTimeout
(
this
.
timer
)
},
30000
)
...
...
@@ -307,6 +317,7 @@ class WifiList extends Component {
}
// Taro.hideLoading()
}
catch
(
error
)
{
Ble
.
postWifiPassword
(
id
,
password
,
deviceId
)
console
.
error
(
error
)
// Taro.hideLoading()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment