class Jijiajian extends Base
{
public function jijiajianList()
{
$jijiajianList = JijiajianModel::all();
$count = JijiajianModel::count();
foreach ($jijiajianList as $value){
$data = [
&nbs
$this -> view -> assign('jijiajianList', $jijiajianList);
$this -> view -> assign('count', $count);
return $this -> view -> fetch('jijiajian');
}
<?php
namespace app\index\model;
use think\Model;
use traits\model\SoftDelete;
class Jijiajian extends Model
{
//引用软删除方法集
public function jijiajian()
{
// The class table and the teacher table are 1-to-1 related
Return $this->hasOne('jijiajian');
}
}
<?php
namespace app\index\controller;
use app\index\model\Gongyika as GongyikaModel;
use app\index\model\Jijiajian;
use think\Request;
class Gongyika extends Base
{
public function gongyikaList()#%
. chanpinxinghao' => $value->chanpinxinghao, //�%'jijiajian' => isset($value->jijiajian->tuhao)? $value->jijiajian->tuhao : '<span style="color:red;">Not allocated</ span>',
##
Thank you, Mr. Zhu. This problem has been solved. The missing hidden field code has been modified and run successfully.
Please provide the error message