47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
namespace app\controllers\channel;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Yii;
|
|
use yii\web\Controller;
|
|
use app\models\common\Config;
|
|
use app\models\common\Store;
|
|
|
|
class CarryController extends CommonController{
|
|
private $shop_id;
|
|
public function init(){
|
|
parent::init();
|
|
$this->shop_id=$this->storeId?:Store::getMainStore($this->wqData['uniacid'])['id'];
|
|
$this->shop_id=$this->shop_id?:0;
|
|
$request = Yii::$app->request;
|
|
if($request->isPost){
|
|
if(!$this->shop_id){
|
|
return $this->result(3,'无效的门店,请先添加商店');die;
|
|
}
|
|
}
|
|
|
|
}
|
|
//配送设置
|
|
public function actionCarrySet(){
|
|
$request = Yii::$app->request;
|
|
if($request->isPost){
|
|
$result=axios_request();
|
|
$data=array(
|
|
'carry'=>array(
|
|
'carryStatus'=>$result['carryStatus'],
|
|
'advanceCarry'=>$result['advanceCarry'],
|
|
'contacts'=>$result['contacts'],
|
|
'contactNumber'=>$result['contactNumber'],
|
|
'address'=>$result['address'],
|
|
'position'=>$result['position']
|
|
),
|
|
'distribution'=>array(
|
|
|
|
),
|
|
'distributionArea'=>array(
|
|
|
|
)
|
|
);
|
|
|
|
}
|
|
}
|
|
} |