feat: 添加旺铺授权系统初始文件

添加url.txt、index.php和auth.json三个初始文件
index.php实现跨域请求处理和授权信息读取
auth.json包含3000+旺铺授权数据
This commit is contained in:
2025-11-25 17:19:49 +08:00
commit 94dd3a4e05
3 changed files with 214 additions and 0 deletions
+165
View File
@@ -0,0 +1,165 @@
{
"status": "success",
"message": "3000+旺铺授权信息",
"data": {
"TenantCode": 533,
"TenantName": "名思图",
"Token": "30B7D1EA-7321-40EA-B714-69D9712E3460",
"AppId": "DA9363E9-692A-4D3C-AFD4-F28CF3113980",
"RegDate": "2023-11-29T17:04:48",
"ExpDate": "2099-11-27T17:04:48",
"Timestamp": "2024-11-24T16:58:59",
"AuditState": 0,
"AccreditCount": 0,
"Funcs": [
{
"ModuleCode": "803",
"ModuleName": "采购",
"ChildNodes": [
{
"FuncCode": "80303001",
"FuncName": "采购订单"
},
{
"FuncCode": "80303002",
"FuncName": "通知单"
},
{
"FuncCode": "80303003",
"FuncName": "采购单"
}
]
},
{
"ModuleCode": "804",
"ModuleName": "调拨",
"ChildNodes": [
{
"FuncCode": "80402001",
"FuncName": "调拨订单"
},
{
"FuncCode": "80402002",
"FuncName": "通知单"
},
{
"FuncCode": "80402003",
"FuncName": "调拨单"
}
]
},
{
"ModuleCode": "805",
"ModuleName": "批发",
"ChildNodes": [
{
"FuncCode": "80502001",
"FuncName": "批发订单"
},
{
"FuncCode": "80502002",
"FuncName": "通知单"
},
{
"FuncCode": "80502003",
"FuncName": "批发单"
}
]
},
{
"ModuleCode": "806",
"ModuleName": "配货",
"ChildNodes": [
{
"FuncCode": "80602001",
"FuncName": "配货订单"
},
{
"FuncCode": "80602002",
"FuncName": "通知单"
},
{
"FuncCode": "80602003",
"FuncName": "配货单"
}
]
},
{
"ModuleCode": "810",
"ModuleName": "库存",
"ChildNodes": [
{
"FuncCode": "81002001",
"FuncName": "申请单"
},
{
"FuncCode": "81002002",
"FuncName": "通知单"
},
{
"FuncCode": "81002003",
"FuncName": "移仓单"
}
]
},
{
"ModuleCode": "10000",
"ModuleName": "报表",
"ChildNodes": [
{
"FuncCode": "8110500305",
"FuncName": "客户往来账"
},
{
"FuncCode": "8110400305",
"FuncName": "厂商往来账"
},
{
"FuncCode": "8110500308",
"FuncName": "资金流水账"
},
{
"FuncCode": "8030500301",
"FuncName": "采购订单统计"
},
{
"FuncCode": "8030500203",
"FuncName": "采购统计"
},
{
"FuncCode": "8040400203",
"FuncName": "调拨统计"
},
{
"FuncCode": "8050400301",
"FuncName": "批发订单统计"
},
{
"FuncCode": "8050400203",
"FuncName": "批发统计"
},
{
"FuncCode": "8060400203",
"FuncName": "配货统计"
},
{
"FuncCode": "8100500206",
"FuncName": "商品库存统计"
},
{
"FuncCode": "8100500405",
"FuncName": "商品进销存统计"
},
{
"FuncCode": "8080300403",
"FuncName": "零售数据统计"
},
{
"FuncCode": "8050400411",
"FuncName": "批发畅滞销统计"
}
]
}
]
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
// 设置响应头,允许所有来源的跨域请求
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization');
header('Content-Type: application/json');
// 处理OPTIONS预检请求
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
exit(0);
}
// 定义文件路径
$urlFilePath = 'c:\\Users\\吴展鹏\\wangpu_auth\\url.txt';
$authFilePath = 'c:\\Users\\吴展鹏\\wangpu_auth\\auth.json';
// 读取并返回auth.json文件的内容
if (file_exists($authFilePath)) {
// 读取JSON文件内容
$jsonContent = file_get_contents($authFilePath);
// 验证JSON格式是否正确
if ($jsonContent && json_decode($jsonContent) !== null) {
// 直接输出JSON内容
echo $jsonContent;
exit;
} else {
// JSON格式错误时的响应
$errorResponse = array(
'status' => 'error',
'message' => 'JSON文件格式错误或内容为空'
);
echo json_encode($errorResponse, JSON_UNESCAPED_UNICODE);
exit;
}
} else {
// 文件不存在时的响应
$errorResponse = array(
'status' => 'error',
'message' => 'auth.json文件不存在'
);
echo json_encode($errorResponse, JSON_UNESCAPED_UNICODE);
exit;
}
// 终止脚本执行
exit;
?>
+1
View File
@@ -0,0 +1 @@
http://wangpu.baison.com.cn/api/sys/devicereg/getaccreditinfo3000j?from=1&tenantcode=0&timestamp=20251125170440&token=82DBFF99-D114-4DBD-85E5-3AEE1004A857&version=3.0.3