|
|
@@ -447,6 +447,27 @@ class Jt extends BaseController
|
|
447
|
447
|
return app("json")->success("获取详情成功-aabb,用户{$userId}", $return);
|
|
448
|
448
|
}
|
|
449
|
449
|
|
|
|
450
|
+ /**
|
|
|
451
|
+ * 商品详情转链
|
|
|
452
|
+ * @return mixed
|
|
|
453
|
+ */
|
|
|
454
|
+ public function changLinkApi()
|
|
|
455
|
+ {
|
|
|
456
|
+ $discount_link = $this->request->param('discount_link');
|
|
|
457
|
+ $skuId = $this->request->param('skuId');
|
|
|
458
|
+ $userId = $this->request->uid();
|
|
|
459
|
+ $url = '';
|
|
|
460
|
+ if($userId != ''){
|
|
|
461
|
+ $clparams = [
|
|
|
462
|
+ 'positionid' => pow(10, 5) + $userId,
|
|
|
463
|
+ 'gid' => $skuId,
|
|
|
464
|
+ 'coupon_url' => $discount_link ?? '',
|
|
|
465
|
+ ];
|
|
|
466
|
+ $url = $this->changLink($clparams);
|
|
|
467
|
+ }
|
|
|
468
|
+ return app("json")->success(['url' => $url]);
|
|
|
469
|
+ }
|
|
|
470
|
+
|
|
450
|
471
|
|
|
451
|
472
|
//实际执行活动经推推商品详情方法
|
|
452
|
473
|
public function doGetJtDetail($goodsId, $userId)
|
|
|
@@ -578,6 +599,7 @@ class Jt extends BaseController
|
|
578
|
599
|
'yanglaojin' => $yanglaojin,
|
|
579
|
600
|
'gongxian' => $gongxian,
|
|
580
|
601
|
'jifen' => $jifen,
|
|
|
602
|
+ 'discount_link' => $detail['couponInfo']['couponList'][0]['discount_link']
|
|
581
|
603
|
|
|
582
|
604
|
// 'yanglao' => $yanglao,
|
|
583
|
605
|
// 'yanglao_' => $commissionMoney,
|
|
|
@@ -587,16 +609,16 @@ class Jt extends BaseController
|
|
587
|
609
|
$formatData['gongxian']=round($gongxian,2);
|
|
588
|
610
|
$formatData['jifen']=round($jifen,2);
|
|
589
|
611
|
|
|
590
|
|
- $formatData['materialUrl'] = '';
|
|
591
|
|
- if($userId!=''){
|
|
592
|
|
- //加入转链地址 此步骤可优化 分两个步骤
|
|
593
|
|
- $clparams = [
|
|
594
|
|
- 'positionid' => pow(10, 5) + $userId,
|
|
595
|
|
- 'gid' => $goodsId,
|
|
596
|
|
- 'coupon_url' => $detail['couponInfo']['couponList'][0]['discount_link'] ?? '',
|
|
597
|
|
- ];
|
|
598
|
|
- $formatData['materialUrl'] = $this->changLink($clparams);
|
|
599
|
|
- }
|
|
|
612
|
+// $formatData['materialUrl'] = '';
|
|
|
613
|
+// if($userId!=''){
|
|
|
614
|
+// //加入转链地址 此步骤可优化 分两个步骤
|
|
|
615
|
+// $clparams = [
|
|
|
616
|
+// 'positionid' => pow(10, 5) + $userId,
|
|
|
617
|
+// 'gid' => $goodsId,
|
|
|
618
|
+// 'coupon_url' => $detail['couponInfo']['couponList'][0]['discount_link'] ?? '',
|
|
|
619
|
+// ];
|
|
|
620
|
+// $formatData['materialUrl'] = $this->changLink($clparams);
|
|
|
621
|
+// }
|
|
600
|
622
|
|
|
601
|
623
|
$return[] = $formatData;
|
|
602
|
624
|
}
|