Browse Source

增加新人发红包短信模版

stanley-king 8 years ago
parent
commit
140e73c7f2
2 changed files with 7 additions and 4 deletions
  1. 5 2
      core/framework/libraries/sms.php
  2. 2 2
      helper/session_helper.php

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

@@ -14,7 +14,8 @@ class Sms
     const resetpass_code = 2;
     const resetpass_code = 2;
     const getbonus_code = 3;
     const getbonus_code = 3;
     const getbind_code = 4;
     const getbind_code = 4;
-    const passwd_code = 5;
+    const newcomer_code = 5;
+    const newcomer_bonus_code = 6;
 
 
     /*
     /*
      * 发送手机短信
      * 发送手机短信
@@ -72,7 +73,9 @@ class Sms
     private function mysend_yuntx($mobile, $content)
     private function mysend_yuntx($mobile, $content)
     {
     {
         $type = intval($content['type']);
         $type = intval($content['type']);
-        static $templates = array(self::register_code => '59006', self::resetpass_code => '63477', self::getbonus_code => '63479', self::getbind_code => '59006', self::passwd_code => '92893');
+        static $templates = array(self::register_code => '59006', self::resetpass_code => '63477',
+            self::getbonus_code => '63479', self::getbind_code => '59006',
+            self::newcomer_code => '92893',self::newcomer_bonus_code => '101581');
         if (!array_key_exists($type, $templates)) return -1;
         if (!array_key_exists($type, $templates)) return -1;
 
 
         return $this->send_msg($mobile, $content['datas'], $templates[$type]);
         return $this->send_msg($mobile, $content['datas'], $templates[$type]);

+ 2 - 2
helper/session_helper.php

@@ -163,9 +163,9 @@ class session_helper
                 relation_helper::onRegister($member_id,$mobile,$info['member_nickname']);
                 relation_helper::onRegister($member_id,$mobile,$info['member_nickname']);
                 $bonus = account_helper::register_bonus($member_id,200);
                 $bonus = account_helper::register_bonus($member_id,200);
                 if($bonus == false) {
                 if($bonus == false) {
-                    sms_helper::send_nostore_message($mobile,Sms::passwd_code,array('account'=> $mobile,'code'=>$password,'time'=>'5'));
+                    sms_helper::send_nostore_message($mobile,Sms::newcomer_code,array('account'=> $mobile,'code'=>$password,'time'=>'5'));
                 } else {
                 } else {
-                    sms_helper::send_nostore_message($mobile,Sms::passwd_code,array('account'=> $mobile,'code'=>$password,'time'=>'5'));
+                    sms_helper::send_nostore_message($mobile,Sms::newcomer_bonus_code,array('account'=> $mobile,'code'=>$password,'amount' => 200,'time'=>'5'));
                 }
                 }
 
 
             } else {
             } else {