|
...
|
...
|
@@ -173,7 +173,8 @@ class Template extends Common{ |
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
//调用API
|
|
|
|
//http://www.dc-api.com/public/index.php?service=App.Tables.BatchQRcode
|
|
|
|
//http://www.dc-api.com/public/index.php?service=App.Tables.BatchQRcode 测试环境
|
|
|
|
//http://xt04.colorcun.com/?service=App.Tables.BatchQRcode 正式环境
|
|
|
|
$param=array(
|
|
|
|
'num' =>$num,
|
|
|
|
'flag' =>$flag,
|
|
...
|
...
|
@@ -181,7 +182,7 @@ class Template extends Common{ |
|
|
|
$url = "http://xt04.colorcun.com/?service=App.Tables.BatchQRcode";
|
|
|
|
$status = json_decode($this->requesthttp($url,$param),true);
|
|
|
|
if($status['ret']==200){
|
|
|
|
$result['msg'] = '添加成功!';
|
|
|
|
$result['msg'] = '二维码已生成!';
|
|
|
|
$result['code'] = 1;
|
|
|
|
return $result;
|
|
|
|
}else{
|
|
...
|
...
|
@@ -193,6 +194,14 @@ class Template extends Common{ |
|
|
|
$this->assign ( 'title','二维码生成' );
|
|
|
|
return $this->fetch();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* post请求
|
|
|
|
* @param $url
|
|
|
|
* @param $param
|
|
|
|
* @param bool $post_file
|
|
|
|
* @return bool|mixed
|
|
|
|
*/
|
|
|
|
public function requesthttp($url,$param,$post_file=false){
|
|
|
|
$oCurl = curl_init();
|
|
|
|
if(stripos($url,"https://")!==FALSE){
|
...
|
...
|
|