-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
附修复代码:
/** * 解决问题:锚点动画报错 * 现象:点击右侧链接定位锚点js报错,且无动画 * 原因:当url进行base64_encode后,字符中包含:!"#$%&'()*+,./:;<=>?@[\]^{|}~
* 解决方案:将以上字符替换成空
* /
public function doBase64Encode($url)
{
$replaceChars = ['!', '"', '#', '$', '%', '&', "'", '(', ')', '', '+', ',', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\', ']', '^', '', '{', '|', '}', '~']; return str_replace($replaceChars, '', base64_encode($url)); }
ApiDoc.php中原来使用base64_encode(url); 的两处代码改为:$this->doBase64Encode(url);
@mumbaicat
Metadata
Metadata
Assignees
Labels
No labels
