validate()) return [ 'code' => 1, 'msg' => $this->getErrorSummary(false)[0], ]; try { // 预生成订单号 $order_no = OrderNo::getOrderNo(OrderNo::ORDER_MALL); cache()->set('delivery_order_no_' . $this->user->id, $order_no); $mchList = $this->getMchListData(); if(isset($mchList['code']) && $mchList['code'] == 1){ return $mchList; } } catch(\Exception $e) { return [ 'code' => 1, 'line' => $e->getLine(), 'msg' => $e->getMessage(), 'file' => $e->getFile(), ]; } return [ 'code' => 0, 'msg' => 'OOKK', 'data' => [ 'level' => $this->getLevelData(), 'mch_list' => $mchList, 'integral'=>$this->integral, 'user_integral' => $this->user->integral, 'user_money' => $this->user->money, 'address' => $this->getAddress(), 'address_id' => (string)(int)Address::findOne([ 'user_id' => $this->saas_user->id, 'is_delete' => 0, 'is_default' => 1 ])->id //'template_id' => $template_id, //'pay_type_list' => $this->getPayTypeList(), ], ]; } }