Commit 5134cd5c authored by “yiyousong”'s avatar “yiyousong”

perf:优化应用数据配置

parent 6b382224
......@@ -136,15 +136,12 @@ export default {
try {
let Obj = JSON.parse(value);
let isjson =
typeof Obj == "object" &&
Object.prototype.toString.call(Obj).toLowerCase() ==
"[object object]" &&
Object.keys(Obj).length;
!value.length;
"[object object]" && Object.keys(Obj).length;
if (isjson) {
callback();
} else {
callback(new Error("输入的JSON对象格式"));
callback(new Error("请输入JSON对象格式"));
}
} catch (err) {
callback(new Error("输入的JSON数据格式有误"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment