55 "context"
66 "crypto/aes"
77 "crypto/cipher"
8- "crypto/md5"
98 crypto_rand "crypto/rand"
109 "crypto/sha1"
1110 "encoding/base64"
@@ -205,9 +204,7 @@ func (d *Yun139) requestRoute(data interface{}, resp interface{}) ([]byte, error
205204 callback := func (req * resty.Request ) {
206205 req .SetBody (data )
207206 }
208- if callback != nil {
209- callback (req )
210- }
207+ callback (req )
211208 body , err := utils .Json .Marshal (req .Body )
212209 if err != nil {
213210 return nil , err
@@ -728,12 +725,12 @@ func (d *Yun139) uploadPersonalParts(ctx context.Context, partInfos []PartInfo,
728725 return nil
729726}
730727
731- func (d * Yun139 ) getPersonalDiskInfo (ctx context.Context ) (* PersonalDiskInfoResp , error ) {
728+ func (d * Yun139 ) getDiskQuotaDetail (ctx context.Context ) (* DiskQuotaDetail , error ) {
732729 data := map [string ]interface {}{
733730 "userDomainId" : d .UserDomainID ,
734731 }
735- var resp PersonalDiskInfoResp
736- _ , err := d .request ("https://user-njs.yun.139.com/user/disk/getPersonalDiskInfo " , http .MethodPost , func (req * resty.Request ) {
732+ var resp DiskQuotaDetail
733+ _ , err := d .request ("https://user-njs.yun.139.com/user/disk/quota/detail " , http .MethodPost , func (req * resty.Request ) {
737734 req .SetBody (data )
738735 req .SetContext (ctx )
739736 }, & resp )
@@ -743,26 +740,6 @@ func (d *Yun139) getPersonalDiskInfo(ctx context.Context) (*PersonalDiskInfoResp
743740 return & resp , nil
744741}
745742
746- func (d * Yun139 ) getFamilyDiskInfo (ctx context.Context ) (* FamilyDiskInfoResp , error ) {
747- data := map [string ]interface {}{
748- "userDomainId" : d .UserDomainID ,
749- }
750- var resp FamilyDiskInfoResp
751- _ , err := d .request ("https://user-njs.yun.139.com/user/disk/getFamilyDiskInfo" , http .MethodPost , func (req * resty.Request ) {
752- req .SetBody (data )
753- req .SetContext (ctx )
754- }, & resp )
755- if err != nil {
756- return nil , err
757- }
758- return & resp , nil
759- }
760-
761- func getMd5 (dataStr string ) string {
762- hash := md5 .Sum ([]byte (dataStr ))
763- return fmt .Sprintf ("%x" , hash )
764- }
765-
766743func (d * Yun139 ) step1_password_login () (string , error ) {
767744 log .Debugf ("--- 执行步骤 1: 登录 API ---" )
768745 loginURL := "https://mail.10086.cn/Login/Login.ashx"
0 commit comments