Commit 934be542 authored by christ's avatar christ

offline

parent c352ff90
......@@ -293,11 +293,10 @@ class OrderServiceModel extends \Business\AbstractModel
$returnData['deliveryman'] = new \stdClass();
}
if(!in_array($this->order['paymentType'],ArrayConst::payTypeOnlines)){
$returnData['offlinePayway']=$storeDao->convertOfflinePayway($returnData['offlinePayway']);
$returnData['offlinePayway']=$storeDao->convertOfflinePayway($this->store['offlinePayway']);
}else{
$returnData['offlinePayway']=new \stdClass();
}
$returnData['storeMemberId']=$this->store['memberId'];
$returnData['totalGoodsNum'] = $orderGoodsDao->getGoodsCount($this->orderGoodsList);
// $returnData['offlinePayway'] = $this->store['offlinePayway'] ? $this->store['offlinePayway'] : '';
......
......@@ -38,14 +38,20 @@ class StoreModel extends \DAO\AbstractModel
public function convertOfflinePayway($offlinPayway)
{
$res = new \stdClass();
// $res['images'] = Array();
// $res['payway'] = '';
if (!empty($offlinPayway)) {
$offlinPayway=unserialize($offlinPayway);
$res['images']=$offlinPayway['images'];
$res['images']=[];
foreach($offlinPayway['images'] as $image){
$image= \Our\Common::getStaticFile($image, \Our\ImageConst::storeLabel);
array_push($res['images'],$image);
}
$res['payway']=$offlinPayway['payway']?$offlinPayway['payway']:'';
}
if(empty($res)){
$res=new \stdClass();
}
return $res;
}
......
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