|
@@ -8,6 +8,7 @@ use app\models\system\Card;
|
|
|
use app\models\system\CardInfo;
|
|
|
use app\models\system\SystemCity;
|
|
|
use app\models\system\SystemStore;
|
|
|
+use app\models\system\SystemStoreApply;
|
|
|
use app\models\system\SystemStoreMember;
|
|
|
use app\models\user\UserAli;
|
|
|
use app\models\user\UserBank;
|
|
@@ -803,7 +804,16 @@ class UserController
|
|
|
->where('paid', 1)->where('store_bag', 1)->where('status', '>=', 0)->find()) {
|
|
|
return app('json')->fail('未购买商家礼包');
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ if (SystemStoreApply::where('uid', $request->uid())->where('status', 0)->find()) {
|
|
|
+ return app('json')->fail('已在申请中');
|
|
|
+ }
|
|
|
+ $data['add_time'] = time();
|
|
|
+ $data['uid'] = $request->uid();
|
|
|
+ $res = SystemStoreApply::create($data);
|
|
|
+ if ($res) {
|
|
|
+ return app('json')->success('申请成功');
|
|
|
+ } else {
|
|
|
+ return app('json')->fail('申请失败,请稍后再试');
|
|
|
+ }
|
|
|
}
|
|
|
}
|