- // encodeURIComponent 编码:
- encodeURIComponent(str)
- // 示例:路由传参编码
- this.$router.push(`/financy/checkPaymentInfo?id=${encodeURIComponent('199USKH+D57668787DHKSDj')}`)
-
-
-
- // decodeURIComponent 解码:
- decodeURIComponent(str)
- // 示例:接收路由参数
- let params = decodeURIComponent(this.$route.query.id)