Commit 043b990e2ad8ce1756aa8c52db528ad2b660188f

Authored by liushiyu
1 parent 59486516

0.1.29

CNLiveBusinessTools.podspec
... ... @@ -9,7 +9,7 @@
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveBusinessTools'
11 11  
12   - s.version = '0.1.28'
  12 + s.version = '0.1.29'
13 13 s.summary = '业务工具集合组件.'
14 14  
15 15 # This description is used to generate tags and improve search results.
... ...
CNLiveBusinessTools/Classes/CNLiveEscpTools.m
... ... @@ -68,10 +68,11 @@ NSString * esp(NSString * src) {
68 68 tmp = [NSString stringWithFormat:@"%@%c",tmp,c];
69 69 }else if ((int)c < 256 ) {
70 70 tmp = [NSString stringWithFormat:@"%@%@",tmp,@"%"];
71   - if((int)c <16){
  71 + if ((int)c < 16) {
72 72 tmp =[NSString stringWithFormat:@"%@%@",tmp,@"0"];
73 73 }
74   - tmp = [NSString stringWithFormat:@"%@%@",tmp,tohex((int)c)];
  74 + if ((int)c != 37) tmp = [NSString stringWithFormat:@"%@%@",tmp,tohex((int)c)];//%
  75 + if ((int)c != 45) tmp = [NSString stringWithFormat:@"%@%@",tmp,tohex((int)c)];//-
75 76 }else{
76 77 tmp = [NSString stringWithFormat:@"%@%@",tmp,@"%u"];
77 78 tmp = [NSString stringWithFormat:@"%@%@",tmp,tohex(c)];
... ...
Example/CNLiveBusinessTools/CNLiveAppDelegate.m
... ... @@ -9,7 +9,7 @@
9 9 #import "CNLiveAppDelegate.h"
10 10 #import "CNLiveQQEmotionManager.h"
11 11 #import "CNLiveBusinessTools.h"
12   -#import "CNLiveEscpTools.h"
  12 +
13 13 @implementation CNLiveAppDelegate
14 14  
15 15 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
... ... @@ -18,6 +18,9 @@
18 18 [CNLiveQQEmotionManager emotionsForQQ];
19 19 NSMutableAttributedString *attStr = [CNLiveBusinessTools replaceQQemojiWithCustomText:@"asfa[微笑]"];
20 20 NSLog(@"attStr:%@",attStr);
  21 +
  22 +
  23 +
21 24 return YES;
22 25 }
23 26  
... ...
Example/CNLiveBusinessTools/CNLiveViewController.m
... ... @@ -8,6 +8,7 @@
8 8  
9 9 #import "CNLiveViewController.h"
10 10 #import <QMUIKit/QMUIKit.h>
  11 +#import "CNLiveEscpTools.h"
11 12 //#import <CNLiveBusinessTools/CNLiveQQEmotionManager.h>
12 13  
13 14 #define KScreenWidth ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width)
... ... @@ -24,6 +25,16 @@
24 25 [super viewDidLoad];
25 26 // Do any additional setup after loading the view, typically from a nib.
26 27 // [self.view addSubview:self.emotionInputManager.emotionView];
  28 +
  29 + //NSString * s = lDvbSAZzaa8xPTQ8M0EquG1xos75HGvU%2F%2Fpages%2FaudioDetail%2FaudioDetail%3Fshare%3D1%26contentId%3D1235864%26rowId%3D2%26pubDate%3D2021-12-12%26assignTag%3D%E5%8F%8C%E8%AF%AD%E7%BE%8E%E6%96%87 安卓
  30 +
  31 + //lDvbSAZzaa8xPTQ8M0EquG1xos75HGvU%2F%2Fpages%2FaudioDetail%2FaudioDetail%3Fshare%3D1%26contentId%3D1240263%26rowId%3D1%26pubDate%3D2021%2D11%2D01%26assignTag%3D%E5%90%8D%E7%AF%87%E8%B5%8F%E6%9E%90
  32 +
  33 +
  34 + NSString * s = @"-"; //@"lDvbSAZzaa8xPTQ8M0EquG1xos75HGvU//pages/audioDetail/audioDetail?share=1&contentId=1240263&rowId=1&pubDate=2021-11-01&assignTag=%E5%90%8D%E7%AF%87%E8%B5%8F%E6%9E%90";
  35 +// swanId=lDvbSAZzaa8xPTQ8M0EquG1xos75HGvU//pages/audioDetail/audioDetail?share=1&contentId=1240263&rowId=1&pubDate=2021-11-01&assignTag=%E5%90%8D%E7%AF%87%E8%B5%8F%E6%9E%90
  36 + NSString * temp_s = [CNLiveEscpTools esp:s];
  37 + NSLog(@"%@",temp_s);
27 38 }
28 39  
29 40 - (void)didReceiveMemoryWarning
... ...