|
|
@@ -24,8 +24,30 @@ class DeliveryController extends BaseController
|
|
|
|
|
|
public function actionList()
|
|
|
{
|
|
|
+ $platformList = [];
|
|
|
+ $platformLogos = [
|
|
|
+ 'data' => '📦',
|
|
|
+ 'shunfeng' => '🚚',
|
|
|
+ 'meituan' => '🍱' ,
|
|
|
+ 'fengniao' => '🍜',
|
|
|
+ 'huolala' => '🚛',
|
|
|
+ 'shansong' => '⚡',
|
|
|
+ 'didi' => '🚗',
|
|
|
+ 'uu' => '🛵'
|
|
|
+ ];
|
|
|
$mainId = $this->mainId;
|
|
|
- DeliveryAuthTokenClass::getAllByCondition(['mainId'=>$mainId]);
|
|
|
+ $allDeliveries = DeliveryAuthTokenClass::getAllByCondition(['mainId'=>$mainId]);
|
|
|
+ foreach($allDeliveries as $d){
|
|
|
+ $item = [
|
|
|
+ 'id'=>$d['platform'],
|
|
|
+ 'logo'=>$platformLogos[$d['platform']],
|
|
|
+ 'is_authorized' => true,
|
|
|
+ 'balance' => 0,
|
|
|
+ 'access_type' => 'oauth'
|
|
|
+ ];
|
|
|
+ $platformList = $item;
|
|
|
+ }
|
|
|
+ util::success(['platformList'=>$platformList]);
|
|
|
// [
|
|
|
// { id: 'dada', name: '达达', logo: '📦', is_authorized: true, balance: 178.0, access_type: 'oauth' },
|
|
|
// { id: 'sf-tongcheng', name: '顺丰同城', logo: '🚚', is_authorized: true, balance: 174.0, access_type: 'oauth' },
|