作者 王智

文档修改

@@ -121,14 +121,14 @@ class Cards extends Api @@ -121,14 +121,14 @@ class Cards extends Api
121 $UserId = $this->is_token($this->request->header()); 121 $UserId = $this->is_token($this->request->header());
122 $params = $this->request->param(); 122 $params = $this->request->param();
123 $UserInfo = Db::name('user')->where('id', $UserId)->find(); 123 $UserInfo = Db::name('user')->where('id', $UserId)->find();
124 -// $is_invite_code = '/MiniAppQrCode/' . $UserId . $params['path'] . '.png';  
125 -// if (file_exists($is_invite_code) == true) {  
126 -// $MiniAppQrcodeUrl = $this->request->domain() . '/MiniAppQrCode/' . $UserId . $params['path'] . '.png';  
127 -// } else {  
128 -// //小程序码  
129 -// $MiniAppQrcodeUrl = $this->UserInserMiniAppQrCode($UserId, $params['path']);  
130 -// }  
131 - $MiniAppQrcodeUrl = $this->InserMiniAppQrCode(0, $UserId, $params['path']); 124 + $is_invite_code = './MiniAppQrCode/' . $UserId . $params['path'] . '.png';
  125 + if (file_exists($is_invite_code) == true) {
  126 + $MiniAppQrcodeUrl = $this->request->domain() . '/MiniAppQrCode/' . $UserId . $params['path'] . '.png';
  127 + } else {
  128 + //小程序码
  129 + $MiniAppQrcodeUrl = $this->UserInserMiniAppQrCode($UserId, $params['path']);
  130 + }
  131 +// $MiniAppQrcodeUrl = $this->InserMiniAppQrCode(0, $UserId, $params['path']);
132 132
133 $data = [ 133 $data = [
134 'Avatar' => $UserInfo['avatar'], 134 'Avatar' => $UserInfo['avatar'],