del
parent
755219dbd7
commit
56c4a57ef1
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 路由设置
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// URL伪静态后缀
|
||||
'url_html_suffix' => MyFileConfig('home_seo_url_html_suffix', '', 'html', true),
|
||||
];
|
||||
?>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\hljapi\controller;
|
||||
|
||||
use app\service\ApiService;
|
||||
use app\service\PluginsService;
|
||||
|
||||
/**
|
||||
* token授权 - 黑龙江政采
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AccessToken extends Common
|
||||
{
|
||||
/**
|
||||
* 预占订单
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'base', 'accesstoken', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\hljapi\controller;
|
||||
|
||||
use app\BaseController;
|
||||
use app\service\ApiService;
|
||||
use app\service\ConfigService;
|
||||
use app\service\SystemService;
|
||||
|
||||
/**
|
||||
* 接口公共控制器 - 黑龙江政采
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Common extends BaseController
|
||||
{
|
||||
// 输入参数 post|get|request
|
||||
protected $data_post;
|
||||
protected $data_get;
|
||||
protected $data_request;
|
||||
|
||||
// 当前系统操作名称
|
||||
protected $module_name;
|
||||
protected $controller_name;
|
||||
protected $action_name;
|
||||
|
||||
// 当前插件操作名称
|
||||
protected $plugins_module_name;
|
||||
protected $plugins_controller_name;
|
||||
protected $plugins_action_name;
|
||||
|
||||
// 分页信息
|
||||
protected $page;
|
||||
protected $page_size;
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-11-30
|
||||
* @desc description
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// 检测是否是新安装
|
||||
SystemService::SystemInstallCheck();
|
||||
|
||||
// 输入参数
|
||||
$this->data_post = input('post.');
|
||||
$this->data_get = input('get.');
|
||||
$this->data_request = input();
|
||||
|
||||
// 系统运行开始
|
||||
SystemService::SystemBegin($this->data_request);
|
||||
|
||||
// 系统初始化
|
||||
$this->SystemInit();
|
||||
|
||||
// 公共数据初始化
|
||||
$this->CommonInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 析构函数
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-03-18
|
||||
* @desc description
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
// 系统运行结束
|
||||
SystemService::SystemEnd($this->data_request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统初始化
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-12-07
|
||||
* @desc description
|
||||
*/
|
||||
private function SystemInit()
|
||||
{
|
||||
// 配置信息初始化
|
||||
ConfigService::ConfigInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 公共数据初始化
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-03-09T11:43:48+0800
|
||||
*/
|
||||
private function CommonInit()
|
||||
{
|
||||
// 当前系统操作名称
|
||||
$this->module_name = RequestModule();
|
||||
$this->controller_name = RequestController();
|
||||
$this->action_name = RequestAction();
|
||||
|
||||
// 当前插件操作名称, 兼容插件模块名称
|
||||
if(empty($this->data_request['pluginsname']))
|
||||
{
|
||||
$this->plugins_module_name = '';
|
||||
$this->plugins_controller_name = '';
|
||||
$this->plugins_action_name = '';
|
||||
} else {
|
||||
$this->plugins_module_name = $this->data_request['pluginsname'];
|
||||
$this->plugins_controller_name = empty($this->data_request['pluginscontrol']) ? 'index' : $this->data_request['pluginscontrol'];
|
||||
$this->plugins_action_name = empty($this->data_request['pluginsaction']) ? 'index' : $this->data_request['pluginsaction'];
|
||||
}
|
||||
|
||||
// 分页信息
|
||||
$this->page = max(1, isset($this->data_request['page']) ? intval($this->data_request['page']) : 1);
|
||||
$this->page_size = 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* 空方法响应
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-11-30
|
||||
* @desc description
|
||||
* @param [string] $method [方法名称]
|
||||
* @param [array] $args [参数]
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
{
|
||||
return ApiService::ApiDataReturn('{"success":false,"resultMsg":"'.$method.'非法访问'.'","resultCode":"07","result":""}');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类属性数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-07
|
||||
* @desc description
|
||||
*/
|
||||
public function GetClassVars()
|
||||
{
|
||||
$data = [];
|
||||
$vers = get_class_vars(get_class());
|
||||
foreach($vers as $k=>$v)
|
||||
{
|
||||
if(property_exists($this, $k))
|
||||
{
|
||||
$data[$k] = $this->$k;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\hljapi\controller;
|
||||
|
||||
use app\service\ApiService;
|
||||
use app\service\PluginsService;
|
||||
|
||||
/**
|
||||
* 订单 - 黑龙江政采
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Order extends Common
|
||||
{
|
||||
/**
|
||||
* 预占订单
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function submitPreOrder()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'order', 'add', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认预占订单
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function confirmPreOrder()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'order', 'confirm', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预占订单
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function cancelPreOrder()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'order', 'cancel', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认收货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function confirmReceipt()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'order', 'collect', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单物流查询
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function getOrderLogisticsInfo()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'order', 'express', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://opensource.org/licenses/mit-license.php )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\hljapi\controller;
|
||||
|
||||
use app\service\ApiService;
|
||||
use app\service\PluginsService;
|
||||
|
||||
/**
|
||||
* 商品 - 黑龙江政采
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Product extends Common
|
||||
{
|
||||
/**
|
||||
* 商品价格查询
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function getSellPrice()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'goods', 'price', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品库存查询
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function getStock()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'goods', 'inventory', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品可售查询
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function saleCheck()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'goods', 'issales', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品上下架通知
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function shelfUpdateNotice()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'goods', 'shelves', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品是否支持货到付款
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-01-02
|
||||
* @desc description
|
||||
*/
|
||||
public function checkIsCod()
|
||||
{
|
||||
$ret = PluginsService::PluginsControlCall('govpurheilongjiang', 'goods', 'iscod', 'api', $this->GetClassVars());
|
||||
return ApiService::ApiDataReturn($ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue