From e63dfc92916d4c7349aaf5aa819fac6581a4263c Mon Sep 17 00:00:00 2001 From: darcy Date: Wed, 17 May 2017 15:55:40 +0800 Subject: [PATCH] fix YQL bugs:the chat '&' doesn't encoded --- src/utils/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request.js b/src/utils/request.js index 6a35807..d1ad8c8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -50,7 +50,7 @@ const fetch = (options) => { }) }) } else if (fetchType === 'YQL') { - url = `http://query.yahooapis.com/v1/public/yql?q=select * from json where url='${options.url}?${qs.stringify(options.data)}'&format=json` + url = `http://query.yahooapis.com/v1/public/yql?q=select * from json where url='${options.url}?${encodeURIComponent(qs.stringify(options.data))}'&format=json` data = null }