作者 郭盛
1 个管道 的构建 通过 耗费 5 秒

修改展示在最前内容

... ... @@ -23,7 +23,8 @@ class Order extends Backend
{
parent::_initialize();
$this->model = new \app\admin\model\Order;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("statusList1", $this->model->setStatusList());
}
/**
... ...
... ... @@ -28,9 +28,15 @@ class Order extends Model
'paytime_text',
'expirationtime_text'
];
public function getStatusList()
{
return ['1' => __('进行中'),'2' => __('已完成'),'3'=>__('售后')];
}
public function setStatusList()
{
return ['1' => __('审核通过'),'2' => __('审核未通过')];
}
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="finish_status">
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
{/foreach}
</ul>
<!--<ul class="nav nav-tabs" data-field="order_status">-->
<!--<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>-->
<!--{foreach name="statusList1" item="vo"}-->
<!--<li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>-->
<!--{/foreach}-->
<!--</ul>-->
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
... ...
... ... @@ -90,6 +90,7 @@ class Teacher extends Api
$param['behind'] = str_replace($http, '', $param['behind']);
$param['thumbnail'] = str_replace($http, '', $param['thumbnail']);
$param['createtime'] = time();
$param['show'] = implode(',',$param['show']);
$data = Db::name('teacher')->insertGetId($param);
if (empty($data)) {
$this->error('提交失败');
... ... @@ -144,6 +145,7 @@ class Teacher extends Api
$data['before'] = $qiniu.$data['before'];
$data['behind'] = $qiniu.$data['behind'];
$data['thumbnail'] = $qiniu.$data['thumbnail'];
$data['show'] = explode(',',$data['show']);
$data['territory_id'] = explode(',',$data['territory_id']);
$this->success('success',$data);
}
... ... @@ -225,6 +227,7 @@ class Teacher extends Api
$param['status'] = 0;
$param['updatetime'] = time();
$param['show'] = implode(',',$param['show']);
$data = Db::name('teacher')->where('id',$param['id'])->update($param);
if (empty($data)) {
$this->error('提交失败');
... ...
... ... @@ -9583,7 +9583,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-03-20 11:27:27 </div>
Generated on 2020-03-20 13:30:11 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...