|
@@ -139,10 +139,15 @@ func (stm *WxTmplPush) getMessage(title, detail, date, row4 string) (map[string]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
bValue := map[string]*qrpc.TmplItem{}
|
|
bValue := map[string]*qrpc.TmplItem{}
|
|
- fmt.Println("formatValue", formatValue)
|
|
|
|
if err := json.Unmarshal([]byte(formatValue), &bValue); err != nil {
|
|
if err := json.Unmarshal([]byte(formatValue), &bValue); err != nil {
|
|
return nil, fmt.Errorf("格式化信息内容异常 %s", err.Error())
|
|
return nil, fmt.Errorf("格式化信息内容异常 %s", err.Error())
|
|
}
|
|
}
|
|
|
|
+ for _, item := range bValue {
|
|
|
|
+ val := []rune(item.Value)
|
|
|
|
+ if len(val) > 20 {
|
|
|
|
+ item.Value = string(val[:17]) + "..."
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return bValue, nil
|
|
return bValue, nil
|
|
|
|
|
|
}
|
|
}
|