京东打开对应商品以及跳转apptore地址
NSURL * jd_app_url = [NSURL URLWithString:@"openapp.jdmobile://"];
NSURL *url;
if([[UIApplication sharedApplication] canOpenURL:jd_app_url]) {
NSString *urlString = @"openapp.jdmobile://virtual?params=%7B%22sourceValue%22:%220_productDetail_97%22,%22des%22:%22productDetail%22,%22skuId%22:%2210058164%22,%22category%22:%22jump%22,%22sourceType%22:%22PCUBE_CHANNEL%22%7D";
url = [NSURL URLWithString:urlString];
[[UIApplication sharedApplication]openURL:url];
}else {
//初始化AlertView
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"尚未安装京东"
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:@"确定",nil];
//显示AlertView
[alert show];
NSString *urlString = @"https://itunes.apple.com/cn/app/%E4%BA%AC%E4%B8%9C-%E9%A6%96%E6%AC%A1%E8%B4%AD%E4%B9%B0%E5%8F%AF%E9%A2%86%E5%8F%96188%E5%85%83%E4%BC%98%E6%83%A0%E5%88%B8/id414245413?mt=8";
url = [NSURL URLWithString:urlString];
[[UIApplication sharedApplication]openURL:url];
}
NSURL * jd_app_url = [NSURL URLWithString:@"openapp.jdmobile://"];
NSURL *url;
if([[UIApplication sharedApplication] canOpenURL:jd_app_url]) {
NSString *urlString = @"openapp.jdmobile://virtual?params=%7B%22sourceValue%22:%220_productDetail_97%22,%22des%22:%22productDetail%22,%22skuId%22:%2210058164%22,%22category%22:%22jump%22,%22sourceType%22:%22PCUBE_CHANNEL%22%7D";
url = [NSURL URLWithString:urlString];
[[UIApplication sharedApplication]openURL:url];
}else {
//初始化AlertView
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"尚未安装京东"
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:@"确定",nil];
//显示AlertView
[alert show];
NSString *urlString = @"https://itunes.apple.com/cn/app/%E4%BA%AC%E4%B8%9C-%E9%A6%96%E6%AC%A1%E8%B4%AD%E4%B9%B0%E5%8F%AF%E9%A2%86%E5%8F%96188%E5%85%83%E4%BC%98%E6%83%A0%E5%88%B8/id414245413?mt=8";
url = [NSURL URLWithString:urlString];
[[UIApplication sharedApplication]openURL:url];
}