Commit d65d1f52 by hank

增加点击状态栏

parent da8656ba
...@@ -5,7 +5,6 @@ import { bluetooth } from './adapter' ...@@ -5,7 +5,6 @@ import { bluetooth } from './adapter'
function Utf8ArrayToStr(array) { function Utf8ArrayToStr(array) {
let out, i, len, c let out, i, len, c
let char2, char3 let char2, char3
out = '' out = ''
len = array.length len = array.length
i = 0 i = 0
...@@ -39,8 +38,10 @@ function Utf8ArrayToStr(array) { ...@@ -39,8 +38,10 @@ function Utf8ArrayToStr(array) {
break break
} }
} }
return out return out
// let decoder = new TextDecoder('utf-8')
// let u8arr = new Uint8Array(array)
// return decoder.decode(u8arr)
} }
/** 连接参数 */ /** 连接参数 */
export function concatParam(data: any): string { export function concatParam(data: any): string {
...@@ -117,7 +118,7 @@ export function getBLEState(buffer: ArrayBuffer) { ...@@ -117,7 +118,7 @@ export function getBLEState(buffer: ArrayBuffer) {
/** 解析蓝牙接收到的数据 */ /** 解析蓝牙接收到的数据 */
export function getBLEData(buffer: ArrayBuffer) { export function getBLEData(buffer: ArrayBuffer) {
console.log(Utf8ArrayToStr(new Uint8Array(buffer.slice(1, buffer.byteLength)))) console.log(Utf8ArrayToStr(new Uint8Array(buffer.slice(1, buffer.byteLength))), buffer.byteLength)
// return String.fromCharCode.apply(null, new Uint8Array(buffer.slice(1, buffer.byteLength))) // return String.fromCharCode.apply(null, new Uint8Array(buffer.slice(1, buffer.byteLength)))
return Utf8ArrayToStr(new Uint8Array(buffer.slice(1, buffer.byteLength))) return Utf8ArrayToStr(new Uint8Array(buffer.slice(1, buffer.byteLength)))
} }
......
...@@ -236,7 +236,9 @@ class MyDevice extends Component { ...@@ -236,7 +236,9 @@ class MyDevice extends Component {
} }
]} ]}
> >
<DeviceItem {...item} onClick={() => this.goDetail(item.equipmentId)} /> <View onClick={() => this.goDetail(item.equipmentId)}>
<DeviceItem {...item} />
</View>
</AtSwipeAction> </AtSwipeAction>
</View> </View>
))} ))}
......
...@@ -158,7 +158,9 @@ class DeviceGroup extends Component { ...@@ -158,7 +158,9 @@ class DeviceGroup extends Component {
} }
]} ]}
> >
<DeviceItem {...item} onClick={() => this.goDetail(item.equipmentId)} /> <View onClick={() => this.goDetail(item.equipmentId)}>
<DeviceItem {...item} />
</View>
</AtSwipeAction> </AtSwipeAction>
</View> </View>
))} ))}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
background: #ff9110 !important; background: #ff9110 !important;
width: 38px; width: 38px;
left: calc(50% - 19px); left: calc(50% - 19px);
height: 5px; height: 6px;
border-radius: 3px; border-radius: 3px;
} }
......
...@@ -27,11 +27,24 @@ ...@@ -27,11 +27,24 @@
.type-tab-item { .type-tab-item {
padding: 0 20px; padding: 0 20px;
position: relative;
} }
.type-tab-item-active { .type-tab-item-active {
font-size: 38px; font-size: 38px;
color: #000; color: #000;
&::after {
content: '';
position: absolute;
bottom: -13px;
width: 38px;
height: 6px;
background: rgba(255, 145, 16, 1);
box-shadow: 0 2px 4px 0 rgba(233, 145, 42, 0.43);
border-radius: 3px;
left: calc(50% - 19px);
}
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
background: #ff9110 !important; background: #ff9110 !important;
width: 38px; width: 38px;
left: calc(50% - 19px); left: calc(50% - 19px);
height: 5px; height: 6px;
border-radius: 3px; border-radius: 3px;
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
width: 38px; width: 38px;
position: absolute; position: absolute;
left: 30px; left: 30px;
top: 25px;
} }
.type-tab { .type-tab {
...@@ -26,14 +27,28 @@ ...@@ -26,14 +27,28 @@
text-align: center; text-align: center;
font-size: 28px; font-size: 28px;
color: #969799; color: #969799;
margin-bottom: 10px;
.type-tab-item { .type-tab-item {
padding: 0 20px; padding: 0 20px;
position: relative;
} }
.type-tab-item-active { .type-tab-item-active {
font-size: 38px; font-size: 38px;
color: #000; color: #000;
&::after {
content: '';
position: absolute;
bottom: -13px;
width: 38px;
height: 6px;
background: rgba(255, 145, 16, 1);
box-shadow: 0 2px 4px 0 rgba(233, 145, 42, 0.43);
border-radius: 3px;
left: calc(50% - 19px);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment