Compare commits

...

4 Commits

Author SHA1 Message Date
邹景立
ef9f90288d Update composer.json 2022-11-03 11:05:35 +08:00
邹景立
8ae4647205 优化路径计算 2022-11-03 10:27:30 +08:00
邹景立
c83bf37ac8 Update UserTransfer.php 2022-11-03 10:23:31 +08:00
邹景立
734c0fda04 增加notify提示 2022-11-03 10:15:19 +08:00
6 changed files with 18 additions and 11 deletions

View File

@ -47,7 +47,7 @@ class Update extends Controller
if (!ModuleService::checkAllowDownload($filename)) {
$this->error('下载的文件不在认证规则中!');
}
if (file_exists($realname = $this->app->getRootPath() . $filename)) {
if (file_exists($realname = with_path($filename))) {
$this->success('读取文件内容成功!', [
'content' => base64_encode(file_get_contents($realname)),
]);

View File

@ -136,7 +136,7 @@ class UserTransfer extends Command
'mch_key' => $data['wechat_mch_key'],
'ssl_key' => $local->path($file1, true),
'ssl_cer' => $local->path($file2, true),
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
'cache_path' => with_path('runtime/wechat'),
];
}
@ -151,8 +151,8 @@ class UserTransfer extends Command
*/
private function getWechatInfo(int $uuid, string $type): ?array
{
$user = DataUser::mk()->where(['id' => $uuid])->find();
if (empty($user)) return null;
$user = DataUser::mk()->where(['id' => $uuid])->findOrEmpty();
if ($user->isEmpty()) return null;
$appid1 = sysconf('data.wxapp_appid');
if (strtolower(sysconf('wechat.type')) === 'api') {
$appid2 = sysconf('wechat.appid');
@ -198,7 +198,7 @@ class UserTransfer extends Command
/**
* 查询更新提现打款状态
* @param array $item
* @param \think\Model|array $item
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\admin\Exception
@ -206,7 +206,7 @@ class UserTransfer extends Command
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
private function queryTransferBank(array $item)
private function queryTransferBank($item)
{
$config = $this->getConfig($item['uuid']);
[$config['appid'], $config['openid']] = [$item['appid'], $item['openid']];
@ -236,7 +236,7 @@ class UserTransfer extends Command
/**
* 查询更新提现打款状态
* @param array $item
* @param \think\Model|array $item
* @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException
* @throws \think\admin\Exception
@ -244,7 +244,7 @@ class UserTransfer extends Command
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
private function queryTransferWallet(array $item)
private function queryTransferWallet($item)
{
$config = $this->getConfig($item['uuid']);
[$config['appid'], $config['openid']] = [$item['appid'], $item['openid']];

View File

@ -47,7 +47,7 @@ class Wxapp extends Controller
$this->config = [
'appid' => $option['appid'] ?? '',
'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'])) {
$this->error("接口类型[{$this->type}]没有定义规则");

View File

@ -115,7 +115,7 @@ class WechatPaymentService extends PaymentService
'appid' => $this->params['wechat_appid'],
'mch_id' => $this->params['wechat_mch_id'],
'mch_key' => $this->params['wechat_mch_key'],
'cache_path' => $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'wechat',
'cache_path' => with_path('runtime/wechat'),
]);
return $this;
}

View File

@ -26,7 +26,7 @@
"ext-mbstring": "*",
"ext-simplexml": "*",
"endroid/qr-code": "^1.9",
"topthink/framework": "^6.0",
"topthink/framework": "^6.1",
"topthink/think-view": "^1.0",
"zoujingli/ip2region": "^2.0",
"zoujingli/think-library": "6.0.x-dev",

View File

@ -188,6 +188,13 @@ $(function () {
var idx = msg ? layer.msg(msg, {icon: 16, scrollbar: false, shade: this.shade, time: 0, end: call}) : layer.load(2, {time: 0, scrollbar: false, shade: this.shade, end: call});
return $.msg.idx.push(idx), idx;
};
/*! Notify 调用入口 */
// https://www.jq22.com/demo/jquerygrowl-notification202104021049
this.notify = function (title, msg, time, option) {
require(['notify'], function (Notify) {
Notify.notify(Object.assign({title: title || '', description: msg || '', position: 'top-right', closeTimeout: time || 3000}, (option || {})));
});
};
/*! 页面加载层 */
this.page = new function () {
this.$body = $('body>.think-page-loader');