Commit a85e0f6d authored by zhz's avatar zhz

inservice

parent 1484a387
......@@ -496,12 +496,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$lng = $param['lng'];
$lat = $param['lat'];
}
$in_store_service_flag=0;
if($lng && $lat){
$location = array('lat'=>$lat,'lng'=>$lng);
$in_store_service = \Store\StoreUtil::getInstance()->checkAddressInServiceArea($location,$commonInfo['store_id']);
$in_store_service && $in_store_service_flag = 1;
}
$storeInfo = \DAO\StoreModel::getInstance()->get($commonInfo['store_id'],false);
$in_store_service_flag = \DAO\StoreModel::getInstance()->checkAddressInServiceArea(array('lng'=>$lng,'lat'=>$lat),$storeInfo);
//所在地
$area = '';
if($commonInfo['areaid_1'] && $commonInfo['areaid_2']){
......
......@@ -38,12 +38,14 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$lng = $param['lng'];
$lat = $param['lat'];
}
$in_store_service_flag=0;
if($lng && $lat){
$location = array('lat'=>$lat,'lng'=>$lng);
$in_store_service = \Store\StoreUtil::getInstance()->checkAddressInServiceArea($location,$data['store_id']);
$in_store_service && $in_store_service_flag = 1;
}
// $in_store_service_flag=0;
// if($lng && $lat){
// $location = array('lat'=>$lat,'lng'=>$lng);
// $in_store_service = \Store\StoreUtil::getInstance()->checkAddressInServiceArea($location,$data['store_id']);
// $in_store_service && $in_store_service_flag = 1;
// }
$storeInfo = \DAO\StoreModel::getInstance()->get($data['store_id'],false);
$in_store_service_flag = \DAO\StoreModel::getInstance()->checkAddressInServiceArea(array('lng'=>$lng,'lat'=>$lat),$storeInfo);
$data['inStoreService'] = $in_store_service_flag;
$data['state'] = \Our\ApiConst::cartGoodsOnline;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment