提交 ab6b4170 编写于 作者: D Devil

细节优化

上级 39a9434e
......@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\ApiService;
use app\service\PluginsService;
use app\service\ResourcesService;
......@@ -96,19 +97,22 @@ class Plugins extends Common
// 调用
$ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'admin', $params);
// ajax 返回的都是数组、使用统一api返回处理
if(IS_AJAX)
{
return ApiService::ApiDataReturn($ret['data']);
}
if($ret['code'] == 0)
{
// 默认则是视图内容
return $ret['data'];
}
// 调用失败
if(IS_AJAX)
{
return $ret;
} else {
MyViewAssign('msg', $ret['msg']);
return MyView();
}
MyViewAssign('msg', $ret['msg']);
return MyView();
}
/**
......
......@@ -1988,6 +1988,7 @@ function CurlPost($url, $post, $is_json = false, $timeout = 30)
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
// 是否 json
......
......@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace app\index\controller;
use app\service\ApiService;
use app\service\PluginsService;
use app\service\ResourcesService;
......@@ -84,19 +85,22 @@ class Plugins extends Common
// 调用
$ret = PluginsService::PluginsControlCall($pluginsname, $pluginscontrol, $pluginsaction, 'index', $params);
// ajax 返回的都是数组、使用统一api返回处理
if(IS_AJAX)
{
return ApiService::ApiDataReturn($ret['data']);
}
if($ret['code'] == 0)
{
// 默认则是视图内容
return $ret['data'];
}
// 调用失败
if(IS_AJAX)
{
return $ret;
} else {
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');
}
MyViewAssign('msg', $ret['msg']);
return MyView();
}
/**
......
......@@ -30,7 +30,7 @@ class PluginsUpgradeService
public static $params;
// 远程插件更新接口
public static $store_plugins_upgrade_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginsupgradeurl';
public static $store_plugins_upgrade_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginsupgradeurl';
/**
* 更新入口
......
......@@ -22,16 +22,16 @@ use app\service\ConfigService;
class StoreService
{
// 远程信息接口
public static $store_site_info_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=siteinfo';
public static $store_site_info_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=siteinfo';
// 远程检查更新接口
public static $store_inspect_upgrade_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=inspectupgrade';
public static $store_inspect_upgrade_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=inspectupgrade';
// 远程插件安全合法校验接口
public static $store_plugins_legal_check_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginslegalcheck';
public static $store_plugins_legal_check_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginslegalcheck';
// 远程插件更新信息接口
public static $store_plugins_upgrade_info_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginsupgradeinfo';
public static $store_plugins_upgrade_info_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=pluginsupgradeinfo';
// 站点商店数据缓存key
public static $site_store_info_key = 'admin_site_store_info_data';
......
......@@ -26,7 +26,7 @@ class SystemUpgradeService
public static $params;
// 远程系统更新接口
public static $store_plugins_upgrade_url = 'https://store.shopxo.net/index.php?s=/api/plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=systemsupgradeurl';
public static $store_plugins_upgrade_url = 'https://store.shopxo.net/api.php?s=plugins/index&pluginsname=store&pluginscontrol=index&pluginsaction=systemsupgradeurl';
// session key
public static $package_url_key = 'package_url_key';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册