feat: 修改遗留bug
This commit is contained in:
parent
45e0ad0227
commit
9a2d597e2b
@ -0,0 +1,670 @@
|
||||
// Code generated by protoc-gen-triple. DO NOT EDIT.
|
||||
//
|
||||
// Source: user.proto
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
)
|
||||
|
||||
import (
|
||||
"dubbo.apache.org/dubbo-go/v3"
|
||||
"dubbo.apache.org/dubbo-go/v3/client"
|
||||
"dubbo.apache.org/dubbo-go/v3/common"
|
||||
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
"dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol"
|
||||
"dubbo.apache.org/dubbo-go/v3/server"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the Triple package
|
||||
// are compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of Triple newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of Triple or updating the Triple
|
||||
// version compiled into your binary.
|
||||
const _ = triple_protocol.IsAtLeastVersion0_1_0
|
||||
|
||||
const (
|
||||
// UserSocialServiceName is the fully-qualified name of the UserSocialService service.
|
||||
UserSocialServiceName = "topfans.user.UserSocialService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// UserSocialServiceRegisterProcedure is the fully-qualified name of the UserSocialService's Register RPC.
|
||||
UserSocialServiceRegisterProcedure = "/topfans.user.UserSocialService/Register"
|
||||
// UserSocialServiceLoginProcedure is the fully-qualified name of the UserSocialService's Login RPC.
|
||||
UserSocialServiceLoginProcedure = "/topfans.user.UserSocialService/Login"
|
||||
// UserSocialServiceRefreshTokenProcedure is the fully-qualified name of the UserSocialService's RefreshToken RPC.
|
||||
UserSocialServiceRefreshTokenProcedure = "/topfans.user.UserSocialService/RefreshToken"
|
||||
// UserSocialServiceValidateTokenProcedure is the fully-qualified name of the UserSocialService's ValidateToken RPC.
|
||||
UserSocialServiceValidateTokenProcedure = "/topfans.user.UserSocialService/ValidateToken"
|
||||
// UserSocialServiceLogoutProcedure is the fully-qualified name of the UserSocialService's Logout RPC.
|
||||
UserSocialServiceLogoutProcedure = "/topfans.user.UserSocialService/Logout"
|
||||
// UserSocialServiceCheckNicknameProcedure is the fully-qualified name of the UserSocialService's CheckNickname RPC.
|
||||
UserSocialServiceCheckNicknameProcedure = "/topfans.user.UserSocialService/CheckNickname"
|
||||
// UserSocialServiceCheckMobileProcedure is the fully-qualified name of the UserSocialService's CheckMobile RPC.
|
||||
UserSocialServiceCheckMobileProcedure = "/topfans.user.UserSocialService/CheckMobile"
|
||||
// UserSocialServiceGetUserProcedure is the fully-qualified name of the UserSocialService's GetUser RPC.
|
||||
UserSocialServiceGetUserProcedure = "/topfans.user.UserSocialService/GetUser"
|
||||
// UserSocialServiceGetFanProfileProcedure is the fully-qualified name of the UserSocialService's GetFanProfile RPC.
|
||||
UserSocialServiceGetFanProfileProcedure = "/topfans.user.UserSocialService/GetFanProfile"
|
||||
// UserSocialServiceUpdateFanProfileSocialProcedure is the fully-qualified name of the UserSocialService's UpdateFanProfileSocial RPC.
|
||||
UserSocialServiceUpdateFanProfileSocialProcedure = "/topfans.user.UserSocialService/UpdateFanProfileSocial"
|
||||
// UserSocialServiceUpdateCrystalBalanceProcedure is the fully-qualified name of the UserSocialService's UpdateCrystalBalance RPC.
|
||||
UserSocialServiceUpdateCrystalBalanceProcedure = "/topfans.user.UserSocialService/UpdateCrystalBalance"
|
||||
// UserSocialServiceUpdateAssetsCountProcedure is the fully-qualified name of the UserSocialService's UpdateAssetsCount RPC.
|
||||
UserSocialServiceUpdateAssetsCountProcedure = "/topfans.user.UserSocialService/UpdateAssetsCount"
|
||||
// UserSocialServiceGetCurrentUserProcedure is the fully-qualified name of the UserSocialService's GetCurrentUser RPC.
|
||||
UserSocialServiceGetCurrentUserProcedure = "/topfans.user.UserSocialService/GetCurrentUser"
|
||||
// UserSocialServiceGetMyProfileProcedure is the fully-qualified name of the UserSocialService's GetMyProfile RPC.
|
||||
UserSocialServiceGetMyProfileProcedure = "/topfans.user.UserSocialService/GetMyProfile"
|
||||
// UserSocialServiceUpdateNicknameProcedure is the fully-qualified name of the UserSocialService's UpdateNickname RPC.
|
||||
UserSocialServiceUpdateNicknameProcedure = "/topfans.user.UserSocialService/UpdateNickname"
|
||||
// UserSocialServiceUpdatePasswordProcedure is the fully-qualified name of the UserSocialService's UpdatePassword RPC.
|
||||
UserSocialServiceUpdatePasswordProcedure = "/topfans.user.UserSocialService/UpdatePassword"
|
||||
// UserSocialServiceUpdateAvatarProcedure is the fully-qualified name of the UserSocialService's UpdateAvatar RPC.
|
||||
UserSocialServiceUpdateAvatarProcedure = "/topfans.user.UserSocialService/UpdateAvatar"
|
||||
// UserSocialServiceGetFanIdentitiesProcedure is the fully-qualified name of the UserSocialService's GetFanIdentities RPC.
|
||||
UserSocialServiceGetFanIdentitiesProcedure = "/topfans.user.UserSocialService/GetFanIdentities"
|
||||
// UserSocialServiceGetMyFanIdentitiesProcedure is the fully-qualified name of the UserSocialService's GetMyFanIdentities RPC.
|
||||
UserSocialServiceGetMyFanIdentitiesProcedure = "/topfans.user.UserSocialService/GetMyFanIdentities"
|
||||
// UserSocialServiceAddIdentityProcedure is the fully-qualified name of the UserSocialService's AddIdentity RPC.
|
||||
UserSocialServiceAddIdentityProcedure = "/topfans.user.UserSocialService/AddIdentity"
|
||||
// UserSocialServiceSwitchIdentityProcedure is the fully-qualified name of the UserSocialService's SwitchIdentity RPC.
|
||||
UserSocialServiceSwitchIdentityProcedure = "/topfans.user.UserSocialService/SwitchIdentity"
|
||||
)
|
||||
|
||||
var (
|
||||
_ UserSocialService = (*UserSocialServiceImpl)(nil)
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
// UserSocialService is a client for the topfans.user.UserSocialService service.
|
||||
type UserSocialService interface {
|
||||
Register(ctx context.Context, req *RegisterRequest, opts ...client.CallOption) (*RegisterResponse, error)
|
||||
Login(ctx context.Context, req *LoginRequest, opts ...client.CallOption) (*LoginResponse, error)
|
||||
RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...client.CallOption) (*RefreshTokenResponse, error)
|
||||
ValidateToken(ctx context.Context, req *ValidateTokenRequest, opts ...client.CallOption) (*ValidateTokenResponse, error)
|
||||
Logout(ctx context.Context, req *LogoutRequest, opts ...client.CallOption) (*LogoutResponse, error)
|
||||
CheckNickname(ctx context.Context, req *CheckNicknameRequest, opts ...client.CallOption) (*CheckNicknameResponse, error)
|
||||
CheckMobile(ctx context.Context, req *CheckMobileRequest, opts ...client.CallOption) (*CheckMobileResponse, error)
|
||||
GetUser(ctx context.Context, req *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error)
|
||||
GetFanProfile(ctx context.Context, req *GetFanProfileRequest, opts ...client.CallOption) (*GetFanProfileResponse, error)
|
||||
UpdateFanProfileSocial(ctx context.Context, req *UpdateFanProfileSocialRequest, opts ...client.CallOption) (*UpdateFanProfileSocialResponse, error)
|
||||
UpdateCrystalBalance(ctx context.Context, req *UpdateCrystalBalanceRequest, opts ...client.CallOption) (*UpdateCrystalBalanceResponse, error)
|
||||
UpdateAssetsCount(ctx context.Context, req *UpdateAssetsCountRequest, opts ...client.CallOption) (*UpdateAssetsCountResponse, error)
|
||||
GetCurrentUser(ctx context.Context, req *GetCurrentUserRequest, opts ...client.CallOption) (*GetCurrentUserResponse, error)
|
||||
GetMyProfile(ctx context.Context, req *GetMyProfileRequest, opts ...client.CallOption) (*GetMyProfileResponse, error)
|
||||
UpdateNickname(ctx context.Context, req *UpdateNicknameRequest, opts ...client.CallOption) (*UpdateNicknameResponse, error)
|
||||
UpdatePassword(ctx context.Context, req *UpdatePasswordRequest, opts ...client.CallOption) (*UpdatePasswordResponse, error)
|
||||
UpdateAvatar(ctx context.Context, req *UpdateAvatarRequest, opts ...client.CallOption) (*UpdateAvatarResponse, error)
|
||||
GetFanIdentities(ctx context.Context, req *GetFanIdentitiesRequest, opts ...client.CallOption) (*GetFanIdentitiesResponse, error)
|
||||
GetMyFanIdentities(ctx context.Context, req *GetMyFanIdentitiesRequest, opts ...client.CallOption) (*GetMyFanIdentitiesResponse, error)
|
||||
AddIdentity(ctx context.Context, req *AddIdentityRequest, opts ...client.CallOption) (*AddIdentityResponse, error)
|
||||
SwitchIdentity(ctx context.Context, req *SwitchIdentityRequest, opts ...client.CallOption) (*SwitchIdentityResponse, error)
|
||||
}
|
||||
|
||||
// NewUserSocialService constructs a client for the user.UserSocialService service.
|
||||
func NewUserSocialService(cli *client.Client, opts ...client.ReferenceOption) (UserSocialService, error) {
|
||||
conn, err := cli.DialWithInfo("topfans.user.UserSocialService", &UserSocialService_ClientInfo, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &UserSocialServiceImpl{
|
||||
conn: conn,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func SetConsumerUserSocialService(srv common.RPCService) {
|
||||
dubbo.SetConsumerServiceWithInfo(srv,&UserSocialService_ClientInfo)
|
||||
}
|
||||
|
||||
// UserSocialServiceImpl implements UserSocialService.
|
||||
type UserSocialServiceImpl struct {
|
||||
conn *client.Connection
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) Register(ctx context.Context, req *RegisterRequest, opts ...client.CallOption) (*RegisterResponse, error) {
|
||||
resp := new(RegisterResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Register", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) Login(ctx context.Context, req *LoginRequest, opts ...client.CallOption) (*LoginResponse, error) {
|
||||
resp := new(LoginResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Login", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...client.CallOption) (*RefreshTokenResponse, error) {
|
||||
resp := new(RefreshTokenResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "RefreshToken", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) ValidateToken(ctx context.Context, req *ValidateTokenRequest, opts ...client.CallOption) (*ValidateTokenResponse, error) {
|
||||
resp := new(ValidateTokenResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "ValidateToken", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) Logout(ctx context.Context, req *LogoutRequest, opts ...client.CallOption) (*LogoutResponse, error) {
|
||||
resp := new(LogoutResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Logout", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) CheckNickname(ctx context.Context, req *CheckNicknameRequest, opts ...client.CallOption) (*CheckNicknameResponse, error) {
|
||||
resp := new(CheckNicknameResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CheckNickname", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) CheckMobile(ctx context.Context, req *CheckMobileRequest, opts ...client.CallOption) (*CheckMobileResponse, error) {
|
||||
resp := new(CheckMobileResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CheckMobile", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetUser(ctx context.Context, req *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error) {
|
||||
resp := new(GetUserResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetUser", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetFanProfile(ctx context.Context, req *GetFanProfileRequest, opts ...client.CallOption) (*GetFanProfileResponse, error) {
|
||||
resp := new(GetFanProfileResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetFanProfile", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdateFanProfileSocial(ctx context.Context, req *UpdateFanProfileSocialRequest, opts ...client.CallOption) (*UpdateFanProfileSocialResponse, error) {
|
||||
resp := new(UpdateFanProfileSocialResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateFanProfileSocial", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdateCrystalBalance(ctx context.Context, req *UpdateCrystalBalanceRequest, opts ...client.CallOption) (*UpdateCrystalBalanceResponse, error) {
|
||||
resp := new(UpdateCrystalBalanceResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateCrystalBalance", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdateAssetsCount(ctx context.Context, req *UpdateAssetsCountRequest, opts ...client.CallOption) (*UpdateAssetsCountResponse, error) {
|
||||
resp := new(UpdateAssetsCountResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateAssetsCount", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetCurrentUser(ctx context.Context, req *GetCurrentUserRequest, opts ...client.CallOption) (*GetCurrentUserResponse, error) {
|
||||
resp := new(GetCurrentUserResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetCurrentUser", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetMyProfile(ctx context.Context, req *GetMyProfileRequest, opts ...client.CallOption) (*GetMyProfileResponse, error) {
|
||||
resp := new(GetMyProfileResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyProfile", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdateNickname(ctx context.Context, req *UpdateNicknameRequest, opts ...client.CallOption) (*UpdateNicknameResponse, error) {
|
||||
resp := new(UpdateNicknameResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateNickname", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdatePassword(ctx context.Context, req *UpdatePasswordRequest, opts ...client.CallOption) (*UpdatePasswordResponse, error) {
|
||||
resp := new(UpdatePasswordResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdatePassword", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) UpdateAvatar(ctx context.Context, req *UpdateAvatarRequest, opts ...client.CallOption) (*UpdateAvatarResponse, error) {
|
||||
resp := new(UpdateAvatarResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateAvatar", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetFanIdentities(ctx context.Context, req *GetFanIdentitiesRequest, opts ...client.CallOption) (*GetFanIdentitiesResponse, error) {
|
||||
resp := new(GetFanIdentitiesResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetFanIdentities", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) GetMyFanIdentities(ctx context.Context, req *GetMyFanIdentitiesRequest, opts ...client.CallOption) (*GetMyFanIdentitiesResponse, error) {
|
||||
resp := new(GetMyFanIdentitiesResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyFanIdentities", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) AddIdentity(ctx context.Context, req *AddIdentityRequest, opts ...client.CallOption) (*AddIdentityResponse, error) {
|
||||
resp := new(AddIdentityResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "AddIdentity", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *UserSocialServiceImpl) SwitchIdentity(ctx context.Context, req *SwitchIdentityRequest, opts ...client.CallOption) (*SwitchIdentityResponse, error) {
|
||||
resp := new(SwitchIdentityResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "SwitchIdentity", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var UserSocialService_ClientInfo = client.ClientInfo{
|
||||
InterfaceName: "topfans.user.UserSocialService",
|
||||
MethodNames: []string{"Register","Login","RefreshToken","ValidateToken","Logout","CheckNickname","CheckMobile","GetUser","GetFanProfile","UpdateFanProfileSocial","UpdateCrystalBalance","UpdateAssetsCount","GetCurrentUser","GetMyProfile","UpdateNickname","UpdatePassword","UpdateAvatar","GetFanIdentities","GetMyFanIdentities","AddIdentity","SwitchIdentity"},
|
||||
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
|
||||
dubboCli := dubboCliRaw.(*UserSocialServiceImpl)
|
||||
dubboCli.conn = conn
|
||||
},
|
||||
}
|
||||
|
||||
// UserSocialServiceHandler is an implementation of the topfans.user.UserSocialService service.
|
||||
type UserSocialServiceHandler interface {
|
||||
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||||
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
|
||||
ValidateToken(context.Context, *ValidateTokenRequest) (*ValidateTokenResponse, error)
|
||||
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
||||
CheckNickname(context.Context, *CheckNicknameRequest) (*CheckNicknameResponse, error)
|
||||
CheckMobile(context.Context, *CheckMobileRequest) (*CheckMobileResponse, error)
|
||||
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
|
||||
GetFanProfile(context.Context, *GetFanProfileRequest) (*GetFanProfileResponse, error)
|
||||
UpdateFanProfileSocial(context.Context, *UpdateFanProfileSocialRequest) (*UpdateFanProfileSocialResponse, error)
|
||||
UpdateCrystalBalance(context.Context, *UpdateCrystalBalanceRequest) (*UpdateCrystalBalanceResponse, error)
|
||||
UpdateAssetsCount(context.Context, *UpdateAssetsCountRequest) (*UpdateAssetsCountResponse, error)
|
||||
GetCurrentUser(context.Context, *GetCurrentUserRequest) (*GetCurrentUserResponse, error)
|
||||
GetMyProfile(context.Context, *GetMyProfileRequest) (*GetMyProfileResponse, error)
|
||||
UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error)
|
||||
UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
|
||||
UpdateAvatar(context.Context, *UpdateAvatarRequest) (*UpdateAvatarResponse, error)
|
||||
GetFanIdentities(context.Context, *GetFanIdentitiesRequest) (*GetFanIdentitiesResponse, error)
|
||||
GetMyFanIdentities(context.Context, *GetMyFanIdentitiesRequest) (*GetMyFanIdentitiesResponse, error)
|
||||
AddIdentity(context.Context, *AddIdentityRequest) (*AddIdentityResponse, error)
|
||||
SwitchIdentity(context.Context, *SwitchIdentityRequest) (*SwitchIdentityResponse, error)
|
||||
}
|
||||
|
||||
func RegisterUserSocialServiceHandler(srv *server.Server, hdlr UserSocialServiceHandler, opts ...server.ServiceOption) error {
|
||||
return srv.Register(hdlr, &UserSocialService_ServiceInfo, opts...)
|
||||
}
|
||||
|
||||
func SetProviderUserSocialService(srv common.RPCService) {
|
||||
dubbo.SetProviderServiceWithInfo(srv,&UserSocialService_ServiceInfo)
|
||||
}
|
||||
|
||||
|
||||
var UserSocialService_ServiceInfo = server.ServiceInfo{
|
||||
InterfaceName: "topfans.user.UserSocialService",
|
||||
ServiceType: (*UserSocialServiceHandler)(nil),
|
||||
Methods: []server.MethodInfo{
|
||||
{
|
||||
Name: "Register",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(RegisterRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*RegisterRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).Register(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Login",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(LoginRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*LoginRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).Login(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "RefreshToken",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(RefreshTokenRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*RefreshTokenRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).RefreshToken(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "ValidateToken",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(ValidateTokenRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*ValidateTokenRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).ValidateToken(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Logout",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(LogoutRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*LogoutRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).Logout(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "CheckNickname",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(CheckNicknameRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*CheckNicknameRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).CheckNickname(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "CheckMobile",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(CheckMobileRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*CheckMobileRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).CheckMobile(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetUser",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetUserRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetUserRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetUser(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetFanProfile",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetFanProfileRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetFanProfileRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetFanProfile(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdateFanProfileSocial",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdateFanProfileSocialRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdateFanProfileSocialRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdateFanProfileSocial(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdateCrystalBalance",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdateCrystalBalanceRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdateCrystalBalanceRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdateCrystalBalance(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdateAssetsCount",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdateAssetsCountRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdateAssetsCountRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdateAssetsCount(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetCurrentUser",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetCurrentUserRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetCurrentUserRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetCurrentUser(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetMyProfile",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetMyProfileRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetMyProfileRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetMyProfile(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdateNickname",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdateNicknameRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdateNicknameRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdateNickname(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdatePassword",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdatePasswordRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdatePasswordRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdatePassword(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UpdateAvatar",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UpdateAvatarRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UpdateAvatarRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).UpdateAvatar(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetFanIdentities",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetFanIdentitiesRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetFanIdentitiesRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetFanIdentities(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetMyFanIdentities",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetMyFanIdentitiesRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetMyFanIdentitiesRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).GetMyFanIdentities(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "AddIdentity",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(AddIdentityRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*AddIdentityRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).AddIdentity(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "SwitchIdentity",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(SwitchIdentityRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*SwitchIdentityRequest)
|
||||
res, err := handler.(UserSocialServiceHandler).SwitchIdentity(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
# 多机部署时将此文件放到 gateway 服务器的 /etc/topfans/gateway.env
|
||||
|
||||
# Gin 运行模式: debug, release
|
||||
GIN_MODE=release
|
||||
GIN_MODE=debug
|
||||
# API 网关监听端口
|
||||
SERVER_PORT=8080
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ type DubboConfig struct {
|
||||
UserServiceURL string
|
||||
SocialServiceURL string
|
||||
AssetServiceURL string
|
||||
GalleryServiceURL string
|
||||
GalleryServiceURL string
|
||||
ActivityServiceURL string
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -1428,12 +1429,33 @@ func (ctrl *AssetController) ImageGeneration(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 开发模式下使用 mock 数据
|
||||
if config.Load().Server.Mode == "debug" {
|
||||
mockData, err := os.ReadFile("/Users/liulujian/Documents/code/TopFansByGithub/mock/minimax.json")
|
||||
if err != nil {
|
||||
response.Error(c, 500, "Failed to read mock data: "+err.Error())
|
||||
return
|
||||
}
|
||||
var mockResult map[string]interface{}
|
||||
if err := json.Unmarshal(mockData, &mockResult); err != nil {
|
||||
response.Error(c, 500, "Failed to parse mock data: "+err.Error())
|
||||
return
|
||||
}
|
||||
response.Success(c, mockResult)
|
||||
return
|
||||
}
|
||||
|
||||
result, err := ctrl.minimaxService.GenerateImage(c.Request.Context(), &req)
|
||||
if err != nil {
|
||||
response.Error(c, 500, "Image generation failed: "+err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// 将输入图片追加到图片数组末尾
|
||||
if len(req.SubjectReference) > 0 && req.SubjectReference[0].ImageFile != "" {
|
||||
result.Images = append(result.Images, req.SubjectReference[0].ImageFile)
|
||||
}
|
||||
|
||||
response.Success(c, gin.H{
|
||||
"images": result.Images,
|
||||
})
|
||||
|
||||
@ -47,7 +47,7 @@ type Asset struct {
|
||||
Owner *OwnerInfo `protobuf:"bytes,18,opt,name=owner,proto3" json:"owner,omitempty"` // 持有者信息(保留用于兼容性)
|
||||
OwnerNickname string `protobuf:"bytes,19,opt,name=owner_nickname,json=ownerNickname,proto3" json:"owner_nickname,omitempty"` // 持有者昵称(在该star下的昵称)
|
||||
IsLiked bool `protobuf:"varint,20,opt,name=is_liked,json=isLiked,proto3" json:"is_liked,omitempty"` // 当前用户是否已点赞
|
||||
Info string `protobuf:"bytes,21,opt,name=info,proto3" json:"info,omitempty"` // 藏品信息
|
||||
Info string `protobuf:"bytes,21,opt,name=info,proto3" json:"info,omitempty"` // 藏品信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -309,6 +309,7 @@ type MintOrder struct {
|
||||
CreatedAt int64 `protobuf:"varint,14,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间(毫秒时间戳)
|
||||
UpdatedAt int64 `protobuf:"varint,15,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间(毫秒时间戳)
|
||||
MintedAt int64 `protobuf:"varint,16,opt,name=minted_at,json=mintedAt,proto3" json:"minted_at,omitempty"` // 上链成功时间(毫秒时间戳,可选)
|
||||
Info string `protobuf:"bytes,17,opt,name=info,proto3" json:"info,omitempty"` // 藏品信息(必填)
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -455,6 +456,13 @@ func (x *MintOrder) GetMintedAt() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MintOrder) GetInfo() string {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 阶段一:初始化铸造订单(仅生成并落库 order_id,status=PENDING)
|
||||
type InitMintOrderRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@ -562,7 +570,7 @@ type CreateMintOrderRequest struct {
|
||||
Rarity int32 `protobuf:"varint,5,opt,name=rarity,proto3" json:"rarity,omitempty"` // 稀有度(可选)
|
||||
Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` // 标签列表(可选)
|
||||
MaterialType string `protobuf:"bytes,7,opt,name=material_type,json=materialType,proto3" json:"material_type,omitempty"` // 素材类型(可选)
|
||||
Info string `protobuf:"bytes,8,opt,name=info,proto3" json:"info,omitempty"` // 藏品信息(必填)
|
||||
Info string `protobuf:"bytes,8,opt,name=info,proto3" json:"info,omitempty"` // 藏品信息(必填)
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -2294,7 +2302,7 @@ var File_asset_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_asset_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\vasset.proto\x12\rtopfans.asset\x1a\x12proto/common.proto\x1a\x1cgoogle/api/annotations.proto\"\xda\x04\n" +
|
||||
"\vasset.proto\x12\rtopfans.asset\x1a\x12proto/common.proto\x1a\x1cgoogle/api/annotations.proto\"\xee\x04\n" +
|
||||
"\x05Asset\x12\x19\n" +
|
||||
"\basset_id\x18\x01 \x01(\x03R\aassetId\x12\x1b\n" +
|
||||
"\towner_uid\x18\x02 \x01(\x03R\bownerUid\x12\x17\n" +
|
||||
@ -2321,11 +2329,12 @@ const file_asset_proto_rawDesc = "" +
|
||||
"\tminted_at\x18\x11 \x01(\x03R\bmintedAt\x12.\n" +
|
||||
"\x05owner\x18\x12 \x01(\v2\x18.topfans.asset.OwnerInfoR\x05owner\x12%\n" +
|
||||
"\x0eowner_nickname\x18\x13 \x01(\tR\rownerNickname\x12\x19\n" +
|
||||
"\bis_liked\x18\x14 \x01(\bR\aisLiked\"X\n" +
|
||||
"\bis_liked\x18\x14 \x01(\bR\aisLiked\x12\x12\n" +
|
||||
"\x04info\x18\x15 \x01(\tR\x04info\"X\n" +
|
||||
"\tOwnerInfo\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1a\n" +
|
||||
"\bnickname\x18\x02 \x01(\tR\bnickname\x12\x16\n" +
|
||||
"\x06avatar\x18\x03 \x01(\tR\x06avatar\"\xe3\x03\n" +
|
||||
"\x06avatar\x18\x03 \x01(\tR\x06avatar\"\xf7\x03\n" +
|
||||
"\tMintOrder\x12\x19\n" +
|
||||
"\border_id\x18\x01 \x01(\tR\aorderId\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x19\n" +
|
||||
@ -2346,12 +2355,13 @@ const file_asset_proto_rawDesc = "" +
|
||||
"created_at\x18\x0e \x01(\x03R\tcreatedAt\x12\x1d\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\x0f \x01(\x03R\tupdatedAt\x12\x1b\n" +
|
||||
"\tminted_at\x18\x10 \x01(\x03R\bmintedAt\"1\n" +
|
||||
"\tminted_at\x18\x10 \x01(\x03R\bmintedAt\x12\x12\n" +
|
||||
"\x04info\x18\x11 \x01(\tR\x04info\"1\n" +
|
||||
"\x14InitMintOrderRequest\x12\x19\n" +
|
||||
"\border_id\x18\x01 \x01(\tR\aorderId\"y\n" +
|
||||
"\x15InitMintOrderResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x12.\n" +
|
||||
"\x05order\x18\x02 \x01(\v2\x18.topfans.asset.MintOrderR\x05order\"\xf3\x01\n" +
|
||||
"\x05order\x18\x02 \x01(\v2\x18.topfans.asset.MintOrderR\x05order\"\xf1\x01\n" +
|
||||
"\x16CreateMintOrderRequest\x12\x19\n" +
|
||||
"\border_id\x18\x02 \x01(\tR\aorderId\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12!\n" +
|
||||
@ -2359,8 +2369,8 @@ const file_asset_proto_rawDesc = "" +
|
||||
"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x16\n" +
|
||||
"\x06rarity\x18\x05 \x01(\x05R\x06rarity\x12\x12\n" +
|
||||
"\x04tags\x18\x06 \x03(\tR\x04tags\x12#\n" +
|
||||
"\rmaterial_type\x18\a \x01(\tR\fmaterialType\x12\x14\n" +
|
||||
"\x05event\x18\b \x01(\tR\x05event\"\xaf\x01\n" +
|
||||
"\rmaterial_type\x18\a \x01(\tR\fmaterialType\x12\x12\n" +
|
||||
"\x04info\x18\b \x01(\tR\x04info\"\xaf\x01\n" +
|
||||
"\x19PreCreateMintOrderRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12!\n" +
|
||||
"\fmaterial_url\x18\x02 \x01(\tR\vmaterialUrl\x12 \n" +
|
||||
|
||||
@ -539,9 +539,9 @@ func (x *RegisterResponse) GetFanProfile() *FanProfile {
|
||||
// 登录请求
|
||||
type LoginRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码
|
||||
StarId *int64 `protobuf:"varint,3,opt,name=star_id,json=starId,proto3,oneof" json:"star_id,omitempty"` // 可选:指定登录的明星ID,不指定则使用最早创建的粉丝档案
|
||||
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码
|
||||
StarId int64 `protobuf:"varint,3,opt,name=star_id,json=starId,proto3" json:"star_id,omitempty"` // 可选:指定登录的明星ID,不指定则使用最早创建的粉丝档案
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -591,8 +591,8 @@ func (x *LoginRequest) GetPassword() string {
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetStarId() int64 {
|
||||
if x != nil && x.StarId != nil {
|
||||
return *x.StarId
|
||||
if x != nil {
|
||||
return x.StarId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -2765,13 +2765,11 @@ const file_user_proto_rawDesc = "" +
|
||||
"expires_in\x18\x03 \x01(\x03R\texpiresIn\x12&\n" +
|
||||
"\x04user\x18\x04 \x01(\v2\x12.topfans.user.UserR\x04user\x129\n" +
|
||||
"\vfan_profile\x18\x05 \x01(\v2\x18.topfans.user.FanProfileR\n" +
|
||||
"fanProfile\"l\n" +
|
||||
"fanProfile\"[\n" +
|
||||
"\fLoginRequest\x12\x16\n" +
|
||||
"\x06mobile\x18\x01 \x01(\tR\x06mobile\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x1c\n" +
|
||||
"\astar_id\x18\x03 \x01(\x03H\x00R\x06starId\x88\x01\x01B\n" +
|
||||
"\n" +
|
||||
"\b_star_id\"\xa3\x02\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x17\n" +
|
||||
"\astar_id\x18\x03 \x01(\x03R\x06starId\"\xa3\x02\n" +
|
||||
"\rLoginResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x12!\n" +
|
||||
"\faccess_token\x18\x02 \x01(\tR\vaccessToken\x12\x1d\n" +
|
||||
@ -3086,7 +3084,6 @@ func file_user_proto_init() {
|
||||
if File_user_proto != nil {
|
||||
return
|
||||
}
|
||||
file_user_proto_msgTypes[5].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@ -61,6 +61,7 @@ message MintOrder {
|
||||
int64 created_at = 14; // 创建时间(毫秒时间戳)
|
||||
int64 updated_at = 15; // 更新时间(毫秒时间戳)
|
||||
int64 minted_at = 16; // 上链成功时间(毫秒时间戳,可选)
|
||||
string info = 17; // 藏品信息(必填)
|
||||
}
|
||||
|
||||
// ==================== 铸造相关消息 ====================
|
||||
|
||||
@ -76,7 +76,7 @@ message RegisterResponse {
|
||||
message LoginRequest {
|
||||
string mobile = 1; // 手机号
|
||||
string password = 2; // 密码
|
||||
optional int64 star_id = 3; // 可选:指定登录的明星ID,不指定则使用最早创建的粉丝档案
|
||||
int64 star_id = 3; // 可选:指定登录的明星ID,不指定则使用最早创建的粉丝档案
|
||||
}
|
||||
|
||||
// 登录响应
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
appErrors "github.com/topfans/backend/pkg/errors"
|
||||
"github.com/topfans/backend/pkg/models"
|
||||
"gorm.io/gorm"
|
||||
@ -117,6 +118,21 @@ func (r *assetRepository) GetByIDAndOwner(assetID, ownerUID, starID int64) (*mod
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"owner_uid": ownerUID,
|
||||
"star_id": starID,
|
||||
"asset_id": asset.ID,
|
||||
"name": asset.Name,
|
||||
"cover_url": asset.CoverURL,
|
||||
"info": asset.Info,
|
||||
"status": asset.Status,
|
||||
"tx_hash": asset.TxHash,
|
||||
"block_number": asset.BlockNumber,
|
||||
"minted_at": asset.MintedAt,
|
||||
"created_at": asset.CreatedAt,
|
||||
"updated_at": asset.UpdatedAt,
|
||||
}).Info("GetByIDAndOwner 查询结果")
|
||||
|
||||
return &asset, nil
|
||||
}
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ const handleLike = async () => {
|
||||
// 返回逻辑
|
||||
const handleBack = () => {
|
||||
if (fromParam.value === 'castlove') {
|
||||
uni.reLaunch({ url: '/pages/square/square?tab=1' });
|
||||
uni.reLaunch({ url: '/pages/castlove/mall' });
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
<!-- 主内容区域 -->
|
||||
<scroll-view class="content-wrapper" scroll-y="true" :show-scrollbar="false" :enhanced="true">
|
||||
<!-- 页面标题 -->
|
||||
<view v-if="pageName" class="page-title">
|
||||
<!-- <view v-if="pageName" class="page-title">
|
||||
<text class="title-text">创建{{ pageName }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 图片上传区域 -->
|
||||
<view class="upload-section">
|
||||
@ -705,9 +705,7 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
font-family: 'ZaoZiGongFangJianHei-1', sans-serif;
|
||||
text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.5);
|
||||
background: linear-gradient(165deg, #F0E4B1 0%, #F08399 50%, #B94E73 90%, #834B9E 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 星援活动 -->
|
||||
<view v-if="showStarActivityIcon" class="daily-task-group" @click="handleTaskClick">
|
||||
<view v-if="showStarActivityIcon" class="daily-task-group" @click="handleStarActivityClick">
|
||||
<!-- 1. 上层:星援活动(悬浮在上面) -->
|
||||
<view class="task-icon-box">
|
||||
<image class="task-icon-img" src="/static/icon/bus-icon.png" mode="aspectFit"></image>
|
||||
@ -94,6 +94,7 @@ import { useStore } from 'vuex';
|
||||
import Avatar from './Avatar.vue';
|
||||
import TaskModal from './TaskModal.vue';
|
||||
import GuideListModal from '@/components/GuideListModal.vue';
|
||||
import { getActivityListApi } from '@/utils/api.js';
|
||||
|
||||
// 定义 props
|
||||
const props = defineProps({
|
||||
@ -221,12 +222,68 @@ const handleBack = () => {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 处理任务图标点击
|
||||
const handleTaskClick = () => {
|
||||
showTaskModal.value = true;
|
||||
};
|
||||
|
||||
// 处理星援活动图标点击
|
||||
const handleStarActivityClick = async () => {
|
||||
try {
|
||||
// 从本地存储获取star_id
|
||||
const starId = uni.getStorageSync('star_id');
|
||||
if (!starId) {
|
||||
uni.showToast({
|
||||
title: '无法获取用户信息',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 显示加载提示
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
|
||||
// 调用API获取活动列表
|
||||
const response = await getActivityListApi(starId, 'active', 1, 10);
|
||||
|
||||
uni.hideLoading();
|
||||
|
||||
// 检查响应数据
|
||||
if (response && response.data && response.data.activities) {
|
||||
const activities = response.data.activities;
|
||||
|
||||
// 查找activity_type为bus的活动
|
||||
const busActivity = activities.find(activity => activity.activity_type === 'bus');
|
||||
|
||||
if (busActivity) {
|
||||
// 跳转到应援活动页面
|
||||
uni.navigateTo({
|
||||
url: `/pages/support-activity/index?id=${busActivity.id}`
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂无巴士应援活动',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取活动列表失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading();
|
||||
console.error('获取活动列表失败:', error);
|
||||
uni.showToast({
|
||||
title: error.message || '获取活动列表失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 点击新手引导
|
||||
const handleGuideClick = () => {
|
||||
showGuideListModal.value = true;
|
||||
|
||||
@ -70,9 +70,9 @@ const cardCustomStyle = {
|
||||
|
||||
// 添加NFT处理 - 跳转到铸爱页面
|
||||
const handleAddNft = () => {
|
||||
// 跳转到广场页面的铸爱 tab
|
||||
// 跳转到铸爱商城页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/square/square?tab=2'
|
||||
url: '/pages/castlove/mall'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -33,16 +33,16 @@
|
||||
@click="selectCard(index)"
|
||||
>
|
||||
<view class="card-frame">
|
||||
<!-- TOPFANS Logo标签 -->
|
||||
<!-- <view class="topfans-label">
|
||||
<text class="topfans-text">TOPFANS</text>
|
||||
</view> -->
|
||||
|
||||
<image
|
||||
class="card-image"
|
||||
:src="image"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
|
||||
<!-- 选中标记 -->
|
||||
<view v-if="selectedIndex === index" class="selected-mark">
|
||||
<text class="check-icon">✓</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -99,32 +99,77 @@ const getStarStyle = (index) => {
|
||||
};
|
||||
};
|
||||
|
||||
// 获取卡片样式
|
||||
// 获取卡片样式 - 金字塔布局(5张图)
|
||||
const getCardStyle = (index) => {
|
||||
const positions = [
|
||||
{ left: '8%', top: '18%', rotate: '-12deg', scale: 1 },
|
||||
{ left: '52%', top: '15%', rotate: '8deg', scale: 0.92 },
|
||||
{ left: '5%', top: '42%', rotate: '-6deg', scale: 0.95 },
|
||||
{ left: '50%', top: '45%', rotate: '10deg', scale: 0.93 }
|
||||
// 金字塔布局:
|
||||
// 顶部:1张大卡片(居中,往下移)- z-index: 30
|
||||
// 中间:2张中等卡片(居中对称)- z-index: 20
|
||||
// 底部:2张小卡片(左右对称,边距更小)- z-index: 10
|
||||
// 使用rpx单位,屏幕宽度750rpx,卡片宽度200rpx
|
||||
// 定义5个位置,对应图片0,1,2,3,4的初始位置
|
||||
const allPositions = [
|
||||
// 位置0(图片0):底部左
|
||||
{ left: 40, top: 624, rotate: '-5deg', scale: 0.72, zIndex: 10 },
|
||||
// 位置1(图片1):中间左
|
||||
{ left: 130, top: 580, rotate: '-8deg', scale: 0.82, zIndex: 20 },
|
||||
// 位置2(图片2):顶部中心
|
||||
{ left: 275, top: 500, rotate: '0deg', scale: 1.15, zIndex: 30 },
|
||||
// 位置3(图片3):中间右
|
||||
{ left: 420, top: 580, rotate: '8deg', scale: 0.82, zIndex: 20 },
|
||||
// 位置4(图片4):底部右
|
||||
{ left: 510, top: 624, rotate: '5deg', scale: 0.72, zIndex: 10 }
|
||||
];
|
||||
|
||||
const pos = positions[index] || positions[0];
|
||||
// 计算当前图片应该在哪个位置
|
||||
let posIndex;
|
||||
if (selectedIndex.value === -1) {
|
||||
// 没有选中,图片index对应位置index
|
||||
posIndex = index;
|
||||
} else {
|
||||
// 有选中的卡片,重新计算位置
|
||||
if (index === selectedIndex.value) {
|
||||
// 选中的卡片移到位置2(顶部中心)
|
||||
posIndex = 2;
|
||||
} else {
|
||||
// 其他卡片按顺序填充到 0,1,3,4 位置
|
||||
// 计算相对位置
|
||||
const relativePos = (index - selectedIndex.value + 5) % 5;
|
||||
// 映射到实际位置(跳过位置2)
|
||||
// relativePos: 1,2,3,4 对应位置: 3,4,0,1
|
||||
if (relativePos === 1) {
|
||||
posIndex = 3; // 下一张 → 中间右
|
||||
} else if (relativePos === 2) {
|
||||
posIndex = 4; // 下下张 → 底部右
|
||||
} else if (relativePos === 3) {
|
||||
posIndex = 0; // 下下下张 → 底部左
|
||||
} else if (relativePos === 4) {
|
||||
posIndex = 1; // 上一张 → 中间左
|
||||
} else {
|
||||
// relativePos === 0,这是选中的卡片,不应该到这里
|
||||
console.error('逻辑错误:relativePos为0但不是选中的卡片');
|
||||
posIndex = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果是选中的卡片,添加高亮效果
|
||||
const pos = allPositions[posIndex];
|
||||
|
||||
// 如果是选中的卡片,放大1.5倍并设置最高层级
|
||||
if (selectedIndex.value === index) {
|
||||
return {
|
||||
left: pos.left,
|
||||
top: pos.top,
|
||||
transform: `rotate(${pos.rotate}) scale(${pos.scale * 1.05})`,
|
||||
filter: 'brightness(1.2)',
|
||||
zIndex: 100
|
||||
left: `${pos.left}rpx`,
|
||||
top: `${pos.top}rpx`,
|
||||
transform: `scale(${pos.scale * 1.15})!important`,
|
||||
filter: 'brightness(1.15) drop-shadow(0 0 40rpx rgba(100, 200, 255, 0.9))',
|
||||
zIndex: 100 // 选中时层级最高
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
left: pos.left,
|
||||
top: pos.top,
|
||||
transform: `rotate(${pos.rotate}) scale(${pos.scale})`
|
||||
left: `${pos.left}rpx`,
|
||||
top: `${pos.top}rpx`,
|
||||
transform: `scale(${pos.scale})`,
|
||||
zIndex: pos.zIndex
|
||||
};
|
||||
};
|
||||
|
||||
@ -133,11 +178,11 @@ const selectCard = (index) => {
|
||||
selectedIndex.value = index;
|
||||
|
||||
// 可以添加选中效果
|
||||
uni.showToast({
|
||||
title: `已选择第${index + 1}张卡片`,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
// uni.showToast({
|
||||
// title: `已选择第${index + 1}张卡片`,
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// });
|
||||
};
|
||||
|
||||
// 将base64转换为Blob
|
||||
@ -621,7 +666,8 @@ const selectAsset = async () => {
|
||||
material_url: imageUrl,
|
||||
rarity: 0,
|
||||
tags: [],
|
||||
order_id: currentOrderId.value
|
||||
order_id: currentOrderId.value,
|
||||
info: orderValue.info || '' // 添加info字段
|
||||
};
|
||||
|
||||
// 调用创建铸造订单API
|
||||
@ -697,7 +743,7 @@ onMounted(() => {
|
||||
|
||||
<style scoped>
|
||||
.generation-result {
|
||||
position: relative;
|
||||
position: relative ;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
@ -798,18 +844,17 @@ onMounted(() => {
|
||||
|
||||
.card-item {
|
||||
position: absolute;
|
||||
width: 280rpx;
|
||||
height: 348rpx;
|
||||
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
width: 200rpx;
|
||||
height: 260rpx;
|
||||
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
cursor: pointer;
|
||||
filter: drop-shadow(0 10rpx 30rpx rgba(0, 0, 0, 0.4));
|
||||
filter: drop-shadow(0 15rpx 40rpx rgba(0, 0, 0, 0.5));
|
||||
transform: scale(0) translateY(100rpx);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cards-visible .card-item {
|
||||
animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
|
||||
cardFloat 4s ease-in-out infinite 0.8s;
|
||||
animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@ -824,8 +869,8 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.card-item:active {
|
||||
transform: scale(0.95) !important;
|
||||
.card-item:active:not(.card-selected) {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.cards-visible .card-item:nth-child(1) {
|
||||
@ -844,6 +889,10 @@ onMounted(() => {
|
||||
animation-delay: 0.45s, 1.25s;
|
||||
}
|
||||
|
||||
.cards-visible .card-item:nth-child(5) {
|
||||
animation-delay: 0.6s, 1.4s;
|
||||
}
|
||||
|
||||
@keyframes cardFloat {
|
||||
0%, 100% {
|
||||
transform: translateY(0) rotate(var(--rotate, 0deg));
|
||||
@ -858,67 +907,62 @@ onMounted(() => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(135deg,
|
||||
#FFE5F0 0%,
|
||||
#E8D4FF 25%,
|
||||
#D4E8FF 50%,
|
||||
#E8FFE5 75%,
|
||||
#FFE5F0 100%);
|
||||
background-size: 200% 200%;
|
||||
animation: holographicShift 3s ease-in-out infinite;
|
||||
rgba(180, 220, 255, 0.95) 0%,
|
||||
rgba(200, 230, 255, 0.95) 50%,
|
||||
rgba(220, 240, 255, 0.95) 100%);
|
||||
border-radius: 20rpx;
|
||||
padding: 12rpx;
|
||||
padding: 10rpx;
|
||||
box-shadow:
|
||||
0 0 30rpx rgba(255, 107, 157, 0.4),
|
||||
0 0 60rpx rgba(168, 107, 255, 0.3),
|
||||
inset 0 0 20rpx rgba(255, 255, 255, 0.3);
|
||||
overflow: hidden;
|
||||
border: 4rpx solid transparent;
|
||||
background-clip: padding-box;
|
||||
0 0 40rpx rgba(100, 200, 255, 0.5),
|
||||
0 20rpx 60rpx rgba(0, 0, 0, 0.4),
|
||||
inset 0 2rpx 10rpx rgba(255, 255, 255, 0.6);
|
||||
overflow: visible;
|
||||
border: 5rpx solid rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.card-frame::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -4rpx;
|
||||
left: -4rpx;
|
||||
right: -4rpx;
|
||||
bottom: -4rpx;
|
||||
background: linear-gradient(45deg,
|
||||
#FF6B9D,
|
||||
#A86BFF,
|
||||
#6BDDFF,
|
||||
#6BFF9D,
|
||||
#FFD66B,
|
||||
#FF6B9D);
|
||||
background-size: 300% 300%;
|
||||
border-radius: 20rpx;
|
||||
top: -8rpx;
|
||||
left: -8rpx;
|
||||
right: -8rpx;
|
||||
bottom: -8rpx;
|
||||
background: linear-gradient(135deg,
|
||||
rgba(100, 200, 255, 0.6) 0%,
|
||||
rgba(150, 220, 255, 0.6) 50%,
|
||||
rgba(200, 240, 255, 0.6) 100%);
|
||||
border-radius: 22rpx;
|
||||
z-index: -1;
|
||||
animation: rainbowBorder 4s linear infinite;
|
||||
filter: blur(10rpx);
|
||||
}
|
||||
|
||||
@keyframes holographicShift {
|
||||
0%, 100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
.topfans-label {
|
||||
position: absolute;
|
||||
top: 15rpx;
|
||||
left: 15rpx;
|
||||
background: linear-gradient(135deg, #A855FF 0%, #D946EF 100%);
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
z-index: 10;
|
||||
box-shadow: 0 4rpx 15rpx rgba(168, 85, 255, 0.5);
|
||||
}
|
||||
|
||||
@keyframes rainbowBorder {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 300% 50%;
|
||||
}
|
||||
.topfans-text {
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
letter-spacing: 1rpx;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.card-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
border-radius: 14rpx;
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.card-shine {
|
||||
@ -1001,13 +1045,17 @@ onMounted(() => {
|
||||
transform: translate(-50%, -50%);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: rgba(255, 107, 157, 0.9);
|
||||
background: linear-gradient(135deg, #00D4FF 0%, #0099FF 100%);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4rpx 20rpx rgba(255, 107, 157, 0.6);
|
||||
box-shadow:
|
||||
0 0 30rpx rgba(0, 212, 255, 0.8),
|
||||
0 8rpx 30rpx rgba(0, 0, 0, 0.4);
|
||||
animation: checkPop 0.3s ease-out;
|
||||
border: 4rpx solid rgba(255, 255, 255, 0.9);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@keyframes checkPop {
|
||||
@ -1023,9 +1071,10 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.check-icon {
|
||||
font-size: 60rpx;
|
||||
font-size: 70rpx;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.card-selected {
|
||||
@ -1271,7 +1320,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.action-button:active {
|
||||
transform: scale(0.95);
|
||||
transform: scale(1.2);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
|
||||
@ -647,7 +647,7 @@ export default {
|
||||
// 跳转到铸爱页面
|
||||
const goToCastlove = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/square/square?tab=2'
|
||||
url: '/pages/castlove/mall'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -451,9 +451,9 @@ const handleAssetClick = (type) => {
|
||||
url: '/pages/exhibition/exhibition'
|
||||
});
|
||||
} else if (type === 'starbook') {
|
||||
// 跳转到广场页面,并切换到星册tab
|
||||
// 跳转到星册页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/square/square?tab=1'
|
||||
url: '/pages/starbook/index'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@ -148,11 +148,11 @@ function handleTabChange(newTab) {
|
||||
|
||||
// 根据tab索引跳转到对应页面
|
||||
const tabRoutes = [
|
||||
'/pages/square/square?tab=0', // 广场
|
||||
'/pages/square/square?tab=1', // 星册
|
||||
'/pages/square/square?tab=2', // 铸爱
|
||||
'/pages/square/square?tab=3', // 星城
|
||||
'/pages/square/square?tab=4' // 好友
|
||||
'/pages/square/square', // 广场
|
||||
'/pages/starbook/index', // 星册
|
||||
'/pages/castlove/mall', // 铸爱
|
||||
'/pages/starcity/index', // 星城
|
||||
'/pages/friends/index' // 好友
|
||||
]
|
||||
|
||||
if (newTab >= 0 && newTab < tabRoutes.length) {
|
||||
|
||||
@ -78,7 +78,6 @@ export async function getAssetCoverRealUrl(coverUrl) {
|
||||
if (!coverUrl || coverUrl.startsWith('/static/')) {
|
||||
return coverUrl || DEFAULT_IMAGE;
|
||||
}
|
||||
console.log(coverUrl)
|
||||
try {
|
||||
// 提取完整OSS对象路径(保留 asset/13/87/filename.jpg 这样的前缀)
|
||||
const objectPath = extractOssObjectPath(coverUrl);
|
||||
|
||||
9
mock/minimax.json
Normal file
9
mock/minimax.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user