diff --git a/.drone.yml b/.drone.yml index eed200c..12f66fe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -35,11 +35,13 @@ steps: - name: "复制api文件" commands: - echo "复制api文件到app目录" - - printenv - - pwd - /bin/cp -f /www/wwwroot/we.cnp5.cn/addons/ewei_shopv2/ewei_shopv2_api.php /www/wwwroot/we.cnp5.cn/app/ewei_shopv2_api.php - /bin/cp -f /www/wwwroot/we.cnp5.cn/addons/ewei_shopv2/api.php /www/wwwroot/we.cnp5.cn/app/api.php + - name: "更新数据库" + commands: + - curl 'http://we2.cnp5.cn/app/api.php?i=1&r=upsql&sql_key=wanshangliaoliao' --compressed --insecure + - name: "更改文件权限" commands: - echo "更改文件权限" diff --git a/plugin/open_api/core/mobile/order/detail.php b/plugin/open_api/core/mobile/order/detail.php index 82cec9d..6da789f 100644 --- a/plugin/open_api/core/mobile/order/detail.php +++ b/plugin/open_api/core/mobile/order/detail.php @@ -388,7 +388,6 @@ class Detail_EweiShopV2Page extends OpenApiMobilePage $title = implode('+',$title_arr); return $title; } - //多商户 protected function merchData() { diff --git a/plugin/open_api/core/mobile/upsql.php b/plugin/open_api/core/mobile/upsql.php new file mode 100644 index 0000000..00c4d90 --- /dev/null +++ b/plugin/open_api/core/mobile/upsql.php @@ -0,0 +1,29 @@ + 1, 'message' => 'sql key出错!')); + die; +}else{ + echo json_encode(array('error' => 0, 'message' => '数据库更新完成!')); +} \ No newline at end of file diff --git a/plugin/open_api/core/page_mobile.php b/plugin/open_api/core/page_mobile.php index 4f696de..745d86a 100644 --- a/plugin/open_api/core/page_mobile.php +++ b/plugin/open_api/core/page_mobile.php @@ -57,10 +57,15 @@ class OpenApiMobilePage extends PluginMobilePage $this->route = $_GPC["r"]; $this->uniacid = $_W["uniacid"]; $this->isPost = $_W["ispost"]; - $this->getRequestParams(); - $this->checkApiKey(); - $this->checkRequestSign(); + if($_GPC["r"] != 'open_api.upsql'){ + $this->getRequestParams(); + $this->checkApiKey(); + $this->checkRequestSign(); + } + } + + /** * 获取请求参数(过滤w7默认参数) */