|
|
@@ -40,15 +40,15 @@ class ApplyController extends BaseController
|
|
|
//申请试用 ssh 2020.1.11
|
|
|
public function actionRegister()
|
|
|
{
|
|
|
- $get = Yii::$app->request->get();
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
$admin = $this->admin;
|
|
|
- $get['adminId'] = $this->adminId;
|
|
|
- $get['adminName'] = $admin['adminName'] ?? '';
|
|
|
- $get['long'] = isset($get['longitude']) ? $get['longitude'] : '';
|
|
|
- $get['lat'] = isset($get['latitude']) ? $get['latitude'] : '';
|
|
|
- $get['from'] = ApplyClass::FROM_RETAIL;
|
|
|
- $get['style'] = SjClass::STYLE_RETAIL;
|
|
|
- $name = $get['name'] ?? '';
|
|
|
+ $post['adminId'] = $this->adminId;
|
|
|
+ $post['adminName'] = $admin['adminName'] ?? '';
|
|
|
+ $post['long'] = isset($post['longitude']) ? $post['longitude'] : '';
|
|
|
+ $post['lat'] = isset($post['latitude']) ? $post['latitude'] : '';
|
|
|
+ $post['from'] = ApplyClass::FROM_RETAIL;
|
|
|
+ $post['style'] = SjClass::STYLE_RETAIL;
|
|
|
+ $name = $post['name'] ?? '';
|
|
|
if (empty($name)) {
|
|
|
util::fail('名称不能为空');
|
|
|
}
|
|
|
@@ -60,7 +60,7 @@ class ApplyController extends BaseController
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|
|
|
//增加或更新申请
|
|
|
- ApplyService::replaceRetail($get);
|
|
|
+ ApplyService::replaceRetail($post);
|
|
|
$transaction->commit();
|
|
|
} catch (\Exception $exception) {
|
|
|
$transaction->rollBack();
|