44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
//
|
|
// YMHtmlUrl.m
|
|
// YUMI
|
|
//
|
|
// Created by YUMI on 2021/9/13.
|
|
//
|
|
|
|
#import "YUMIHtmlUrl.h"
|
|
#import "AESUtils.h"
|
|
|
|
@implementation YUMIHtmlUrl
|
|
|
|
NSString * const URLWithType(URLType type) {
|
|
NSString *prefix = @"eparty";
|
|
|
|
// 明文 URL 配置(无需加密的路径)
|
|
NSDictionary *plainUrls = @{
|
|
@(kCaptchaSwitchPath): @"modules/humanMachineVerification/index.html",
|
|
};
|
|
|
|
NSString *plainUrl = plainUrls[@(type)];
|
|
if (plainUrl) {
|
|
return [NSString stringWithFormat:@"%@/%@", prefix, plainUrl];
|
|
}
|
|
|
|
// 加密 URL 配置(需要 AES 解密的路径)
|
|
NSDictionary *encryptedUrls = @{
|
|
@(kPrivacyURL): @"sPa8x4YF1hFEeCeH5v+RMOulemxgjjZLbxkN8ZrBSM8=", // modules/rule/privacy-wap.html
|
|
@(kUserProtocalURL): @"0sBhBaRqf7oBlYvNK4azCrVPTFjv9FYF0A2v9+qkSxg=", // modules/rule/protocol.html
|
|
@(kFAQURL): @"k/Bqnh8nGkuhV8KhU6xN5a8EkxEQrbDMAWNBtaAdJCo=", // modules/rule/guide.html
|
|
};
|
|
|
|
NSString *encryptedUrl = encryptedUrls[@(type)];
|
|
if (encryptedUrl) {
|
|
NSString *decryptedPath = [AESUtils aesDecrypt:encryptedUrl];
|
|
return [NSString stringWithFormat:@"%@/%@", prefix, decryptedPath];
|
|
}
|
|
|
|
// 未找到对应的 URL 配置
|
|
return @"";
|
|
}
|
|
|
|
@end
|