浏览代码

add to local

stanley-king 8 年之前
父节点
当前提交
3f479b753c
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      core/framework/libraries/sms.php

+ 7 - 2
core/framework/libraries/sms.php

@@ -34,7 +34,7 @@ class Sms
         } elseif ($mobile_host_type == 3) {
             return $this->mysend_yuntx($mobile, $content);
         } elseif ($mobile_host_type == 4) {
-            $this->send_yunpian($mobile, $content);
+            return $this->send_yunpian($mobile, $content);
         }
     }
 
@@ -75,6 +75,8 @@ class Sms
     private function mysend_yuntx($mobile, $content)
     {
         $type = intval($content['type']);
+        Log::record("mysend_yuntx type={$type}",Log::DEBUG);
+
         static $templates = array(self::register_code => '59006',
             self::resetpass_code => '63477',
             self::getbonus_code => '63479',
@@ -84,7 +86,10 @@ class Sms
             self::order_sended => '146345',
             self::order_received => '146346');
 
-        if (!array_key_exists($type, $templates)) return -1;
+        if (!array_key_exists($type, $templates)) {
+            Log::record("mysend_yuntx type error}",Log::ERR);
+            return -1;
+        }
 
         return $this->send_msg($mobile, $content['datas'], $templates[$type]);
     }