|
@@ -13,6 +13,7 @@ class Sms
|
|
|
const register_code = 1;
|
|
|
const resetpass_code = 2;
|
|
|
const getbonus_code = 3;
|
|
|
+ const getbind_code = 4;
|
|
|
|
|
|
/*
|
|
|
* 发送手机短信
|
|
@@ -22,18 +23,13 @@ class Sms
|
|
|
public function send($mobile,$content)
|
|
|
{
|
|
|
$mobile_host_type=C('mobile_host_type');
|
|
|
- if($mobile_host_type==1)
|
|
|
- {
|
|
|
+ if($mobile_host_type == 1) {
|
|
|
return $this->mysend_smsbao($mobile,$content);
|
|
|
}
|
|
|
-
|
|
|
- if($mobile_host_type==2)
|
|
|
- {
|
|
|
+ elseif($mobile_host_type == 2) {
|
|
|
return $this->mysend_yunpian($mobile,$content);
|
|
|
}
|
|
|
-
|
|
|
- if($mobile_host_type==3)
|
|
|
- {
|
|
|
+ elseif($mobile_host_type == 3) {
|
|
|
return $this->mysend_yuntx($mobile,$content);
|
|
|
}
|
|
|
}
|
|
@@ -72,7 +68,7 @@ class Sms
|
|
|
$time = $content['time'];
|
|
|
$type = intval($content['type']);
|
|
|
|
|
|
- static $templates = array(self::register_code => '59006',self::resetpass_code => '63477', self::getbonus_code => '63479');
|
|
|
+ static $templates = array(self::register_code => '59006',self::resetpass_code => '63477', self::getbonus_code => '63479',self::getbind_code => '59006');
|
|
|
if(!array_key_exists($type,$templates)) return -1;
|
|
|
|
|
|
return $this->send_msg($mobile,$code,$templates[$type],$time);
|