using Hotline.Share.Dtos.Snapshot;
using Hotline.ThirdAccountDomainServices.Interfaces;
using XF.Domain.Dependency;

namespace Hotline.Tests.Mock;
public class ThirdTestService : IThirdIdentiyService, IScopeDependency
{
    public async Task<ThirdPhoneOutDto> GetPhoneNumberAsync(ThirdTokenDto dto, CancellationToken token)
    {
        return new ThirdPhoneOutDto
        {
            PhoneNumber = "138001389877"
        };
    }

    public async Task<ThirdTokenOutDto> GetTokenAsync(ThirdTokenDto dto, CancellationToken token)
    {
        //var resultString = "{\"SessionKey\":\"letVB1m+8ZYsMjo8PxhwUw==\",\"OpenId\":\"oHBwj4_8hQG1Q00HyTO3d47RLuAA\"}";
        //return resultString.FromJson<ThirdTokenOutDto>();
        return new ThirdTokenOutDto
        {
            SessionKey = "sessionKeyfjdklsafjdskla",
            OpenId = "测试生成的OpenId",
            UnIonId = "测试生成的UnionId",
        };
    }
}
