mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
优化路径计算
This commit is contained in:
parent
c83bf37ac8
commit
8ae4647205
@ -47,7 +47,7 @@ class Update extends Controller
|
|||||||
if (!ModuleService::checkAllowDownload($filename)) {
|
if (!ModuleService::checkAllowDownload($filename)) {
|
||||||
$this->error('下载的文件不在认证规则中!');
|
$this->error('下载的文件不在认证规则中!');
|
||||||
}
|
}
|
||||||
if (file_exists($realname = $this->app->getRootPath() . $filename)) {
|
if (file_exists($realname = with_path($filename))) {
|
||||||
$this->success('读取文件内容成功!', [
|
$this->success('读取文件内容成功!', [
|
||||||
'content' => base64_encode(file_get_contents($realname)),
|
'content' => base64_encode(file_get_contents($realname)),
|
||||||
]);
|
]);
|
||||||
|
@ -136,7 +136,7 @@ class UserTransfer extends Command
|
|||||||
'mch_key' => $data['wechat_mch_key'],
|
'mch_key' => $data['wechat_mch_key'],
|
||||||
'ssl_key' => $local->path($file1, true),
|
'ssl_key' => $local->path($file1, true),
|
||||||
'ssl_cer' => $local->path($file2, true),
|
'ssl_cer' => $local->path($file2, true),
|
||||||
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
|
'cache_path' => with_path('runtime/wechat'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class Wxapp extends Controller
|
|||||||
$this->config = [
|
$this->config = [
|
||||||
'appid' => $option['appid'] ?? '',
|
'appid' => $option['appid'] ?? '',
|
||||||
'appsecret' => $option['appkey'] ?? '',
|
'appsecret' => $option['appkey'] ?? '',
|
||||||
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
|
'cache_path' => with_path('runtime/wechat'),
|
||||||
];
|
];
|
||||||
if (empty(UserAdminService::TYPES[$this->type]['auth'])) {
|
if (empty(UserAdminService::TYPES[$this->type]['auth'])) {
|
||||||
$this->error("接口类型[{$this->type}]没有定义规则");
|
$this->error("接口类型[{$this->type}]没有定义规则");
|
||||||
|
@ -115,7 +115,7 @@ class WechatPaymentService extends PaymentService
|
|||||||
'appid' => $this->params['wechat_appid'],
|
'appid' => $this->params['wechat_appid'],
|
||||||
'mch_id' => $this->params['wechat_mch_id'],
|
'mch_id' => $this->params['wechat_mch_id'],
|
||||||
'mch_key' => $this->params['wechat_mch_key'],
|
'mch_key' => $this->params['wechat_mch_key'],
|
||||||
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
|
'cache_path' => with_path('runtime/wechat'),
|
||||||
]);
|
]);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user