• 先对字符串base64编码,然后替换安全字符即可
    window.btoa("hello").replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '')