Showing
1 changed file
with
15 additions
and
0 deletions
@@ -157,6 +157,21 @@ | @@ -157,6 +157,21 @@ | ||
157 | if (typeof value == 'object') { | 157 | if (typeof value == 'object') { |
158 | return Promise.resolve(); | 158 | return Promise.resolve(); |
159 | } else { | 159 | } else { |
160 | + if (platformType.value !== PlateFormTypeEnum.tencent_cound) { | ||
161 | + // 阿里云不能是以[]开头 | ||
162 | + if ( | ||
163 | + Object.prototype.toString.call(JSON.parse(value)) === '[object Array]' | ||
164 | + ) { | ||
165 | + return Promise.reject('请输入JSON格式例如{"code":"1234"}'); | ||
166 | + } | ||
167 | + } else { | ||
168 | + // 腾讯云只能是[]开头 | ||
169 | + if ( | ||
170 | + Object.prototype.toString.call(JSON.parse(value)) !== '[object Array]' | ||
171 | + ) { | ||
172 | + return Promise.reject('请输入这种格式["123456"]'); | ||
173 | + } | ||
174 | + } | ||
160 | if (typeof JSON.parse(value) == 'object') { | 175 | if (typeof JSON.parse(value) == 'object') { |
161 | return Promise.resolve(); | 176 | return Promise.resolve(); |
162 | } | 177 | } |