作者 王晓刚
1 个管道 的构建 通过 耗费 12 秒

短信验证码

@@ -127,7 +127,7 @@ if(!function_exists('send_sms')){ @@ -127,7 +127,7 @@ if(!function_exists('send_sms')){
127 //todo 短信账号密码 127 //todo 短信账号密码
128 require_once EXTEND_PATH . 'nsms/nsms.php'; 128 require_once EXTEND_PATH . 'nsms/nsms.php';
129 $url = "http://www.ztsms.cn/sendNSms.do"; 129 $url = "http://www.ztsms.cn/sendNSms.do";
130 - $username = 'mzhongjie'; 130 + $username = 'gongpinda';
131 $password = 'Cxz307312'; 131 $password = 'Cxz307312';
132 $sendAPI = new \sendAPI($url, $username, $password); 132 $sendAPI = new \sendAPI($url, $username, $password);
133 $sendAPI->data = $data;/*初始化数据包*/ 133 $sendAPI->data = $data;/*初始化数据包*/
@@ -216,11 +216,11 @@ class User extends Frontend @@ -216,11 +216,11 @@ class User extends Frontend
216 'productid' => '887361',//产品id 216 'productid' => '887361',//产品id
217 'xh' => ''//小号 217 'xh' => ''//小号
218 ); 218 );
219 - /*$result2 = send_sms($content); 219 + $result2 = send_sms($content);
220 if (substr($result2, 0, strpos($result2, ',')) != "1") { 220 if (substr($result2, 0, strpos($result2, ',')) != "1") {
221 Db::rollback(); 221 Db::rollback();
222 $this->error('发送失败'); 222 $this->error('发送失败');
223 - }*/ 223 + }
224 Db::commit(); 224 Db::commit();
225 $this->success('SUCCESS','',['code'=>$code]); 225 $this->success('SUCCESS','',['code'=>$code]);
226 } 226 }
@@ -271,11 +271,11 @@ class User extends Frontend @@ -271,11 +271,11 @@ class User extends Frontend
271 'productid' => '887361',//产品id 271 'productid' => '887361',//产品id
272 'xh' => ''//小号 272 'xh' => ''//小号
273 ); 273 );
274 - /*$result2 = send_sms($content); 274 + $result2 = send_sms($content);
275 if (substr($result2, 0, strpos($result2, ',')) != "1") { 275 if (substr($result2, 0, strpos($result2, ',')) != "1") {
276 Db::rollback(); 276 Db::rollback();
277 $this->error('发送失败'); 277 $this->error('发送失败');
278 - }*/ 278 + }
279 Db::commit(); 279 Db::commit();
280 $this->success('SUCCESS','',['code'=>$code]); 280 $this->success('SUCCESS','',['code'=>$code]);
281 } 281 }
@@ -339,10 +339,10 @@ class User extends Frontend @@ -339,10 +339,10 @@ class User extends Frontend
339 } 339 }
340 // $token = generate_user_token($result1); 340 // $token = generate_user_token($result1);
341 // session('token',$token); 341 // session('token',$token);
342 - /*$this->auth->direct($result1); 342 + $this->auth->direct($result1);
343 $token = $this->auth->getToken(); 343 $token = $this->auth->getToken();
344 session('token',$token); 344 session('token',$token);
345 - Cookie::set('token',$token);*/ 345 + Cookie::set('token',$token);
346 Db::commit(); 346 Db::commit();
347 $this->success('SUCCESS','user/login_view'); 347 $this->success('SUCCESS','user/login_view');
348 } 348 }