修复错误

This commit is contained in:
mkm 2023-08-03 14:45:54 +08:00
parent 5243005944
commit 2c6bbbab91
2 changed files with 3 additions and 4 deletions

View File

@ -191,8 +191,6 @@ class UserController extends BaseApiController
public function postsms()
{
$params = $this->request->param();
$params['mobile']=$this->userInfo['mobile'];
$params['nickname']=$this->userInfo['nickname'];
$res = CommonUserLogic::postsms($params);
if ($res == true) {
return $this->success('发送成功', [], 1, 1);

View File

@ -196,11 +196,12 @@ class UserLogic extends BaseLogic
return Db::name('dict_data')->where('id', $data['contract_type'])->value('name');
})
->find();
$user = User::where('id', $params['id'])->find();
if ($find) {
//发送短信
$sms = [
'mobile' => $params['mobile'],
'name' => $params['nickname'],
'mobile' => $user['mobile'],
'name' => $user['nickname'],
'type' => '《' . $find['contract_type_name'] . '》',
'code' => 'api/Hetong/url?id=' . $find['id'],
'scene' => 'WQ'