iOS传参数小程序URL中的&符号,识别不了
2021-07-31 本文已影响0人
晨曦景雪
NSString *text=[NSString stringWithFormat:@"token=%@&order=%@",kFetchMyDefault(@"token"),self.orderDict[@"fhId"]] ;
NSString *url = [text stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@":/?#[]@!$ &'()*+,;=""<>%{}|\\^~`"].invertedSet];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"alipay://platformapi/startapp?appId=%@&page=pages/payment/payment?%@",payModel.appletUserName,url]] options:@{UIApplicationOpenURLOptionUniversalLinksOnly: @NO} completionHandler:nil];