ios QQ移动客服
#pragma mark -事件通知
#pragma mark客服
//在线客服
NSString*qqNumber=@"11111111";
if([[UIApplicationsharedApplication]canOpenURL:[NSURLURLWithString:@"mqq://"]]) {
UIWebView*webView = [[UIWebViewalloc]initWithFrame:CGRectZero];
NSURL* url=[NSURLURLWithString:[NSStringstringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",qqNumber]];
NSURLRequest*request = [NSURLRequestrequestWithURL:url];
[webViewloadRequest:request];
[self.viewaddSubview:webView];
}else{
UIAlertController*alertController = [UIAlertControlleralertControllerWithTitle:@"提示"message:@"对不起,您还没安装QQ"preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction*cancelAction = [UIAlertActionactionWithTitle:@"取消"style:UIAlertActionStyleCancelhandler:^(UIAlertAction*action) {
return;
}];
[alertControlleraddAction:cancelAction];
[selfpresentViewController:alertControlleranimated:YEScompletion:nil];
}
}