fix: 处理 iframe 参数兼容性
							parent
							
								
									6489b9910f
								
							
						
					
					
						commit
						43804edf45
					
				| 
						 | 
					@ -11,8 +11,14 @@ export function appendParamsToUrl(url = '', pathname = '', params: Record<string
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  // 设置URL的查询参数
 | 
					  // 设置URL的查询参数
 | 
				
			||||||
  let result = urlObject.toString()
 | 
					  let result = urlObject.toString()
 | 
				
			||||||
  if (result.endsWith('?')) {
 | 
					  if (result.endsWith('?') || result.endsWith('&')) {
 | 
				
			||||||
    result += searchParams.toString()
 | 
					    result += searchParams.toString()
 | 
				
			||||||
 | 
					  } else if (result.indexOf('?') > -1) {
 | 
				
			||||||
 | 
					    if (result.endsWith('&')) {
 | 
				
			||||||
 | 
					      result += searchParams.toString()
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      result += '&' + searchParams.toString()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    result += '?' + searchParams.toString()
 | 
					    result += '?' + searchParams.toString()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue