|
@@ -7,6 +7,7 @@ import dayjs from 'dayjs';
|
|
import Skeleton from 'taro-skeleton'
|
|
import Skeleton from 'taro-skeleton'
|
|
|
|
|
|
import ImagePicker from '../../components/common/imagePicker';
|
|
import ImagePicker from '../../components/common/imagePicker';
|
|
|
|
+import MessageNoticebar from '../../components/common/messageNoticebar';
|
|
|
|
|
|
import { add, minus, asyncAdd } from '../../actions/counter'
|
|
import { add, minus, asyncAdd } from '../../actions/counter'
|
|
|
|
|
|
@@ -130,33 +131,6 @@ class PunchClock extends Component {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
- let token = Taro.getStorageSync('token');
|
|
|
|
- //建立连接
|
|
|
|
- Taro.connectSocket({
|
|
|
|
- header:{
|
|
|
|
- 'token': token,
|
|
|
|
- },
|
|
|
|
- url: "wss://uat.jishutao.com/webSocketServer",
|
|
|
|
- // 172.16.0.188:8080
|
|
|
|
- // uat.jishutao.com
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //连接成功
|
|
|
|
- Taro.onSocketOpen(function() {
|
|
|
|
- Taro.sendSocketMessage({
|
|
|
|
- data: 'stock',
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //接收数据
|
|
|
|
- Taro.onSocketMessage(function(data) {
|
|
|
|
- console.log(data,'接收数据')
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //连接失败
|
|
|
|
- Taro.onSocketError(function() {
|
|
|
|
- console.log('websocket连接失败!');
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
|
|
|
|
publicReleaseClockIn(){
|
|
publicReleaseClockIn(){
|
|
@@ -329,6 +303,7 @@ class PunchClock extends Component {
|
|
const {dtails} = this.state;
|
|
const {dtails} = this.state;
|
|
return (
|
|
return (
|
|
<View className='punchClock'>
|
|
<View className='punchClock'>
|
|
|
|
+ <MessageNoticebar/>
|
|
<View className='header'>
|
|
<View className='header'>
|
|
<Skeleton
|
|
<Skeleton
|
|
title
|
|
title
|