正在显示
21 个修改的文件
包含
62 行增加
和
6 行删除
@@ -63,7 +63,7 @@ class Banner extends Backend | @@ -63,7 +63,7 @@ class Banner extends Backend | ||
63 | ->select(); | 63 | ->select(); |
64 | 64 | ||
65 | foreach ($list as $row) { | 65 | foreach ($list as $row) { |
66 | - $row->visible(['id','image','createtime','url','status']); | 66 | + $row->visible(['id','image','createtime','url','status','sort']); |
67 | 67 | ||
68 | } | 68 | } |
69 | $list = collection($list)->toArray(); | 69 | $list = collection($list)->toArray(); |
@@ -63,7 +63,7 @@ class Btbanner extends Backend | @@ -63,7 +63,7 @@ class Btbanner extends Backend | ||
63 | ->select(); | 63 | ->select(); |
64 | 64 | ||
65 | foreach ($list as $row) { | 65 | foreach ($list as $row) { |
66 | - $row->visible(['id','image','createtime','url']); | 66 | + $row->visible(['id','image','createtime','url','sort']); |
67 | 67 | ||
68 | } | 68 | } |
69 | $list = collection($list)->toArray(); | 69 | $list = collection($list)->toArray(); |
@@ -10,6 +10,7 @@ return [ | @@ -10,6 +10,7 @@ return [ | ||
10 | 'Brand_explain' => '品牌说明', | 10 | 'Brand_explain' => '品牌说明', |
11 | 'File' => '视频文件', | 11 | 'File' => '视频文件', |
12 | 'Image_long' => '长图', | 12 | 'Image_long' => '长图', |
13 | + 'Sort' => '排序', | ||
13 | 'Createtime' => '创建时间', | 14 | 'Createtime' => '创建时间', |
14 | 'Updatetime' => '更新时间', | 15 | 'Updatetime' => '更新时间', |
15 | 'Deletetime' => '删除时间' | 16 | 'Deletetime' => '删除时间' |
@@ -5,6 +5,7 @@ return [ | @@ -5,6 +5,7 @@ return [ | ||
5 | 'Image' => '分类图', | 5 | 'Image' => '分类图', |
6 | 'Images' => '分类轮播图', | 6 | 'Images' => '分类轮播图', |
7 | 'Name' => '分类名称', | 7 | 'Name' => '分类名称', |
8 | + 'Sort' => '排序', | ||
8 | 'Createtime' => '创建时间', | 9 | 'Createtime' => '创建时间', |
9 | 'Updatetime' => '更新时间' | 10 | 'Updatetime' => '更新时间' |
10 | ]; | 11 | ]; |
@@ -28,6 +28,12 @@ | @@ -28,6 +28,12 @@ | ||
28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> | 28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | + <div class="form-group"> | ||
32 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
33 | + <div class="col-xs-12 col-sm-8"> | ||
34 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0"> | ||
35 | + </div> | ||
36 | + </div> | ||
31 | <div class="form-group layer-footer"> | 37 | <div class="form-group layer-footer"> |
32 | <label class="control-label col-xs-12 col-sm-2"></label> | 38 | <label class="control-label col-xs-12 col-sm-2"></label> |
33 | <div class="col-xs-12 col-sm-8"> | 39 | <div class="col-xs-12 col-sm-8"> |
@@ -28,6 +28,12 @@ | @@ -28,6 +28,12 @@ | ||
28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> | 28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | + <div class="form-group"> | ||
32 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
33 | + <div class="col-xs-12 col-sm-8"> | ||
34 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}"> | ||
35 | + </div> | ||
36 | + </div> | ||
31 | <div class="form-group layer-footer"> | 37 | <div class="form-group layer-footer"> |
32 | <label class="control-label col-xs-12 col-sm-2"></label> | 38 | <label class="control-label col-xs-12 col-sm-2"></label> |
33 | <div class="col-xs-12 col-sm-8"> | 39 | <div class="col-xs-12 col-sm-8"> |
@@ -28,6 +28,12 @@ | @@ -28,6 +28,12 @@ | ||
28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> | 28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | + <div class="form-group"> | ||
32 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
33 | + <div class="col-xs-12 col-sm-8"> | ||
34 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0"> | ||
35 | + </div> | ||
36 | + </div> | ||
31 | <div class="form-group layer-footer"> | 37 | <div class="form-group layer-footer"> |
32 | <label class="control-label col-xs-12 col-sm-2"></label> | 38 | <label class="control-label col-xs-12 col-sm-2"></label> |
33 | <div class="col-xs-12 col-sm-8"> | 39 | <div class="col-xs-12 col-sm-8"> |
@@ -28,6 +28,12 @@ | @@ -28,6 +28,12 @@ | ||
28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> | 28 | <span style="color:red;">商品详情页:/pages/index/goodsDetail/goodsDetail?id=10<br/>其中10代表商品管理列表的ID列的值</span> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |
31 | + <div class="form-group"> | ||
32 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
33 | + <div class="col-xs-12 col-sm-8"> | ||
34 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}"> | ||
35 | + </div> | ||
36 | + </div> | ||
31 | <div class="form-group layer-footer"> | 37 | <div class="form-group layer-footer"> |
32 | <label class="control-label col-xs-12 col-sm-2"></label> | 38 | <label class="control-label col-xs-12 col-sm-2"></label> |
33 | <div class="col-xs-12 col-sm-8"> | 39 | <div class="col-xs-12 col-sm-8"> |
@@ -73,6 +73,12 @@ | @@ -73,6 +73,12 @@ | ||
73 | <ul class="row list-inline plupload-preview" id="p-image_long"></ul> | 73 | <ul class="row list-inline plupload-preview" id="p-image_long"></ul> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | + <div class="form-group"> | ||
77 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
78 | + <div class="col-xs-12 col-sm-8"> | ||
79 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0"> | ||
80 | + </div> | ||
81 | + </div> | ||
76 | <div class="form-group layer-footer"> | 82 | <div class="form-group layer-footer"> |
77 | <label class="control-label col-xs-12 col-sm-2"></label> | 83 | <label class="control-label col-xs-12 col-sm-2"></label> |
78 | <div class="col-xs-12 col-sm-8"> | 84 | <div class="col-xs-12 col-sm-8"> |
@@ -76,6 +76,12 @@ | @@ -76,6 +76,12 @@ | ||
76 | <ul class="row list-inline plupload-preview" id="p-image_long"></ul> | 76 | <ul class="row list-inline plupload-preview" id="p-image_long"></ul> |
77 | </div> | 77 | </div> |
78 | </div> | 78 | </div> |
79 | + <div class="form-group"> | ||
80 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
81 | + <div class="col-xs-12 col-sm-8"> | ||
82 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}"> | ||
83 | + </div> | ||
84 | + </div> | ||
79 | <div class="form-group layer-footer"> | 85 | <div class="form-group layer-footer"> |
80 | <label class="control-label col-xs-12 col-sm-2"></label> | 86 | <label class="control-label col-xs-12 col-sm-2"></label> |
81 | <div class="col-xs-12 col-sm-8"> | 87 | <div class="col-xs-12 col-sm-8"> |
@@ -37,6 +37,12 @@ | @@ -37,6 +37,12 @@ | ||
37 | <span style="color:red;">图片尺寸:460*164</span> | 37 | <span style="color:red;">图片尺寸:460*164</span> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | + <div class="form-group"> | ||
41 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
42 | + <div class="col-xs-12 col-sm-8"> | ||
43 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="0"> | ||
44 | + </div> | ||
45 | + </div> | ||
40 | <div class="form-group layer-footer"> | 46 | <div class="form-group layer-footer"> |
41 | <label class="control-label col-xs-12 col-sm-2"></label> | 47 | <label class="control-label col-xs-12 col-sm-2"></label> |
42 | <div class="col-xs-12 col-sm-8"> | 48 | <div class="col-xs-12 col-sm-8"> |
@@ -36,6 +36,12 @@ | @@ -36,6 +36,12 @@ | ||
36 | <span style="color:red;">图片尺寸:460*164</span> | 36 | <span style="color:red;">图片尺寸:460*164</span> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | + <div class="form-group"> | ||
40 | + <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label> | ||
41 | + <div class="col-xs-12 col-sm-8"> | ||
42 | + <input id="c-sort" data-rule="required range(0~)" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}"> | ||
43 | + </div> | ||
44 | + </div> | ||
39 | <div class="form-group layer-footer"> | 45 | <div class="form-group layer-footer"> |
40 | <label class="control-label col-xs-12 col-sm-2"></label> | 46 | <label class="control-label col-xs-12 col-sm-2"></label> |
41 | <div class="col-xs-12 col-sm-8"> | 47 | <div class="col-xs-12 col-sm-8"> |
@@ -61,13 +61,13 @@ class Brand extends Api | @@ -61,13 +61,13 @@ class Brand extends Api | ||
61 | public function brandType(){ | 61 | public function brandType(){ |
62 | if($this->request->isGet()){ | 62 | if($this->request->isGet()){ |
63 | $arr = []; | 63 | $arr = []; |
64 | - $res = Common::selectSoftData('btype','id,image,name,address'); | 64 | + $res = Common::selectSoftData('btype','id,image,name,address','sort desc,id desc'); |
65 | foreach ($res as &$value){ | 65 | foreach ($res as &$value){ |
66 | $value['image'] = $this->auth->absolutionUrlOne($value['image']); | 66 | $value['image'] = $this->auth->absolutionUrlOne($value['image']); |
67 | } | 67 | } |
68 | $arr['data'] = $res; | 68 | $arr['data'] = $res; |
69 | //品牌专区轮播图 | 69 | //品牌专区轮播图 |
70 | - $res1 = Common::selectData('btbanner','id,image,url'); | 70 | + $res1 = Common::selectData('btbanner','id,image,url','sort desc,id desc'); |
71 | foreach ($res1 as &$value1){ | 71 | foreach ($res1 as &$value1){ |
72 | $value1['image'] = $this->auth->absolutionUrlOne($value1['image']); | 72 | $value1['image'] = $this->auth->absolutionUrlOne($value1['image']); |
73 | } | 73 | } |
@@ -98,7 +98,7 @@ class Index extends Api | @@ -98,7 +98,7 @@ class Index extends Api | ||
98 | if($this->request->isGet()){ | 98 | if($this->request->isGet()){ |
99 | $arr = []; | 99 | $arr = []; |
100 | //轮播图 | 100 | //轮播图 |
101 | - $res_banner = Common::selectWhereData('banner',['status'=>'normal'],'id,image,url'); | 101 | + $res_banner = Common::selectWhereData('banner',['status'=>'normal'],'id,image,url','sort desc,id desc'); |
102 | foreach ($res_banner as &$b_value){ | 102 | foreach ($res_banner as &$b_value){ |
103 | $b_value['image'] = $this->auth->absolutionUrlOne($b_value['image']); | 103 | $b_value['image'] = $this->auth->absolutionUrlOne($b_value['image']); |
104 | } | 104 | } |
@@ -52,7 +52,7 @@ class Sort extends Api | @@ -52,7 +52,7 @@ class Sort extends Api | ||
52 | */ | 52 | */ |
53 | public function sortType(){ | 53 | public function sortType(){ |
54 | if($this->request->isGet()){ | 54 | if($this->request->isGet()){ |
55 | - $res = Common::selectData('gtype','id,image,images,name'); | 55 | + $res = Common::selectData('gtype','id,image,images,name','sort desc,id desc'); |
56 | foreach ($res as &$value){ | 56 | foreach ($res as &$value){ |
57 | $value['image'] = $this->auth->absolutionUrlOne($value['image']); | 57 | $value['image'] = $this->auth->absolutionUrlOne($value['image']); |
58 | $value['images'] = $this->auth->absolutionUrl($value['images']); | 58 | $value['images'] = $this->auth->absolutionUrl($value['images']); |
@@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
28 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, | 28 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, |
29 | {field: 'url', title: __('Url')}, | 29 | {field: 'url', title: __('Url')}, |
30 | {field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal:'启用', hidden: '禁用'}}, | 30 | {field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal:'启用', hidden: '禁用'}}, |
31 | + {field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序 | ||
31 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
32 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 33 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
33 | ] | 34 | ] |
@@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
27 | {field: 'id', title: __('Id')}, | 27 | {field: 'id', title: __('Id')}, |
28 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, | 28 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, |
29 | {field: 'url', title: __('Url')}, | 29 | {field: 'url', title: __('Url')}, |
30 | + {field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序 | ||
30 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 31 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
31 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 32 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
32 | ] | 33 | ] |
@@ -32,6 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -32,6 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
32 | // {field: 'introduce', title: __('Introduce'),operate:false}, | 32 | // {field: 'introduce', title: __('Introduce'),operate:false}, |
33 | // {field: 'file', title: __('File')}, | 33 | // {field: 'file', title: __('File')}, |
34 | // {field: 'image_long', title: __('Image_long')}, | 34 | // {field: 'image_long', title: __('Image_long')}, |
35 | + {field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序 | ||
35 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 36 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
36 | // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 37 | // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
37 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 38 | {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 | @@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
27 | {field: 'id', title: __('Id')}, | 27 | {field: 'id', title: __('Id')}, |
28 | {field: 'name', title: __('Name')}, | 28 | {field: 'name', title: __('Name')}, |
29 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, | 29 | {field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image,operate:false}, |
30 | + {field: 'sort', title: __('Sort'),sortable: true,operate:false},//排序 | ||
30 | // {field: 'images', title: __('Images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, | 31 | // {field: 'images', title: __('Images'), events: Table.api.events.image, formatter: Table.api.formatter.images}, |
31 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 32 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
32 | // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 33 | // {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
-
请 注册 或 登录 后发表评论