|
|
@@ -73,15 +73,30 @@ class MainController extends BaseController
|
|
|
//会员注册码 ssh 20220607
|
|
|
public function actionGetMemberPoster()
|
|
|
{
|
|
|
+ $shop = $this->shop;
|
|
|
+ $pfShopId = $shop->pfShopId ?? 0;
|
|
|
+
|
|
|
$merchant = WxOpenClass::getMallWxInfo();
|
|
|
$page = 'pages/login/index';
|
|
|
$ptStyle = dict::getDict('ptStyle', 'mall');
|
|
|
$scene = 'a=' . $this->shopAdminId . '&s=' . $this->shopId;
|
|
|
$imgUrl = miniUtil::generateUnlimitedMiniCode($merchant, $page, $scene, $ptStyle);
|
|
|
- $url = imgUtil::groupImg($imgUrl);
|
|
|
- $respond = [
|
|
|
- 'imgUrl' => $url,
|
|
|
- ];
|
|
|
+
|
|
|
+ if ($pfShopId > 0) {
|
|
|
+
|
|
|
+ $prefix = imgUtil::getPrefix();
|
|
|
+ $titleBase64 = stringUtil::ossBase64('注册会员');
|
|
|
+
|
|
|
+ $memberUrl = $prefix . 'shop/miniCodeBg.jpg?x-oss-process=image';
|
|
|
+ $memberMiniCodeBase64 = stringUtil::ossBase64($imgUrl);
|
|
|
+ $memberUrl .= '/watermark,image_' . $memberMiniCodeBase64 . ',g_north,x_0,y_40';
|
|
|
+ $memberUrl .= '/watermark,text_' . $titleBase64 . ',g_north,x_0,y_530,size_50';
|
|
|
+
|
|
|
+ $respond = ['imgUrl' => $memberUrl];
|
|
|
+ } else {
|
|
|
+ $url = imgUtil::groupImg($imgUrl);
|
|
|
+ $respond = ['imgUrl' => $url];
|
|
|
+ }
|
|
|
util::success($respond);
|
|
|
}
|
|
|
|