|
@@ -8,6 +8,7 @@ import (
|
|
|
"hongze/hongze_chart_lib/services/data"
|
|
|
"hongze/hongze_chart_lib/utils"
|
|
|
"strconv"
|
|
|
+ "strings"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -104,7 +105,7 @@ func (this *ChartController) ChartInfoDetail() {
|
|
|
startDate = startDate + "-01"
|
|
|
endDate = endDate + "-01"
|
|
|
case 6:
|
|
|
- startDate = startDate + "-01"
|
|
|
+ //startDate = startDate + "-01"
|
|
|
//endDate = time.Now().Format(utils.FormatDate)
|
|
|
endDate = ""
|
|
|
case 7:
|
|
@@ -124,6 +125,16 @@ func (this *ChartController) ChartInfoDetail() {
|
|
|
endDate = ""
|
|
|
}
|
|
|
|
|
|
+ // 兼容日期错误
|
|
|
+ {
|
|
|
+ if strings.Count(startDate, "-") == 1 {
|
|
|
+ startDate = startDate + "-01"
|
|
|
+ }
|
|
|
+ if strings.Count(endDate, "-") == 1 {
|
|
|
+ endDate = endDate + "-01"
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if chartType == 2 {
|
|
|
if seasonStartDate != "" {
|
|
|
startDate = seasonStartDate + "-01-01"
|