Compare commits

..

No commits in common. "086162dc67da331f7f82721a29295307d42d4af0" and "d74c2284cf4459f2c54ed024b7edba1f4e478385" have entirely different histories.

2 changed files with 3 additions and 11 deletions

View File

@ -316,11 +316,6 @@ func (a *App) Upload(path, kind string) (string, error) {
return cast.ToString(result["media_id"]), nil return cast.ToString(result["media_id"]), nil
} }
func (a *App) MediaUrl(mediaId string) string {
mUrl := fmt.Sprintf("https://qyapi.weixin.qq.com/cgi-bin/media/get?access_token=%s&media_id=%s", a.GetToken(), mediaId)
return mUrl
}
func (q *App) GetJsapiConfig(url string) (*JsapiConfig, error) { func (q *App) GetJsapiConfig(url string) (*JsapiConfig, error) {
ticket, err := q.getJsapiTicket() ticket, err := q.getJsapiTicket()
if err != nil { if err != nil {

View File

@ -3,12 +3,11 @@ package qyweixin
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"strings"
"git.u8t.cn/open/gosdk/util" "git.u8t.cn/open/gosdk/util"
"git.u8t.cn/open/goutil" "git.u8t.cn/open/goutil"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cast" "github.com/spf13/cast"
"strings"
) )
type Applyer struct { type Applyer struct {
@ -166,11 +165,9 @@ func (d *ApproveDetail) GetData() map[string]string {
} else if content.Control == "Money" { } else if content.Control == "Money" {
value = content.Value.NewMoney value = content.Value.NewMoney
} else if content.Control == "File" { } else if content.Control == "File" {
fileIds := make([]string, 0) if len(content.Value.Files) > 0 {
for _, v := range content.Value.Files { value = content.Value.Files[0].FileId
fileIds = append(fileIds, v.FileId)
} }
value = strings.Join(fileIds, ",")
} else if content.Control == "Vacation" { //请假 请假类型,开始时间,结束时间,请假时长 } else if content.Control == "Vacation" { //请假 请假类型,开始时间,结束时间,请假时长
tp := content.Value.Vacation.Selector.Options[0].Value[0].Text tp := content.Value.Vacation.Selector.Options[0].Value[0].Text
value = tp + "," + cast.ToString(content.Value.Vacation.Attendance.DateRange.NewBegin) + value = tp + "," + cast.ToString(content.Value.Vacation.Attendance.DateRange.NewBegin) +