Showing
1 changed file
with
11 additions
and
2 deletions
| @@ -173,7 +173,8 @@ class Template extends Common{ | @@ -173,7 +173,8 @@ class Template extends Common{ | ||
| 173 | return $result; | 173 | return $result; |
| 174 | } | 174 | } |
| 175 | //调用API | 175 | //调用API |
| 176 | - //http://www.dc-api.com/public/index.php?service=App.Tables.BatchQRcode | 176 | + //http://www.dc-api.com/public/index.php?service=App.Tables.BatchQRcode 测试环境 |
| 177 | + //http://xt04.colorcun.com/?service=App.Tables.BatchQRcode 正式环境 | ||
| 177 | $param=array( | 178 | $param=array( |
| 178 | 'num' =>$num, | 179 | 'num' =>$num, |
| 179 | 'flag' =>$flag, | 180 | 'flag' =>$flag, |
| @@ -181,7 +182,7 @@ class Template extends Common{ | @@ -181,7 +182,7 @@ class Template extends Common{ | ||
| 181 | $url = "http://xt04.colorcun.com/?service=App.Tables.BatchQRcode"; | 182 | $url = "http://xt04.colorcun.com/?service=App.Tables.BatchQRcode"; |
| 182 | $status = json_decode($this->requesthttp($url,$param),true); | 183 | $status = json_decode($this->requesthttp($url,$param),true); |
| 183 | if($status['ret']==200){ | 184 | if($status['ret']==200){ |
| 184 | - $result['msg'] = '添加成功!'; | 185 | + $result['msg'] = '二维码已生成!'; |
| 185 | $result['code'] = 1; | 186 | $result['code'] = 1; |
| 186 | return $result; | 187 | return $result; |
| 187 | }else{ | 188 | }else{ |
| @@ -193,6 +194,14 @@ class Template extends Common{ | @@ -193,6 +194,14 @@ class Template extends Common{ | ||
| 193 | $this->assign ( 'title','二维码生成' ); | 194 | $this->assign ( 'title','二维码生成' ); |
| 194 | return $this->fetch(); | 195 | return $this->fetch(); |
| 195 | } | 196 | } |
| 197 | + | ||
| 198 | + /** | ||
| 199 | + * post请求 | ||
| 200 | + * @param $url | ||
| 201 | + * @param $param | ||
| 202 | + * @param bool $post_file | ||
| 203 | + * @return bool|mixed | ||
| 204 | + */ | ||
| 196 | public function requesthttp($url,$param,$post_file=false){ | 205 | public function requesthttp($url,$param,$post_file=false){ |
| 197 | $oCurl = curl_init(); | 206 | $oCurl = curl_init(); |
| 198 | if(stripos($url,"https://")!==FALSE){ | 207 | if(stripos($url,"https://")!==FALSE){ |
-
Please register or login to post a comment