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
0ce7625a
authored
Dec 24, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
0299c284
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
343 additions
and
36 deletions
+343
-36
src/app.tsx
+7
-0
src/conpoments/device_item/index.scss
+1
-1
src/conpoments/film_list_item/index.scss
+11
-0
src/conpoments/modal/index.scss
+9
-0
src/pages/home/device/device_list/index.tsx
+8
-0
src/pages/home/device/group_list/index.tsx
+9
-2
src/pages/home/device/index.scss
+28
-1
src/pages/home/device/index.tsx
+47
-28
src/pages/home/device/modal/index.scss
+90
-0
src/pages/home/device/modal/index.tsx
+74
-0
src/pages/home/device/shop_list/index.tsx
+7
-1
src/pages/home/film/film_list/index.scss
+1
-0
src/pages/home/film/index.tsx
+8
-0
src/pages/home/film/schedule_add/components/device/index.tsx
+3
-2
src/pages/home/film/schedule_add/components/films/index.scss
+1
-0
src/pages/home/film/schedule_list/index.tsx
+7
-0
src/pages/home/tempaltes/collection.tsx
+7
-0
src/pages/home/tempaltes/film_detail.tsx
+7
-1
src/pages/home/tempaltes/index.tsx
+8
-0
src/pages/home/tempaltes/scss/index.scss
+2
-0
src/pages/home/user/index.tsx
+8
-0
No files found.
src/app.tsx
View file @
0ce7625a
...
...
@@ -114,6 +114,13 @@ 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
:
'理想屏'
}
}
// constructor(props: any) {
// super(props)
// this.initToekn()
...
...
src/conpoments/device_item/index.scss
View file @
0ce7625a
...
...
@@ -93,7 +93,7 @@
.device-item-info-state-active
{
font-size
:
26px
;
color
:
#5ff054
;
//
color: #5ff054;
.dian
{
background
:
#5ff054
;
...
...
src/conpoments/film_list_item/index.scss
View file @
0ce7625a
...
...
@@ -8,6 +8,7 @@
&
-img-box
{
width
:
261px
;
min-width
:
261px
;
background
:
$bgColor
;
text-align
:
center
;
position
:
relative
;
...
...
@@ -38,11 +39,21 @@
display
:
flex
;
padding-left
:
15px
;
flex-direction
:
column
;
word-break
:
break-all
;
box-sizing
:
border-box
;
width
:
400px
;
&
-name
{
font-size
:
32px
;
color
:
#333
;
margin-bottom
:
15px
;
font-weight
:
bold
;
overflow
:
hidden
;
height
:
35px
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
// display: -webkit-box;
}
&
-detail
{
...
...
src/conpoments/modal/index.scss
View file @
0ce7625a
...
...
@@ -20,10 +20,19 @@
border-radius
:
16px
;
flex-direction
:
column
;
background-color
:
white
;
position
:
relative
;
@include
rn
(
height
,
600px
);
}
.modal-close
{
position
:
absolute
;
margin
:
0
auto
;
width
:
43px
;
height
:
43px
;
bottom
:
-72px
;
}
&
-title
{
text-align
:
center
;
padding-bottom
:
20px
;
...
...
src/pages/home/device/device_list/index.tsx
View file @
0ce7625a
...
...
@@ -213,6 +213,14 @@ class MyDevice extends Component {
this
.
getDate
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imgUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
render
()
{
const
{
count
,
height
}
=
this
.
props
const
{
list
,
showModal
,
name
}
=
this
.
state
...
...
src/pages/home/device/group_list/index.tsx
View file @
0ce7625a
...
...
@@ -68,7 +68,13 @@ class DeviceGroup extends Component {
async
componentWillMount
()
{
this
.
getDate
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
componentDidShow
()
{
this
.
page
=
1
this
.
getDate
()
...
...
@@ -256,8 +262,9 @@ class DeviceGroup extends Component {
<
Modal
title=
{
name
}
onConfirm=
{
this
.
inputConfirm
}
onCancel=
{
this
.
cancelModal
}
>
<
View
className=
"film-modal"
>
<
Input
placeholder=
"请输入设备组名称"
placeholder=
"请输入设备组名称
不超过20字
"
className=
"film-modal-input"
maxLength=
{
20
}
value=
{
temp
.
equipmentGroupName
}
onInput=
{
this
.
changeName
}
/>
...
...
src/pages/home/device/index.scss
View file @
0ce7625a
@import
'@styles/var.scss'
;
@import
'~taro-ui/dist/style/components/modal.scss'
;
//
@import '~taro-ui/dist/style/components/modal.scss';
.at-modal__content
{
padding
:
52px
24px
!
important
;
...
...
@@ -8,6 +8,33 @@
color
:
#666
;
}
.device-container
{
.modal
{
.modal-bottom-btn
{
justify-content
:
center
!
important
;
}
}
.go-template-container
{
padding-bottom
:
83px
;
padding-top
:
100px
;
font-size
:
34px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
102
,
102
,
102
,
1
);
}
.go-tempalte
{
width
:
320px
;
height
:
245px
;
}
}
.modal
{
.modal-bottom-btn
{
justify-content
:
center
!
important
;
}
}
// @import '~taro-ui/dist/style/components/tabs.scss';
// .at-tabs__item-underline {
...
...
src/pages/home/device/index.tsx
View file @
0ce7625a
...
...
@@ -4,9 +4,9 @@ import DeviceGroup from './group_list'
import
{
ComponentClass
}
from
'react'
import
{
AtTabs
,
AtTabsPane
,
AtModal
}
from
'taro-ui'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
Modal
from
'./modal/index'
import
'./index.scss'
import
{
View
}
from
'@tarojs/components'
import
{
View
,
Image
}
from
'@tarojs/components'
type
PageStateProps
=
{}
...
...
@@ -38,14 +38,21 @@ class Device extends Component {
const
{
windowHeight
}
=
Taro
.
getSystemInfoSync
()
const
id
=
Taro
.
getStorageSync
(
'isAdd'
)
console
.
log
(
id
,
this
.
$router
.
params
.
id
,
'isAdd'
)
this
.
state
=
{
current
:
0
,
id
:
''
,
id
:
'
1
'
,
windowHeight
:
windowHeight
}
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
componentDidShow
()
{
const
id
=
Taro
.
getStorageSync
(
'isAdd'
)
console
.
log
(
id
,
this
.
$router
.
params
.
id
,
'isAdd'
)
...
...
@@ -60,31 +67,43 @@ class Device extends Component {
render
()
{
const
{
current
,
windowHeight
,
id
}
=
this
.
state
return
(
<
View
style=
{
`height: ${windowHeight}px;`
}
>
<
View
className=
"device-container"
style=
{
`height: ${windowHeight}px;`
}
>
<
DeviceList
height=
{
windowHeight
}
/>
<
AtModal
isOpened=
{
!!
id
}
content=
"设备已添加成功~去模板市场逛一逛吧~"
confirmText=
"确认"
onClose=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
({
id
:
''
})
}
}
onCancel=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
({
id
:
''
})
}
}
onConfirm=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
({
id
:
''
})
}
}
/>
{
!!
id
&&
(
<
Modal
onClose=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
({
id
:
''
})
}
}
onCancel=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
({
id
:
''
})
}
}
onConfirm=
{
()
=>
{
Taro
.
removeStorage
({
key
:
'isAdd'
})
this
.
setState
(
{
id
:
''
},
()
=>
{
Taro
.
switchTab
({
url
:
'/pages/home/tempaltes/index'
})
}
)
}
}
>
<
View
className=
"go-template-container"
>
<
Image
className=
"go-tempalte"
src=
"http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/goTempalte.png"
/>
<
View
>
设备添加成功,去模版市场逛一逛吧
</
View
>
</
View
>
</
Modal
>
)
}
</
View
>
// <AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}>
...
...
src/pages/home/device/modal/index.scss
0 → 100644
View file @
0ce7625a
@import
'@styles/var.scss'
;
.modal
{
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
position
:
absolute
;
align-items
:
center
;
justify-content
:
center
;
background-color
:
rgba
(
$color
:
#000
,
$alpha
:
0
.5
);
&
-wrapper
{
width
:
674px
;
display
:
flex
;
// margin-top: -50px;
padding-top
:
21px
;
padding-bottom
:
66px
;
border-radius
:
16px
;
flex-direction
:
column
;
background-color
:
white
;
position
:
relative
;
@include
rn
(
height
,
600px
);
}
.modal-close
{
position
:
absolute
;
margin
:
0
auto
;
width
:
85px
;
height
:
85px
;
bottom
:
-144px
;
left
:
0
;
right
:
0
;
}
&
-title
{
text-align
:
center
;
padding-bottom
:
20px
;
border
:
0
solid
$border-color
;
border-bottom-width
:
1px
;
@include
eject
(
display
,
block
);
}
&
-content-wrapper
{
flex
:
1
;
text-align
:
center
;
}
&
-bottom-btn
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
padding
:
0
56px
;
border
:
0
solid
$border-color
;
border-top-width
:
0
;
}
&
-confirm-text
{
flex
:
1
;
width
:
252px
;
max-width
:
252px
;
height
:
86px
;
line-height
:
86px
;
text-align
:
center
;
background
:
linear-gradient
(
266deg
,
rgba
(
255
,
171
,
32
,
1
)
0%
,
rgba
(
255
,
114
,
14
,
1
)
100%
);
border-radius
:
43px
;
font-size
:
36px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
white
;
}
&
-cancel-text
{
flex
:
1
;
width
:
252px
;
max-width
:
252px
;
height
:
86px
;
line-height
:
86px
;
text-align
:
center
;
background
:
rgba
(
230
,
230
,
230
,
1
);
border-radius
:
43px
;
font-size
:
36px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
102
,
102
,
102
,
1
);
}
}
src/pages/home/device/modal/index.tsx
0 → 100644
View file @
0ce7625a
import
{
ComponentClass
}
from
'react'
import
Taro
,
{
Component
}
from
'@tarojs/taro'
import
{
View
,
Text
,
Image
}
from
'@tarojs/components'
import
'./index.scss'
type
PageStateProps
=
{}
type
PageDispatchProps
=
{}
type
PageOwnProps
=
{
/** 标题 */
title
?:
string
/** 内容 */
children
:
any
marginTop
?:
string
/** 取消文字 */
cancelText
?:
string
|
'取消'
confirmText
?:
string
|
'确定'
onClose
?:
()
=>
void
onCancel
?:
()
=>
void
onConfirm
?:
()
=>
void
}
type
PageState
=
{}
type
IProps
=
PageStateProps
&
PageDispatchProps
&
PageOwnProps
interface
Modal
{
props
:
IProps
state
:
PageState
}
class
Modal
extends
Component
{
cancel
=
e
=>
{
// e.stopPropagation()
// this.props.onCancel && this.props.onCancel()
}
render
()
{
const
{
title
,
children
,
onCancel
,
onConfirm
,
cancelText
,
confirmText
,
onClose
,
marginTop
=
'-50px'
}
=
this
.
props
console
.
log
(
onCancel
,
onClose
,
onConfirm
)
return
(
<
View
className=
"modal"
onClick=
{
this
.
cancel
}
>
<
View
className=
"modal-wrapper"
style=
{
{
marginTop
}
}
>
{
title
&&
<
Text
className=
"modal-title"
>
{
title
||
'标题'
}
</
Text
>
}
<
View
className=
"modal-content-wrapper"
>
{
children
}
</
View
>
<
View
className=
"modal-bottom-btn"
>
<
Text
className=
"modal-confirm-text"
onClick=
{
()
=>
onConfirm
&&
onConfirm
()
}
>
{
confirmText
||
'确定'
}
</
Text
>
</
View
>
<
Image
className=
"modal-close"
src=
"http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/modal-close.png"
onClick=
{
()
=>
{
onClose
&&
onClose
()
}
}
/>
</
View
>
</
View
>
)
}
}
export
default
Modal
as
ComponentClass
<
PageOwnProps
,
PageState
>
src/pages/home/device/shop_list/index.tsx
View file @
0ce7625a
...
...
@@ -137,7 +137,13 @@ class MyDevice extends Component {
url
:
`/pages/home/device/shop_device_detail/index?equipmentShopId=
${
equipmentId
}
`
})
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
shouldComponentUpdate
(
nextProps
:
IProps
,
_nextState
)
{
const
{
list
}
=
this
.
props
const
{
list
:
_list
}
=
nextProps
...
...
src/pages/home/film/film_list/index.scss
View file @
0ce7625a
...
...
@@ -34,6 +34,7 @@
}
.type-tab-item-active
{
font-weight
:
bold
;
font-size
:
38px
;
color
:
#000
;
...
...
src/pages/home/film/index.tsx
View file @
0ce7625a
...
...
@@ -40,6 +40,14 @@ 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
:
'理想屏'
}
}
changePage
=
value
=>
{
this
.
setState
({
current
:
value
})
}
...
...
src/pages/home/film/schedule_add/components/device/index.tsx
View file @
0ce7625a
...
...
@@ -214,7 +214,7 @@ class DeviceSelect extends Component {
async
updateBind
()
{
// 更新设备绑定
const
{
checked
,
l
ist
}
=
this
.
state
const
{
checked
,
allL
ist
}
=
this
.
state
let
{
cId
}
=
this
.
state
let
{
fId
}
=
this
.
$router
.
params
if
(
cId
===
'null'
)
{
...
...
@@ -224,10 +224,11 @@ class DeviceSelect extends Component {
let
checkedArr
:
any
=
[]
const
equipmentsIds
:
any
=
[]
const
equipmentTopicList
:
any
=
[]
l
ist
.
map
(
item
=>
{
allL
ist
.
map
(
item
=>
{
if
(
checked
.
has
(
item
.
equipmentId
))
{
checkedArr
.
push
(
item
)
if
(
fId
)
{
console
.
log
(
item
)
equipmentsIds
.
push
(
item
.
equipmentId
)
equipmentTopicList
.
push
(
item
.
mqttTopic
)
}
...
...
src/pages/home/film/schedule_add/components/films/index.scss
View file @
0ce7625a
...
...
@@ -66,6 +66,7 @@
}
.type-tab-item-active
{
font-weight
:
bold
;
font-size
:
38px
;
color
:
#000
;
...
...
src/pages/home/film/schedule_list/index.tsx
View file @
0ce7625a
...
...
@@ -56,6 +56,13 @@ class Schedule extends Component {
list
:
[]
}
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
async
componentWillMount
()
{
this
.
getData
()
}
...
...
src/pages/home/tempaltes/collection.tsx
View file @
0ce7625a
...
...
@@ -82,6 +82,13 @@ 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
:
'理想屏'
}
}
componentDidShow
()
{
this
.
isShow
=
true
this
.
setState
({
...
...
src/pages/home/tempaltes/film_detail.tsx
View file @
0ce7625a
...
...
@@ -164,7 +164,13 @@ class FilmDetail extends Component {
webviewLoad
()
{
Taro
.
hideLoading
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
render
()
{
const
{
filmInfo
,
filmList
,
showModal
,
filmId
}
=
this
.
state
const
templateId
=
this
.
$router
.
params
.
templateId
...
...
src/pages/home/tempaltes/index.tsx
View file @
0ce7625a
...
...
@@ -89,6 +89,14 @@ class Tempaltes extends Component {
Taro
.
showTabBar
()
}
onShareAppMessage
(
e
)
{
return
{
path
:
'/pages/home/device/index'
,
imageUrl
:
'http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/SHARELOGO.jpg'
,
title
:
'理想屏'
}
}
componentDidHide
()
{
this
.
isShow
=
false
}
...
...
src/pages/home/tempaltes/scss/index.scss
View file @
0ce7625a
...
...
@@ -35,6 +35,7 @@
}
.type-tab-item-active
{
font-weight
:
bold
;
font-size
:
38px
;
color
:
#000
;
...
...
@@ -116,6 +117,7 @@
}
.type-tab-item-active
{
font-weight
:
bold
;
font-size
:
38px
;
color
:
#000
;
}
...
...
src/pages/home/user/index.tsx
View file @
0ce7625a
...
...
@@ -38,6 +38,14 @@ 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
:
'理想屏'
}
}
componentWillMount
()
{
this
.
getUserInfo
()
}
...
...
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