1、到阿里大于控制台下载最新的sdk,https://help.aliyun.com/document_detail/55359.html?spm=5176.doc55451.2.6.98qxal
2、解压包
![](https://img.haomeiwen.com/i7647722/b8258c88c17fceb7.png)
把api_sdk 文件复制到项目中extend扩展目录,并把api_sdk改名为dysms
![](https://img.haomeiwen.com/i7647722/ad111fe7d3c76f85.png)
3、阿里大于api文档地址,https://help.aliyun.com/document_detail/55451.html?spm=5176.doc55359.6.557.ZpP0of
![](https://img.haomeiwen.com/i7647722/754afb6f69638fff.png)
4、在测试控制器中新增一个测试方法,下面是我本地的测试样例
![](https://img.haomeiwen.com/i7647722/c9ba3e108f53c5f8.png)
![](https://img.haomeiwen.com/i7647722/4ebb9ae961bcd240.png)
若没有加载config::load();会报错
![](https://img.haomeiwen.com/i7647722/4dd03d61342ceee9.png)
5、查看手机是否有验证,也可在控制台查看短信是否发送成功
网友评论