shish 6 anni fa
parent
commit
216fca498f
2 ha cambiato i file con 14 aggiunte e 11 eliminazioni
  1. 5 11
      biz/merchant/services/MerchantService.php
  2. 9 0
      common/components/business.php

+ 5 - 11
biz/merchant/services/MerchantService.php

@@ -67,12 +67,6 @@ class MerchantService extends BaseService
 		foreach ($deleteExtend as $delExtend) {
 			unset($extend[$delExtend]);
 		}
-		
-		//设置计算方式
-		$freight = $extend['freight'];
-		$freightList = explode('_', $freight);
-		$extend['freightFirst'] = isset($freightList[0]) && is_numeric($freightList[0]) ? $freightList[0] : 5;
-		$extend['freightAdd'] = isset($freightList[1]) && is_numeric($freightList[1]) ? $freightList[1] : 2;
 		$merchant['extend'] = $extend;
 		return $merchant;
 	}
@@ -164,7 +158,7 @@ class MerchantService extends BaseService
 			if (empty($hasMenu)) {
 				xhWxMenuService::applyInit($merchant);
 			}
-
+			
 			//微信客户初始化
 			$hasUser = UserService::getByCondition(['merchantId' => $merchantId]);
 			if (empty($hasUser)) {
@@ -174,14 +168,14 @@ class MerchantService extends BaseService
 			}
 			
 			//模板消息
-			$hasMessage = TMessageService::getByCondition(['merchantId'=>$merchantId]);
-			if(empty($hasMessage)){
+			$hasMessage = TMessageService::getByCondition(['merchantId' => $merchantId]);
+			if (empty($hasMessage)) {
 				xhTMessageService::init($merchant);
 			}
-
+			
 			//完成初始化标识
 			MerchantExtendClass::updateByCondition(['merchantId' => $merchantId], ['init' => 1]);
-
+			
 			$transaction->commit();
 			return true;
 		} catch (Exception $e) {

+ 9 - 0
common/components/business.php

@@ -171,13 +171,22 @@ class business
 		if (empty($imgUrl)) {
 			$info['logoUrl'] = '';
 			$info['smallLogoUrl'] = '';
+			$info['smallWxQrCodeUrl'] = '';
+			$info['wxQrCodeUrl'] = '';
 			return $info;
 		}
 		$prefixImgUrl = Yii::$app->params['imgHost'];
+		//logo
 		$smallImg = self::getSmallImg($imgUrl);
 		$small = $prefixImgUrl . $smallImg;
 		$info['smallLogoUrl'] = $small;
 		$info['logoUrl'] = $prefixImgUrl . $imgUrl;
+		//二维码
+		$smallImg = self::getSmallImg($info['wxQrCodeUrl']);
+		$small = $prefixImgUrl . $smallImg;
+		$info['smallWxQrCodeUrl'] = $small;
+		$info['wxQrCodeUrl'] = $prefixImgUrl . $imgUrl;
+		
 		return $info;
 	}