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