package essapi import ( "fmt" "mtp2_if/logger" "mtp2_if/utils" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" essbasic "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/essbasic/v20210526" ) func CreateConsoleLoginUrl(proxyOrganizationOpenId, proxyOrganizationName string) (response *essbasic.CreateConsoleLoginUrlResponse, err error) { if utils.TencentESSClient == nil { err = fmt.Errorf("腾讯电子签客户端未初始化") logger.GetLogger().Errorf("CreateConsoleLoginUrl failed: %s", err.Error()) return } agent := utils.SetAgent(proxyOrganizationOpenId) // 实例化一个请求对象,每个接口都会对应一个request对象 request := essbasic.NewCreateConsoleLoginUrlRequest() request.Agent = agent request.ProxyOrganizationName = &proxyOrganizationName response, err = utils.TencentESSClient.CreateConsoleLoginUrl(request) if _, ok := err.(*errors.TencentCloudSDKError); ok { logger.GetLogger().Errorf("CreateConsoleLoginUrl failed: %s", err.Error()) return } return }