登录返回服务器时间戳

This commit is contained in:
sk 2024-04-26 16:32:40 +08:00
parent ebad03fce1
commit 853e7771f9
4 changed files with 14 additions and 3 deletions

View File

@ -1051,6 +1051,7 @@ type SCLogin struct {
IpaUrl string `protobuf:"bytes,15,opt,name=IpaUrl,proto3" json:"IpaUrl,omitempty"` //ipa 下载地址
Token string `protobuf:"bytes,16,opt,name=Token,proto3" json:"Token,omitempty"` // md5(密码+AppId)
ClientParam string `protobuf:"bytes,17,opt,name=ClientParam,proto3" json:"ClientParam,omitempty"` // 客户端配置文件
Ts int64 `protobuf:"varint,18,opt,name=Ts,proto3" json:"Ts,omitempty"` // 时间戳
}
func (x *SCLogin) Reset() {
@ -1204,6 +1205,13 @@ func (x *SCLogin) GetClientParam() string {
return ""
}
func (x *SCLogin) GetTs() int64 {
if x != nil {
return x.Ts
}
return 0
}
//公告参数
type Bulletion struct {
state protoimpl.MessageState
@ -2850,7 +2858,7 @@ var file_login_proto_rawDesc = []byte{
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66,
0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e,
0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x47, 0x61, 0x6d, 0x65,
0x43, 0x66, 0x67, 0x22, 0xc0, 0x04, 0x0a, 0x07, 0x53, 0x43, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
0x43, 0x66, 0x67, 0x22, 0xd0, 0x04, 0x0a, 0x07, 0x53, 0x43, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
@ -2886,7 +2894,8 @@ var file_login_proto_rawDesc = []byte{
0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e,
0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x6c, 0x6c, 0x65,
0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x12, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x54, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x6c, 0x6c, 0x65,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x69,
0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63,

View File

@ -153,6 +153,7 @@ message SCLogin {
string IpaUrl = 15;//ipa
string Token = 16;// md5(+AppId)
string ClientParam = 17;//
int64 Ts = 18; //
}
//
message Bulletion{

2
public

@ -1 +1 @@
Subproject commit b3c791a33ee4a8739fca055f43d24009b6c1ef34
Subproject commit 81f1fac2d0ab4cb613da90ecfaa706fd6b7d800a

View File

@ -275,6 +275,7 @@ func SCLogin(s *netlib.Session, sid int64, csLogin *login_proto.CSLogin, acc *mo
sclogin := &login_proto.SCLogin{
OpRetCode: code,
ClientParam: string(model.ClinetBuf),
Ts: time.Now().Unix(),
}
if acc != nil {
now := time.Now()