request->get(); $where = []; $where['introSjId'] = $this->sjId; $status = $get['status'] ?? 0; $style = $get['style'] ?? MerchantClass::STYLE_SUPPLIER; if (!empty($status)) { $where['status'] = $status; } $where['style'] = $style; $data = ApplyService::getApplyList($where); util::success($data); } //审核 public function actionCheck() { $id = Yii::$app->request->post('id'); $status = Yii::$app->request->post('status', 0); $remark = Yii::$app->request->post('remark', ''); $apply = ApplyService::getById($id); if (empty($apply)) { util::fail('找不到申请记录'); } if ($apply['status'] != 0) { util::fail('已经审过了'); } if ($status == 1) { ApplyService::pass($id); } ApplyService::updateById($id, ['status' => $status, 'remark' => $remark]); util::success('操作成功'); } //申请试用,花店添加新客户 shish 2021.1.8 public function actionRegister() { $post = Yii::$app->request->post(); $post['adminId'] = $this->adminId; $post['long'] = isset($post['longitude']) ? $post['longitude'] : ''; $post['lat'] = isset($post['latitude']) ? $post['latitude'] : ''; $post['from'] = ApplyClass::FROM_GHS; ApplyService::addApply($post); util::complete(); } //申请状态 public function actionApplyStatus() { //-1申请试用 0审核中 1审核通过、试用中 2审核未通过 3已付费,立即订购 4试用到期失效,待付款,立即订购,价格不显示 $status = -1; util::success(['status' => $status]); } //地图相关信息 shish 2020.1.14 public function actionRegionRelate() { $regionTree = RegionService::tree(); $mapKey = 'OFWBZ-2NTHP-EHNDD-LKWQY-GANM7-PXBJH'; $out = ['region' => $regionTree, 'txMapKey' => $mapKey]; util::success($out); } //获取申请的验证码 shish 2020.2.23 public function actionGetValidateCode() { $mobile = Yii::$app->request->get('mobile'); util::success(['code' => rand(1111, 9999)]); } }