补充呢
This commit is contained in:
@@ -391,7 +391,7 @@ export default {
|
||||
request.success({
|
||||
"rows": res.rows.map(i=>{
|
||||
let nameValue = i.name;
|
||||
if (nameValue.startsWith('{') && nameValue.endsWith('}')) {
|
||||
if (nameValue && nameValue.startsWith('{') && nameValue.endsWith('}')) {
|
||||
i.name = JSON.parse(i.name);
|
||||
} else {
|
||||
i.name = {
|
||||
@@ -401,7 +401,7 @@ export default {
|
||||
};
|
||||
}
|
||||
let fixedWordValue = i.fixedWord;
|
||||
if (fixedWordValue.startsWith('{') && fixedWordValue.endsWith('}')) {
|
||||
if (fixedWordValue && fixedWordValue.startsWith('{') && fixedWordValue.endsWith('}')) {
|
||||
i.fixedWord = JSON.parse(i.fixedWord);
|
||||
} else {
|
||||
i.fixedWord = {
|
||||
@@ -448,7 +448,7 @@ export default {
|
||||
$("#id").val(json.id);
|
||||
$("#nameplateType1").val(json.nameplateType);
|
||||
let name = json.name;
|
||||
if (name.startsWith('{') && name.endsWith('}')) {
|
||||
if (name && name.startsWith('{') && name.endsWith('}')) {
|
||||
var jsonName = JSON.parse(json.name);
|
||||
console.log(jsonName)
|
||||
$("#name1").val(jsonName.zh);
|
||||
@@ -460,7 +460,7 @@ export default {
|
||||
$("#en_name1").val(name);
|
||||
}
|
||||
let fixedWord = json.fixedWord;
|
||||
if (fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
|
||||
if (fixedWord && fixedWord.startsWith('{') && fixedWord.endsWith('}')) {
|
||||
let jsonValue = JSON.parse(json.fixedWord);
|
||||
$('#zhFixedWord').val(jsonValue.zh);
|
||||
$('#arFixedWord').val(jsonValue.ar);
|
||||
|
Reference in New Issue
Block a user