| | |
| | | static int sBatteryLevel = -1; |
| | | static int sBatteryState = -1; |
| | | static NSThread * _thread; |
| | | static NSString* APP_ID; |
| | | |
| | | -(void) Init |
| | | { |
| | |
| | | switch([[_dict objectForKey:@"code"] intValue]){ |
| | | case U2S_Init: |
| | | [self Init]; |
| | | APP_ID = [_dict objectForKey:@"appID"]; |
| | | break; |
| | | case U2S_CopyContent: |
| | | [UIPasteboard generalPasteboard].string = _dict[@"content"]; |
| | |
| | | } |
| | | case U2S_FreePlatformPay: |
| | | { |
| | | [SPYOUCommonAPi IAPShareForObject:[_dict objectForKey:@"identifier"] |
| | | [SPYOUCommonAPi IAPShareForObject:[_dict objectForKey:@"cpInfo"] |
| | | Amount:[_dict objectForKey:@"mount"] |
| | | ExtraInfo:[NSString stringWithFormat:@"{\"appid\":\"%@\",\"cpinfo\":\"%@\",\"cporderid\":\"%@\"}", |
| | | @"spxjgame", |
| | | APP_ID, |
| | | [_dict objectForKey:@"cpInfo"], |
| | | [_dict objectForKey:@"orderId"]] |
| | | block:^(BOOL state, NSString *error) { |