重新划定分区

This commit is contained in:
Sheyiyuan 2024-12-12 15:11:31 +08:00
parent 86ea3fc544
commit 933ebdfc46
4 changed files with 53 additions and 2 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
/data /data
**/.DS_Store **/.DS_Store
/app_demo/ /app_demo/
.idea/
.vscode/

View File

@ -359,7 +359,11 @@ func (a *apiInfo) SetGroupAddRequest(flag string, subType string, approve bool,
return return
} }
// 2.有响应API使用http协议处理 // 2.有响应API需添加echo字段
func (a *apiInfo) GetLoginInfo(flag string, approve bool) {
}
var AppApi apiInfo var AppApi apiInfo

View File

@ -115,6 +115,26 @@ func processMessage(messageType int, message []byte) {
} }
default: default:
{ {
messageMap := make(map[string]interface{})
err := json.Unmarshal(message, &messageMap)
if err != nil {
LOG.ERROR("Unmarshal error when handling api response message: %v", err)
return
}
if messageMap["status"] != "ok" {
LOG.ERROR("API response error: %v", messageMap["status"])
return
}
if messageMap["echo"] == "" {
LOG.WARN("Unknown API response: %v", messageMap["echo"])
return
}
apiResp := make(map[string]interface{})
apiResp["uuid"] = messageMap["echo"]
ApiChan := make(chan map[string]interface{})
go func(apiResp map[string]interface{}) {
ApiChan <- apiResp
}(apiResp)
// 此处为api请求响应数据通过channel返回给调用者 // 此处为api请求响应数据通过channel返回给调用者
return return
} }

25
doc/index.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="wind,bot,dice,风铃,骰子,骰娘,wind官网">
<title>WIND</title>
</head>
<body>
<h1>WIND</h1>
<div>WIND is not<br> Dice</div>
<hr>
<div>Hello&nbsp;World!</div>
<dl>
<dt>简单</dt>
<dd>开箱即用web界面简单易懂</dd>
<dt>快捷</dt>
<dd>app一键安装一键启动一键更新</dd>
<dt>方便</dt>
<dd>开发者友好,代码开源,可定制化</dd>
<dt>小巧</dt>
<dd>体积小,启动快,占用资源少</dd>
</dl>
<span>点击<a href="https://github.com/Sheyiyuan/ProjectWIND" target="_blank">这里</a>关注我们</span>
</body>
</html>