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
24f55c42
authored
Dec 26, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ui
parent
0dba328e
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
108 additions
and
49 deletions
+108
-49
src/api/axios.ts
+9
-8
src/app.tsx
+2
-1
src/common/enum.ts
+1
-1
src/common/events.ts
+1
-0
src/common/token.ts
+3
-3
src/conpoments/film_list_item/index.scss
+5
-4
src/conpoments/film_list_item/index.tsx
+4
-4
src/conpoments/shop_device_item/index.scss
+19
-6
src/conpoments/shop_device_item/index.tsx
+2
-2
src/pages/home/device/device_list/index.tsx
+1
-1
src/pages/home/device/group_list/index.tsx
+1
-1
src/pages/home/device/index.tsx
+8
-1
src/pages/home/device/shop_list/index.tsx
+1
-1
src/pages/home/film/schedule_add/components/films/index.tsx
+1
-1
src/pages/home/tempaltes/conpoments/home_item/index.scss
+11
-1
src/pages/home/tempaltes/conpoments/home_item/index.tsx
+9
-5
src/pages/home/tempaltes/scss/temp-type.scss
+3
-2
src/pages/home/tempaltes/scss/type_detail.scss
+2
-1
src/pages/home/user/index.scss
+5
-4
src/pages/login/index.scss
+5
-1
src/pages/system/wifi_list/index.tsx
+15
-1
No files found.
src/api/axios.ts
View file @
24f55c42
...
...
@@ -25,14 +25,15 @@ $axios.interceptors.request.use((config: any) => {
if
(
!
noToken
)
{
// 默认添加token
const
tokne
=
token
.
getToken
()
if
(
!
tokne
)
{
config
.
cancelToken
=
new
CancelToken
(
cancel
=>
{
console
.
warn
(
`token 为空取消请求~`
)
cancel
(
TOKEN_REPEAT
)
})
return
config
}
config
.
headers
.
visualToken
=
token
.
getToken
()
// if (!tokne) {
// config.cancelToken = new CancelToken(cancel => {
// console.warn(`token 为空取消请求~`)
// cancel(TOKEN_REPEAT)
// })
// return config
// }
config
.
headers
.
visualToken
=
tokne
// return config
}
else
{
delete
config
.
headers
.
noToken
}
...
...
src/app.tsx
View file @
24f55c42
...
...
@@ -35,8 +35,9 @@ class App extends Component {
*/
config
:
Config
=
{
pages
:
[
'pages/login/index'
,
'pages/home/device/index'
,
'pages/login/index'
,
// 'pages/home/device/index',
'pages/home/tempaltes/index'
,
'pages/home/film/index'
,
'pages/agreement/index'
,
...
...
src/common/enum.ts
View file @
24f55c42
export
enum
SHOWTYPE
{
export
enum
SHOWTYPE
{
// 横屏竖屏的枚举
HORIZONTAL
=
'横屏'
,
VERTICAL
=
'竖屏'
,
OTHER
=
'异形屏'
...
...
src/common/events.ts
View file @
24f55c42
// tslint:disable:no-invalid-this
// tslint:disable-next-line:only-arrow-functions
const
EventBus
=
(
function
()
{
// 非父子组件的通讯 当时用于解决模板详情页 对于模板列表页面的消息通知
function
EventBusClass
()
{
this
.
msgQueues
=
{}
}
...
...
src/common/token.ts
View file @
24f55c42
...
...
@@ -4,9 +4,9 @@ class Token {
private
initDone
=
false
// private token = '676191a8b17442cfb06d31fdc936db6e-APP'
private
token
=
''
//
constructor() {
//
this.getStorageToken()
//
}
constructor
()
{
this
.
getStorageToken
()
}
init
()
{
if
(
!
this
.
initDone
)
{
...
...
src/conpoments/film_list_item/index.scss
View file @
24f55c42
...
...
@@ -13,10 +13,11 @@
text-align
:
center
;
position
:
relative
;
border-radius
:
6px
;
box-sizing
:
border-box
;
.films-item-img-bg
{
width
:
261px
;
height
:
261px
;
//
height: 261px;
position
:
absolute
;
z-index
:
-1
;
filter
:
blur
(
10px
);
...
...
@@ -24,7 +25,7 @@
.films-item-img
{
width
:
100%
;
height
:
15
8
px
;
height
:
15
0
px
;
border-radius
:
6px
;
}
...
...
@@ -49,7 +50,7 @@
margin-bottom
:
13px
;
font-weight
:
bold
;
overflow
:
hidden
;
height
:
40px
;
//
height: 40px;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
...
...
@@ -57,7 +58,7 @@
}
&
-detail
{
height
:
6
5px
;
height
:
5
5px
;
overflow
:
hidden
;
font-size
:
22px
;
color
:
#666
;
...
...
src/conpoments/film_list_item/index.tsx
View file @
24f55c42
...
...
@@ -57,12 +57,12 @@ class FilmListItem extends Component {
/>
</
View
>
<
View
className=
"films-item-info"
>
<
Text
className=
"films-item-info-name"
onClick=
{
()
=>
onClick
&&
onClick
()
}
>
<
View
className=
"films-item-info-name"
onClick=
{
()
=>
onClick
&&
onClick
()
}
>
{
filmName
}
</
Text
>
<
Text
className=
"films-item-info-detail"
onClick=
{
()
=>
onClick
&&
onClick
()
}
>
</
View
>
<
View
className=
"films-item-info-detail"
onClick=
{
()
=>
onClick
&&
onClick
()
}
>
{
filmDescribe
?
filmDescribe
:
'无'
}
</
Text
>
</
View
>
<
View
className=
"films-item-info-time"
>
<
Text
className=
"films-item-info-count"
>
{
updateTime
}
</
Text
>
{
isChoose
?
null
:
(
...
...
src/conpoments/shop_device_item/index.scss
View file @
24f55c42
...
...
@@ -5,12 +5,12 @@
display
:
flex
;
flex-direction
:
row
;
width
:
100%
;
padding
:
20
px
;
padding
:
36px
24px
10px
24
px
;
&
-img-box
{
width
:
260px
;
height
:
195px
;
padding
:
4
.5px
8px
;
//
padding: 4.5px 8px;
// border-radius: 8px;
// border: 1px solid $border-color;
...
...
@@ -24,24 +24,37 @@
&
-info
{
// flex: ;
width
:
19
0px
;
width
:
21
0px
;
display
:
flex
;
padding-left
:
40px
;
flex-direction
:
column
;
padding-bottom
:
10px
;
&
-name
{
font-size
:
32px
;
color
:
#333
;
font-weight
:
bold
;
padding-top
:
10px
;
margin-bottom
:
7px
;
overflow
:
hidden
;
// height: 40px;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
&
-intro
{
font-size
:
2
2
px
;
font-size
:
2
4
px
;
color
:
#666
;
height
:
75px
;
overflow
:
hidden
;
height
:
65px
;
display
:
inline-block
;
/* postcss-pxtransform rn eject enable */
overflow
:
hidden
;
white-space
:
nowrap
;
// display: -webkit-box;
text-overflow
:
ellipsis
;
-webkit-line-clamp
:
2
;
// margin-bottom: 38px;
}
...
...
src/conpoments/shop_device_item/index.tsx
View file @
24f55c42
...
...
@@ -48,13 +48,13 @@ class DeviceItem extends Component {
return
(
<
View
className=
"device-item"
>
<
View
className=
"device-item-img-box"
onClick=
{
()
=>
this
.
goDetail
(
equipmentShopId
)
}
>
<
Image
className=
"device-item-img"
src=
{
url
}
/>
<
Image
className=
"device-item-img"
mode=
"aspectFit"
src=
{
url
}
/>
</
View
>
<
View
className=
"device-item-info"
>
<
Text
className=
"device-item-info-name"
>
{
String
(
equipmentName
).
slice
(
0
,
7
)
}
</
Text
>
<
Text
className=
"device-item-info-intro"
>
{
equipmentIntro
}
</
Text
>
<
Text
className=
"device-item-info-price"
>
¥
<
Text
className=
"num"
>
{
equipmentPrice
}
</
Text
>
元
¥
<
Text
className=
"num"
>
{
equipmentPrice
}
</
Text
>
元
</
Text
>
</
View
>
<
View
className=
"device-item-btn"
>
...
...
src/pages/home/device/device_list/index.tsx
View file @
24f55c42
...
...
@@ -142,7 +142,7 @@ class MyDevice extends Component {
showMyToast
({
title
:
'删除成功~'
})
}
catch
(
error
)
{
console
.
error
(
error
)
showMyToast
({
result
:
error
,
title
:
'
失败成功
~'
})
showMyToast
({
result
:
error
,
title
:
'
删除失败
~'
})
}
}
})
...
...
src/pages/home/device/group_list/index.tsx
View file @
24f55c42
...
...
@@ -126,7 +126,7 @@ class DeviceGroup extends Component {
showMyToast
({
title
:
'删除成功~'
})
}
catch
(
error
)
{
console
.
error
(
error
)
showMyToast
({
result
:
error
,
title
:
'
失败成功
~'
})
showMyToast
({
result
:
error
,
title
:
'
删除失败
~'
})
}
}
})
...
...
src/pages/home/device/index.tsx
View file @
24f55c42
...
...
@@ -52,10 +52,17 @@ class Device extends Component {
title
:
'理想屏'
}
}
componentDidMount
()
{
Taro
.
setNavigationBarTitle
({
title
:
'设备'
})
}
componentDidShow
()
{
Taro
.
setNavigationBarTitle
({
title
:
'设备'
})
const
id
=
Taro
.
getStorageSync
(
'isAdd'
)
console
.
log
(
id
,
this
.
$router
.
params
.
id
,
'isAdd'
)
this
.
setState
({
id
:
this
.
$router
.
params
.
id
||
id
})
...
...
src/pages/home/device/shop_list/index.tsx
View file @
24f55c42
...
...
@@ -111,7 +111,7 @@ class MyDevice extends Component {
showMyToast
({
title
:
'删除成功~'
})
}
catch
(
error
)
{
console
.
error
(
error
)
showMyToast
({
result
:
error
,
title
:
'
失败成功
~'
})
showMyToast
({
result
:
error
,
title
:
'
删除失败
~'
})
}
}
})
...
...
src/pages/home/film/schedule_add/components/films/index.tsx
View file @
24f55c42
...
...
@@ -119,7 +119,7 @@ class Films extends Component {
showMyToast
({
title
:
'删除成功~'
})
}
catch
(
error
)
{
console
.
error
(
error
)
showMyToast
({
title
:
'
失败成功
~'
})
showMyToast
({
title
:
'
删除失败
~'
})
}
}
})
...
...
src/pages/home/tempaltes/conpoments/home_item/index.scss
View file @
24f55c42
...
...
@@ -13,7 +13,8 @@
&
-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
20px
;
// padding: 0 20px;
padding-left
:
0
;
padding-bottom
:
20px
;
font-size
:
20px
;
}
...
...
@@ -27,6 +28,15 @@
.btn-all
{
font-size
:
28px
;
color
:
#ff9110
;
display
:
flex
;
align-items
:
center
;
}
.right-icon
{
margin-left
:
8px
;
margin-top
:
3px
;
width
:
12px
;
height
:
20px
;
}
&
-list
{
...
...
src/pages/home/tempaltes/conpoments/home_item/index.tsx
View file @
24f55c42
// import { ITempItem } from '../..'
import
{
ComponentClass
}
from
'react'
import
Taro
,
{
Component
}
from
'@tarojs/taro'
import
{
View
,
Text
,
ScrollView
}
from
'@tarojs/components'
import
{
View
,
Text
,
ScrollView
,
Image
}
from
'@tarojs/components'
import
TempItem
from
'../temp_item'
import
'./index.scss'
...
...
@@ -41,10 +41,14 @@ class HomeItem extends Component {
<
View
className=
"home-item"
>
<
ScrollView
scrollY
>
<
View
className=
"home-item-title"
>
<
Text
className=
"title-name"
>
{
typeName
?
typeName
:
''
}
</
Text
>
<
Text
className=
"btn-all"
onClick=
{
this
.
goAll
}
>
更多
>
</
Text
>
<
View
className=
"title-name"
>
{
typeName
?
typeName
:
''
}
</
View
>
<
View
className=
"btn-all"
onClick=
{
this
.
goAll
}
>
更多
<
Image
className=
"right-icon"
src=
"http://visual-clouds.oss-cn-beijing.aliyuncs.com/miniprogram/arrow-right.png"
/>
</
View
>
</
View
>
<
View
className=
"home-item-list"
>
{
templateInfo
.
map
(
item
=>
{
...
...
src/pages/home/tempaltes/scss/temp-type.scss
View file @
24f55c42
...
...
@@ -18,13 +18,14 @@
}
.type-item
{
padding
:
2
0
px
;
padding
:
2
4
px
;
padding-right
:
10px
;
&
-title
{
padding-top
:
54px
;
font-size
:
38px
;
color
:
#000
;
font-weight
:
bold
;
}
.type-item-btn
{
...
...
@@ -37,7 +38,7 @@
padding
:
0
;
background
:
#f3f3f5
;
// box-shadow: 0 7px 12px 0 rgba(159, 87, 2, 0.17);
border-radius
:
3
px
;
border-radius
:
6
px
;
color
:
#666
;
border
:
none
;
line-height
:
56px
;
...
...
src/pages/home/tempaltes/scss/type_detail.scss
View file @
24f55c42
...
...
@@ -32,7 +32,7 @@
padding
:
0
;
box-shadow
:
none
;
// box-shadow: 0 7px 12px 0 rgba(159, 87, 2, 0.17);
border-radius
:
3
px
;
border-radius
:
6
px
;
&
:
:
after
{
display
:
none
;
...
...
@@ -69,6 +69,7 @@
color
:
#999
;
padding
:
0
20px
0
20px
;
margin
:
22px
;
margin-left
:
0
;
height
:
80px
;
line-height
:
80px
;
font-weight
:
bold
;
...
...
src/pages/home/user/index.scss
View file @
24f55c42
...
...
@@ -9,10 +9,10 @@
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
margin-bottom
:
40px
;
height
:
373
px
;
//
margin-bottom: 40px;
height
:
417
px
;
box-sizing
:
border-box
;
padding
:
1
0
0px
0
70px
40px
;
padding
:
1
2
0px
0
70px
40px
;
background
:
url('https://visual-clouds.oss-cn-beijing.aliyuncs.com/js/card.png')
no-repeat
center
;
background-size
:
100%
;
...
...
@@ -49,7 +49,7 @@
&
-vip
{
// padding-left: 20px;
margin-top
:
10px
;
background
:
rgba
(
254
,
74
,
26
,
1
);
background
:
rgba
(
254
,
74
,
26
,
0
.5
);
border-radius
:
22px
;
display
:
inline-block
;
// padding-top: 20px;
...
...
@@ -61,6 +61,7 @@
font-weight
:
400
;
color
:
rgba
(
255
,
255
,
255
,
1
);
letter-spacing
:
0
.43px
;
// opacity: 0.5;
}
}
...
...
src/pages/login/index.scss
View file @
24f55c42
...
...
@@ -12,7 +12,7 @@
background-size
:
cover
;
&
-step1
{
padding-top
:
2
0
0px
;
padding-top
:
2
9
0px
;
.login-register
{
width
:
550px
;
...
...
@@ -160,6 +160,10 @@
margin-bottom
:
103px
;
width
:
550px
;
height
:
86px
;
// line-height: 1;
// font-weight: 550;
letter-spacing
:
1px
;
box-sizing
:
content-box
;
border-radius
:
54px
;
background
:
none
;
border
:
2px
solid
rgba
(
255
,
255
,
255
,
1
);
...
...
src/pages/system/wifi_list/index.tsx
View file @
24f55c42
...
...
@@ -65,6 +65,7 @@ class WifiList extends Component {
protected
advertisData
=
''
protected
bluetoothCode
=
''
protected
initLoading
=
true
protected
timer
:
any
=
null
protected
activeWLAN
:
IWifiListItem
constructor
(
props
:
any
)
{
super
(
props
)
...
...
@@ -286,8 +287,19 @@ class WifiList extends Component {
this
.
cancelModal
()
try
{
Taro
.
showLoading
({
title
:
'连接中...'
})
await
Ble
.
postWifiPassword
(
id
,
password
,
deviceId
)
this
.
timer
=
setTimeout
(()
=>
{
if
(
!
this
.
deviceToken
)
{
Taro
.
hideLoading
()
Taro
.
showToast
({
title
:
'请重新扫码连接!'
,
icon
:
'none'
})
Taro
.
navigateBack
()
}
clearTimeout
(
this
.
timer
)
},
30000
)
await
Ble
.
postWifiPassword
(
id
,
password
,
deviceId
)
if
(
mode
&&
mode
===
'OWNRESET'
)
{
setTimeout
(()
=>
{
// Taro.navigateBack()
...
...
@@ -317,6 +329,8 @@ class WifiList extends Component {
componentWillUnmount
()
{
Ble
.
closeBluetoothAdapter
()
clearTimeout
(
this
.
timer
)
this
.
timer
=
null
}
render
()
{
...
...
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