From 850145e068502e70dd961dd4e81e33be25cc1e13 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Mon, 24 Aug 2020 15:46:16 +0800 Subject: [PATCH] json 格式处理 --- src/models/RoleLog.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models/RoleLog.lua b/src/models/RoleLog.lua index 5411d9c..242a919 100644 --- a/src/models/RoleLog.lua +++ b/src/models/RoleLog.lua @@ -74,6 +74,7 @@ local ItemReason = { sign = 1004, -- 签到 friendPoint = 1005, -- 友情 birth = 1006, -- 出生奖励 + actSign = 1007, -- 活动签到 -- 餐厅 greenHourse = 1101, -- 食材获得 @@ -473,7 +474,7 @@ function RoleLog.bind(Role) if not schema[field] then printError(string.format("LOG ERROR: logType [%s] have new field [%s], call.", logType, field)) else - if value == 'json' then + if schema[field] == 'json' then value = jsonEncode(value) end doc[field] = value -- libgit2 0.21.2