|
|
@@ -91,4 +91,27 @@ class Sys extends Model
|
|
|
$data["wxconfig"] = $wxconfig;
|
|
|
return $data;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取微信配置
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function getWeixinConfig(){
|
|
|
+ $data = $this->getDataInfo("weixin");
|
|
|
+ foreach($data as $k=>$v){
|
|
|
+ if(empty($v)){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $return=[
|
|
|
+ "APPID" => $data["appid"],
|
|
|
+ "APPSECRET" => $data["secret"],
|
|
|
+ "MCHID" => $data["mchid"],
|
|
|
+ "ApiV2Key" => $data["apiv2key"],
|
|
|
+ "ApiclientKey" => "file://".app()->getRootPath()."/".trim($data["apiclient_key"],"/"),
|
|
|
+ "ApiclientCert" => "file://".app()->getRootPath()."/".trim($data["apiclient_cert"],"/"),
|
|
|
+ "NOTIFY_URL" => $data["notify_url"],
|
|
|
+ ];
|
|
|
+ return $return;
|
|
|
+ }
|
|
|
}
|