|
|
@@ -29,44 +29,44 @@ class MainController extends BaseController
|
|
|
//商城海报 ssh 20210610
|
|
|
public function actionGetMallPoster()
|
|
|
{
|
|
|
- $shop = $this->shop;
|
|
|
- $pfShopId = $shop->pfShopId ?? 0;
|
|
|
-
|
|
|
- $merchant = WxOpenClass::getMallWxInfo();
|
|
|
- $goodsPage = 'pages/home/category';
|
|
|
- $ptStyle = dict::getDict('ptStyle', 'mall');
|
|
|
- $scene = 'a=' . $this->shopAdminId . '&s=' . $this->shopId;
|
|
|
- $goodsImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $goodsPage, $scene, $ptStyle);
|
|
|
-
|
|
|
- $flowerPage = 'pages/item/item';
|
|
|
- $flowerImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $flowerPage, $scene, $ptStyle);
|
|
|
-
|
|
|
- $prefix = imgUtil::getPrefix();
|
|
|
- $titleBase64 = stringUtil::ossBase64('个人买花');
|
|
|
-
|
|
|
- if ($pfShopId > 0) {
|
|
|
- $goodsUrl = $prefix . 'shop/miniCodeBg.jpg?x-oss-process=image';
|
|
|
- $goodsMiniCodeBase64 = stringUtil::ossBase64($goodsImgUrl);
|
|
|
- $goodsUrl .= '/watermark,image_' . $goodsMiniCodeBase64 . ',g_north,x_0,y_40';
|
|
|
- $goodsUrl .= '/watermark,text_' . $titleBase64 . ',g_north,x_0,y_530,size_50';
|
|
|
-
|
|
|
- $flowerUrl = $prefix . 'shop/miniCodeBg.jpg?x-oss-process=image';
|
|
|
- $flowerMiniCodeBase64 = stringUtil::ossBase64($flowerImgUrl);
|
|
|
- $flowerUrl .= '/watermark,image_' . $flowerMiniCodeBase64 . ',g_north,x_0,y_40';
|
|
|
- $flowerUrl .= '/watermark,text_' . $titleBase64 . ',g_north,x_0,y_530,size_50';
|
|
|
-
|
|
|
- $respond = [
|
|
|
- 'imgUrl' => $goodsUrl,
|
|
|
- 'flowerImgUrl' => $flowerUrl,
|
|
|
- ];
|
|
|
- } else {
|
|
|
- $goodsUrl = imgUtil::groupImg($goodsImgUrl);
|
|
|
- $flowerUrl = imgUtil::groupImg($flowerImgUrl);
|
|
|
- $respond = [
|
|
|
- 'imgUrl' => $goodsUrl,
|
|
|
- 'flowerImgUrl' => $flowerUrl,
|
|
|
- ];
|
|
|
- }
|
|
|
+// $shop = $this->shop;
|
|
|
+// $pfShopId = $shop->pfShopId ?? 0;
|
|
|
+//
|
|
|
+// $merchant = WxOpenClass::getMallWxInfo();
|
|
|
+// $goodsPage = 'pages/home/category';
|
|
|
+// $ptStyle = dict::getDict('ptStyle', 'mall');
|
|
|
+// $scene = 'a=' . $this->shopAdminId . '&s=' . $this->shopId;
|
|
|
+// $goodsImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $goodsPage, $scene, $ptStyle);
|
|
|
+//
|
|
|
+// $flowerPage = 'pages/item/item';
|
|
|
+// $flowerImgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $flowerPage, $scene, $ptStyle);
|
|
|
+//
|
|
|
+// $prefix = imgUtil::getPrefix();
|
|
|
+// $titleBase64 = stringUtil::ossBase64('个人买花');
|
|
|
+//
|
|
|
+// if ($pfShopId > 0) {
|
|
|
+// $goodsUrl = $prefix . 'shop/miniCodeBg.jpg?x-oss-process=image';
|
|
|
+// $goodsMiniCodeBase64 = stringUtil::ossBase64($goodsImgUrl);
|
|
|
+// $goodsUrl .= '/watermark,image_' . $goodsMiniCodeBase64 . ',g_north,x_0,y_40';
|
|
|
+// $goodsUrl .= '/watermark,text_' . $titleBase64 . ',g_north,x_0,y_530,size_50';
|
|
|
+//
|
|
|
+// $flowerUrl = $prefix . 'shop/miniCodeBg.jpg?x-oss-process=image';
|
|
|
+// $flowerMiniCodeBase64 = stringUtil::ossBase64($flowerImgUrl);
|
|
|
+// $flowerUrl .= '/watermark,image_' . $flowerMiniCodeBase64 . ',g_north,x_0,y_40';
|
|
|
+// $flowerUrl .= '/watermark,text_' . $titleBase64 . ',g_north,x_0,y_530,size_50';
|
|
|
+//
|
|
|
+// $respond = [
|
|
|
+// 'imgUrl' => $goodsUrl,
|
|
|
+// 'flowerImgUrl' => $flowerUrl,
|
|
|
+// ];
|
|
|
+// } else {
|
|
|
+// $goodsUrl = imgUtil::groupImg($goodsImgUrl);
|
|
|
+// $flowerUrl = imgUtil::groupImg($flowerImgUrl);
|
|
|
+// $respond = [
|
|
|
+// 'imgUrl' => $goodsUrl,
|
|
|
+// 'flowerImgUrl' => $flowerUrl,
|
|
|
+// ];
|
|
|
+// }
|
|
|
|
|
|
//零交会
|
|
|
$merchant = WxOpenClass::getWxInfo();
|
|
|
@@ -76,6 +76,7 @@ class MainController extends BaseController
|
|
|
$imgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $page, $scene, $ptStyle);
|
|
|
$apiHost = Yii::$app->params['hdImgHost'];
|
|
|
$ljh = $apiHost . $imgUrl;
|
|
|
+ $respond = [];
|
|
|
$respond['ljhUrl'] = $ljh;
|
|
|
|
|
|
util::success($respond);
|