|
|
@@ -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,65 @@ class LlEventController extends BaseController
|
|
|
|
|
|
public $guestAccess = [];
|
|
|
|
|
|
+ public function actionAddMobile(){
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $mobile = $get['mobile']??'';
|
|
|
+ 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']) || $event['launchShopId'] != $shopId) {
|
|
|
+ util::fail('不是你提交的');
|
|
|
+ }
|
|
|
+ LlEventClass::addMobile($event,$mobile);
|
|
|
+ util::complete('添加成功');
|
|
|
+ }
|
|
|
+
|
|
|
+ //添加微信
|
|
|
+ public function actionAddWx(){
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $wx = $get['mobile']??'';
|
|
|
+ if(empty($wx)){
|
|
|
+ util::fail('没有微信');
|
|
|
+ }
|
|
|
+ $event = LlEventClass::getById($id);
|
|
|
+ if (empty($event)) {
|
|
|
+ util::fail('没有找到');
|
|
|
+ }
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ if (!isset($event['launchShopId']) || $event['launchShopId'] != $shopId) {
|
|
|
+ util::fail('不是你提交的');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //添加身份证号
|
|
|
+ public function actionAddNo()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $no = $get['no']??'';
|
|
|
+ if(empty($no)){
|
|
|
+ util::fail('没有身份证号');
|
|
|
+ }
|
|
|
+ $event = LlEventClass::getById($id);
|
|
|
+ if (empty($event)) {
|
|
|
+ util::fail('没有找到');
|
|
|
+ }
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ if (!isset($event['launchShopId']) || $event['launchShopId'] != $shopId) {
|
|
|
+ util::fail('不是你提交的');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function actionDetail()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
@@ -21,7 +81,7 @@ class LlEventController extends BaseController
|
|
|
util::fail('没有找到');
|
|
|
}
|
|
|
$shopId = $this->shopId;
|
|
|
- if (isset($event['launchShopId']) == false || $event['launchShopId'] != $shopId) {
|
|
|
+ if (!isset($event['launchShopId']) || $event['launchShopId'] != $shopId) {
|
|
|
util::fail('不是你提交的');
|
|
|
}
|
|
|
$proveJson = $event['prove'] ?? '';
|