Commit 73ce7b237f39bb021195a15b9e0c34874daf66b2
Merge branch 'local_dev_branch_by_ft' into 'main_dev'
fix: 修改阿里云或者腾讯云发送参数,校验参数问题 See merge request yunteng/thingskit-front!981
Showing
1 changed file
with
15 additions
and
0 deletions
| ... | ... | @@ -157,6 +157,21 @@ |
| 157 | 157 | if (typeof value == 'object') { |
| 158 | 158 | return Promise.resolve(); |
| 159 | 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 | 175 | if (typeof JSON.parse(value) == 'object') { |
| 161 | 176 | return Promise.resolve(); |
| 162 | 177 | } | ... | ... |