作者 王智

daima

... ... @@ -2,6 +2,7 @@
namespace app\admin\controller;
use think\Db;
use app\common\controller\Backend;
/**
... ... @@ -79,6 +80,18 @@ class Renwu extends Backend
public function look()
{
$id = input('id');
dump($id);
$Arr = Db::name('renwu')->where('id', $id)->find();
if (empty($Arr['xi_id'])) {
$data['xi'] = '';
} else {
$data['xi'] = Db::name('user')->where('id', $Arr['xi_id'])->value('nickname');
}
if (empty($Arr['zhao_id'])) {
$data['zhao'] = '';
} else {
$data['zhao'] = Db::name('user')->where('id', $Arr['zhao_id'])->value('nickname');
}
$this->assign("data", $data);
return $this->view->fetch();
}
}
... ...
... ... @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Title</title>
<div>{$data.xi}</div>
</head>
<body>
... ...