From b7131603c4e158e56433fdc06b6303f999d75f45 Mon Sep 17 00:00:00 2001 From: hoteas Date: Sat, 8 Oct 2022 17:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/makecode.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/makecode.go b/code/makecode.go index 5f26007..aa3f9e7 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -193,6 +193,12 @@ func (that *MakeCode) Db2JSON(db *db.HoTimeDB, config Map) { if indexNum > -1 { coloum["label"] = info.GetString("label")[:indexNum] } + psStart := strings.Index(info.GetString("label"), "{") + psEnd := strings.Index(info.GetString("label"), "}") + if psStart != -1 && psEnd > psStart { + coloum["ps"] = info.GetString("label")[psStart+1 : psEnd] + } + //去除数据信息,是用:号分割的 indexNum = strings.Index(coloum.GetString("label"), ":") if indexNum > -1 {