Manage.php 536 B

12345678910111213141516171819
  1. <?php namespace Msg\Lib;
  2. use Dever;
  3. class Manage
  4. {
  5. # 发送消息
  6. public function showRecord($id, $type = 'code')
  7. {
  8. $info = Dever::db('code', 'msg')->find($id);
  9. if (is_object($info['record'])) {
  10. $info['record'] = (array)$info['record'];
  11. }
  12. if (is_array($info['record'])) {
  13. $info['record'] = Dever::json_encode($info['record']);
  14. }
  15. $result['type'] = 'string';
  16. $result['content'] = $info['record'];
  17. return $result;
  18. }
  19. }