Ver código fonte

【Mod】接入国都短信服务

liuxiangxin 1 mês atrás
pai
commit
151a33fcd3

+ 2 - 2
app/Console/Commands/CouponNotice.php

@@ -3,7 +3,7 @@
 namespace App\Console\Commands;
 
 use Illuminate\Console\Command;
-use App\Facades\Servers\Aliyun\Sms;
+use App\Facades\Servers\Sms\GuoDu as Sms;
 use App\Models\CustomCoupon as Model;
 
 class CouponNotice extends Command
@@ -62,7 +62,7 @@ class CouponNotice extends Command
         // 组合数据
         $phoneList          = implode(',',$phoneList);
         // 给这些手机号发送一条阿里云短信
-        $result             = $phoneList ? Sms::sendSms($phoneList,'开邻智数','SMS_478125029') : [];
+        $result             = $phoneList ? Sms::sendSms($phoneList,'尊敬的开邻会员,您有专属优惠券即将到期,请及时打开微信小程序 开邻智数 使用。拒收请回复R','开邻') : [];
         // 返回结果
         return              $result;
 	}

+ 2 - 2
app/Console/Commands/OrdersNotice.php

@@ -3,7 +3,7 @@
 namespace App\Console\Commands;
 
 use Illuminate\Console\Command;
-use App\Facades\Servers\Aliyun\Sms;
+use App\Facades\Servers\Sms\GuoDu as Sms;
 use App\Models\OrdersProduct as Model;
 
 class OrdersNotice extends Command
@@ -63,7 +63,7 @@ class OrdersNotice extends Command
         // 组合数据
         $phoneList          = implode(',',$phoneList);
         // 给这些手机号发送一条阿里云短信
-        $result             = $phoneList ? Sms::sendSms($phoneList,'开邻智数','SMS_478160083') : [];
+        $result             = $phoneList ? Sms::sendSms($phoneList,'尊敬的地区代表,您近期有待处理订单,请尽快登录系统后台处理https://mall.findit.ltd/admin','开邻') : [];
         // 返回结果
         return              $result;
 	}

+ 28 - 0
app/Facades/Servers/Sms/GuoDu.php

@@ -0,0 +1,28 @@
+<?php namespace App\Facades\Servers\Sms;
+
+use Illuminate\Support\Facades\Facade;
+
+/**
+ * 短信发送
+ * 
+ * @method static array sendSms($desMobile,$content,$sign) 发送短信
+ * @method static int|array surplus() 短信余额
+ * 
+ * @see \App\Servers\Sms\GuoDu
+ * 
+ * 
+ */
+class GuoDu extends Facade
+{
+    /**
+     * Get the registered name of the component.
+     *
+     * @return string
+     */
+    protected static function getFacadeAccessor()
+    {
+        return '\App\Servers\Sms\GuoDu';
+    }
+}
+
+?>

+ 28 - 0
app/Servers/Sms/GuoDu.php

@@ -0,0 +1,28 @@
+<?php namespace App\Facades\Servers\Sms;
+
+use Illuminate\Support\Facades\Facade;
+
+/**
+ * 短信发送
+ * 
+ * @method static array sendSms($desMobile,$content,$sign) 发送短信
+ * @method static int|array surplus() 发送短信
+ * 
+ * @see \App\Servers\Sms\GuoDu
+ * 
+ * 
+ */
+class GuoDu extends Facade
+{
+    /**
+     * Get the registered name of the component.
+     *
+     * @return string
+     */
+    protected static function getFacadeAccessor()
+    {
+        return '\App\Servers\Aliyun\Sms';
+    }
+}
+
+?>

+ 1 - 1
resources/views/admin/regiment_active/add.blade.php

@@ -66,7 +66,7 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 		</div>
 	</div>
 	<div class="form-group col-sm-12">
-		<label class="control-label">自开团</label>
+		<label class="control-label">自开团</label>
 		<div class="radio">
 			<label class="radio-inline"><input type="radio" value="0" name="automatic" >开启</label>
 			<label class="radio-inline"><input type="radio" value="1" name="automatic" >关闭</label>

+ 1 - 1
resources/views/admin/regiment_active/copy.blade.php

@@ -66,7 +66,7 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 			</div>
 		</div>
 		<div class="form-group col-sm-12">
-			<label class="control-label">自开团</label>
+			<label class="control-label">自开团</label>
 			<div class="radio">
 				<label class="radio-inline"><input type="radio" value="0" name="automatic" @if($oldData['automatic'] == 0) checked @endif>开启</label>
 				<label class="radio-inline"><input type="radio" value="1" name="automatic" @if($oldData['automatic'] == 1) checked @endif>关闭</label>

+ 1 - 1
resources/views/admin/regiment_active/edit.blade.php

@@ -66,7 +66,7 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 			</div>
 		</div>
 		<div class="form-group col-sm-12">
-			<label class="control-label">自开团</label>
+			<label class="control-label">自开团</label>
 			<div class="radio">
 				<label class="radio-inline"><input type="radio" value="0" name="automatic" @if($oldData['automatic'] == 0) checked @endif>开启</label>
 				<label class="radio-inline"><input type="radio" value="1" name="automatic" @if($oldData['automatic'] == 1) checked @endif>关闭</label>