Commit ad13e7c3 by hank

fix bug

parent 92b221a2
......@@ -77,7 +77,8 @@ $axios.interceptors.response.use(
if (!!code && code !== '0') {
Taro.showToast({
title: msg,
duration: 2000
duration: 2000,
icon: 'none'
})
return Promise.reject(config.data)
}
......
......@@ -151,6 +151,7 @@ export function analysisPage(value: arrayBuffer): Promise<ICallBack> {
return new Promise(resolve => {
let page = 0
const state = new Uint8Array(value)[0] // 获取蓝牙状态
console.log(state, 'state')
// 判断第8位数是否是 1
if ((state & 0x80) !== 0) {
// 第8位数为 1, 设备端发送资源包
......@@ -168,7 +169,7 @@ export function analysisPage(value: arrayBuffer): Promise<ICallBack> {
advertisData = getBLEData(value) + advertisData
// advertisData2 = String.fromCharCode.apply(null, new Uint8Array(value)) + advertisData2
}
console.log('累加结果', advertisData)
console.log(value, 'arrayBuffer')
resolve({ page, advertisData, state })
// callBack({ page, advertisData, state })
} else {
......
......@@ -112,10 +112,12 @@ class Films extends Component {
onSetting(item) {
if (process.env.TARO_ENV !== 'rn') {
Taro.hideTabBar().then(() => {
this.setState({
isOpened: true,
chooseItem: item
})
setTimeout(() => {
this.setState({
isOpened: true,
chooseItem: item
})
}, 500)
})
} else {
this.setState({
......
......@@ -49,7 +49,7 @@ class Device extends Component {
return (
<View>
<View style={{ height: `${windowHeight + 43}px` }}>
<View style={{ height: `${windowHeight}px` }}>
<FilmList height={windowHeight} />
</View>
</View>
......
......@@ -6,7 +6,7 @@
.device-bind {
width: 100%;
height: 100%;
min-height: 100%;
display: flex;
flex-direction: column;
......
......@@ -81,7 +81,7 @@ class FilmDetail extends Component {
Taro.navigateBack()
}, 500)
} catch (error) {
showMyToast({ title: '更新失败' })
// showMyToast({ title: '更新失败' })
}
}
......
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