vue给url添加编码
原文链接: https://blog.csdn.net/qq_46302247/article/details/120993985
// 解码用
// decodeURIComponent(str)
// 编码用
// encodeURIComponent(str)
var test = '天天好心情ing'
var a = encodeURIComponent(test)
console.log('编码后', a)
console.log('解码后', decodeURIComponent(a))