From 38f925a259057679200441be7c010c1d21081359 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Wed, 20 Aug 2025 11:54:32 +0800 Subject: [PATCH] files --- qyweixin/app_approve.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) +