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

图片上传修改

@@ -79,8 +79,7 @@ class MemberController extends CommentController @@ -79,8 +79,7 @@ class MemberController extends CommentController
79 */ 79 */
80 80
81 private function getmedia($access_token,$media_id,$foldername){ 81 private function getmedia($access_token,$media_id,$foldername){
82 -// $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=".$access_token."&media_id=".$media_id;  
83 - $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"; 82 + $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=".$access_token."&media_id=".$media_id;
84 if (!file_exists("./upload/".$foldername)) { 83 if (!file_exists("./upload/".$foldername)) {
85 mkdir("./upload/".$foldername, 0777, true); 84 mkdir("./upload/".$foldername, 0777, true);
86 } 85 }
@@ -94,9 +93,6 @@ class MemberController extends CommentController @@ -94,9 +93,6 @@ class MemberController extends CommentController
94 curl_exec($ch); 93 curl_exec($ch);
95 curl_close($ch); 94 curl_close($ch);
96 fclose($fp); 95 fclose($fp);
97 - $a['g'] = $saveName;  
98 - $a['f'] = $url;  
99 - Db::name('Test')->insertGetId($a);  
100 return $saveName; 96 return $saveName;
101 } 97 }
102 98
@@ -664,6 +664,8 @@ @@ -664,6 +664,8 @@
664 isShowProgressTips: 1, // 默认为1,显示进度提示 664 isShowProgressTips: 1, // 默认为1,显示进度提示
665 success: function (res) { 665 success: function (res) {
666 var serverId = res.serverId; 666 var serverId = res.serverId;
  667 + console.log('1111111');
  668 + console.log(serverId);
667 $.ajax({ 669 $.ajax({
668 url: "{:url('Member/upload_wx_pic')}", 670 url: "{:url('Member/upload_wx_pic')}",
669 type: "POST", 671 type: "POST",