mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-11-12 21:53:44 +08:00
优化插件更新逻辑
This commit is contained in:
@@ -16,6 +16,6 @@ class IndexController
|
||||
}
|
||||
public function test()
|
||||
{
|
||||
return runtime_path();
|
||||
return request()->domain();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,7 @@ class OrderController extends BaseController
|
||||
public function index()
|
||||
{
|
||||
$servertime = date('Y-m-d H:i:s', time());
|
||||
// 加载配置文件
|
||||
$option = \think\facade\Config::load("extendconfig/platform", 'extendconfig');
|
||||
View::assign('servertime', $servertime);
|
||||
View::assign('options', $option);
|
||||
return View::fetch();
|
||||
}
|
||||
public function showOrder()
|
||||
|
||||
@@ -234,6 +234,8 @@ class PayController
|
||||
} else {
|
||||
return '监听收款配置文件名错误';
|
||||
}
|
||||
// 当前站点
|
||||
$user_config['host'] = \request()->domain();
|
||||
// 实例化支付类
|
||||
$Mpay = new \MpayClass($user_config);
|
||||
// 获取订单
|
||||
|
||||
@@ -15,9 +15,6 @@ class PayManageController extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// 加载配置文件
|
||||
$option = \think\facade\Config::load("extendconfig/platform", 'extendconfig');
|
||||
View::assign('options', $option);
|
||||
return View::fetch();
|
||||
}
|
||||
// 编辑账号
|
||||
@@ -25,11 +22,8 @@ class PayManageController extends BaseController
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$account = PayAccount::find($id);
|
||||
// 加载配置文件
|
||||
$option = \think\facade\Config::load("extendconfig/platform", 'extendconfig');
|
||||
View::assign([
|
||||
'id' => $id,
|
||||
'options' => $option,
|
||||
'platform' => $account->getData('platform'),
|
||||
'account' => $account->account,
|
||||
'password' => $account->password,
|
||||
@@ -41,9 +35,6 @@ class PayManageController extends BaseController
|
||||
// 添加账号
|
||||
public function addAccount()
|
||||
{
|
||||
// 加载配置文件
|
||||
$option = \think\facade\Config::load("extendconfig/platform", 'extendconfig');
|
||||
View::assign(['options' => $option]);
|
||||
return View::fetch();
|
||||
}
|
||||
// 添加收款终端
|
||||
|
||||
@@ -31,4 +31,10 @@ class PluginController extends BaseController
|
||||
return json(\backMsg(1, '失败'));
|
||||
}
|
||||
}
|
||||
// 插件选项
|
||||
public function pluginOption()
|
||||
{
|
||||
$option = Platform::field('platform,name')->where('state', 1)->select();
|
||||
return json($option);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user