|
@@ -138,26 +138,12 @@ class Member extends Api
|
|
}
|
|
}
|
|
|
|
|
|
$code = rand(1000, 9999);
|
|
$code = rand(1000, 9999);
|
|
-// $Sms = new SmsDemo();
|
|
|
|
-// $send = $Sms->sendSms($mobile, $code);
|
|
|
|
-// if ($send->Message == 'OK') {
|
|
|
|
-// $log = ['code' => $code,
|
|
|
|
-// 'mobile' => $mobile,
|
|
|
|
-// 'scene' =>$scene,
|
|
|
|
-// 'time' => datetime(time())
|
|
|
|
-// ];
|
|
|
|
-// $addLog = CodeModel::create($log);
|
|
|
|
-// if ($addLog) {
|
|
|
|
-// $this->result('验证码已发送', [], 1);
|
|
|
|
-// } else {
|
|
|
|
-// $this->result('验证码发送失败');
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-// $this->result('验证码发送失败');
|
|
|
|
-// }
|
|
|
|
- $log = ['code' => '1234',
|
|
|
|
|
|
+ $Sms = new SmsDemo();
|
|
|
|
+ $send = $Sms->sendSms($mobile, $code);
|
|
|
|
+ if ($send->Message == 'OK') {
|
|
|
|
+ $log = ['code' => $code,
|
|
'mobile' => $mobile,
|
|
'mobile' => $mobile,
|
|
- 'scene' =>$scene,
|
|
|
|
|
|
+ 'scene' =>$scene,
|
|
'time' => datetime(time())
|
|
'time' => datetime(time())
|
|
];
|
|
];
|
|
$addLog = CodeModel::create($log);
|
|
$addLog = CodeModel::create($log);
|
|
@@ -166,6 +152,20 @@ class Member extends Api
|
|
} else {
|
|
} else {
|
|
$this->result('验证码发送失败');
|
|
$this->result('验证码发送失败');
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ $this->result('验证码发送失败');
|
|
|
|
+ }
|
|
|
|
+// $log = ['code' => '1234',
|
|
|
|
+// 'mobile' => $mobile,
|
|
|
|
+// 'scene' =>$scene,
|
|
|
|
+// 'time' => datetime(time())
|
|
|
|
+// ];
|
|
|
|
+// $addLog = CodeModel::create($log);
|
|
|
|
+// if ($addLog) {
|
|
|
|
+// $this->result('验证码已发送', [], 1);
|
|
|
|
+// } else {
|
|
|
|
+// $this->result('验证码发送失败');
|
|
|
|
+// }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|