作者 Cool

jssdk素材api地址修改

... ... @@ -243,8 +243,8 @@ class SalesmangoodsController extends WeChatBaseController{
$str = 'uploads/'.date('YmdHis').time().rand('1000000','99999999').'.png';
$targetName = $str;
// $access_token = $access_token['accessToken'];
$url = "http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath";
$file = file_get_contents("http://file.api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath";
$file = file_get_contents("https://api.weixin.qq.com/cgi-bin/media/get?access_token=$access_token&media_id=$filepath");
file_put_contents($targetName,$file);
$msg["filename"] = '/'.$str;
return json_encode($msg);
... ...