def l111lll11_wcplus_(item): """ :param item: :return: 发送一条日志 """ from l1l11_wcplus_ import socketio socketio.emit('command', item)
def message(message, _type=''): """ :param _type: 默认 success warning error :param message: :return: 顶部下拉消息 """ from l1l11_wcplus_ import socketio socketio.emit('message', {'type': _type, 'message': message})
def l1l111lll_wcplus_(message, title, _type=''): """ :param message:默认 success warning error :param title: :param _type: :return: 弹窗消息 """ from l1l11_wcplus_ import socketio socketio.emit('message_box', { 'message': message, 'title': title, 'type': _type })
def l1l11111l_wcplus_(message, title, _type='', duration=3): """ :param message:默认 success warning error :param title: :param _type: :param duration: 消息显示时间 0表示消息不会自动关闭 :return: 右侧消息 """ from l1l11_wcplus_ import socketio socketio.emit('notification', { 'message': message, 'title': title, 'type': _type, 'duration': duration })
def send(self): """ :return: 通过websocket 发送数据到前端 """ socketio.emit('req_data', self.get())
def l1ll11111l1_wcplus_(): socketio.emit('connect', {'data': 'hand shake'})
def l11l1ll11_wcplus_(self): """ :return: 通过websocket发送数据 """ from l1l11_wcplus_ import socketio socketio.emit('process', self.process)