Commit 850145e068502e70dd961dd4e81e33be25cc1e13
1 parent
887c1843
json 格式处理
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
src/models/RoleLog.lua
@@ -74,6 +74,7 @@ local ItemReason = { | @@ -74,6 +74,7 @@ local ItemReason = { | ||
74 | sign = 1004, -- 签到 | 74 | sign = 1004, -- 签到 |
75 | friendPoint = 1005, -- 友情 | 75 | friendPoint = 1005, -- 友情 |
76 | birth = 1006, -- 出生奖励 | 76 | birth = 1006, -- 出生奖励 |
77 | + actSign = 1007, -- 活动签到 | ||
77 | 78 | ||
78 | -- 餐厅 | 79 | -- 餐厅 |
79 | greenHourse = 1101, -- 食材获得 | 80 | greenHourse = 1101, -- 食材获得 |
@@ -473,7 +474,7 @@ function RoleLog.bind(Role) | @@ -473,7 +474,7 @@ function RoleLog.bind(Role) | ||
473 | if not schema[field] then | 474 | if not schema[field] then |
474 | printError(string.format("LOG ERROR: logType [%s] have new field [%s], call.", logType, field)) | 475 | printError(string.format("LOG ERROR: logType [%s] have new field [%s], call.", logType, field)) |
475 | else | 476 | else |
476 | - if value == 'json' then | 477 | + if schema[field] == 'json' then |
477 | value = jsonEncode(value) | 478 | value = jsonEncode(value) |
478 | end | 479 | end |
479 | doc[field] = value | 480 | doc[field] = value |