Files
addons
cron
dysms
model
sdk
Dysms.php
config.php
install.sql
uninstall.sql
kuaidi
.htaccess
app_download_files
extend
hyhproject
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
hyhproject.tar.gz
index.html
index.php
reg.lock
robots.txt
qlg.tsgz.moe/addons/dysms/Dysms.php
2019-09-06 23:53:10 +08:00

177 lines
1.8 KiB
PHP
Executable File

<?php
namespace addons\dysms; // 注意命名空间规范
use think\addons\Addons;
use addons\dysms\model\Dysms as DM;
/**
* 阿里云-云通信
* @author HSF
*/
class Dysms extends Addons{
// 该插件的基础信息
public $info = [
'name' => 'Dysms', // 插件标识
'title' => '短信接口(阿里云-云通信)', // 插件名称
'description' => '阿里云-云通信短信服务', // 插件简介
'status' => 0, // 状态
'author' => 'HSF',
'version' => '1.0.0'
];
/**
* 插件安装方法
* @return bool
*/
public function install(){
$m = new DM();
$flag = $m->install();
WSTClearHookCache();
cache('hooks',null);
return $flag;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall(){
$m = new DM();
$flag = $m->uninstall();
WSTClearHookCache();
cache('hooks',null);
return $flag;
}
/**
* 插件启用方法
* @return bool
*/
public function enable(){
WSTClearHookCache();
cache('hooks',null);
return true;
}
/**
* 插件禁用方法
* @return bool
*/
public function disable(){
WSTClearHookCache();
cache('hooks',null);
return true;
}
/**
* 插件设置方法
* @return bool
*/
public function saveConfig(){
WSTClearHookCache();
cache('hooks',null);
return true;
}
/**
* 阿里云-云通信短信服务商
* @param string $phoneNumer 手机号码
* @param string $content 短信内容
*/
function sendSMS($params){
$dm = new DM();
$dm->sendSMS($params);
return true;
}
}