feat: openid login
This commit is contained in:
+17
-42
@@ -11,40 +11,21 @@ message Response {
|
||||
string data = 3;
|
||||
}
|
||||
|
||||
// 小程序注册
|
||||
message RegisterReq {
|
||||
string openid = 1; // 可空;空则服务端模拟
|
||||
string nickname = 2;
|
||||
string avatar = 3;
|
||||
string mobile = 4;
|
||||
uint32 gender = 5; // 1男 2女
|
||||
string birthday = 6;
|
||||
string username = 7;
|
||||
uint32 app_id = 8; // 应用标识
|
||||
}
|
||||
|
||||
// 账号密码注册
|
||||
message RegisterByUserReq {
|
||||
uint32 type = 1; // 1手机号 2邮箱
|
||||
string account = 2;
|
||||
string pwd = 3;
|
||||
string code = 4;
|
||||
uint32 app_id = 5; // 应用标识
|
||||
}
|
||||
|
||||
// openid 登录
|
||||
message LoginReq {
|
||||
string openid = 1;
|
||||
string client_code = 1;
|
||||
string grant_type = 2;
|
||||
string code = 3;
|
||||
string mobile = 4;
|
||||
string password = 5;
|
||||
string sms_code = 6;
|
||||
}
|
||||
|
||||
// 管理端用户列表
|
||||
message UserItemsReq {
|
||||
string mobile = 1;
|
||||
int32 page = 2;
|
||||
int32 size = 3;
|
||||
}
|
||||
|
||||
// 管理端修改用户状态
|
||||
message UserStatusReq {
|
||||
int64 id = 1;
|
||||
int32 status = 2;
|
||||
@@ -87,18 +68,16 @@ message UsersByIdsData {
|
||||
repeated UserBriefItem items = 1;
|
||||
}
|
||||
|
||||
// 内部:修改用户手机号(同步凭证 identifier)
|
||||
message UpdateMobileReq {
|
||||
int64 user_id = 1;
|
||||
string mobile = 2; // 新手机号明文
|
||||
string mobile = 2;
|
||||
}
|
||||
|
||||
message UpdateMobileData {
|
||||
int64 user_id = 1;
|
||||
string mobile = 2; // 加密后手机号
|
||||
string mobile = 2;
|
||||
}
|
||||
|
||||
// 内部:撤销业务端开通(删除/禁用销售或门店时)
|
||||
message RevokeBizClientReq {
|
||||
int64 user_id = 1;
|
||||
string client_code = 2;
|
||||
@@ -108,22 +87,18 @@ message RevokeBizClientData {
|
||||
bool revoked = 1;
|
||||
}
|
||||
|
||||
message InfoReq {}
|
||||
|
||||
service User {
|
||||
rpc Register(RegisterReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
post: "/customer/v3/register"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc RegisterByUser(RegisterByUserReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
post: "/customer/v3/register/user"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc Login(LoginReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
post: "/customer/v3/login"
|
||||
post: "/api/v3/login"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
rpc Info(InfoReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v3/user/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user