generated from root/miduo_server
39 lines
881 B
Go
39 lines
881 B
Go
package common
|
|
|
|
import (
|
|
"github.com/gogf/gf/net/ghttp"
|
|
"gmanager/library/netutil"
|
|
)
|
|
|
|
// Login 登录页面
|
|
func GM(r *ghttp.Request) {
|
|
cmd := netutil.Gmcmd{
|
|
ServerIp: "192.168.2.84",
|
|
ServerPort: "7904",
|
|
Cmd: "sendmail",
|
|
UserId: "10001266",
|
|
Args: "10001266 16#5000|14#100 title cont",
|
|
}
|
|
//sendmail 10001266 10001266 16#5000|14#100 title cont
|
|
res := cmd.SendGM() //0 成功
|
|
r.Response.Writeln(res)
|
|
}
|
|
|
|
func SendMail(r *ghttp.Request) {
|
|
uid := r.GetString("uid")
|
|
cmd := r.GetString("cmd")
|
|
param := r.GetString("param") //奖励内容
|
|
title := r.GetString("title") //标题
|
|
cont := r.GetString("cont") //内容
|
|
allcmd := param + " " + title + " " + cont
|
|
sendcmd := netutil.Gmcmd{
|
|
ServerIp: "127.0.0.1",
|
|
ServerPort: "7904",
|
|
Cmd: cmd,
|
|
UserId: uid,
|
|
Args: allcmd,
|
|
}
|
|
res:=sendcmd.SendGM()
|
|
r.Response.Writeln(res)
|
|
}
|