|
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Wap\Order;
|
|
|
|
|
|
use App\Http\Controllers\Wap\BaseController;
|
|
|
use App\Modules\Channel\Services\ChannelService;
|
|
|
+use App\Modules\OfficialAccount\Services\ForceSubscribeService;
|
|
|
use App\Modules\Statistic\Services\AdVisitStatService;
|
|
|
use App\Modules\Statistic\Services\DataAnalysisSelectUserService;
|
|
|
use App\Modules\User\Services\UserService;
|
|
@@ -109,6 +110,7 @@ class OrdersController extends BaseController
|
|
|
}
|
|
|
|
|
|
}*/
|
|
|
+ $this->appad();
|
|
|
|
|
|
foreach ($res as $v) {
|
|
|
$intro = [];
|
|
@@ -696,4 +698,19 @@ class OrdersController extends BaseController
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ private function appad(){
|
|
|
+ if(!$this->force_subscribe_info){
|
|
|
+ $this->force_subscribe_info = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);
|
|
|
+ }
|
|
|
+ if(!$this->force_subscribe_info){
|
|
|
+ return ['appad'=>false,'appad_banner'=>'','appad_url'=>''];
|
|
|
+ }
|
|
|
+ if($this->force_subscribe_info->subscribe_time &&
|
|
|
+ (time()-strtotime($this->force_subscribe_info->subscribe_time) >=3*86400)
|
|
|
+ && !OrderService::isPaidUser($this->uid)
|
|
|
+ ){
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
}
|