TypeError: route.replace is not a function 的解决

TypeError: route.replace is not a function 的解决

如图: 

route = route.replace(curTag, params[key]);

thirdScriptError
route.replace is not a function;at pages/index/index page getList function
TypeError: route.replace is not a function

修改为:

route = route.toString().replace(curTag, params[key]);

即: 加上 .toString() 转换为字符串/.