|
@@ -0,0 +1,39 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+
|
|
|
+namespace App\Http\Controllers\QuickApp\SendOrder;
|
|
|
+
|
|
|
+
|
|
|
+use App\Exceptions\ApiException;
|
|
|
+use App\Http\Controllers\QuickApp\BaseController;
|
|
|
+use App\Modules\SendOrder\Models\QappSendOrder;
|
|
|
+
|
|
|
+class TxAdqNewNoAdvBookController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ * 腾讯广告新版,非点击广告访问链接的用户将看到配置的非广告书籍
|
|
|
+ * - 如果是通过腾讯adq广告投放的hap链接中,会有腾讯广告那边添加的参数,形如:hap:
|
|
|
+ * - 否则,形如:hap:
|
|
|
+ * @param $sendOrderId
|
|
|
+ * @return mixed
|
|
|
+ * @throws ApiException
|
|
|
+ */
|
|
|
+ public function getNoAdvBookInfo($sendOrderId) {
|
|
|
+ $extraConfig = QappSendOrder::where('send_order_id', $sendOrderId)
|
|
|
+ ->where('platform', 'tx_adq_new')
|
|
|
+ ->value('extra_config');
|
|
|
+ if($extraConfig) {
|
|
|
+ $extraConfigDecode = \json_decode($extraConfig, true);
|
|
|
+ $bid = $extraConfigDecode['txAdqNoAdvBid'] ?? 0;
|
|
|
+ $cid = $extraConfigDecode['txAdqNoAdvCid'] ?? 0;
|
|
|
+ if($bid) {
|
|
|
+ return response()->success([
|
|
|
+ 'bid' => Hashids::encode($bid),
|
|
|
+ 'cid' => $cid,
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ throw new ApiException(-1, '没有找到配置的书籍');
|
|
|
+ }
|
|
|
+}
|