Commit 5bacae97 by fengfan

Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau

parents 61fbee25 66c11f8f
......@@ -23,12 +23,12 @@ export function getProvince() {
}
})
}
export function updateTitle(tiltle) {
export function updateTitle(title) {
return request({
url: '/index/update/title',
method: 'post',
data: {
tiltle
title
}
})
}
......
......@@ -89,7 +89,7 @@
>
<template slot-scope="{row}">
<el-button type="primary" size="mini" @click="handleUpdate(row)">修改</el-button>
<el-button size="mini" type="danger" @click="handleModifyStatus(row,'deleted')">删除</el-button>
<el-button size="mini" type="danger" @click="handleDelete(row,'deleted')">删除</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -22,17 +22,17 @@ books = [
]
def sendMessage(message):
def sendMessage(path, message):
parser = argparse.ArgumentParser()
parser.add_argument("--ip", default="172.16.1.113",
parser.add_argument("--ip", default="127.0.0.1",
help="The ip of the OSC server")
parser.add_argument("--port", type=int, default=7000,
help="The port the OSC server is listening on")
args = parser.parse_args()
client = udp_client.SimpleUDPClient(args.ip, args.port)
print(json.dumps(message))
client.send_message("/ctr", json.dumps(message))
print(path, message)
client.send_message(path, json.dumps(message))
# error action
......@@ -86,7 +86,13 @@ def create_slider():
if(result['index'] == 2):
sendMessage([{"page": "bi"}]) # BIM
return jsonify(code=0, message='success')
@app.route('/api/ctr', methods=['POST'])
def create_ctr():
# data = json.loads(request.json)
print(request.json)
# print(data)
result = request.json
sendMessage(request.json['path'], request.json['arguments'])
return jsonify(code=0, message='success', data = request.json)
if __name__ == '__main__':
app.run(host=localIP, port=8900)
......@@ -86,7 +86,7 @@ if __name__ == "__main__":
parser.add_argument("--ip",
default='127.0.0.1', help="The ip to listen on")
parser.add_argument("--port",
type=int, default=5006, help="The port to listen on")
type=int, default=7000, help="The port to listen on")
args = parser.parse_args()
dispatcher = dispatcher.Dispatcher()
......
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