diff --git a/qyweixin/app_approve.go b/qyweixin/app_approve.go index 48af83f..e70927a 100644 --- a/qyweixin/app_approve.go +++ b/qyweixin/app_approve.go @@ -157,7 +157,9 @@ func (d *ApproveDetail) GetData() map[string]string { } else if content.Control == "Money" { value = content.Value.NewMoney } else if content.Control == "File" { - value = content.Value.Files[0].FileId + if len(content.Value.Files) > 0 { + value = content.Value.Files[0].FileId + } } else if content.Control == "Vacation" { //请假 : 请假类型,开始时间,结束时间,请假时长 tp := content.Value.Vacation.Selector.Options[0].Value[0].Text value = tp + "," + cast.ToString(content.Value.Vacation.Attendance.DateRange.NewBegin) +