URl拼接问题?

发布于 4 年前作者 yan9411033 次浏览最后编辑 4 年前来自 issues

如何将参数w拼接到url中“李荣浩”的指定位置?

2 回复
yangjun
yangjun1 楼4 年前
// 1
var url = "https://music.163.com/api/search/get?s=" + this.data.word + "&type=1&limit=10"
// 2
var url = `https://music.163.com/api/search/get?s=${this.data.word}&type=1&limit=10`
pingcao
pingcao2 楼1 个月前
var url = `https://xxxx.com/get?s=${w}&type=1`