|
|
@@ -4,6 +4,7 @@ namespace hd\controllers;
|
|
|
|
|
|
use bizHd\ll\classes\LlEventClass;
|
|
|
use common\components\imgUtil;
|
|
|
+use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
|
|
|
@@ -12,6 +13,29 @@ class LlEventController extends BaseController
|
|
|
|
|
|
public $guestAccess = [];
|
|
|
|
|
|
+ public function actionAddMobile()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $mobile = $get['mobile'] ?? 0;
|
|
|
+ if (empty($mobile)) {
|
|
|
+ util::fail('请填写手机号');
|
|
|
+ }
|
|
|
+ if (!stringUtil::isMobile($mobile)) {
|
|
|
+ util::fail('手机号错误');
|
|
|
+ }
|
|
|
+ $event = LlEventClass::getById($id);
|
|
|
+ if (empty($event)) {
|
|
|
+ util::fail('没有找到');
|
|
|
+ }
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ if (isset($event['launchShopId']) == false || $event['launchShopId'] != $shopId) {
|
|
|
+ util::fail('不是你提交的');
|
|
|
+ }
|
|
|
+ LlEventClass::addMobile($event, $mobile);
|
|
|
+ util::complete('添加成功');
|
|
|
+ }
|
|
|
+
|
|
|
public function actionDetail()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|