dever 3 years ago
parent
commit
6becd10d1d
2 changed files with 18 additions and 1 deletions
  1. 8 1
      app/mshop/src/Act.php
  2. 10 0
      app/shop/database/info.php

+ 8 - 1
app/mshop/src/Act.php

@@ -9,6 +9,13 @@ class Act extends Core
     # 采购
     public function buy()
     {
-        # 获取这个
+        $shop = $this->shop;
+        # 获取门店分配的仓库和工厂
+
+        $sql = 'select *,round((st_distance(point(lng, lat), point('.$shop['lng'].', '.$shop['lat'].'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';
+
+        $data = Dever::db('shop/info')->$method($sql, array(), $page);
+
+        $store = Dever::db('shop/store')->select();
     }
 }

+ 10 - 0
app/shop/database/info.php

@@ -461,6 +461,16 @@ return array
             'option'    => $act,
         ),
 
+        'pdesc'      => array
+        (
+            'type'      => 'text-255',
+            'name'      => '配送与自提说明',
+            'default'   => '',
+            'desc'      => '配送与自提说明',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+        ),
+
         'status'        => array
         (
             'type'      => 'int-11',