Skip to content

Commit 709b154

Browse files
committed
fix bug
1 parent 0073cb9 commit 709b154

File tree

10 files changed

+90
-278
lines changed

10 files changed

+90
-278
lines changed

.github/workflows/Deploy.yml

-35
This file was deleted.

go.mod

-45
This file was deleted.

go.sum

-154
This file was deleted.

main.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
package main
22

33
import (
4+
"github.com/gin-gonic/gin"
45
"go-wows-bot/global"
56
"go-wows-bot/util"
67
"go-wows-bot/wows"
78
"log"
89
"os"
910
"path/filepath"
10-
11-
"github.com/gin-gonic/gin"
1211
)
1312

1413
func main() {
1514
global.CurrentPath = getCurrentAbPathByExecutable()
1615
global.InitAll()
1716

17+
//Id := regexp.MustCompile(" [1-9]$").FindAllStringSubmatch("wws me ship Yamato 1", -1)
18+
19+
//fmt.Println(Id[0][0])
1820
generServer(global.ServerStartPort)
1921
//times := ""
2022
//i, _ := strconv.Atoi(times)

serverApi/PlatformController.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ func BindUserApi(server string, username string, qq_id string) bool {
2626
c := resty.New()
2727
r := &model.BindBack{}
2828

29+
hearders := map[string]string{
30+
"accept": "application/json",
31+
"Authorization": global.Token,
32+
}
33+
2934
log.Printf("绑定用户请求:%v", global.API_Server+"/api/wows/bind/account/platform/bind/put?platformType=QQ&platformId="+qq_id+"&accountId="+GetAccountId(server, username))
30-
c.R().SetResult(r).Get(global.API_Server + "/api/wows/bind/account/platform/bind/put?platformType=QQ&platformId=" + qq_id + "&accountId=" + GetAccountId(server, username))
35+
c.R().SetResult(r).SetHeaders(hearders).Get(global.API_Server + "/api/wows/bind/account/platform/bind/put?platformType=QQ&platformId=" + qq_id + "&accountId=" + GetAccountId(server, username))
3136

3237
if r.Message != "success" {
3338
log.Printf(r.Message)

wows/public.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@ func wwsHelp(group_id int64) {
5656
log.Printf("向群:%v发送帮助信息", group_id)
5757

5858
message := "帮助列表\n " +
59+
"服务器参考asia、eu、na、ru\n " +
60+
"下面的[][]代表可选项 请不要两个一起选择\n " +
5961
"wws help:获取帮助\n " +
60-
"wws bind/set/绑定 服务器 游戏昵称:绑定QQ与游戏账号\n " +
61-
"wws 查询绑定/查绑定/绑定列表[me]:查询指定用户的绑定账号\n " +
62-
"wws 切换绑定[id]:使用查绑定中的序号快速切换绑定账号\n " +
63-
"wws [服务器+游戏昵称][me]:查询账号总体战绩\n " +
62+
"wws bind/set/绑定 服务器 游戏昵称:绑定QQ与游戏账号 eg:wws set asia cunoe\n " +
63+
"wws 查询绑定/查绑定/绑定列表:查询已经绑定的账号 eg:wws 查询绑定\n " +
64+
"wws 切换绑定 [id]:使用查绑定中的序号快速切换绑定账号 eg:wws 切换绑定 1\n " +
65+
"wws [服务器+游戏昵称][me]:查询账号总体战绩 eg:wws asia cunoe或者wws me\n " +
6466
"wws [服务器+游戏昵称][me] recent [日期]:查询账号近期战绩,默认1天\n " +
67+
"wws [服务器+游戏昵称][me] ship [舰船名称] 序号(可不加 默认为0):查询单船战绩 eg:wws Asia cunoe ship Yamato 1\n " +
6568
"wws [server][nation][ship.type]:查询战舰相关信息\n " +
6669
"[待开发] wws ship recent\n " +
6770
"[待开发] wws rank\n " +

0 commit comments

Comments
 (0)