diff --git a/Cunkebao/app/wechat-accounts/[id]/page.tsx b/Cunkebao/app/wechat-accounts/[id]/page.tsx index fac8dd48..1d24e07e 100644 --- a/Cunkebao/app/wechat-accounts/[id]/page.tsx +++ b/Cunkebao/app/wechat-accounts/[id]/page.tsx @@ -1010,17 +1010,23 @@ export default function WechatAccountDetailPage() {
- {accountSummary && accountSummary.restrictions.map((record) => ( -
-
-
- {record.reason} + {accountSummary?.restrictions?.length > 0 ? ( + accountSummary.restrictions.map((record) => ( +
+
+
+ {record.reason} +
+ {formatDateTime(record.date)} +
+
恢复时间:{formatDateTime(record.date)}
- {formatDateTime(record.date)} -
-
恢复时间:{formatDateTime(record.date)}
+ )) + ) : ( +
+ 暂无风险记录,请继续保持
- ))} + )}
diff --git a/Server/application/common/model/WechatRestricts.php b/Server/application/common/model/WechatRestricts.php new file mode 100644 index 00000000..060c9ffb --- /dev/null +++ b/Server/application/common/model/WechatRestricts.php @@ -0,0 +1,17 @@ + 1, - 'level' => 2, - 'reason' => '频繁添加好友', - 'date' => date('Y-m-d H:i:s', strtotime('-1 day')), - ], - [ - 'id' => 2, - 'level' => 3, - 'reason' => '营销内容违规', - 'date' => date('Y-m-d H:i:s', strtotime('-1 day')), - ], - ]; + return WechatRestrictsModel::alias('r') + ->field( + [ + 'r.id', 'r.restrictTime date', 'r.level', 'r.reason' + ] + ) + ->where('r.wechatId', $wechatId)->select() + ->toArray(); } /** @@ -92,7 +87,7 @@ class GetWechatOnDeviceSummarizeV1Controller extends BaseController */ protected function getDateDiff(string $wechatId): int { - $currentData = new \DateTime(date('Y-m-d H:i:s', time())); + $currentData = new \DateTime(date('Y-m-d H:i:s', time())); $registerDate = new \DateTime($this->getRegisterDate($wechatId)); $interval = date_diff($currentData, $registerDate); @@ -208,7 +203,7 @@ class GetWechatOnDeviceSummarizeV1Controller extends BaseController */ protected function getTodayNewFriendCount(string $ownerWechatId): int { - return WechatFriendShipModel::where( compact('ownerWechatId') ) + return WechatFriendShipModel::where(compact('ownerWechatId')) ->whereBetween('createTime', [ strtotime(date('Y-m-d 00:00:00')),