|
@@ -84,10 +84,15 @@ class UserController extends RestBaseController |
|
@@ -84,10 +84,15 @@ class UserController extends RestBaseController |
84
|
*/
|
84
|
*/
|
85
|
public function getCode(){
|
85
|
public function getCode(){
|
86
|
$param=$this->request->param();
|
86
|
$param=$this->request->param();
|
|
|
87
|
+ $param['mobile']=17694933850;
|
87
|
require_once VENDOR_PATH . "sms/serverSid.php";
|
88
|
require_once VENDOR_PATH . "sms/serverSid.php";
|
88
|
require_once VENDOR_PATH . "sms/lib/Ucpaas.class.php";
|
89
|
require_once VENDOR_PATH . "sms/lib/Ucpaas.class.php";
|
89
|
$send=new \Ucpaas();
|
90
|
$send=new \Ucpaas();
|
90
|
$code = cmf_get_verification_code($param['mobile'], 4);
|
91
|
$code = cmf_get_verification_code($param['mobile'], 4);
|
91
|
- $send->SendSms('78950d10e37b4ae5bd9b9c08f3720db3','41494',$code,17694933850);
|
92
|
+ $appid = "78950d10e37b4ae5bd9b9c08f3720db3"; //应用的ID,可在开发者控制台内的短信产品下查看
|
|
|
93
|
+ $templateid = "41494"; //可在后台短信产品→选择接入的应用→短信模板-模板ID,查看该模板ID
|
|
|
94
|
+ $uid = "";
|
|
|
95
|
+//70字内(含70字)计一条,超过70字,按67字/条计费,超过长度短信平台将会自动分割为多条发送。分割后的多条短信将按照具体占用条数计费。
|
|
|
96
|
+ echo $ucpass->SendSms($appid,$templateid,$code, $param['mobile'],$uid);
|
92
|
}
|
97
|
}
|
93
|
} |
98
|
} |