isAjax()){ } $info=[ 'brand_name'=>'', 'logo_url'=>'', 'protocol'=>'', 'protocol_url'=>'', 'end_time'=>'', 'primary_category_id'=>'', 'secondary_category_id'=>'', 'agreement_media_url'=>'', 'operator_media_url'=>'', 'agreement_media_id'=>'', 'operator_media_id'=>'', ]; $this->assign('info',$info); return $this->fetch('card/submerchant'); } /*** * 上传微信图片 */ public function image(){ $OpenPlatform=new Oplatform(1); // $app=$OpenPlatform->app(); $upload_model = new UploadModel($this->site_id, $this->app_module); $param = array( 'thumb_type' => '', 'name' => 'file', ); //微信配置 $wechat=new \addon\wechat\model\Wechat(1); $path = $this->site_id > 0 ? 'common/images/' . date('Ymd') . '/' : 'common/images/' . date('Ymd') . '/'; // $result = $upload_model->setPath($path)->image($param); // var_dump($result); $o='upload/1/common/images/20230619/20230619100442168714028250627.jpg'; $json= $wechat->uploadArticleImage($o); // var_dump($json); // if ($result['code'] > 0) { //// var_dump($result);die; // $json= $app->uploadArticleImage($result['data']['pic_path']); // var_dump($json); //// if(input('type')!='app_logo'){ //// $ext = $file->getOriginalExtension(); //// $res = $CloudPay->upload($ext, $result['data']['pic_path']);//上传阿里 //// $result['data']['image_id'] = $res['image_id']; //// }else{ //// //// } // } // return $this->response($result); // var_dump(); } }