|
@@ -241,17 +241,27 @@ function fixVolumeData(json,volumeData,index){
|
|
|
|
|
|
|
|
|
// 初版时间
|
|
|
- let firstDate = new Date(volumeData?.editionFirst.iso);
|
|
|
- let firstYear = firstDate?.getFullYear();
|
|
|
- let firstMonth = firstDate?.getMonth()+1;
|
|
|
+ let firstDate
|
|
|
+ if(volumeData?.editionFirst?.iso){
|
|
|
+ firstDate = new Date(volumeData?.editionFirst.iso);
|
|
|
+ }
|
|
|
+ let firstYear = firstDate&&firstDate?.getFullYear();
|
|
|
+ let firstMonth = firstDate&&(firstDate?.getMonth()+1);
|
|
|
// 本版时间印次
|
|
|
- let currentDate = new Date(volumeData?.editionDate.iso);
|
|
|
- let currentYear = currentDate?.getFullYear();
|
|
|
- let currentMonth = currentDate?.getMonth()+1;
|
|
|
+ let currentDate
|
|
|
+ if(volumeData?.editionDate?.iso){
|
|
|
+ currentDate = new Date(volumeData?.editionDate.iso);
|
|
|
+ }
|
|
|
+ let currentYear = currentDate&¤tDate?.getFullYear();
|
|
|
+ let currentMonth = currentDate&&(currentDate?.getMonth()+1);
|
|
|
// 最新时间印次
|
|
|
- let latestDate = new Date(volumeData?.printDate.iso);
|
|
|
- let latestYear = latestDate?.getFullYear();
|
|
|
- let latestMonth = latestDate?.getMonth()+1;
|
|
|
+ let latestDate
|
|
|
+ if(volumeData?.printDate?.iso){
|
|
|
+ latestDate = new Date(volumeData?.printDate.iso);
|
|
|
+ }
|
|
|
+ let latestYear = latestDate&&latestDate?.getFullYear();
|
|
|
+ let latestMonth = latestDate&&(latestDate?.getMonth()+1);
|
|
|
+
|
|
|
let latestNum = volumeData?.printNumber || "";
|
|
|
let currentNum = volumeData?.editionNumber || "";
|
|
|
let printSum = volumeData?.printSum?volumeData?.printSum+"万":"" || "";
|
|
@@ -264,14 +274,14 @@ function fixVolumeData(json,volumeData,index){
|
|
|
|
|
|
json.importantProject = importantProject
|
|
|
json.firstDate = firstDate
|
|
|
- json.firstYear = firstYear
|
|
|
- json.firstMonth = firstMonth
|
|
|
+ json.firstYear = firstYear || ""
|
|
|
+ json.firstMonth = firstMonth || ""
|
|
|
json.currentDate = currentDate
|
|
|
- json.currentYear = currentYear
|
|
|
- json.currentMonth = currentMonth
|
|
|
+ json.currentYear = currentYear || ""
|
|
|
+ json.currentMonth = currentMonth || ""
|
|
|
json.latestDate = latestDate
|
|
|
- json.latestYear = latestYear
|
|
|
- json.latestMonth = latestMonth
|
|
|
+ json.latestYear = latestYear || ""
|
|
|
+ json.latestMonth = latestMonth || ""
|
|
|
json.currentNum = currentNum
|
|
|
json.latestMonth = latestMonth
|
|
|
json.latestNum = latestNum
|