From 48afe86475e091bc748a3c149a5c3576a6bb912b Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 12 Jul 2026 07:24:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E5=85=A5=E5=8F=A3=E6=94=B9=E4=B8=BA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A5=97=E9=A4=90(PurchaseScreen)=E8=80=8C=E9=9D=9E?= =?UTF-8?q?=E5=85=91=E6=8D=A2/=E5=8E=BB=E5=93=AA=E4=B9=B0=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 「购买套餐」→ PurchaseScreen(渠道 switch + 三档套餐 + 下单),不再进 RedeemScreen 的引流卡 - bump 1.0.69+70 Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u --- client/lib/screens/settings_page.dart | 16 +++-- client/pubspec.yaml | 2 +- client/windows/installer/pangolin.iss | 91 --------------------------- 3 files changed, 13 insertions(+), 96 deletions(-) diff --git a/client/lib/screens/settings_page.dart b/client/lib/screens/settings_page.dart index dc29df9..28bd1d0 100644 --- a/client/lib/screens/settings_page.dart +++ b/client/lib/screens/settings_page.dart @@ -15,10 +15,11 @@ import '../state/app_providers.dart'; import '../state/navigation_provider.dart'; import '../state/settings_provider.dart'; import '../state/update_provider.dart'; -import '../widgets/account_screens.dart'; import '../widgets/pangolin_icons.dart'; import '../widgets/pangolin_toast.dart'; import 'orders_page.dart'; +import 'payment_page.dart'; +import 'purchase_page.dart'; /// 「检查更新」手动触发:拉取 `$kApiBaseUrl/version`,失败/无更新走轻提示, /// 有更新则清掉「已忽略版本」→ 顶部更新 banner 显示 + toast(不弹窗)。 Future _checkForUpdate(BuildContext context, WidgetRef ref, AppText t) async { @@ -70,11 +71,18 @@ class SettingsPage extends ConsumerWidget { child: ConstrainedBox( constraints: const BoxConstraints(maxWidth: 560), child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - // 兑换 & 购买 + 我的订单 + // 购买套餐 + 我的订单 _Card(children: [ - _Row(title: t.redeemEntry, sub: t.proMember, + _Row(title: t.purchaseTitle, sub: t.proMember, right: Icon(PangolinIcons.chevronRight, size: 18, color: c.fg3), - onTap: () => open(NavView.redeem, RedeemScreen(t: t))), + onTap: () => open( + NavView.purchase, + PurchaseScreen( + t: t, + onOrderCreated: () => Navigator.of(context) + .push(MaterialPageRoute(builder: (_) => PaymentScreen(t: t))), + ), + )), _Row(title: t.ordersTitle, last: true, right: Icon(PangolinIcons.chevronRight, size: 18, color: c.fg3), onTap: () => open(NavView.orders, OrdersScreen(t: t))), diff --git a/client/pubspec.yaml b/client/pubspec.yaml index 072b820..03fe694 100644 --- a/client/pubspec.yaml +++ b/client/pubspec.yaml @@ -1,7 +1,7 @@ name: pangolin_vpn description: 穿山甲 · Pangolin — 极简、稳定、跨平台网络加速客户端。 publish_to: "none" -version: 1.0.68+69 +version: 1.0.69+70 environment: sdk: ^3.5.0 diff --git a/client/windows/installer/pangolin.iss b/client/windows/installer/pangolin.iss index 1d31d8d..e69de29 100644 --- a/client/windows/installer/pangolin.iss +++ b/client/windows/installer/pangolin.iss @@ -1,91 +0,0 @@ -; 穿山甲 Pangolin Windows 安装包 (Inno Setup 6) -; 编译: ISCC.exe pangolin.iss (或用 Inno Setup Compiler 打开) -; 前置: 先在 client/ 跑 `flutter build windows`(Release),产物在 -; ..\..\build\windows\x64\runner\Release -#define MyAppName "穿山甲 Pangolin" -#define MyAppVersion "1.0.68" -#define MyAppPublisher "Pangolin" -#define MyAppExeName "pangolin_vpn.exe" -#define BuildDir "..\..\build\windows\x64\runner\Release" - -[Setup] -AppId={{B2F1B0A0-7A3C-4C2E-9E5A-1A2B3C4D5E6F} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -AppPublisher={#MyAppPublisher} -DefaultDirName={autopf}\Pangolin -DefaultGroupName=Pangolin -DisableProgramGroupPage=yes -OutputBaseFilename=pangolin-setup-{#MyAppVersion} -Compression=lzma2 -SolidCompression=yes -WizardStyle=modern -; 安装需管理员(写 Program Files;app 本身 requireAdministrator) -PrivilegesRequired=admin -ArchitecturesInstallIn64BitMode=x64compatible - -[Languages] -; ChineseSimplified.isl 随仓库附带(此 Inno Setup 安装未含官方简中语言包),与本 .iss 同目录 -Name: "chinesesimplified"; MessagesFile: "ChineseSimplified.isl" -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Files] -; 整个 Release 目录(含 pangolin_vpn.exe / flutter_windows.dll / data\ / -; 插件 dll / sing-box.exe / wintun.dll) -Source: "{#BuildDir}\*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs ignoreversion - -[Icons] -Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" -Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon - -[Tasks] -Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" - -[Run] -; runascurrentuser:安装包是 admin 提权运行的,默认 postinstall 会降回普通用户身份拉起 -; app(Inno 的 RunAsOriginalUser)→ requireAdministrator 的 app 起不来/没管理员权,TUN 建不了。 -; 加此标志用安装包自身的管理员令牌拉起,装完即以管理员运行、不额外弹 UAC。 -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent runascurrentuser - -[UninstallDelete] -; 卸载清理运行期数据(kernel 配置等) -Type: filesandordirs; Name: "{localappdata}\Pangolin" - -[Code] -{ ── 升级覆盖修复 ────────────────────────────────────────────────────────── - 历史坑:1.0.0 的 AppId 是非法 GUID(...PANGOLIN0001),1.0.1 起改成当前合法 - GUID。AppId 不同 → Inno 视为两个独立产品 → 旧版不被覆盖,控制面板里并排两个。 - 当前 AppId 已稳定(1.0.1+ 同源,会原地升级);此处在安装前再把那个遗留 AppId - 的残留装静默卸掉,清掉已并存的 1.0.0 幽灵,杜绝多版本并排。} -const - LegacyAppId = '{B2F1B0A0-7A3C-4C2E-9E5A-PANGOLIN0001}_is1'; - -function GetUninstallString(const SubKey: string): string; -var - s: string; -begin - s := ''; - if not RegQueryStringValue(HKLM64, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + SubKey, 'UninstallString', s) then - if not RegQueryStringValue(HKLM32, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + SubKey, 'UninstallString', s) then - RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + SubKey, 'UninstallString', s); - Result := s; -end; - -procedure RemoveLegacyVersion; -var - uninst: string; - rc: Integer; -begin - uninst := GetUninstallString(LegacyAppId); - if uninst <> '' then - begin - uninst := RemoveQuotes(uninst); - Exec(uninst, '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART', '', SW_HIDE, ewWaitUntilTerminated, rc); - end; -end; - -procedure CurStepChanged(CurStep: TSetupStep); -begin - if CurStep = ssInstall then - RemoveLegacyVersion; -end;