feat: 切换到商户号子账号登录端点 + 项目清理

- AuthService: 改用 http://common.apifm.com/loginAdmin/operator/v2 商户号登录
  * 验证码和登录统一使用该主机以保持 JSESSIONID 一致
  * 改用 FormUrlEncodedContent POST body
  * 未配置 MerchantId 时回退到旧的 pdomain 登录方式
- AppConfig: 新增 MerchantId 配置项
- App.config: 新增 MerchantId=15073
- LoginViewModel: captchaKey 由 GUID 改为 JS Math.random 风格 0.xxx
- setup.iss: 修复 GBK 编码损坏导致的字符串未闭合错误,改为 UTF-8 BOM
- README: 更新配置示例与相关文档链接
- .gitignore: 忽略 .env 本地密钥文件
- 清理过时/无关文档与未引用的 SFX 打包脚本
This commit is contained in:
key
2026-04-17 12:03:15 +08:00
parent 61399323bf
commit fb65dceaa0
16 changed files with 25554 additions and 68901 deletions

5
.gitignore vendored
View File

@@ -48,6 +48,11 @@ installer/
Thumbs.db
ehthumbs.db
Desktop.ini
# Local secrets / credentials
.env
.env.local
.env.*.local
.DS_Store
# Temp files

View File

@@ -7,7 +7,9 @@
<!-- API工厂配置 -->
<add key="ApiBaseUrl" value="https://api.it120.cc" />
<add key="SubDomain" value="let5see" />
<!-- 商户IDint32用于 /login/operator/v2 子账号登录 -->
<add key="MerchantId" value="15073" />
<!-- 同步配置 -->
<add key="SyncPageSize" value="50" />
<add key="ShipConcurrency" value="3" />

View File

@@ -10,6 +10,9 @@ namespace PackagingMallShipper.Helpers
public static string SubDomain =>
ConfigurationManager.AppSettings["SubDomain"] ?? "vv125s";
public static string MerchantId =>
ConfigurationManager.AppSettings["MerchantId"] ?? "";
public static int SyncPageSize =>
int.TryParse(ConfigurationManager.AppSettings["SyncPageSize"], out var size) ? size : 50;

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
@@ -11,13 +11,13 @@
<ApplicationIcon>Resources\Icons\app.ico</ApplicationIcon>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!-- 版本信息 -->
<Version>1.0.1</Version>
<FileVersion>1.0.1.0</FileVersion>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<!-- 鐗堟湰淇℃伅 -->
<Version>1.0.2</Version>
<FileVersion>1.0.2.0</FileVersion>
<AssemblyVersion>1.0.2.0</AssemblyVersion>
<Company>PackagingMall</Company>
<Product>包装商城发货助手</Product>
<Copyright>Copyright © 2025</Copyright>
<Product>鍖呰鍟嗗煄鍙戣揣鍔╂墜</Product>
<Copyright>Copyright 2025</Copyright>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,6 +1,7 @@
using System;
using System.Data.SQLite;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
@@ -13,11 +14,17 @@ namespace PackagingMallShipper.Services
public class AuthService : IAuthService
{
private readonly HttpClient _httpClient;
private readonly HttpClientHandler _httpClientHandler;
private LocalSession _currentSession;
public AuthService()
{
_httpClient = new HttpClient();
_httpClientHandler = new HttpClientHandler
{
UseCookies = true,
CookieContainer = new CookieContainer()
};
_httpClient = new HttpClient(_httpClientHandler);
_httpClient.Timeout = TimeSpan.FromSeconds(30);
LoadSession();
}
@@ -26,40 +33,84 @@ namespace PackagingMallShipper.Services
public bool IsLoggedIn => !string.IsNullOrEmpty(GetToken());
// 子账号登录的验证码和登录接口,位于 common.apifm.com
private const string OperatorHost = "http://common.apifm.com";
private const string LegacyHost = "https://user.api.it120.cc";
private static string AuthHost =>
string.IsNullOrWhiteSpace(AppConfig.MerchantId) ? LegacyHost : OperatorHost;
public string GetCaptchaUrl(string key)
{
return $"https://user.api.it120.cc/code?k={Uri.EscapeDataString(key)}";
return $"{AuthHost}/code?k={Uri.EscapeDataString(key)}";
}
public async Task<byte[]> GetCaptchaImageAsync(string key)
{
var url = GetCaptchaUrl(key);
Debug.WriteLine($"[验证码请求] URL: {url}");
using (var response = await _httpClient.GetAsync(url))
{
Debug.WriteLine($"[验证码响应] HTTP状态码: {response.StatusCode}");
if (response.Headers.TryGetValues("Set-Cookie", out var setCookieValues))
{
foreach (var item in setCookieValues)
{
Debug.WriteLine($"[验证码响应] Set-Cookie: {item}");
}
}
var cookieCount = _httpClientHandler.CookieContainer.GetCookies(new Uri(AuthHost)).Count;
Debug.WriteLine($"[验证码响应] 当前会话Cookie数量: {cookieCount}");
response.EnsureSuccessStatusCode();
var data = await response.Content.ReadAsByteArrayAsync();
Debug.WriteLine($"[验证码响应] 图片字节数: {data?.Length ?? 0}");
return data;
}
}
public async Task<LoginResult> LoginAsync(string userName, string password, string captcha = null, string captchaKey = null)
{
try
{
// 使用子账号登录接口 /login/userName/v2
// 注意:该接口会优先判断手机号码登录,如果满足直接登录成功,其次才会尝试子账号登录
// 该接口要求必须提供验证码参数
var urlBuilder = new System.Text.StringBuilder();
urlBuilder.Append("https://user.api.it120.cc/login/userName/v2");
urlBuilder.Append($"?userName={Uri.EscapeDataString(userName)}");
urlBuilder.Append($"&pwd={Uri.EscapeDataString(password)}");
urlBuilder.Append($"&pdomain={Uri.EscapeDataString(AppConfig.SubDomain)}");
urlBuilder.Append("&rememberMe=true");
// 优先使用 /login/operator/v2商户号登录要求配置 MerchantId
// 否则回退 /login/userName/v2专属域名登录
var useOperator = !string.IsNullOrWhiteSpace(AppConfig.MerchantId);
string url;
var form = new System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>
{
new System.Collections.Generic.KeyValuePair<string, string>("userName", userName),
new System.Collections.Generic.KeyValuePair<string, string>("pwd", password),
new System.Collections.Generic.KeyValuePair<string, string>("rememberMe", "true"),
new System.Collections.Generic.KeyValuePair<string, string>("imgcode", captcha ?? ""),
new System.Collections.Generic.KeyValuePair<string, string>("k", captchaKey ?? "")
};
if (useOperator)
{
// 商户号子账号登录,走 common.apifm.com/loginAdmin/operator/v2
url = $"{OperatorHost}/loginAdmin/operator/v2";
form.Add(new System.Collections.Generic.KeyValuePair<string, string>("merchantId", AppConfig.MerchantId));
}
else
{
url = $"{LegacyHost}/login/userName/v2";
form.Add(new System.Collections.Generic.KeyValuePair<string, string>("pdomain", AppConfig.SubDomain));
}
// 验证码参数是必须的
urlBuilder.Append($"&imgcode={Uri.EscapeDataString(captcha ?? "")}");
urlBuilder.Append($"&k={Uri.EscapeDataString(captchaKey ?? "")}");
var url = urlBuilder.ToString();
// 详细日志请求URL隐藏密码
var logUrl = url.Replace($"&pwd={Uri.EscapeDataString(password)}", "&pwd=***");
System.Diagnostics.Debug.WriteLine($"[登录请求] URL: {logUrl}");
System.Diagnostics.Debug.WriteLine($"[登录请求] URL: {url}");
System.Diagnostics.Debug.WriteLine($"[登录请求] 用户名: {userName}");
System.Diagnostics.Debug.WriteLine($"[登录请求] 验证码: {captcha}");
System.Diagnostics.Debug.WriteLine($"[登录请求] 验证码Key: {captchaKey}");
System.Diagnostics.Debug.WriteLine($"[登录请求] 子域名: {AppConfig.SubDomain}");
if (useOperator)
System.Diagnostics.Debug.WriteLine($"[登录请求] 商户ID: {AppConfig.MerchantId}");
else
System.Diagnostics.Debug.WriteLine($"[登录请求] 子域名: {AppConfig.SubDomain}");
var cookieCount = _httpClientHandler.CookieContainer.GetCookies(new Uri(AuthHost)).Count;
System.Diagnostics.Debug.WriteLine($"[登录请求] 当前会话Cookie数量: {cookieCount}");
var response = await _httpClient.PostAsync(url, null);
var content = new FormUrlEncodedContent(form);
var response = await _httpClient.PostAsync(url, content);
var json = await response.Content.ReadAsStringAsync();
// 详细日志API响应
@@ -73,6 +124,10 @@ namespace PackagingMallShipper.Services
if (result?.Code != 0)
{
System.Diagnostics.Debug.WriteLine($"[登录失败] 错误码: {result?.Code}, 错误信息: {result?.Msg}");
if (result?.Code == 300)
{
System.Diagnostics.Debug.WriteLine("[登录失败] 服务端判定为验证码错误,重点核对验证码会话(Cookie)、验证码Key、输入值");
}
return new LoginResult
{

View File

@@ -10,6 +10,7 @@ namespace PackagingMallShipper.Services
{
Task<LoginResult> LoginAsync(string userName, string password, string captcha = null, string captchaKey = null);
string GetCaptchaUrl(string key);
Task<byte[]> GetCaptchaImageAsync(string key);
string GetToken();
bool IsLoggedIn { get; }
LocalSession CurrentSession { get; }

View File

@@ -2,6 +2,7 @@ using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
using System.IO;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using PackagingMallShipper.Services;
@@ -43,21 +44,34 @@ namespace PackagingMallShipper.ViewModels
// 子账号登录必须提供验证码,默认显示
ShowCaptcha = true;
RefreshCaptcha();
_ = RefreshCaptchaAsync();
}
[RelayCommand]
public void RefreshCaptcha()
public async Task RefreshCaptchaAsync()
{
_captchaKey = Guid.NewGuid().ToString("N");
var url = _authService.GetCaptchaUrl(_captchaKey);
try
{
// 采用 JS Math.random 风格 0.xxx 作为 k与服务端示例一致
var rnd = new Random();
_captchaKey = "0." + rnd.NextDouble().ToString("F18", System.Globalization.CultureInfo.InvariantCulture).Split('.')[1];
var imageBytes = await _authService.GetCaptchaImageAsync(_captchaKey);
CaptchaImageSource = new BitmapImage();
CaptchaImageSource.BeginInit();
CaptchaImageSource.UriSource = new Uri(url);
CaptchaImageSource.CacheOption = BitmapCacheOption.None;
CaptchaImageSource.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
CaptchaImageSource.EndInit();
using (var ms = new MemoryStream(imageBytes))
{
var bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.CacheOption = BitmapCacheOption.OnLoad;
bitmap.StreamSource = ms;
bitmap.EndInit();
bitmap.Freeze();
CaptchaImageSource = bitmap;
}
}
catch (Exception ex)
{
ErrorMessage = $"验证码加载失败: {ex.Message}";
}
}
[RelayCommand]
@@ -86,10 +100,12 @@ namespace PackagingMallShipper.ViewModels
try
{
var normalizedCaptcha = (Captcha ?? string.Empty).Trim().Replace(" ", string.Empty);
var result = await _authService.LoginAsync(
UserName,
Password,
ShowCaptcha ? Captcha : null,
ShowCaptcha ? normalizedCaptcha : null,
ShowCaptcha ? _captchaKey : null
);
@@ -109,13 +125,13 @@ namespace PackagingMallShipper.ViewModels
if (result.RequireCaptcha && !ShowCaptcha)
{
ShowCaptcha = true;
RefreshCaptcha();
await RefreshCaptchaAsync();
}
else if (ShowCaptcha)
{
// 验证码错误,刷新验证码
Captcha = "";
RefreshCaptcha();
await RefreshCaptchaAsync();
}
}
}

View File

@@ -50,6 +50,8 @@
<TextBox x:Name="CaptchaTextBox"
Text="{Binding Captcha, UpdateSourceTrigger=PropertyChanged}"
Height="35" FontSize="14" Padding="10,5"
MaxLength="8"
InputMethod.IsInputMethodEnabled="False"
Grid.Column="0" Margin="0,0,10,0"/>
<Border Grid.Column="1" BorderBrush="#CCCCCC" BorderThickness="1" CornerRadius="2">

View File

@@ -63,13 +63,17 @@ bin/Release/net462/PackagingMallShipper.exe
<!-- API工厂配置 -->
<add key="ApiBaseUrl" value="https://api.it120.cc" />
<add key="SubDomain" value="let5see" />
<!-- 商户ID用于 /loginAdmin/operator/v2 子账号登录 -->
<add key="MerchantId" value="15073" />
<!-- 同步配置 -->
<add key="SyncPageSize" value="50" />
<add key="ShipConcurrency" value="3" />
</appSettings>
```
> 登录采用 `http://common.apifm.com/loginAdmin/operator/v2` 商户号子账号登录接口;`MerchantId` 未配置时回退至 `https://user.api.it120.cc/login/userName/v2` 的 `pdomain` 登录方式。
## 数据存储
本地数据库位置:`%LOCALAPPDATA%\PackagingMallShipper\data.db`
@@ -102,4 +106,6 @@ PackagingMallShipper/
## 相关文档
- [技术方案文档](../enterprise-management/docs/轻量级订单发货客户端方案.md)
- [技术方案文档](./轻量级订单发货客户端方案.md)
- [后台接口文档](./后台接口.md)
- [安装包构建说明](./BUILD_INSTALLER.md)

View File

@@ -1,48 +0,0 @@
@echo off
chcp 65001 >nul
echo ========================================
echo 创建 7z 自解压安装包
echo ========================================
echo.
set "SEVENZIP=C:\Program Files\7-Zip\7z.exe"
if not exist "%SEVENZIP%" (
echo [错误] 未找到 7-Zip
pause
exit /b 1
)
:: 创建临时 7z 包
echo [1/3] 创建压缩包...
"%SEVENZIP%" a -t7z -mx=9 "installer\app.7z" ".\publish\*" -r
:: 检查 SFX 模块
set "SFX_MODULE=C:\Program Files\7-Zip\7zSD.sfx"
if not exist "%SFX_MODULE%" (
echo.
echo [提示] 7zSD.sfx 模块不存在,将创建普通压缩包
echo.
move "installer\app.7z" "installer\PackagingMallShipper_v1.0.0.7z"
echo [完成] 已创建: installer\PackagingMallShipper_v1.0.0.7z
goto :end
)
:: 合并为自解压 EXE
echo [2/3] 创建自解压程序...
copy /b "%SFX_MODULE%" + "sfx_config.txt" + "installer\app.7z" "installer\PackagingMallShipper_SFX_v1.0.0.exe"
:: 清理临时文件
echo [3/3] 清理临时文件...
del "installer\app.7z"
echo.
echo ========================================
echo [成功] 自解压安装包已创建!
echo.
echo 位置: installer\PackagingMallShipper_SFX_v1.0.0.exe
echo ========================================
:end
echo.
pause

View File

@@ -1,8 +1,8 @@
; Inno Setup Script for 包装商城发货助手
; Inno Setup Script for 包装商城发货助手
; Requires Inno Setup 6.x
#define MyAppName "包装商城发货助手"
#define MyAppVersion "1.0.1"
#define MyAppVersion "1.0.2"
#define MyAppPublisher "PackagingMall"
#define MyAppExeName "PackagingMallShipper.exe"
@@ -131,4 +131,4 @@ begin
end;
end;
end;
end;
end;

View File

@@ -1,5 +0,0 @@
;!@Install@!UTF-8!
Title="包装商城发货助手 v1.0.0"
BeginPrompt="是否安装 包装商城发货助手?"
RunProgram="PackagingMallShipper.exe"
;!@InstallEnd@!

View File

@@ -1,76 +0,0 @@
# 成都邮电鸡蛋托套装报价表2025-12-28
&gt; 备注:
&gt; 1. 开具 13% 的增值税专票;
&gt; 2. 四川范围内 9.6 m 以上车送货,送货费 2040 元/方,包卸货;
&gt; 3. 纸箱为高标准配置,高于网上常规配置;
&gt; 4. 网络店铺可搜索淘宝第一名:捷合农产品包装。
---
## 一、主表(按套装规格)
| 序号 | 产品系列 | 产品名称 | 货品编号 | 放置方式 | 蛋托+盖板厚度(mm) | 孔径尺寸(mm) | 纸箱尺寸(mm) | 适用蛋型 | 打包数量(套) | 自提开票(元/套) | 快递开票(元/套) | 网上头部店铺价(不含票) | 包价格(元/箱) |
|----|-----------|-----------------------------|--------------------------------------------------------------|------------|------------------|--------------|--------------|----------|--------------|----------------|----------------|----------------------|--------------|
| 1 | 20 枚竖大 | 20 枚竖大鸡蛋托+纸箱12 套) | 1222003×1213222003×241322003×120000000×12 | 竖放不粘底 | 10+60+10 | 3545 | 285×233×91 | 大鸡蛋 | 12 | 2.5157 | 3.2407 | — | 38.8880 |
| 2 | 30 枚竖中 | 30 枚竖中鸡蛋托+纸箱12 套) | 1223001×121323001×1213223001×240000000×12 | 竖放不粘底 | 10+58+10 | 3641 | 312×264×91 | 中小鸡蛋 | 12 | 3.2625 | 3.9875 | 5.9 | 47.8499 |
| 3 | 30 枚竖中彩箱 | 30 枚竖中彩箱6 套) | 1223004×61323001×613223001×120000000×6 | 竖放不粘底 | 15+65+15 | 3641 | 310×260×110 | 中小鸡蛋 | 6 | 4.43 | 5.88 | — | 35.28 |
| 4 | 加厚 30 枚竖中 | 加厚 30 枚竖中6 套) | 122300101×613200101×61322300101×120000000×6 | 竖放不粘底 | 10+58+10 | 3641 | 312×264×91 | 中小鸡蛋 | 6 | 4.0517 | 5.835 | — | 35.01 |
| 5 | 30 枚横中 | 30 枚横中鸡蛋托+纸箱10 套) | 1223002×101323002×1013223002×100000000×10 | 横放粘底 | 10+46+10 | 4265 | 338×288×79 | 中偏大 | 10 | 3.3471 | 4.5571 | 7.4 | 45.5709 |
| 6 | 30 枚竖大上开口 | 30 枚竖大上开口箱8 套) | 1323003×813223003×161223005×80000000×8 | 竖放不粘底 | 10+60+10 | 3545 | 340×280×90 | 大鸡蛋 | 8 | 3.8663 | 4.9538 | — | 39.63 |
| 7 | 30 枚竖大 | 30 枚竖大鸡蛋托+纸箱10 套) | 1323003×1013223003×201223003×100000000×10 | 竖放不粘底 | 10+60+10 | 3545 | 335×285×91 | 大鸡蛋 | 10 | 3.3492 | 4.2192 | 6 | 42.1918 |
| 8 | 40 枚竖大 | 40 枚竖大鸡蛋托+纸箱8 套) | 1322003×1613222003×241224003×80000000×8 | 竖放不粘底 | (10+60)×2+10 | 3545 | 285×233×165 | 大鸡蛋 | 8 | 4.0375 | 5.125 | — | 41.00 |
| 9 | 50 枚竖中 | 50 枚竖中鸡蛋托+纸箱6 套) | 1225001×61322501×1213222501×180000000×6 | 竖放不粘底 | (10+57)×2+10 | 3641 | 262×262×155 | 中小鸡蛋 | 6 | 4.4548 | 5.9048 | 8.5 | 35.4287 |
|10 | 50 枚横中 | 50 枚横中鸡蛋托+纸箱6 套) | 1225002×61322502×1213222502×60000000×6 | 横放粘底 | (10+46)×2+10 | 4265 | 288×288×135 | 中偏大 | 6 | 4.81 | 6.8267 | 5.5 | 40.96 |
|11 | 50 枚竖大 | 50 枚竖大鸡蛋托+纸箱6 套) | 1322503×1213222503×180000000×61225003×6 | 竖放不粘底 | (10+60)×2+10 | 3545 | 285×285×162 | 大鸡蛋 | 6 | 5.0206 | 6.4706 | 10.5 | 38.8238 |
|12 | 60 枚竖中 | 60 枚竖中鸡蛋托+纸箱6 套) | 1226001×61323001×1213223001×180000000×6 | 竖放不粘底 | (10+58)×2+10 | 3641 | 312×262×159 | 中小鸡蛋 | 6 | 4.8707 | 6.3541 | 9.5 | 38.1243 |
|13 | 60 枚横中 | 60 枚横中鸡蛋托+纸箱5 套) | 1226002×51323002×1013223002×50000000×5 | 横放粘底 | (10+46)×2+10 | 4265 | 338×288×135 | 中偏大 | 5 | 5.4791 | 7.2591 | 11.5 | 36.2957 |
|14 | 60 枚竖大 | 60 枚竖大鸡蛋托+纸箱6 套) | 1323003×1213223003×181226003×60000000×6 | 竖放不粘底 | (10+60)×2+10 | 45 | 335×285×165 | 大鸡蛋 | 6 | 5.5683 | 7.0183 | — | 42.11 |
|15 |100 枚竖中 |100 枚竖中鸡蛋托+纸箱4 套) |12210001×41322501×1613222501×200000000×4 | 竖放不粘底 | (10+57)×4+10 | 3641 | 262×262×291 | 中小鸡蛋 | 4 | 7.2902 | 9.4652 | 14.5 | 37.8609 |
|16 |100 枚横中 |100 枚横中鸡蛋托+纸箱4 套) |12210002×41322502×1613222502×40000000×4 | 横放粘底 | (10+46)×4+10 | 4265 | 288×288×247 | 中偏大 | 4 | 7.925 | 10.95 | 14.5 | 43.8 |
|17 |100 枚竖大 |100 枚竖大鸡蛋托+纸箱4 套) |1322503×1613222503×200000000×412210003×4 | 竖放不粘底 | (10+60)×4+10 | 45 | 285×285×302 | 大鸡蛋 | 4 | 8.3210 | 10.4960 | 16.5 | 41.9839 |
---
### 皮蛋/鸭蛋系列
| 类别 | 产品名称 | 货品编号 | 放置方式 | 厚度(mm) | 孔径(mm) | 纸箱尺寸(mm) | 适用规格 | 套/箱 | 自提开票(元/套) | 快递开票(元/套) | 包价格(元/箱) |
|------|----------|--------------------------------------------------------|----------|-----------|----------|---------------|----------|--------|------------------|------------------|----------------|
| 皮蛋 | 20 枚皮蛋托+纸箱6 套) | 232001×6332001×6 | 竖放 | 10+70+10 | 55 | 340×275×105 | 大皮蛋 | 6 | 4.15 | 6.1667 | 37.00 |
| 皮蛋 | 30 枚皮蛋托+纸箱5 套) | 233001×5333001×5 | 竖放 | (10+70)+10 | 52 | 320×195×185 | 中皮蛋 | 5 | 4.52 | 6.4 | 32.00 |
| 皮蛋 | 40 枚皮蛋托+纸箱3 套) | 234001×3332001×6 | 竖放 | (10+70)+10 | 55 | 340×280×195 | 大皮蛋 | 3 | 6.8667 | 10 | 30.00 |
| 鸭蛋 | 20 枚鸭蛋托+纸箱6 套) | S322001×6S232001×6 | 竖放 | 10+65+10 | 45 | 285×235×106 | 大中鸭蛋 | 6 | 3.4683 | 4.9183 | 29.51 |
| 鸭蛋 | 30 枚鸭蛋托+纸箱6 套) | S321501×12S233001×6 | 竖放 | (10+65)×2+10 | 45 | 285×180×185 | 大中鸭蛋 | 6 | 4.5580 | 6.0080 | 36.0478 |
| 鸭蛋 | 40 枚鸭蛋托+纸箱5 套) | S322001×10S234001×5 | 竖放 | (10+65)×2+10 | 45 | 286×246×195 | 大中鸭蛋 | 5 | 5.9099 | 7.6499 | 38.2493 |
---
## 二、速查价目表Sheet3 精简版)
| 货品名称 | 货品编号 | 套/箱 | 自提开票(元/套) | 快递开票(元/套) | 包开票(元/箱) |
|----------|--------------------------------------------------------|--------|------------------|------------------|----------------|
| 20 枚鸡蛋托大套装 12 套竖不粘底 | 1222003×1213222003×241322003×120000000×12 | 12 | 2.5157 | 3.2407 | 38.8880 |
| 30 枚鸡蛋托中套装 12 套竖不粘底 | 1223001×121323001×1213223001×240000000×12 | 12 | 3.2625 | 3.9875 | 47.8499 |
| 加厚 30 枚鸡蛋托中套装 6 套竖不粘底 | 122300101×613200101×61322300101×120000000×6 | 6 | 4.0517 | 5.835 | 35.01 |
| 30 枚鸡蛋托大套装 10 套横粘底 | 1223002×101323002×1013223002×100000000×10 | 10 | 3.3471 | 4.5571 | 45.5709 |
| 30 枚鸡蛋托大套装 10 套竖不粘底 | 1323003×1013223003×201223003×100000000×10 | 10 | 3.3492 | 4.2192 | 42.1918 |
| 30 枚鸡蛋托大套装 8 套竖不粘底(上开口箱) | 1323003×813223003×161223005×80000000×8 | 8 | 3.8663 | 4.9538 | 39.63 |
| 30 枚鸡蛋托中套装 6 套竖不粘底彩箱 | 1223004×61323001×613223001×120000000×6 | 6 | 4.43 | 5.88 | 35.28 |
| 40 枚鸡蛋托大套装 8 套竖不粘底 | 1322003×1613222003×241224003×80000000×8 | 8 | 4.0375 | 5.125 | 41.00 |
| 50 枚鸡蛋托中套装 6 套竖不粘底 | 1225001×61322501×1213222501×180000000×6 | 6 | 4.4548 | 5.9048 | 35.4287 |
| 50 枚鸡蛋托大套装 6 套横粘底 | 1225002×61322502×1213222502×60000000×6 | 6 | 4.81 | 6.8267 | 40.96 |
| 50 枚鸡蛋托大套装 6 套竖不粘底 | 1322503×1213222503×180000000×61225003×6 | 6 | 5.0206 | 6.4706 | 38.8238 |
| 60 枚鸡蛋托中套装 6 套竖不粘底 | 1226001×61323001×1213223001×180000000×6 | 6 | 4.8707 | 6.3541 | 38.1243 |
| 60 枚鸡蛋托大套装 5 套横粘底 | 1226002×51323002×1013223002×50000000×5 | 5 | 5.4791 | 7.2591 | 36.2957 |
| 60 枚鸡蛋托大套装 6 套竖不粘底 | 1323003×1213223003×181226003×60000000×6 | 6 | 5.5683 | 7.0183 | 42.11 |
| 100 枚鸡蛋托中套装 4 套竖不粘底 | 12210001×41322501×1613222501×200000000×4 | 4 | 7.2902 | 9.4652 | 37.8609 |
| 100 枚鸡蛋托大套装 4 套横粘底 | 12210002×41322502×1613222502×40000000×4 | 4 | 7.925 | 10.95 | 43.8 |
| 100 枚鸡蛋托大套装 4 套竖不粘底 | 1322503×1613222503×200000000×412210003×4 | 4 | 8.3210 | 10.4960 | 41.9839 |
| 12 枚大鹅蛋对扣+纸箱6 套) | 431203×1212431201×60000000×6 | 6 | 4.5367 | 5.9867 | 35.92 |
| 12 枚大鹅蛋盖板托+纸箱6 套) | 431201×6431202×1212431201×60000000×6 | 6 | 4.3233 | 5.7733 | 34.64 |
| 20 枚皮蛋托+纸箱 6 套 | 232001×6332001×6 | 6 | 4.15 | 6.1667 | 37.00 |
| 30 枚皮蛋托+纸箱 5 套 | 233001×5333001×5 | 5 | 4.52 | 6.4 | 32.00 |
| 40 枚皮蛋托+纸箱 3 套 | 234001×3332001×6 | 3 | 6.8667 | 10 | 30.00 |
| 20 枚鸭蛋托+纸箱 6 套 | S322001×6S232001×6 | 6 | 3.4683 | 4.9183 | 29.51 |
| 30 枚鸭蛋托+纸箱 6 套 | S321501×12S233001×6 | 6 | 4.5580 | 6.0080 | 36.0478 |
| 40 枚鸭蛋托+纸箱 5 套 | S322001×10S234001×5 | 5 | 5.9099 | 7.6499 | 38.2493 |

File diff suppressed because it is too large Load Diff

25416
后台接口.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,87 +0,0 @@
登录和数据库调试日志说明
==========================
已为登录功能和数据库初始化添加详细的调试日志输出,帮助诊断问题。
⚠️ 重要提示:如果遇到"SQLite error (1): no such table: local_session"错误
请删除旧数据库后重新运行程序:
1. 关闭程序
2. 删除文件:%LOCALAPPDATA%\PackagingMallShipper\data.db
3. 重新运行程序,数据库会自动重建
如何查看调试日志:
------------------
方法一:使用 Visual Studio
1. 在 Visual Studio 中打开项目
2. 按 F5 或点击"调试">"开始调试"启动程序
3. 尝试登录
4. 查看 Visual Studio 底部的"输出"窗口
5. 在输出窗口的下拉菜单中选择"调试"
6. 将看到类似以下的详细日志:
[登录请求] URL: https://user.api.it120.cc/login/userName/v2?userName=...&pwd=***&pdomain=let5see...
[登录请求] 用户名: 刘海春
[登录请求] 验证码: 1234
[登录请求] 验证码Key: abc123...
[登录请求] 子域名: let5see
[登录响应] HTTP状态码: OK
[登录响应] JSON原始内容: {"code":...,"msg":"..."}
[登录响应] 解析结果 - Code: xxx, Msg: xxx
[登录失败] 错误码: xxx, 错误信息: no user
方法二:使用 DebugView (无需 Visual Studio)
1. 下载 DebugView 工具https://learn.microsoft.com/en-us/sysinternals/downloads/debugview
2. 以管理员身份运行 DebugView
3. 确保勾选 "Capture Win32" 和 "Capture Global Win32"
4. 运行编译好的 PackagingMallShipper.exe
5. 尝试登录
6. 在 DebugView 窗口中查看实时调试输出
日志内容说明:
--------------
1. [登录请求] - 显示发送给API的请求信息
- URL完整的API请求地址密码已隐藏
- 用户名:输入的用户名
- 验证码:输入的验证码值
- 验证码Key用于验证码验证的唯一标识
- 子域名:当前配置的子域名
2. [登录响应] - 显示API返回的响应信息
- HTTP状态码HTTP层面的状态如 200 OK
- JSON原始内容API返回的完整JSON响应
- 解析结果从JSON中提取的code和msg字段
3. [登录失败] - 如果登录失败,显示详细的错误信息
- 错误码API返回的错误代码
- 错误信息API返回的错误消息如 "no user"
4. [登录成功] - 如果登录成功显示token和用户ID
5. [登录异常] - 如果发生网络异常等错误,显示异常详情
排查步骤:
----------
1. 确认验证码是否正确输入
- 错误码 300 = "图片验证码错误"
2. 确认用户名编码是否正确
- 查看日志中的URL确认中文用户名是否被正确编码
3. 确认子域名配置是否正确
- 应该为 "let5see"
4. 查看API返回的完整错误信息
- 可能会有更详细的错误描述
5. 验证HTTP状态码
- 应该为 200 OK
- 如果是 404说明接口地址错误
常见错误码:
-----------
- 300: 图片验证码错误
- 700: 需要验证码
- 其他错误码请参考API返回的msg字段