request->post('val'); $type = $this->request->post('type'); $qrCode = \app\common\library\share\Qrsharecode::getMpCode($type,$val); if(!$qrCode){ $this->error(__('获取失败')); } return $this->success("获取成功","data:image/png;base64,".$qrCode); } }