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
1980ac3b
authored
Nov 24, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换作品和日程
parent
64f67ddd
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
115 additions
and
70 deletions
+115
-70
src/actions/asyncCounter.ts
+1
-1
src/actions/counter.ts
+1
-1
src/api/common.ts
+8
-7
src/app.tsx
+8
-1
src/assets/images/schedule-selcet.png
+0
-0
src/assets/images/schedule.png
+0
-0
src/pages/home/device/device_detail/index.scss
+4
-0
src/pages/home/device/device_detail/index.tsx
+28
-2
src/pages/home/device/device_list/index.tsx
+1
-1
src/pages/home/device/my_film/index.tsx
+1
-1
src/pages/home/film/film_list/index.tsx
+1
-1
src/pages/home/film/index.scss
+0
-1
src/pages/home/film/index.tsx
+18
-15
src/pages/home/film/my_film/index.tsx
+1
-1
src/pages/home/film/schedule_add/components/films/index.tsx
+1
-1
src/pages/home/film/schedule_add/index.tsx
+2
-2
src/pages/home/film/schedule_list/index.scss
+2
-0
src/pages/home/film/schedule_list/index.tsx
+4
-1
src/pages/home/index.tsx
+2
-2
src/pages/home/tempaltes/conpoments/temp_detail_content/index.tsx
+1
-1
src/pages/home/tempaltes/detail.tsx
+8
-8
src/pages/home/tempaltes/film_detail.tsx
+8
-8
src/pages/home/tempaltes/film_edit.tsx
+6
-6
src/pages/home/tempaltes/film_edit_info.tsx
+5
-5
src/pages/home/tempaltes/film_page.tsx
+1
-1
src/pages/home/tempaltes/template_type_detail.tsx
+1
-1
src/pages/home/user/index.tsx
+2
-2
No files found.
src/actions/asyncCounter.ts
View file @
1980ac3b
...
@@ -16,7 +16,7 @@ export function getTempList(page: number) {
...
@@ -16,7 +16,7 @@ export function getTempList(page: number) {
}
}
}
}
/** 获取我的
视片
列表 */
/** 获取我的
作品
列表 */
export
function
getDeviceList
(
page
:
number
,
showTemplate
:
string
=
''
)
{
export
function
getDeviceList
(
page
:
number
,
showTemplate
:
string
=
''
)
{
return
async
(
dispatch
,
state
)
=>
{
return
async
(
dispatch
,
state
)
=>
{
const
oldState
=
state
().
counter
const
oldState
=
state
().
counter
...
...
src/actions/counter.ts
View file @
1980ac3b
...
@@ -9,7 +9,7 @@ export function setTempList(list: any[], count: number) {
...
@@ -9,7 +9,7 @@ export function setTempList(list: any[], count: number) {
}
}
}
}
/** 修改我的
视片
数据 */
/** 修改我的
作品
数据 */
export
function
setDeviceList
(
list
:
any
[],
count
:
number
)
{
export
function
setDeviceList
(
list
:
any
[],
count
:
number
)
{
return
{
return
{
list
,
list
,
...
...
src/api/common.ts
View file @
1980ac3b
...
@@ -15,6 +15,7 @@ export interface IUpdateDeviceInfo {
...
@@ -15,6 +15,7 @@ export interface IUpdateDeviceInfo {
equipmentId
:
string
equipmentId
:
string
equipmentName
:
string
equipmentName
:
string
equipmentUrl
:
string
equipmentUrl
:
string
equipmentDescribe
:
string
equipmentResolution
:
string
equipmentResolution
:
string
equipmentStyle
:
'CROSSWISE'
|
'LENGTHWAYS'
|
'DOUBLECROSSWISE'
|
'DOUBLELENGTHWAYS'
equipmentStyle
:
'CROSSWISE'
|
'LENGTHWAYS'
|
'DOUBLECROSSWISE'
|
'DOUBLELENGTHWAYS'
}
}
...
@@ -50,11 +51,11 @@ class UsersApi extends ApiClient {
...
@@ -50,11 +51,11 @@ class UsersApi extends ApiClient {
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/info/
${
id
}
`
})
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/info/
${
id
}
`
})
}
}
/** 创建
视片
*/
/** 创建
作品
*/
createFilm
(
filmName
:
string
,
filmDescribe
:
string
,
templateId
:
string
)
{
createFilm
(
filmName
:
string
,
filmDescribe
:
string
,
templateId
:
string
)
{
return
this
.
request
({
url
:
'/template/add/film'
,
data
:
{
filmDescribe
,
filmName
,
templateId
}
})
return
this
.
request
({
url
:
'/template/add/film'
,
data
:
{
filmDescribe
,
filmName
,
templateId
}
})
}
}
/** 修改
视片
信息 */
/** 修改
作品
信息 */
updateFilmName
(
filmName
:
string
,
filmDescribe
:
string
,
filmId
:
string
)
{
updateFilmName
(
filmName
:
string
,
filmDescribe
:
string
,
filmId
:
string
)
{
return
this
.
request
({
return
this
.
request
({
url
:
'/template/update/film/base/info'
,
url
:
'/template/update/film/base/info'
,
...
@@ -62,21 +63,21 @@ class UsersApi extends ApiClient {
...
@@ -62,21 +63,21 @@ class UsersApi extends ApiClient {
})
})
}
}
/** 获取
视片
详情列表 */
/** 获取
作品
详情列表 */
getFilmDetailList
(
id
:
string
,
page
:
number
)
{
getFilmDetailList
(
id
:
string
,
page
:
number
)
{
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/equipment/list/
${
id
}
?p=
${
page
}
&c=50`
})
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/equipment/list/
${
id
}
?p=
${
page
}
&c=50`
})
}
}
/** 获取
视片
详情 */
/** 获取
作品
详情 */
getFilmDetailInfo
(
id
:
string
)
{
getFilmDetailInfo
(
id
:
string
)
{
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/film/info/
${
id
}
`
})
return
this
.
request
({
method
:
'GET'
,
url
:
`/template/get/film/info/
${
id
}
`
})
}
}
/** 获取
视片
下设备列表详情 */
/** 获取
作品
下设备列表详情 */
getFilmDeviceList
(
FilmId
:
string
)
{
getFilmDeviceList
(
FilmId
:
string
)
{
return
this
.
request
({
url
:
`/template/get/equipment/list/
${
FilmId
}
`
,
data
:
{
p
:
1000
,
c
:
10
}
})
return
this
.
request
({
url
:
`/template/get/equipment/list/
${
FilmId
}
`
,
data
:
{
p
:
1000
,
c
:
10
}
})
}
}
/** 获取我的
视片
列表 */
/** 获取我的
作品
列表 */
getMyFilmsList
(
page
:
number
,
templateShow
:
string
)
{
getMyFilmsList
(
page
:
number
,
templateShow
:
string
)
{
return
this
.
request
({
return
this
.
request
({
url
:
`/myfilm/get/list?p=
${
page
}
&c=10`
,
url
:
`/myfilm/get/list?p=
${
page
}
&c=10`
,
...
@@ -144,7 +145,7 @@ class UsersApi extends ApiClient {
...
@@ -144,7 +145,7 @@ class UsersApi extends ApiClient {
})
})
}
}
/** 删除
视片
*/
/** 删除
作品
*/
removeFilm
(
filmId
:
string
)
{
removeFilm
(
filmId
:
string
)
{
return
this
.
request
({
return
this
.
request
({
method
:
'GET'
,
method
:
'GET'
,
...
...
src/app.tsx
View file @
1980ac3b
...
@@ -55,6 +55,7 @@ class App extends Component {
...
@@ -55,6 +55,7 @@ class App extends Component {
'pages/home/tempaltes/film_preview'
,
'pages/home/tempaltes/film_preview'
,
'pages/home/tempaltes/film_edit'
,
'pages/home/tempaltes/film_edit'
,
'pages/home/tempaltes/film_edit_info'
,
'pages/home/tempaltes/film_edit_info'
,
'pages/home/film/schedule_list/index'
,
'pages/home/film/schedule_add/index'
,
'pages/home/film/schedule_add/index'
,
'pages/home/film/schedule_add/components/films/index'
,
'pages/home/film/schedule_add/components/films/index'
,
'pages/home/film/schedule_add/components/device/index'
,
'pages/home/film/schedule_add/components/device/index'
,
...
@@ -90,11 +91,17 @@ class App extends Component {
...
@@ -90,11 +91,17 @@ class App extends Component {
},
},
{
{
pagePath
:
'pages/home/film/index'
,
pagePath
:
'pages/home/film/index'
,
text
:
'
视片及日程
'
,
text
:
'
作品
'
,
iconPath
:
'./assets/images/film.png'
,
iconPath
:
'./assets/images/film.png'
,
selectedIconPath
:
'./assets/images/film_ac.png'
selectedIconPath
:
'./assets/images/film_ac.png'
},
},
{
{
pagePath
:
'pages/home/film/schedule_list/index'
,
text
:
'日程'
,
iconPath
:
'./assets/images/schedule.png'
,
selectedIconPath
:
'./assets/images/schedule-selcet.png'
},
{
pagePath
:
'pages/home/user/index'
,
pagePath
:
'pages/home/user/index'
,
text
:
'个人中心'
,
text
:
'个人中心'
,
iconPath
:
'./assets/images/personal.png'
,
iconPath
:
'./assets/images/personal.png'
,
...
...
src/assets/images/schedule-selcet.png
0 → 100644
View file @
1980ac3b
1.39 KB
src/assets/images/schedule.png
0 → 100644
View file @
1980ac3b
1.32 KB
src/pages/home/device/device_detail/index.scss
View file @
1980ac3b
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
@include
eject
(
box-sizing
,
border-box
);
@include
eject
(
box-sizing
,
border-box
);
textarea
{
height
:
100px
;
}
&
-item
{
&
-item
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/pages/home/device/device_detail/index.tsx
View file @
1980ac3b
...
@@ -6,6 +6,7 @@ import {
...
@@ -6,6 +6,7 @@ import {
View
,
View
,
Text
,
Text
,
Input
,
Input
,
Textarea
,
Image
,
Image
,
ScrollView
,
ScrollView
,
Button
,
Button
,
...
@@ -30,6 +31,7 @@ type PageState = {
...
@@ -30,6 +31,7 @@ type PageState = {
clientSecret
:
string
clientSecret
:
string
equipmentUrl
:
string
equipmentUrl
:
string
equipmentName
:
string
equipmentName
:
string
equipmentDescribe
:
string
equipmentState
:
string
equipmentState
:
string
equipmentResolution
:
string
equipmentResolution
:
string
equipmentStyle
:
'CROSSWISE'
|
'LENGTHWAYS'
|
'DOUBLECROSSWISE'
|
'DOUBLELENGTHWAYS'
equipmentStyle
:
'CROSSWISE'
|
'LENGTHWAYS'
|
'DOUBLECROSSWISE'
|
'DOUBLELENGTHWAYS'
...
@@ -58,6 +60,7 @@ class DeviceDetail extends Component {
...
@@ -58,6 +60,7 @@ class DeviceDetail extends Component {
clientSecret
:
''
,
clientSecret
:
''
,
equipmentUrl
:
''
,
equipmentUrl
:
''
,
equipmentName
:
''
,
equipmentName
:
''
,
equipmentDescribe
:
''
,
equipmentState
:
''
,
equipmentState
:
''
,
equipmentResolution
:
''
,
equipmentResolution
:
''
,
equipmentStyle
:
'CROSSWISE'
equipmentStyle
:
'CROSSWISE'
...
@@ -81,6 +84,7 @@ class DeviceDetail extends Component {
...
@@ -81,6 +84,7 @@ class DeviceDetail extends Component {
clientSecret
,
clientSecret
,
equipmentUrl
,
equipmentUrl
,
equipmentName
,
equipmentName
,
equipmentDescribe
,
equipmentState
,
equipmentState
,
equipmentStyle
,
equipmentStyle
,
equipmentResolution
equipmentResolution
...
@@ -91,6 +95,7 @@ class DeviceDetail extends Component {
...
@@ -91,6 +95,7 @@ class DeviceDetail extends Component {
clientSecret
,
clientSecret
,
equipmentUrl
,
equipmentUrl
,
equipmentName
,
equipmentName
,
equipmentDescribe
,
equipmentState
,
equipmentState
,
equipmentResolution
,
equipmentResolution
,
equipmentStyle
:
!
equipmentStyle
?
'CROSSWISE'
:
equipmentStyle
equipmentStyle
:
!
equipmentStyle
?
'CROSSWISE'
:
equipmentStyle
...
@@ -105,6 +110,10 @@ class DeviceDetail extends Component {
...
@@ -105,6 +110,10 @@ class DeviceDetail extends Component {
const
{
value
}
=
target
const
{
value
}
=
target
this
.
setState
({
equipmentName
:
value
})
this
.
setState
({
equipmentName
:
value
})
}
}
setDeviceDescribe
({
target
})
{
const
{
value
}
=
target
this
.
setState
({
equipmentDescribe
:
value
})
}
setResolution
({
target
})
{
setResolution
({
target
})
{
const
{
value
}
=
target
const
{
value
}
=
target
...
@@ -126,6 +135,7 @@ class DeviceDetail extends Component {
...
@@ -126,6 +135,7 @@ class DeviceDetail extends Component {
equipmentUrl
,
equipmentUrl
,
equipmentName
,
equipmentName
,
equipmentStyle
,
equipmentStyle
,
equipmentDescribe
,
equipmentResolution
equipmentResolution
}
=
this
.
state
}
=
this
.
state
if
(
!
equipmentName
||
!
equipmentUrl
)
{
if
(
!
equipmentName
||
!
equipmentUrl
)
{
...
@@ -138,6 +148,7 @@ class DeviceDetail extends Component {
...
@@ -138,6 +148,7 @@ class DeviceDetail extends Component {
equipmentId
,
equipmentId
,
equipmentName
,
equipmentName
,
equipmentUrl
,
equipmentUrl
,
equipmentDescribe
,
equipmentResolution
,
equipmentResolution
,
equipmentStyle
equipmentStyle
})
})
...
@@ -150,7 +161,13 @@ class DeviceDetail extends Component {
...
@@ -150,7 +161,13 @@ class DeviceDetail extends Component {
}
}
render
()
{
render
()
{
const
{
equipmentName
,
equipmentUrl
,
equipmentResolution
,
equipmentStyle
}
=
this
.
state
const
{
equipmentName
,
equipmentUrl
,
equipmentResolution
,
equipmentStyle
,
equipmentDescribe
}
=
this
.
state
console
.
log
({
equipmentStyle
})
console
.
log
({
equipmentStyle
})
return
(
return
(
<
ScrollView
className=
"device-detail"
scrollY
>
<
ScrollView
className=
"device-detail"
scrollY
>
...
@@ -160,7 +177,16 @@ class DeviceDetail extends Component {
...
@@ -160,7 +177,16 @@ class DeviceDetail extends Component {
className=
"item-input"
className=
"item-input"
value=
{
equipmentName
}
value=
{
equipmentName
}
placeholder=
"请输入设备名称"
placeholder=
"请输入设备名称"
onInput=
{
this
.
setDeviceName
}
onInput=
{
this
.
setDeviceDescribe
}
/>
</
View
>
<
View
className=
"device-detail-item"
>
<
Text
className=
"item-text"
>
设备描述:
</
Text
>
<
Textarea
className=
"item-input"
value=
{
equipmentDescribe
}
placeholder=
"请输入设备描述"
onInput=
{
this
.
setDeviceDescribe
}
/>
/>
</
View
>
</
View
>
<
View
className=
"device-detail-item"
>
<
View
className=
"device-detail-item"
>
...
...
src/pages/home/device/device_list/index.tsx
View file @
1980ac3b
...
@@ -241,7 +241,7 @@ class MyDevice extends Component {
...
@@ -241,7 +241,7 @@ class MyDevice extends Component {
</
AtSwipeAction
>
</
AtSwipeAction
>
))
}
))
}
</
ListView
>
</
ListView
>
<
View
className=
"device-list-add-btn"
onClick=
{
this
.
s
electAddDevic
e
}
>
<
View
className=
"device-list-add-btn"
onClick=
{
this
.
s
canCod
e
}
>
<
Text
className=
"icon"
>
+
</
Text
>
<
Text
className=
"icon"
>
+
</
Text
>
</
View
>
</
View
>
{
/* <AtModal isOpened>
{
/* <AtModal isOpened>
...
...
src/pages/home/device/my_film/index.tsx
View file @
1980ac3b
...
@@ -22,7 +22,7 @@ interface MyFilm {
...
@@ -22,7 +22,7 @@ interface MyFilm {
class
MyFilm
extends
Component
{
class
MyFilm
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
'我的
视片
'
navigationBarTitleText
:
'我的
作品
'
}
}
render
()
{
render
()
{
...
...
src/pages/home/film/film_list/index.tsx
View file @
1980ac3b
...
@@ -219,7 +219,7 @@ class Films extends Component {
...
@@ -219,7 +219,7 @@ class Films extends Component {
</
View
>
</
View
>
<
ListView
<
ListView
count=
{
count
}
count=
{
count
}
height=
{
height
&&
height
-
60
}
height=
{
height
&&
height
}
dataListLength=
{
list
.
length
}
dataListLength=
{
list
.
length
}
pullingUp=
{
done
=>
this
.
onScrollToLower
(
done
)
}
pullingUp=
{
done
=>
this
.
onScrollToLower
(
done
)
}
pullingDown=
{
done
=>
this
.
onDownRefresh
(
done
)
}
pullingDown=
{
done
=>
this
.
onDownRefresh
(
done
)
}
...
...
src/pages/home/film/index.scss
View file @
1980ac3b
@import
'@styles/var.scss'
;
@import
'@styles/var.scss'
;
@import
'~taro-ui/dist/style/components/tabs.scss'
;
@import
'~taro-ui/dist/style/components/action-sheet.scss'
;
@import
'~taro-ui/dist/style/components/action-sheet.scss'
;
.at-tabs__item-underline
{
.at-tabs__item-underline
{
...
...
src/pages/home/film/index.tsx
View file @
1980ac3b
...
@@ -5,8 +5,6 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
...
@@ -5,8 +5,6 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
'./index.scss'
import
'./index.scss'
import
'taro-ui/dist/style/components/list.scss'
import
'taro-ui/dist/style/components/icon.scss'
import
{
View
}
from
'@tarojs/components'
import
{
View
}
from
'@tarojs/components'
type
PageStateProps
=
{}
type
PageStateProps
=
{}
...
@@ -27,7 +25,7 @@ interface Device {
...
@@ -27,7 +25,7 @@ interface Device {
state
:
PageState
state
:
PageState
}
}
const
tabList
=
[{
title
:
'我的
视片
'
},
{
title
:
'日程列表'
}]
const
tabList
=
[{
title
:
'我的
作品
'
},
{
title
:
'日程列表'
}]
class
Device
extends
Component
{
class
Device
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
''
,
navigationBarTitleText
:
''
,
...
@@ -50,18 +48,23 @@ class Device extends Component {
...
@@ -50,18 +48,23 @@ class Device extends Component {
const
{
current
,
windowHeight
}
=
this
.
state
const
{
current
,
windowHeight
}
=
this
.
state
return
(
return
(
<
AtTabs
current=
{
current
}
tabList=
{
tabList
}
onClick=
{
this
.
changePage
}
swipeable=
{
false
}
>
<
View
>
<
AtTabsPane
current=
{
current
}
index=
{
0
}
>
<
View
style=
{
{
height
:
`${windowHeight + 43}px`
}
}
>
<
View
style=
{
{
height
:
`${windowHeight + 43}px`
}
}
>
<
FilmList
height=
{
windowHeight
}
/>
<
FilmList
height=
{
windowHeight
}
/>
</
View
>
</
View
>
</
View
>
</
AtTabsPane
>
// <AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}>
<
AtTabsPane
className=
"at-tabs-page"
current=
{
current
}
index=
{
1
}
>
// <AtTabsPane current={current} index={0}>
<
View
style=
{
{
height
:
`${windowHeight}px`
}
}
>
// <View style={{ height: `${windowHeight + 43}px` }}>
<
ScheduleList
height=
{
windowHeight
}
/>
// <FilmList height={windowHeight} />
</
View
>
// </View>
</
AtTabsPane
>
// </AtTabsPane>
</
AtTabs
>
// <AtTabsPane className="at-tabs-page" current={current} index={1}>
// <View style={{ height: `${windowHeight}px` }}>
// <ScheduleList height={windowHeight} />
// </View>
// </AtTabsPane>
// </AtTabs>
)
)
}
}
}
}
...
...
src/pages/home/film/my_film/index.tsx
View file @
1980ac3b
...
@@ -22,7 +22,7 @@ interface MyFilm {
...
@@ -22,7 +22,7 @@ interface MyFilm {
class
MyFilm
extends
Component
{
class
MyFilm
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
'我的
视片
'
navigationBarTitleText
:
'我的
作品
'
}
}
render
()
{
render
()
{
...
...
src/pages/home/film/schedule_add/components/films/index.tsx
View file @
1980ac3b
...
@@ -159,7 +159,7 @@ class Films extends Component {
...
@@ -159,7 +159,7 @@ class Films extends Component {
typeChange
(
state
)
{
typeChange
(
state
)
{
const
newSet
=
this
.
state
.
checked
const
newSet
=
this
.
state
.
checked
if
(
newSet
.
size
)
{
if
(
newSet
.
size
)
{
showMyToast
({
title
:
'不可选择不同版型的
视片
~'
})
showMyToast
({
title
:
'不可选择不同版型的
作品
~'
})
return
return
}
}
Taro
.
setStorage
({
Taro
.
setStorage
({
...
...
src/pages/home/film/schedule_add/index.tsx
View file @
1980ac3b
...
@@ -239,9 +239,9 @@ class ScheduleAdd extends Component {
...
@@ -239,9 +239,9 @@ class ScheduleAdd extends Component {
value=
{
scheduleName
}
value=
{
scheduleName
}
className=
"schedule-add-name"
className=
"schedule-add-name"
/>
/>
<
View
className=
"schedule-add-title"
>
视片
</
View
>
<
View
className=
"schedule-add-title"
>
作品
</
View
>
<
Button
size=
"mini"
onClick=
{
this
.
chooseFilm
}
>
<
Button
size=
"mini"
onClick=
{
this
.
chooseFilm
}
>
选择
视片
选择
作品
</
Button
>
</
Button
>
{
filmList
&&
{
filmList
&&
filmList
.
map
((
item
,
index
)
=>
{
filmList
.
map
((
item
,
index
)
=>
{
...
...
src/pages/home/film/schedule_list/index.scss
View file @
1980ac3b
@import
'@styles/var.scss'
;
@import
'@styles/var.scss'
;
@import
'~taro-ui/dist/style/components/list.scss'
;
@import
'~taro-ui/dist/style/components/icon.scss'
;
.films
{
.films
{
width
:
100%
;
width
:
100%
;
...
...
src/pages/home/film/schedule_list/index.tsx
View file @
1980ac3b
...
@@ -3,7 +3,7 @@ import { ComponentClass } from 'react'
...
@@ -3,7 +3,7 @@ import { ComponentClass } from 'react'
import
{
View
,
Text
,
Icon
}
from
'@tarojs/components'
import
{
View
,
Text
,
Icon
}
from
'@tarojs/components'
import
{
showMyToast
}
from
'@/common/utils'
import
{
showMyToast
}
from
'@/common/utils'
import
ListView
from
'@/conpoments/list_view'
import
ListView
from
'@/conpoments/list_view'
import
Taro
,
{
Component
}
from
'@tarojs/taro'
import
Taro
,
{
Component
,
Config
}
from
'@tarojs/taro'
import
{
getDeviceList
}
from
'@/actions/asyncCounter'
import
{
getDeviceList
}
from
'@/actions/asyncCounter'
import
FilmListItem
from
'@/conpoments/film_list_item'
import
FilmListItem
from
'@/conpoments/film_list_item'
import
{
AtList
,
AtListItem
}
from
'taro-ui'
import
{
AtList
,
AtListItem
}
from
'taro-ui'
...
@@ -44,6 +44,9 @@ interface Schedule {
...
@@ -44,6 +44,9 @@ interface Schedule {
}
}
class
Schedule
extends
Component
{
class
Schedule
extends
Component
{
config
:
Config
=
{
navigationBarTitleText
:
''
}
protected
page
=
1
protected
page
=
1
constructor
(
props
)
{
constructor
(
props
)
{
...
...
src/pages/home/index.tsx
View file @
1980ac3b
...
@@ -17,7 +17,7 @@ class Index extends Component {
...
@@ -17,7 +17,7 @@ class Index extends Component {
list
:
[
list
:
[
{
{
pagePath
:
'pages/home/device/index'
,
pagePath
:
'pages/home/device/index'
,
text
:
'设备与
视片
'
text
:
'设备与
作品
'
// iconPath: './constants/images/device.png',
// iconPath: './constants/images/device.png',
// selectedIconPath: './constants/images/device_ac.png'
// selectedIconPath: './constants/images/device_ac.png'
},
},
...
@@ -56,7 +56,7 @@ class Index extends Component {
...
@@ -56,7 +56,7 @@ class Index extends Component {
// },
// },
// {
// {
// pagePath: 'pages/home/device/index',
// pagePath: 'pages/home/device/index',
// text: '设备与
视片
',
// text: '设备与
作品
',
// iconPath: '../../constants/images/device.png',
// iconPath: '../../constants/images/device.png',
// selectedIconPath: '../../constants/images/device_ac.png'
// selectedIconPath: '../../constants/images/device_ac.png'
// },
// },
...
...
src/pages/home/tempaltes/conpoments/temp_detail_content/index.tsx
View file @
1980ac3b
...
@@ -21,7 +21,7 @@ export default function TempDetailContent(props: IProps) {
...
@@ -21,7 +21,7 @@ export default function TempDetailContent(props: IProps) {
<
DetailTop
{
...
Object
.
assign
(
detailData
,
{
templateId
})}
templateId2=
{
templateId
}
/>
<
DetailTop
{
...
Object
.
assign
(
detailData
,
{
templateId
})}
templateId2=
{
templateId
}
/>
<
View
className=
"temp-detail-list"
>
<
View
className=
"temp-detail-list"
>
<
Text
className=
"temp-detail-list-title"
>
我的
视片
(
{
filmDataList
.
length
}
)
</
Text
>
<
Text
className=
"temp-detail-list-title"
>
我的
作品
(
{
filmDataList
.
length
}
)
</
Text
>
<
View
className=
"temp-detail-list-content"
>
<
View
className=
"temp-detail-list-content"
>
{
filmDataList
&&
filmDataList
.
map
(
item
=>
<
TempItem
{
...
item
}
key=
{
item
.
templateId
}
/>)
}
{
filmDataList
&&
filmDataList
.
map
(
item
=>
<
TempItem
{
...
item
}
key=
{
item
.
templateId
}
/>)
}
</
View
>
</
View
>
...
...
src/pages/home/tempaltes/detail.tsx
View file @
1980ac3b
...
@@ -99,7 +99,7 @@ class TempDetail extends Component {
...
@@ -99,7 +99,7 @@ class TempDetail extends Component {
inputConfirm
=
async
()
=>
{
inputConfirm
=
async
()
=>
{
const
{
createFilmDescribe
,
createFilmName
,
templateId
}
=
this
.
state
const
{
createFilmDescribe
,
createFilmName
,
templateId
}
=
this
.
state
if
(
!
createFilmName
)
{
if
(
!
createFilmName
)
{
showMyToast
({
title
:
'
视片
名称不能为空~'
})
showMyToast
({
title
:
'
作品
名称不能为空~'
})
return
return
}
}
try
{
try
{
...
@@ -176,20 +176,20 @@ class TempDetail extends Component {
...
@@ -176,20 +176,20 @@ class TempDetail extends Component {
)
}
)
}
</
View
>
</
View
>
<
Button
type=
"primary"
className=
"temp-detail-bottom-btn"
onClick=
{
this
.
createFilm
}
>
<
Button
type=
"primary"
className=
"temp-detail-bottom-btn"
onClick=
{
this
.
createFilm
}
>
创建
视片
创建
作品
</
Button
>
</
Button
>
{
showModal
?
(
{
showModal
?
(
<
Modal
title=
"
视片
信息"
onConfirm=
{
this
.
inputConfirm
}
onCancel=
{
this
.
cancelModal
}
>
<
Modal
title=
"
作品
信息"
onConfirm=
{
this
.
inputConfirm
}
onCancel=
{
this
.
cancelModal
}
>
<
View
className=
"film-modal"
>
<
View
className=
"film-modal"
>
<
Text
className=
"film-modal-text"
>
视片
名称
</
Text
>
<
Text
className=
"film-modal-text"
>
作品
名称
</
Text
>
<
Input
<
Input
placeholder=
"请输入
视片
名称"
placeholder=
"请输入
作品
名称"
className=
"film-modal-input"
className=
"film-modal-input"
onInput=
{
this
.
changeFilmName
}
onInput=
{
this
.
changeFilmName
}
/>
/>
<
Text
className=
"film-modal-text"
>
视片
描述
</
Text
>
<
Text
className=
"film-modal-text"
>
作品
描述
</
Text
>
<
Input
<
Input
placeholder=
"请输入
视片
描述"
placeholder=
"请输入
作品
描述"
className=
"film-modal-input"
className=
"film-modal-input"
onInput=
{
this
.
changeDescribeName
}
onInput=
{
this
.
changeDescribeName
}
/>
/>
...
@@ -212,7 +212,7 @@ class TempDetail extends Component {
...
@@ -212,7 +212,7 @@ class TempDetail extends Component {
// <View>
// <View>
// <DetailTop {...detailData} />
// <DetailTop {...detailData} />
// <View className="temp-detail-list">
// <View className="temp-detail-list">
// <Text className="temp-detail-list-title">我的
视片
({filmDataList.length})</Text>
// <Text className="temp-detail-list-title">我的
作品
({filmDataList.length})</Text>
// <View className="temp-detail-list-content">
// <View className="temp-detail-list-content">
// {filmDataList.map(item => (
// {filmDataList.map(item => (
// <TempItem {...item} key={item.templateId} />
// <TempItem {...item} key={item.templateId} />
...
...
src/pages/home/tempaltes/film_detail.tsx
View file @
1980ac3b
...
@@ -35,7 +35,7 @@ interface FilmDetail {
...
@@ -35,7 +35,7 @@ interface FilmDetail {
class
FilmDetail
extends
Component
{
class
FilmDetail
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
'
视片
详情'
navigationBarTitleText
:
'
作品
详情'
// navigationStyle: undefined
// navigationStyle: undefined
}
}
...
@@ -123,7 +123,7 @@ class FilmDetail extends Component {
...
@@ -123,7 +123,7 @@ class FilmDetail extends Component {
filmInfo
:
{
templateName
,
templateDescribe
,
filmId
}
filmInfo
:
{
templateName
,
templateDescribe
,
filmId
}
}
=
this
.
state
}
=
this
.
state
if
(
!
templateName
)
{
if
(
!
templateName
)
{
showMyToast
({
title
:
'
视片
名称不能为空~'
})
showMyToast
({
title
:
'
作品
名称不能为空~'
})
return
return
}
}
try
{
try
{
...
@@ -195,25 +195,25 @@ class FilmDetail extends Component {
...
@@ -195,25 +195,25 @@ class FilmDetail extends Component {
</View>
</View>
<View className="film-detail-bottom-bar">
<View className="film-detail-bottom-bar">
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.goEdit}>
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.goEdit}>
修改
视片
修改
作品
</Button>
</Button>
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.chengDevice}>
<Button type="primary" className="film-detail-bottom-bar-btn" onClick={this.chengDevice}>
更改绑定设备
更改绑定设备
</Button>
</Button>
</View>
</View>
{showModal ? (
{showModal ? (
<Modal title="
视片
信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<Modal title="
作品
信息" onConfirm={this.inputConfirm} onCancel={this.cancelModal}>
<View className="film-modal">
<View className="film-modal">
<Text className="film-modal-text">
视片
名称</Text>
<Text className="film-modal-text">
作品
名称</Text>
<Input
<Input
placeholder="请输入
视片
名称"
placeholder="请输入
作品
名称"
className="film-modal-input"
className="film-modal-input"
value={filmInfo.templateName}
value={filmInfo.templateName}
onInput={this.changeFilmName}
onInput={this.changeFilmName}
/>
/>
<Text className="film-modal-text">
视片
描述</Text>
<Text className="film-modal-text">
作品
描述</Text>
<Input
<Input
placeholder="请输入
视片
描述"
placeholder="请输入
作品
描述"
className="film-modal-input"
className="film-modal-input"
value={filmInfo.templateDescribe}
value={filmInfo.templateDescribe}
onInput={this.changeDescribeName}
onInput={this.changeDescribeName}
...
...
src/pages/home/tempaltes/film_edit.tsx
View file @
1980ac3b
...
@@ -32,7 +32,7 @@ interface FilmDetail {
...
@@ -32,7 +32,7 @@ interface FilmDetail {
class
FilmDetail
extends
Component
{
class
FilmDetail
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
'编辑
视片
'
navigationBarTitleText
:
'编辑
作品
'
}
}
constructor
()
{
constructor
()
{
...
@@ -247,16 +247,16 @@ class FilmDetail extends Component {
...
@@ -247,16 +247,16 @@ class FilmDetail extends Component {
<
View
className=
"film-detail"
>
<
View
className=
"film-detail"
>
<
View
className=
"film-detail-scroll"
>
<
View
className=
"film-detail-scroll"
>
{
/* <View className="film-info">
{
/* <View className="film-info">
<Text className="film-info-text">
视片
名称</Text>
<Text className="film-info-text">
作品
名称</Text>
<Input
<Input
placeholder="请输入
视片
名称"
placeholder="请输入
作品
名称"
className="film-info-input"
className="film-info-input"
value={filmInfo.filmName}
value={filmInfo.filmName}
onInput={this.changeFilmName}
onInput={this.changeFilmName}
/>
/>
<Text className="film-info-text">
视片
描述</Text>
<Text className="film-info-text">
作品
描述</Text>
<Input
<Input
placeholder="请输入
视片
描述"
placeholder="请输入
作品
描述"
className="film-info-input"
className="film-info-input"
value={filmInfo.filmDescribe}
value={filmInfo.filmDescribe}
onInput={this.changeDescribeName}
onInput={this.changeDescribeName}
...
@@ -290,7 +290,7 @@ class FilmDetail extends Component {
...
@@ -290,7 +290,7 @@ class FilmDetail extends Component {
</
View
>
</
View
>
<
View
className=
"film-detail-bottom-bar"
>
<
View
className=
"film-detail-bottom-bar"
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
goPreview
}
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
goPreview
}
>
预览
视片
预览
作品
</
Button
>
</
Button
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
updateFilm
}
>
<
Button
type=
"primary"
className=
"film-detail-bottom-bar-btn"
onClick=
{
this
.
updateFilm
}
>
更改并同步到设备
更改并同步到设备
...
...
src/pages/home/tempaltes/film_edit_info.tsx
View file @
1980ac3b
...
@@ -71,7 +71,7 @@ class FilmDetail extends Component {
...
@@ -71,7 +71,7 @@ class FilmDetail extends Component {
filmInfo
:
{
templateName
,
templateDescribe
,
filmId
}
filmInfo
:
{
templateName
,
templateDescribe
,
filmId
}
}
=
this
.
state
}
=
this
.
state
if
(
!
templateName
)
{
if
(
!
templateName
)
{
showMyToast
({
title
:
'
视片
名称不能为空~'
})
showMyToast
({
title
:
'
作品
名称不能为空~'
})
return
return
}
}
try
{
try
{
...
@@ -119,16 +119,16 @@ class FilmDetail extends Component {
...
@@ -119,16 +119,16 @@ class FilmDetail extends Component {
return
(
return
(
<
View
className=
"film-detail"
>
<
View
className=
"film-detail"
>
<
View
className=
"film-modal"
>
<
View
className=
"film-modal"
>
<
Text
className=
"film-modal-text"
>
视片
名称
</
Text
>
<
Text
className=
"film-modal-text"
>
作品
名称
</
Text
>
<
Input
<
Input
placeholder=
"请输入
视片
名称"
placeholder=
"请输入
作品
名称"
className=
"film-modal-input"
className=
"film-modal-input"
value=
{
filmInfo
.
templateName
}
value=
{
filmInfo
.
templateName
}
onInput=
{
this
.
changeFilmName
}
onInput=
{
this
.
changeFilmName
}
/>
/>
<
Text
className=
"film-modal-text"
>
视片
描述
</
Text
>
<
Text
className=
"film-modal-text"
>
作品
描述
</
Text
>
<
Input
<
Input
placeholder=
"请输入
视片
描述"
placeholder=
"请输入
作品
描述"
className=
"film-modal-input"
className=
"film-modal-input"
value=
{
filmInfo
.
templateDescribe
}
value=
{
filmInfo
.
templateDescribe
}
onInput=
{
this
.
changeDescribeName
}
onInput=
{
this
.
changeDescribeName
}
...
...
src/pages/home/tempaltes/film_page.tsx
View file @
1980ac3b
...
@@ -26,7 +26,7 @@ interface FilmPage {
...
@@ -26,7 +26,7 @@ interface FilmPage {
class
FilmPage
extends
Component
{
class
FilmPage
extends
Component
{
config
:
Config
=
{
config
:
Config
=
{
navigationBarTitleText
:
'
视片
详情'
navigationBarTitleText
:
'
作品
详情'
}
}
constructor
()
{
constructor
()
{
...
...
src/pages/home/tempaltes/template_type_detail.tsx
View file @
1980ac3b
...
@@ -279,7 +279,7 @@ class TemplateTypeDetail extends Component {
...
@@ -279,7 +279,7 @@ class TemplateTypeDetail extends Component {
// <View>
// <View>
// <DetailTop {...detailData} />
// <DetailTop {...detailData} />
// <View className="temp-detail-list">
// <View className="temp-detail-list">
// <Text className="temp-detail-list-title">我的
视片
({filmDataList.length})</Text>
// <Text className="temp-detail-list-title">我的
作品
({filmDataList.length})</Text>
// <View className="temp-detail-list-content">
// <View className="temp-detail-list-content">
// {filmDataList.map(item => (
// {filmDataList.map(item => (
// <TempItem {...item} key={item.templateId} />
// <TempItem {...item} key={item.templateId} />
...
...
src/pages/home/user/index.tsx
View file @
1980ac3b
...
@@ -96,7 +96,7 @@ class User extends Component {
...
@@ -96,7 +96,7 @@ class User extends Component {
className=
"user-item-view"
className=
"user-item-view"
onClick=
{
()
=>
this
.
goPage
(
'/pages/home/device/my_film/index'
)
}
onClick=
{
()
=>
this
.
goPage
(
'/pages/home/device/my_film/index'
)
}
>
>
<
Text
>
我的
视片
</
Text
>
<
Text
>
我的
作品
</
Text
>
</
View
>
</
View
>
<
View
<
View
className=
"user-item-view"
className=
"user-item-view"
...
@@ -118,7 +118,7 @@ class User extends Component {
...
@@ -118,7 +118,7 @@ class User extends Component {
</
View
>
</
View
>
{
/* <View className="user-item">
{
/* <View className="user-item">
<View className="user-item-view">
<View className="user-item-view">
<Text>我的
视片
</Text>
<Text>我的
作品
</Text>
</View>
</View>
<View className="user-item-view">
<View className="user-item-view">
<Text>我的设备</Text>
<Text>我的设备</Text>
...
...
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