|
@@ -229,6 +229,16 @@ void handleMsg(byte* inBytes){
|
|
|
else if (tcpModel.action == DeviceAction::SYSTEM_SETTING) { // 修改科室设置
|
|
|
getPartSetting();
|
|
|
}
|
|
|
+ else if (tcpModel.action == DeviceAction::SERVER_CHANGE) {
|
|
|
+ StoragePreferences::putString(STORE_GATEWAY, tcpModel.json["server_ip"].asCString());
|
|
|
+ StoragePreferences::putString(STORE_HTTP_PORT, tcpModel.json["server_port"].asCString());
|
|
|
+
|
|
|
+ const char* req = "-1";
|
|
|
+ TcpClient::instance()->sendMsg(req);
|
|
|
+ //重启
|
|
|
+ sync();
|
|
|
+ reboot(RB_AUTOBOOT);
|
|
|
+ }
|
|
|
} else if (tcpModel.type == TcpType::DATA){
|
|
|
if (tcpModel.action == DataAction::REFRESH){ // 刷新数据
|
|
|
dataRefresh();
|