作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

添加发短信功能

... ... @@ -1706,6 +1706,7 @@ class User extends Api
public function iphone_order()
{
$param['user_id'] = $this->uid;
$user = Db::name('user')->where('id',$param['user_id'])->field('mobile,id,type')->find();
//接收视频ID加视频属性
$video['id'] = $this->request->post('video_id');
... ... @@ -1765,8 +1766,18 @@ class User extends Api
->insertGetId($param);
if(empty($data)){
$this->error(['code'=>2,'msg'=>'sql执行失败']);
}else{
//发送短信,通知客户
$mobile = 13780608990;
$content = "【仁甲看见SHOP】提醒您,您有新苹果客户下了订单,客户电话为:$user[mobile] ,请您及时回复!";
//发送短信
$send = new Pay();
$send->sms($mobile,$content);
$this->success('SUCCESS',['order_id'=>$data]);
}
$this->success('SUCCESS',['order_id'=>$data]);
}
... ...