diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 102d2bf8..b33a6b3e 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2111,7 +2111,8 @@ class ProductRepository extends BaseRepository switch($data['product_type']) { case 0: - return $this->apiProductDetail(['product_id' => $data['id']], 0, 0); + case 98: + return $this->apiProductDetail(['product_id' => $data['id']], $data['product_type'], 0); break; case 1: $ret = $this->apiProductDetail(['product_id' => $data['id']], 1, 0); diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index 130879f5..561464df 100644 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -43,6 +43,7 @@ use Joypack\Tencent\Map\Bundle\Location; use Joypack\Tencent\Map\Bundle\LocationOption; use think\exception\ValidateException; use think\facade\Cache; +use think\facade\Db; use think\facade\Log; use think\Response; @@ -474,4 +475,20 @@ class Common extends BaseController } return app('json')->success(['subscribe' => false, 'qrcode' => systemConfig('wechat_qrcode')]); } + + //区县数据 + public function get_area($city_code){ + $select=Db::name('geo_area')->where('city_code',$city_code)->field('area_id id,area_code code,area_name name')->select(); + return app('json')->success($select); + } + //街道 乡镇数据 + public function get_street($area_code){ + $select=Db::name('geo_street')->where('area_code',$area_code)->field('street_id id,street_code code,street_name name')->select(); + return app('json')->success($select); + } + //村数据 + public function get_village($street_code){ + $select=Db::name('geo_village')->where('street_code',$street_code)->field('village_id id,village_code code,village_name name')->select(); + return app('json')->success($select); + } } diff --git a/app/controller/api/store/product/StoreProduct.php b/app/controller/api/store/product/StoreProduct.php index 0332a23d..3db98c39 100644 --- a/app/controller/api/store/product/StoreProduct.php +++ b/app/controller/api/store/product/StoreProduct.php @@ -166,7 +166,7 @@ class StoreProduct extends BaseController */ public function preview() { - $param = $this->request->params(['key','id','product_type']); + $param = $this->request->params(['key','id',['product_type',0]]); $data = []; if($param['key']){ $data = Cache::get($param['key']); diff --git a/app/controller/merchant/store/StoreImport.php b/app/controller/merchant/store/StoreImport.php index 8b83d112..509331b4 100644 --- a/app/controller/merchant/store/StoreImport.php +++ b/app/controller/merchant/store/StoreImport.php @@ -98,15 +98,15 @@ class StoreImport extends BaseController 'E1'=>'分类', 'F1'=>'单位名', 'G1'=>'出售价', - 'H1'=>'成本价', - 'I1'=>'总库存', + 'H1'=>'总库存', + 'I1'=>'规格', ]; SpreadsheetExcelService::instance()->checkImport($path,$check); $data = [ 'mer_id' => $this->request->merId(), 'data' => [ 'path' => $path, - 'sql' => ['store_name' => 'A', 'store_info' => 'B', 'keyword' => 'C', 'bar_code' => 'D', 'cate_id' => 'E', 'unit_name' => 'F', 'price' => 'G', 'cost' => 'H', 'stock' => 'I'], + 'sql' => ['store_name' => 'A', 'store_info' => 'B', 'keyword' => 'C', 'bar_code' => 'D', 'cate_id' => 'E', 'unit_name' => 'F', 'price' => 'G', 'stock' => 'H', 'specifications' => 'I'], 'where' => ['bar_code' => 'D'], ] ]; diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 54183254..00000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/system.html b/public/system.html index 387e805d..4c00d67f 100644 --- a/public/system.html +++ b/public/system.html @@ -1,3 +1,3 @@ -