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

修改接口

@@ -1818,7 +1818,7 @@ class User extends Api @@ -1818,7 +1818,7 @@ class User extends Api
1818 $send->sms($mobile1,$content); 1818 $send->sms($mobile1,$content);
1819 1819
1820 1820
1821 - $this->error('error',$data); 1821 + $this->error('error',['code'=>1,'info'=>$data]);
1822 1822
1823 }else{ 1823 }else{
1824 $data['is_enough'] = 1; 1824 $data['is_enough'] = 1;
@@ -1833,7 +1833,7 @@ class User extends Api @@ -1833,7 +1833,7 @@ class User extends Api
1833 ->where('video_id',$video_s) 1833 ->where('video_id',$video_s)
1834 ->find(); 1834 ->find();
1835 if(!empty($res)){ 1835 if(!empty($res)){
1836 - $this->error('该属性的视频已经购买过了'); 1836 + $this->error('error',['code'=>2]);
1837 } 1837 }
1838 $param['video_id'] = serialize($video); 1838 $param['video_id'] = serialize($video);
1839 }else{ 1839 }else{
@@ -1845,7 +1845,7 @@ class User extends Api @@ -1845,7 +1845,7 @@ class User extends Api
1845 foreach ($arr as &$v){ 1845 foreach ($arr as &$v){
1846 if(!empty($v['pic_id'])){ 1846 if(!empty($v['pic_id'])){
1847 if($v['pic_id'] == $pic_id){ 1847 if($v['pic_id'] == $pic_id){
1848 - $this->error('该图片已经购买过了'); 1848 + $this->error('error',['code'=>2]);
1849 } 1849 }
1850 } 1850 }
1851 } 1851 }
@@ -1856,7 +1856,7 @@ class User extends Api @@ -1856,7 +1856,7 @@ class User extends Api
1856 $data_order = Db::name('iphone') 1856 $data_order = Db::name('iphone')
1857 ->insertGetId($param); 1857 ->insertGetId($param);
1858 if(empty($data_order)){ 1858 if(empty($data_order)){
1859 - $this->error(['code'=>2,'msg'=>'sql执行失败']); 1859 + $this->error('sql执行失败');
1860 }else{ 1860 }else{
1861 $send = new Pay(); 1861 $send = new Pay();
1862 Db::startTrans(); 1862 Db::startTrans();