diff --git a/model/channel.go b/model/channel.go index f1ac421..b929cf0 100644 --- a/model/channel.go +++ b/model/channel.go @@ -255,6 +255,7 @@ func UpdateChannelStatusById(id int, status int, reason string) { // find channel by id success, update status and other info info := channel.GetOtherInfo() info["status_reason"] = reason + info["status_time"] = common.GetTimestamp() channel.SetOtherInfo(info) channel.Status = status err = channel.Save() diff --git a/web/src/components/ChannelsTable.js b/web/src/components/ChannelsTable.js index c49d85b..8ed4667 100644 --- a/web/src/components/ChannelsTable.js +++ b/web/src/components/ChannelsTable.js @@ -96,7 +96,23 @@ const ChannelsTable = () => { title: '状态', dataIndex: 'status', render: (text, record, index) => { - return
{renderStatus(text)}
; + if (text === 3) { + if (record.other_info === '') { + record.other_info = '{}' + } + let otherInfo = JSON.parse(record.other_info); + let reason = otherInfo['status_reason']; + let time = otherInfo['status_time']; + return ( +
+ + {renderStatus(text)} + +
+ ); + } else { + return renderStatus(text); + } }, }, {