dever 3 years ago
parent
commit
cc6da00e76

+ 79 - 3
app/act/database/info.php

@@ -13,7 +13,19 @@ $type = array
 $get = array
 (
     1 => '获取优惠券',
-),
+);
+
+$coupon = function()
+{
+    $array = array();
+    $info = Dever::db('goods/coupon')->select();
+    
+    if($info)
+    {
+        $array += $info;
+    }
+    return $array;
+};
 
 # 常用的col
 $col = '*';
@@ -63,6 +75,56 @@ return array
             'update'    => 'textarea',
         ),
 
+        'cover'     => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '封面图',
+            'default'   => '',
+            'desc'      => '封面图',
+            'match'     => 'option',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '300*300',
+        ),
+
+        'type'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => '活动类型',
+            'default'   => '1',
+            'desc'      => '活动类型',
+            'match'     => 'is_numeric',
+            'update'    => 'select',
+            'option'    => $type,
+            'search'    => 'radio',
+            'list'      => true,
+        ),
+
+        'get'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => '活动奖励',
+            'default'   => '1',
+            'desc'      => '活动奖励',
+            'match'     => 'is_numeric',
+            'update'    => 'radio',
+            'option'    => $get,
+            'control'   => 'get',
+        ),
+
+        'coupon'      => array
+        (
+            'type'      => 'varchar-5000',
+            'name'      => '优惠券',
+            'default'   => '',
+            'desc'      => '优惠券',
+            'match'     => 'is_string',
+            'update'    => 'checkbox',
+            'option'    => $coupon,
+            'list'      => true,
+            'show'      => 'get=1',
+        ),
+
         'content'       => array
         (
             'type'      => 'text-255',
@@ -74,6 +136,20 @@ return array
             'key'       => '1',
         ),
 
+        'reorder'       => array
+        (
+            'type'      => 'int-11',
+            'name'      => '排序-数值越大越靠前,相当于置顶',
+            'default'   => '1',
+            'desc'      => '请输入排序',
+            'match'     => 'option',
+            //'update'  => 'text',
+            'search'    => 'order',
+            'list'      => true,
+            'order'     => 'desc',
+            'edit'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',
@@ -120,8 +196,8 @@ return array
                 'state' => 1,
             ),
             'type' => 'all',
-            'order' => array('reorder' => 'desc', 'pdate' => 'desc'),
-            'limit' => '0,1000',
+            'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
+            'limit' => '0,10',
             'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
         ),
 

+ 28 - 2
app/content/database/feature.php

@@ -65,6 +65,18 @@ return array
             'update'    => 'textarea',
         ),
 
+        'cover'     => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '封面图',
+            'default'   => '',
+            'desc'      => '封面图',
+            'match'     => 'option',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '300*300',
+        ),
+
         'content'       => array
         (
             'type'      => 'text-255',
@@ -76,6 +88,20 @@ return array
             'key'       => '1',
         ),
 
+        'reorder'       => array
+        (
+            'type'      => 'int-11',
+            'name'      => '排序-数值越大越靠前,相当于置顶',
+            'default'   => '1',
+            'desc'      => '请输入排序',
+            'match'     => 'option',
+            //'update'  => 'text',
+            'search'    => 'order',
+            'list'      => true,
+            'order'     => 'desc',
+            'edit'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',
@@ -122,8 +148,8 @@ return array
                 'state' => 1,
             ),
             'type' => 'all',
-            'order' => array('reorder' => 'desc', 'pdate' => 'desc'),
-            'limit' => '0,1000',
+            'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
+            'limit' => '0,10',
             'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
         ),
 

+ 28 - 2
app/content/database/news.php

@@ -65,6 +65,18 @@ return array
             'update'    => 'textarea',
         ),
 
+        'cover'     => array
+        (
+            'type'      => 'varchar-150',
+            'name'      => '封面图',
+            'default'   => '',
+            'desc'      => '封面图',
+            'match'     => 'option',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '300*300',
+        ),
+
         'content'       => array
         (
             'type'      => 'text-255',
@@ -75,6 +87,20 @@ return array
             'update'    => 'editor',
             'key'       => '1',
         ),
+
+        'reorder'       => array
+        (
+            'type'      => 'int-11',
+            'name'      => '排序-数值越大越靠前,相当于置顶',
+            'default'   => '1',
+            'desc'      => '请输入排序',
+            'match'     => 'option',
+            //'update'  => 'text',
+            'search'    => 'order',
+            'list'      => true,
+            'order'     => 'desc',
+            'edit'      => true,
+        ),
         
         'state'     => array
         (
@@ -122,8 +148,8 @@ return array
                 'state' => 1,
             ),
             'type' => 'all',
-            'order' => array('reorder' => 'desc', 'pdate' => 'desc'),
-            'limit' => '0,1000',
+            'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
+            'limit' => '0,10',
             'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
         ),
 

+ 1 - 1
app/factory/database/info.php

@@ -229,7 +229,7 @@ return array
             'desc'      => '生产能力',
             'match'     => 'option',
             // 多级联动+多选
-            'update'    => Dever::input('col') ? 'linkage' : 'hidden',
+            'update'    => Dever::input('col') ? 'linkage' : false,
             'option'    => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=factory&other_id={where_id}&goods_id={id}', 'manage')),
         ),
 

+ 10 - 0
app/factory/lib/Manage.php

@@ -132,4 +132,14 @@ class Manage
             }
         }
     }
+
+    # 根据分类获取商品
+    public function getInfo_api()
+    {
+        $where['city'] = Dever::input('city');
+
+        $data = Dever::db('factory/info')->select($where);
+
+        return $data;
+    }
 }

+ 1 - 1
app/goods/database/card.php

@@ -87,7 +87,7 @@ return array
         'goods'       => array
         (
             'type'      => 'text-1000',
-            'name'      => '商品配置',
+            'name'      => '商品配置-如果该商品有多种价格,礼品卡只能兑换最低价格的商品',
             'default'   => '',
             'desc'      => '商品配置',
             'match'     => 'is_string',

+ 47 - 12
app/goods/database/info.php

@@ -4,8 +4,9 @@ $status = Dever::config('base')->status;
 
 $price_type = array
 (
-    1 => '单一价格',
-    2 => '多种价格(需进行属性设置)',
+    1 => '普通商品',
+    2 => '多价商品',
+    3 => '套餐商品',
 );
 
 $mode = array
@@ -176,7 +177,7 @@ $config = array
         'price_type'        => array
         (
             'type'      => 'int-11',
-            'name'      => '价格类型',
+            'name'      => '商品类型',
             'default'   => '1',
             'desc'      => '价格类型',
             'match'     => 'is_numeric',
@@ -218,6 +219,39 @@ $config = array
             'show'      => 'price_type=1',
         ),
 
+        'goods'       => array
+        (
+            'type'      => 'text-1000',
+            'name'      => '套餐商品配置-套餐商品只可以选择普通商品',
+            'default'   => '',
+            'desc'      => '套餐商品配置',
+            'match'     => 'is_string',
+            'show'      => 'price_type=3',
+            'update'    => array
+            (
+                array
+                (
+                    'col'       => 'goods_id',
+                    'name'      => '选择商品',
+                    'default'   => '',
+                    'desc'      => '选择商品',
+                    'match'     => 'option',
+                    'update'    => 'select',
+                    'update_search' => 'goods/lib/manage.search?price_type=1',
+                ),
+
+                array
+                (
+                    'col'       => 'num',
+                    'name'      => '数量',
+                    'default'   => '1',
+                    'desc'      => '数量',
+                    'match'     => 'is_string',
+                    'update'    => 'text',
+                ),
+            ),
+        ),
+
         'cover'     => array
         (
             'type'      => 'varchar-150',
@@ -266,10 +300,10 @@ $config = array
             'default'   => '2',
             'desc'      => '是否热门商品',
             'match'     => 'is_numeric',
-            'update'    => 'radio',
+            //'update'    => 'radio',
             'option'    => $yes,
-            'list'      => true,
-            'edit'      => true,
+            //'list'      => true,
+            //'edit'      => true,
         ),
 
         'top'      => array
@@ -279,10 +313,10 @@ $config = array
             'default'   => '2',
             'desc'      => '是否推荐商品',
             'match'     => 'is_numeric',
-            'update'    => 'radio',
+            //'update'    => 'radio',
             'option'    => $yes,
-            'list'      => true,
-            'edit'      => true,
+            //'list'      => true,
+            //'edit'      => true,
         ),
 
         'youhui'      => array
@@ -313,7 +347,7 @@ $config = array
         (
             'type'      => 'tinyint-1',
             'name'      => '状态',
-            'default'   => '1',
+            'default'   => '2',
             'desc'      => '状态',
             'match'     => 'is_numeric',
             //'update'  => 'select',
@@ -402,7 +436,7 @@ $config = array
             'update' => array('编辑', 'info'),
             'fast' => array('属性设置', '"info_attr&project=goods&search_option_info_id={id}&search_option_category={category}&oper_parent=info&oper_project=goods&oper_save_jump=info&where_id={id}"', '{price_type} == 2'),
 
-            'fast_list' => array('价格设置', '"info_sku&project=goods&goods_id={id}&page_type=1"', '{price_type} <= 2'),
+            'fast_list' => array('价格设置', '"info_sku&project=goods&goods_id={id}&page_type=1"', '{price_type} > 0'),
             'br1' => array('<br />'),
             'delete' => '删除',
         ),
@@ -433,12 +467,13 @@ $config = array
             (
                 'ids' => array('yes-id', 'in'),
                 'name' => array('yes', 'like'),
+                'price_type' => 'yes',
                 'id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'all',
             'order' => array('reorder' => 'desc', 'id' => 'desc'),
-            'limit' => '0,1000',
+            'limit' => '0,10',
             'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
         ),
 

+ 5 - 0
app/goods/lib/Manage.php

@@ -42,6 +42,11 @@ class Manage
             $where['cate_id'] = $cate;
         }
 
+        $price_type = Dever::input('price_type');
+        if ($price_type) {
+            $where['price_type'] = $price_type;
+        }
+
         if ($yes) {
             $yes = Dever::db($table)->search(array('ids' => $yes));
         }

+ 87 - 0
app/shop/database/factory.php

@@ -0,0 +1,87 @@
+<?php
+
+return array
+(
+    # 表名
+    'name' => 'factory',
+    # 显示给用户看的名称
+    'lang' => '分配厂家',
+    'menu' => false,
+    # 数据结构
+    'struct' => array
+    (
+    
+        'id'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => 'ID',
+            'default'   => '',
+            'desc'      => '',
+            'match'     => 'is_numeric',
+            'search'    => 'order',
+            'update'    => 'hidden',
+            //'list'        => true,
+        ),
+
+        'shop_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '所属门店',
+            'default'   => '',
+            'desc'      => '所属门店',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
+        ),
+
+        'factory_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '所属工厂',
+            'default'   => '',
+            'desc'      => '所属工厂',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
+        ),
+
+        'city'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '城市',
+            'default'   => '',
+            'desc'      => '城市',
+            'match'     => 'option',
+            //'update'  => 'text',
+        ),
+
+        'state'     => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '1',
+            'desc'      => '请选择状态',
+            'match'     => 'is_numeric',
+        ),
+        
+        'cdate'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '创建时间',
+            'match'     => array('is_numeric', time()),
+            'desc'      => '',
+            # 只有insert时才生效
+            //'insert'    => true,
+            'search'    => 'date',
+            'list'      => 'date("Y-m-d H:i:s", {cdate})',
+        ),
+    ),
+
+    'manage' => array
+    (
+        
+    ),
+
+    'request' => array
+    (
+        
+    ),
+);

+ 0 - 140
app/shop/database/focus.php

@@ -1,140 +0,0 @@
-<?php
-
-$location = array
-(
-    1 => '首页',
-    2 => '商品列表',
-);
-
-$type = array
-(
-    1 => '链接',
-    2 => '分享活动',
-    3 => '推广员活动',
-);
-
-return array
-(
-    # 表名
-    'name' => 'focus',
-    # 显示给用户看的名称
-    'lang' => '焦点图管理',
-    # 后台菜单排序
-    'order' => 9,
-    # 数据结构
-    'struct' => array
-    (
-        'id'        => array
-        (
-            'type'      => 'int-11',
-            'name'      => 'ID',
-            'default'   => '',
-            'desc'      => '',
-            'match'     => 'is_numeric',
-            'search'    => 'order',
-            //'list'        => true,
-            'order'     => 'desc',
-        ),
-        
-        'name'      => array
-        (
-            'type'      => 'varchar-32',
-            'name'      => '名称',
-            'default'   => '',
-            'desc'      => '请输入名称',
-            'match'     => 'is_string',
-            'update'    => 'text',
-            'search'    => 'fulltext',
-            'list'      => true,
-        ),
-
-        'type'      => array
-        (
-            'type'      => 'int-11',
-            'name'      => '类型',
-            'default'   => '1',
-            'desc'      => '请选择类型',
-            'match'     => 'is_numeric',
-            'update'    => 'select',
-            'option'    => $type,
-            'control'   => 'type',
-        ),
-
-        'link'      => array
-        (
-            'type'      => 'varchar-400',
-            'name'      => '链接',
-            'default'   => '',
-            'desc'      => '请输入链接',
-            'match'     => 'option',
-            'update'    => 'text',
-            //'search'    => 'fulltext',
-            'show'      => 'type=1',
-        ),
-
-        'location'      => array
-        (
-            'type'      => 'int-11',
-            'name'      => '显示位置',
-            'default'   => '1',
-            'desc'      => '请选择显示位置',
-            'match'     => 'is_numeric',
-            'update'    => 'select',
-            'search'    => 'select',
-            'option'    => $location,
-            'list'      => true,
-            'edit'      => true,
-        ),
-
-        'pic'       => array
-        (
-            'type'      => 'varchar-150',
-            'name'      => '图片',
-            'default'   => '',
-            'desc'      => '请选择图片',
-            'match'     => 'is_string',
-            'update'    => 'image',
-            'key'       => '1',
-            'place'     => '150',
-        ),
-        
-        'reorder'       => array
-        (
-            'type'      => 'int-11',
-            'name'      => '排序(数值越大越靠前)',
-            'default'   => '1',
-            'desc'      => '请输入排序',
-            'match'     => 'option',
-            'update'    => 'text',
-            'search'    => 'order',
-            'list'      => true,
-            'order'     => 'desc',
-            'edit'      => true,
-        ),
-
-        'state'     => array
-        (
-            'type'      => 'tinyint-1',
-            'name'      => '状态',
-            'default'   => '1',
-            'desc'      => '请选择状态',
-            'match'     => 'is_numeric',
-        ),
-        
-        'cdate'     => array
-        (
-            'type'      => 'int-11',
-            'name'      => '录入时间',
-            'match'     => array('is_numeric', time()),
-            'desc'      => '',
-            # 只有insert时才生效
-            'insert'    => true,
-            'list'      => 'date("Y-m-d H:i:s", {cdate})',
-        ),
-    ),
-
-    'request' => array
-    (
-        
-    ),
-);

+ 36 - 2
app/shop/database/info.php

@@ -57,7 +57,7 @@ return array
             'desc'      => '',
             'match'     => 'is_numeric',
             'search'    => 'order',
-            //'list'      => true,
+            'list'      => true,
             'order'     => 'desc',
         ),
 
@@ -217,10 +217,34 @@ return array
             'desc'      => '生产能力',
             'match'     => 'option',
             // 多级联动+多选
-            'update'    => Dever::input('col') ? 'linkage' : 'hidden',
+            'update'    => Dever::input('col') ? 'linkage' : false,
             'option'    => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=shop&other_id={where_id}&goods_id={id}', 'manage')),
         ),
 
+        'factory'       => array
+        (
+            'type'      => 'text-255',
+            'name'      => '分配工厂-请先选择地区,再选择工厂',
+            'default'   => '',
+            'desc'      => '分配工厂',
+            'match'     => 'option',
+            // 多级联动+多选
+            'update'    => Dever::input('col') ? 'linkage' : false,
+            'option'    => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'factory'), '分配工厂'),
+        ),
+
+        'store'       => array
+        (
+            'type'      => 'text-255',
+            'name'      => '分配仓库-请先选择地区,再选择仓库',
+            'default'   => '',
+            'desc'      => '分配仓库',
+            'match'     => 'option',
+            // 多级联动+多选
+            'update'    => Dever::input('col') ? 'linkage' : false,
+            'option'    => array(Dever::url('api.get?level_total=3', 'area'), 'city', Dever::url('lib/manage.getInfo', 'store'), '分配仓库'),
+        ),
+
         'hr2'       => array
         (
             'name'      => '门店营业设置',
@@ -362,6 +386,7 @@ return array
             'place'     => '660*660',
         ),
 
+        /*
         'hr4'       => array
         (
             'name'      => '优惠券设置',
@@ -404,6 +429,7 @@ return array
             'option'    => $yes,
             //'search'    => 'select',
         ),
+        */
 
         'type'        => array
         (
@@ -460,11 +486,19 @@ return array
         (
             'delete' => '删除',
 
+
+            'br11' => array('<br /><br />'),
+
+            'add12' => array('分配工厂', '"info&where_id={id}&col=factory&oper_save_jump=info&oper_table=info&oper_parent=info"'),
+
+            'add13' => array('分配仓库', '"info&where_id={id}&col=store&oper_save_jump=info&oper_table=info&oper_parent=info"'),
+
             'br1' => array('<br /><br />'),
 
             'add1' => array('批量设置商品', '"info&where_id={id}&col=goods&oper_save_jump=info&oper_table=info&oper_parent=info"'),
             'list22' => array('商品管理', '"goods&search_option_shop_id={id}&oper_table=info"'),
 
+
             'br2' => array('<br /><br />'),
 
             'list' => array('优惠券管理', '"coupon&search_option_shop_id={id}&oper_table=info"'),

+ 87 - 0
app/shop/database/store.php

@@ -0,0 +1,87 @@
+<?php
+
+return array
+(
+    # 表名
+    'name' => 'store',
+    # 显示给用户看的名称
+    'lang' => '分配仓库',
+    'menu' => false,
+    # 数据结构
+    'struct' => array
+    (
+    
+        'id'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => 'ID',
+            'default'   => '',
+            'desc'      => '',
+            'match'     => 'is_numeric',
+            'search'    => 'order',
+            'update'    => 'hidden',
+            //'list'        => true,
+        ),
+
+        'shop_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '所属门店',
+            'default'   => '',
+            'desc'      => '所属门店',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
+        ),
+
+        'store_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '所属仓库',
+            'default'   => '',
+            'desc'      => '所属仓库',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
+        ),
+
+        'city'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '城市',
+            'default'   => '',
+            'desc'      => '城市',
+            'match'     => 'option',
+            //'update'  => 'text',
+        ),
+
+        'state'     => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '1',
+            'desc'      => '请选择状态',
+            'match'     => 'is_numeric',
+        ),
+        
+        'cdate'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '创建时间',
+            'match'     => array('is_numeric', time()),
+            'desc'      => '',
+            # 只有insert时才生效
+            //'insert'    => true,
+            'search'    => 'date',
+            'list'      => 'date("Y-m-d H:i:s", {cdate})',
+        ),
+    ),
+
+    'manage' => array
+    (
+        
+    ),
+
+    'request' => array
+    (
+        
+    ),
+);

+ 1 - 1
app/shop/lib/Info.php

@@ -118,7 +118,7 @@ class Info
         if ($name) {
             $where .= ' and name like("%'.$name.'%")';
         }
-        $sql = 'select *, round((st_distance(point(lng, lat), point('.$lng.', '.$lat.'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';
+        $sql = 'select id,name,`desc`,truename,mobile,lng,lat,address,open,worktime,method,gotime,round((st_distance(point(lng, lat), point('.$lng.', '.$lat.'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';
 
         $data = Dever::db('shop/info')->$method($sql, array(), $page);
 

+ 8 - 32
app/shop/lib/Manage.php

@@ -61,38 +61,9 @@ class Manage
             }
         }
 
-        $goods = Dever::param('goods', $data);
-        if ($goods) {
-            $goods = Dever::json_decode($goods);
-
-            if ($goods) {
-                foreach ($goods as $k1 => $v1) {
-                    if ($v1['value']) {
-                        foreach ($v1['value'] as $k => $v) {
-                            if ($v['state'] == 1) {
-                                $w = array();
-                                $w['goods_id'] = $v['id'];
-                                $w['shop_id'] = $id;
-                                $info = Dever::db('shop/goods')->one($w);
-
-                                $w['category_id'] = $v1['id'];
-                                if (!$info) {
-                                    Dever::db('shop/goods')->insert($w);
-                                } else {
-                                    $w['where_id'] = $info['id'];
-                                    $w['state'] = 1;
-                                    Dever::db('shop/goods')->update($w);
-                                }
-                            } else {
-                                unset($goods[$k1]['value'][$k]);
-                            }
-                        }
-                    }
-                }
-
-                $update['goods'] = Dever::json_encode($goods);
-            }
-        }
+        Dever::upLinkage($update, $id, $data, 'goods', 'shop/goods', 'shop_id', 'goods_id', 'category_id');
+        Dever::upLinkage($update, $id, $data, 'factory', 'shop/factory', 'shop_id', 'factory_id', 'city');
+        Dever::upLinkage($update, $id, $data, 'store', 'shop/store', 'shop_id', 'store_id', 'city');
 
         if (isset($update) && $update) {
             $update['where_id'] = $id;
@@ -117,6 +88,11 @@ class Manage
         }
     }
 
+    private function updateParam()
+    {
+
+    }
+
     /**
      * 更新商品信息
      *

+ 8 - 4
app/shop/src/Main.php

@@ -34,16 +34,20 @@ class Main extends Core
             $this->data['shop'] = Dever::load('shop/lib/info')->get($city, $lng, $lat);
         }
 
-        # 获取焦点图
-        $this->data['focus'] = Dever::db('shop/focus')->select(array('location' => 2));
+        # 焦点图
+        $this->data['focus'] = Dever::load('push/lib/data')->get('home_focus', '首页焦点图', 5);
 
         # 获取活动推荐
+        $this->data['act'] = Dever::load('push/lib/data')->get('home_act', '首页活动推荐', 3);
 
         # 获取热门商品
-        $this->data['hot'] = Dever::load('shop/lib/info')->getGoods($this->data['shop'], 1);
+        //$this->data['hot'] = Dever::load('shop/lib/info')->getGoods($this->data['shop'], 1);
+        # 获取活动推荐
+        $this->data['hot'] = Dever::load('push/lib/data')->get('home_hot', '首页热门商品', 6);
 
         # 获取推荐商品
-        $this->data['top'] = Dever::load('shop/lib/info')->getGoods($this->data['shop'], 2);
+        //$this->data['top'] = Dever::load('shop/lib/info')->getGoods($this->data['shop'], 2);
+        $this->data['top'] = Dever::load('push/lib/data')->get('home_top', '首页推荐商品', 6);
 
         return $this->data;
     }

+ 1 - 1
app/store/database/info.php

@@ -181,7 +181,7 @@ return array
             'desc'      => '生产能力',
             'match'     => 'option',
             // 多级联动+多选
-            'update'    => Dever::input('col') ? 'linkage' : 'hidden',
+            'update'    => Dever::input('col') ? 'linkage' : false,
             'option'    => array(Dever::url('api.get', 'category'), 'cate_id', Dever::url('lib/info.getGoods', 'goods'), '快速设置', Dever::url('project/database/list?project=goods&table=info_sku&page_type=1&other=store&other_id={where_id}&goods_id={id}', 'manage')),
         ),
 

+ 10 - 0
app/store/lib/Manage.php

@@ -161,4 +161,14 @@ class Manage
             }
         }
     }
+
+    # 根据分类获取商品
+    public function getInfo_api()
+    {
+        $where['city'] = Dever::input('city');
+
+        $data = Dever::db('store/info')->select($where);
+
+        return $data;
+    }
 }