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

图片上传修改

... ... @@ -79,8 +79,7 @@ class MemberController extends CommentController
*/
private function getmedia($access_token,$media_id,$foldername){
// $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=".$access_token."&media_id=".$media_id;
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=15_LUlpJJuAYp_0MRxQUFVAArKQOcZJAZdPMVGxan_7HokxpAPod7vgAF1r6-BGSyUTDl0LCambzkP_zkaxaR6OooomZp5J1xeVrC1tr_9tDQ1B6H0IAlooBpumWUMkBaDPA9nxJg7Yl188SEMvRDLjAEAIUC&media_id=rwtg-ADWOiYiE-cGA9FNpPoze0JLN7VCotJWURFMoGnYDID2pGIqM0s_pcSA4zM4";
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=".$access_token."&media_id=".$media_id;
if (!file_exists("./upload/".$foldername)) {
mkdir("./upload/".$foldername, 0777, true);
}
... ... @@ -94,9 +93,6 @@ class MemberController extends CommentController
curl_exec($ch);
curl_close($ch);
fclose($fp);
$a['g'] = $saveName;
$a['f'] = $url;
Db::name('Test')->insertGetId($a);
return $saveName;
}
... ...
... ... @@ -664,6 +664,8 @@
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
var serverId = res.serverId;
console.log('1111111');
console.log(serverId);
$.ajax({
url: "{:url('Member/upload_wx_pic')}",
type: "POST",
... ...