فهرست منبع

mp3地址判断平台

shish 5 سال پیش
والد
کامیت
ce27e369ec
1فایلهای تغییر یافته به همراه14 افزوده شده و 1 حذف شده
  1. 14 1
      biz-ghs/ws/services/WsService.php

+ 14 - 1
biz-ghs/ws/services/WsService.php

@@ -3,6 +3,8 @@
 namespace bizGhs\ws\services;
 
 use common\components\baiduAip;
+use common\components\dict;
+use common\components\util;
 use GatewayClient\Gateway;
 use Yii;
 class WsService
@@ -34,7 +36,18 @@ class WsService
     //商城客户下单时,提示零售花店(下所有有开启通知的员工) 你有新的订单
     public static function newOrderNotice($shopAdminId)
     {
-        $url = 'https://img.theflorist.cn/audio/new_order0.mp3';
+        $ptStyle = Yii::$app->params['ptStyle'];
+        $prefix = '';
+        if($ptStyle == dict::getDict('ptStyle','hd')){
+            $prefix = Yii::$app->params['hdImgHost'];
+        }elseif($ptStyle == dict::getDict('ptStyle','ghs')){
+            $prefix = Yii::$app->params['ghsImgHost'];
+        }elseif($ptStyle == dict::getDict('ptStyle','mall')){
+            $prefix = Yii::$app->params['mallImgHost'];
+        }else{
+            util::fail('平台无效');
+        }
+        $url = $prefix.'audio/new_order0.mp3';
         $data = [
             'type'=>'new_order',
             'url'=>$url,