作者 王智

daima

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 namespace app\admin\controller; 3 namespace app\admin\controller;
4 4
  5 +use think\Db;
5 use app\common\controller\Backend; 6 use app\common\controller\Backend;
6 7
7 /** 8 /**
@@ -79,6 +80,18 @@ class Renwu extends Backend @@ -79,6 +80,18 @@ class Renwu extends Backend
79 public function look() 80 public function look()
80 { 81 {
81 $id = input('id'); 82 $id = input('id');
82 - dump($id); 83 + $Arr = Db::name('renwu')->where('id', $id)->find();
  84 + if (empty($Arr['xi_id'])) {
  85 + $data['xi'] = '';
  86 + } else {
  87 + $data['xi'] = Db::name('user')->where('id', $Arr['xi_id'])->value('nickname');
  88 + }
  89 + if (empty($Arr['zhao_id'])) {
  90 + $data['zhao'] = '';
  91 + } else {
  92 + $data['zhao'] = Db::name('user')->where('id', $Arr['zhao_id'])->value('nickname');
  93 + }
  94 + $this->assign("data", $data);
  95 + return $this->view->fetch();
83 } 96 }
84 } 97 }
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <title>Title</title> 5 <title>Title</title>
  6 + <div>{$data.xi}</div>
6 </head> 7 </head>
7 <body> 8 <body>
8 9