重庆迈尖科技有限公司
2018-10-08 3aa774bc9655922a31038d2b51cf0d4b2ea97682
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
//  MyJSInterface.m
//  EasyJSWebViewSample
//
//  Created by Lau Alex on 19/1/13.
//  Copyright (c) 2013 Dukeland. All rights reserved.
//
 
#import "MyJSInterface.h"
 
@implementation MyJSInterface
 
- (NSString *)getUid{
    NSString *uid = [NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]];
    NSLog(@"%@",uid);
    if(![[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]){
        return @"0";
    }
    return uid;
}
- (NSString *)getVersion{
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
}
- (NSString *)getSign:(NSString *)string{
    NSString *MD5String = [NSString md5:[NSString stringWithFormat:@"%@@?,223Hbb88lll",string]];
    NSLog(@"%@",MD5String);
    return MD5String;
}
 
- (void)toast:(NSString *)string{
    
    ALToastCenter(string);
}
 
- (void)jumpGoodsSplash:(NSString *)string{
    NSDictionary *dic = @{@"type":@"new",@"id":string};
    [[NSNotificationCenter defaultCenter] postNotificationName:@"jumpGoodsDETAIL" object:dic];
    
}
 
- (void)jumpGoodsDetail:(NSString *)string{
    NSDictionary *dic = @{@"type":@"old",@"id":string};
    [[NSNotificationCenter defaultCenter] postNotificationName:@"jumpGoodsDETAIL" object:dic];
}
 
-(void)jumpSearch:(NSString *)key {
    
    NSDictionary *dic = @{@"key" : key};
    [[NSNotificationCenter defaultCenter] postNotificationName:@"jumpSearch" object:dic];
}
 
- (void)login{
    [[NSNotificationCenter defaultCenter] postNotificationName:@"jumpLoginVc" object:nil];
    
}
@end