作者 jinglong
1 个管道 的构建 通过 耗费 10 秒

修改分类排序

... ... @@ -63,7 +63,7 @@ class Banner extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','image','createtime','url','status']);
$row->visible(['id','image','createtime','url','status','sort']);
}
$list = collection($list)->toArray();
... ...
... ... @@ -63,7 +63,7 @@ class Btbanner extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','image','createtime','url']);
$row->visible(['id','image','createtime','url','sort']);
}
$list = collection($list)->toArray();
... ...
... ... @@ -4,6 +4,7 @@ return [
'Id' => 'ID',
'Image' => '轮播图',
'Url' => '跳转链接',
'Sort' => '排序',
'Createtime' => '创建时间',
'Updatetime' => '更新时间'
];
... ...
... ... @@ -4,6 +4,7 @@ return [
'Id' => 'ID',
'Image' => '轮播图',
'Url' => '跳转链接',
'Sort' => '排序',
'Createtime' => '创建时间',
'Updatetime' => '更新时间'
];
... ...
... ... @@ -10,6 +10,7 @@ return [
'Brand_explain' => '品牌说明',
'File' => '视频文件',
'Image_long' => '长图',
'Sort' => '排序',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Deletetime' => '删除时间'
... ...
... ... @@ -5,6 +5,7 @@ return [
'Image' => '分类图',
'Images' => '分类轮播图',
'Name' => '分类名称',
'Sort' => '排序',
'Createtime' => '创建时间',
'Updatetime' => '更新时间'
];
... ...
... ... @@ -28,6 +28,12 @@
<span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -28,6 +28,12 @@
<span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -28,6 +28,12 @@
<span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -28,6 +28,12 @@
<span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -73,6 +73,12 @@
<ul class="row list-inline plupload-preview" id="p-image_long"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -76,6 +76,12 @@
<ul class="row list-inline plupload-preview" id="p-image_long"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -37,6 +37,12 @@
<span style="color:red;">图片尺寸:460*164</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -36,6 +36,12 @@
<span style="color:red;">图片尺寸:460*164</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -61,13 +61,13 @@ class Brand extends Api
public function brandType(){
if($this->request->isGet()){
$arr = [];
$res = Common::selectSoftData('btype','id,image,name,address');
$res = Common::selectSoftData('btype','id,image,name,address','sort desc,id desc');
foreach ($res as &$value){
$value['image'] = $this->auth->absolutionUrlOne($value['image']);
}
$arr['data'] = $res;
//品牌专区轮播图
$res1 = Common::selectData('btbanner','id,image,url');
$res1 = Common::selectData('btbanner','id,image,url','sort desc,id desc');
foreach ($res1 as &$value1){
$value1['image'] = $this->auth->absolutionUrlOne($value1['image']);
}
... ...
... ... @@ -98,7 +98,7 @@ class Index extends Api
if($this->request->isGet()){
$arr = [];
//轮播图
$res_banner = Common::selectWhereData('banner',['status'=>'normal'],'id,image,url');
$res_banner = Common::selectWhereData('banner',['status'=>'normal'],'id,image,url','sort desc,id desc');
foreach ($res_banner as &$b_value){
$b_value['image'] = $this->auth->absolutionUrlOne($b_value['image']);
}
... ...
... ... @@ -52,7 +52,7 @@ class Sort extends Api
*/
public function sortType(){
if($this->request->isGet()){
$res = Common::selectData('gtype','id,image,images,name');
$res = Common::selectData('gtype','id,image,images,name','sort desc,id desc');
foreach ($res as &$value){
$value['image'] = $this->auth->absolutionUrlOne($value['image']);
$value['images'] = $this->auth->absolutionUrl($value['images']);
... ...
... ... @@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false},
{field: 'url', title: __('Url')},
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal:'启用', hidden: '禁用'}},
{field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
... ...
... ... @@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('Id')},
{field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false},
{field: 'url', title: __('Url')},
{field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
... ...
... ... @@ -32,6 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// {field: 'introduce', title: __('Introduce'),operate:false},
// {field: 'file', title: __('File')},
// {field: 'image_long', title: __('Image_long')},
{field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...
... ... @@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name')},
{field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false},
{field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序
// {field: 'images', title: __('Images'), events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
... ...