This commit is contained in:
parent
e93d5db2d7
commit
3f722eed41
@ -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 "更改文件权限"
|
||||
|
@ -388,7 +388,6 @@ class Detail_EweiShopV2Page extends OpenApiMobilePage
|
||||
$title = implode('+',$title_arr);
|
||||
return $title;
|
||||
}
|
||||
|
||||
//多商户
|
||||
protected function merchData()
|
||||
{
|
||||
|
29
plugin/open_api/core/mobile/upsql.php
Normal file
29
plugin/open_api/core/mobile/upsql.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 数据库升级
|
||||
*/
|
||||
$sql = "
|
||||
CREATE TABLE `ims_ewei_shop_good_wpfw` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`uniacid` int(11) NOT NULL,
|
||||
`goods_id` int(11) NOT NULL,
|
||||
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`api_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`deleted` tinyint(3) DEFAULT '0',
|
||||
PRIMARY KEY (`id`,`goods_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
";
|
||||
pdo_run($sql);
|
||||
// if(!pdo_fieldexists("ewei_message_mass_sign", "id")) {
|
||||
// pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
|
||||
// }
|
||||
|
||||
header('content-type:application/json');
|
||||
global $_GPC;
|
||||
if($_GPC['sql_key']!='wanshangliaoliao'){
|
||||
echo json_encode(array('error' => 1, 'message' => 'sql key出错!'));
|
||||
die;
|
||||
}else{
|
||||
echo json_encode(array('error' => 0, 'message' => '数据库更新完成!'));
|
||||
}
|
@ -57,10 +57,15 @@ class OpenApiMobilePage extends PluginMobilePage
|
||||
$this->route = $_GPC["r"];
|
||||
$this->uniacid = $_W["uniacid"];
|
||||
$this->isPost = $_W["ispost"];
|
||||
if($_GPC["r"] != 'open_api.upsql'){
|
||||
$this->getRequestParams();
|
||||
$this->checkApiKey();
|
||||
$this->checkRequestSign();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取请求参数(过滤w7默认参数)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user