From c61434d9759623c2442efe604d1c218fbfe90f32 Mon Sep 17 00:00:00 2001 From: RobinzZH Date: Thu, 21 Jun 2018 10:46:55 +0800 Subject: [PATCH] fix(openapi): change const error by eslint fix --- bin/tsw/util/openapi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/tsw/util/openapi.js b/bin/tsw/util/openapi.js index aba19c8c..97d25339 100644 --- a/bin/tsw/util/openapi.js +++ b/bin/tsw/util/openapi.js @@ -25,7 +25,8 @@ this.signature = opt => { const busidataArr = [opt.method, encode(opt.pathname)]; // HTTP请求方式 & encode(uri) & encode(a=x&b=y&...) - for (const i in opt.data) { + let i; + for (i in opt.data) { // i !== 'sig' && queryArray.push(i + '=' + opt.data[i]); // 过滤掉undefined value的key,因为发送的时候data,会做JSON.stringify, 没有定义值的key会被过滤掉 if (typeof opt.data[i] !== 'undefined' && i !== 'sig') { queryArray.push(i + '=' + opt.data[i]);