|
@@ -147,13 +147,49 @@ class HomeController extends BaseController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param $userId
|
|
|
- * @param $actId
|
|
|
+ * @SWG\Get(
|
|
|
+ * path="/transfer/25/1",
|
|
|
+ * tags={"首页管理"},
|
|
|
+ * summary="获取返利链接接口",
|
|
|
+ * description="获取返利链接接口",
|
|
|
+ * produces={"application/json"},
|
|
|
+ * @SWG\Response(
|
|
|
+ * response="200",
|
|
|
+ * description="success",
|
|
|
+ * @SWG\Schema(
|
|
|
+ * @SWG\Property(
|
|
|
+ * property="type",
|
|
|
+ * type="string",
|
|
|
+ * description="类型(1 h5 2小程序)"
|
|
|
+ * ),
|
|
|
+ * @SWG\Property(
|
|
|
+ * property="url",
|
|
|
+ * type="string",
|
|
|
+ * description="链接或者小程序首页"
|
|
|
+ * ),
|
|
|
+ * @SWG\Property(
|
|
|
+ * property="app_id",
|
|
|
+ * type="string",
|
|
|
+ * description="小程序appID"
|
|
|
+ * )
|
|
|
+ * )
|
|
|
+ * ),
|
|
|
+ * @SWG\Response(
|
|
|
+ * response="403",
|
|
|
+ * description="fail",
|
|
|
+ * @SWG\Schema(ref="#/definitions/ErrorBean")
|
|
|
+ * )
|
|
|
+ * )
|
|
|
*/
|
|
|
- public static function getTransferLinkurl($userId, $actId)
|
|
|
+ public function getTransferLinkurl($userId, $actId)
|
|
|
{
|
|
|
// dd(request()->getHost());
|
|
|
$url = HomeLogic::getTransferLink($actId,$userId);
|
|
|
- return redirect($url);
|
|
|
+ $data = [
|
|
|
+ "type"=>1,
|
|
|
+ "url"=>$url,
|
|
|
+ "app_id"=>""
|
|
|
+ ];
|
|
|
+ return $this->success($data);
|
|
|
}
|
|
|
}
|