diff --git a/ios/Runner/RunnerRelease-xhj.entitlements b/ios/Runner/RunnerRelease-xhj.entitlements index d7b50f42..66cd751d 100755 --- a/ios/Runner/RunnerRelease-xhj.entitlements +++ b/ios/Runner/RunnerRelease-xhj.entitlements @@ -6,7 +6,7 @@ development com.apple.developer.associated-domains - applinks:lock.skychip.top + applinks:lock.xhjcn.ltd com.apple.external-accessory.wireless-configuration diff --git a/ios/Runner/info_xhj.plist b/ios/Runner/info_xhj.plist index f6cc0fca..a21ee95c 100755 --- a/ios/Runner/info_xhj.plist +++ b/ios/Runner/info_xhj.plist @@ -30,10 +30,10 @@ CFBundleURLIconFile CFBundleURLName - com.sky.skysmartlock + com.xhj.xhjsmartlock CFBundleURLSchemes - skysmartlock + xhjsmartlock @@ -45,7 +45,7 @@ weixin CFBundleURLSchemes - wxbe340095d2b8fd51 + wx8e48112e22343817 diff --git a/lib/flavors.dart b/lib/flavors.dart index 145d2bf5..0d4fbe8f 100755 --- a/lib/flavors.dart +++ b/lib/flavors.dart @@ -39,6 +39,13 @@ class UmengKey { typedef dynamic fCallFunction(); +class WechatAppInfo { + WechatAppInfo({required this.wechatAppId, required this.universalLink}); + + String wechatAppId; + String universalLink; +} + class F { static Flavor? appFlavor; @@ -281,6 +288,37 @@ class F { } } + static WechatAppInfo get wechatAppInfo { + switch (appFlavor) { + case Flavor.local: + return WechatAppInfo( + wechatAppId: 'wxbe340095d2b8fd51', + universalLink: 'https://apt.skychip.top/'); + case Flavor.dev: + return WechatAppInfo( + wechatAppId: 'wxbe340095d2b8fd51', + universalLink: 'https://apt.skychip.top/'); + case Flavor.pre: + case Flavor.sky_pre: + case Flavor.xhj_pre: + return WechatAppInfo( + wechatAppId: 'wxbe340095d2b8fd51', + universalLink: 'https://apt.skychip.top/'); + case Flavor.sky: + return WechatAppInfo( + wechatAppId: 'wxbe340095d2b8fd51', + universalLink: 'https://lock.skychip.top/'); + case Flavor.xhj: + case Flavor.xhj_bundle: + return WechatAppInfo( + wechatAppId: 'wx8e48112e22343817', + universalLink: 'https://lock.xhjcn.ltd/'); + default: + return WechatAppInfo( + wechatAppId: 'wxbe340095d2b8fd51', universalLink: ''); + } + } + // 是否是生产环境 static bool get isProductionEnv { switch (appFlavor) { diff --git a/lib/mine/mine/starLockMine_page.dart b/lib/mine/mine/starLockMine_page.dart index fad1ad1d..aae1828c 100755 --- a/lib/mine/mine/starLockMine_page.dart +++ b/lib/mine/mine/starLockMine_page.dart @@ -49,7 +49,7 @@ class StarLockMinePageState extends State with BaseWidget { onTap: () { WechatManageTool.getAppInfo(() { WxPushWeChatMiniProgramTool.pushWeChatMiniProgram( - 'wxbe340095d2b8fd51'); + F.wechatAppInfo.wechatAppId, F.wechatAppInfo.universalLink); }); }, child: Padding( diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index e0835c62..0f277f3a 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -86,7 +86,8 @@ class _MineSetPageState extends State onTap: () { WechatManageTool.getAppInfo(() { WxPushWeChatMiniProgramTool.pushWeChatMiniProgram( - 'wxbe340095d2b8fd51'); + F.wechatAppInfo.wechatAppId, + F.wechatAppInfo.universalLink); }); }, child: ClipRRect( diff --git a/lib/tools/wechat/wx_push_miniProgram/wx_push_miniProgram.dart b/lib/tools/wechat/wx_push_miniProgram/wx_push_miniProgram.dart index e877bae0..43a16561 100644 --- a/lib/tools/wechat/wx_push_miniProgram/wx_push_miniProgram.dart +++ b/lib/tools/wechat/wx_push_miniProgram/wx_push_miniProgram.dart @@ -23,10 +23,9 @@ class WxPushWeChatMiniProgramTool { doOnIOS: true); } - static Future pushWeChatMiniProgram(String appId) async { + static Future pushWeChatMiniProgram(String appId,String _associationUrl) async { if (!isInit) { isInit = true; - final String _associationUrl = await Storage.getAssociationUrl(); await initWeChatMiniProgram(appId, _associationUrl); final MiniProgram miniProgram = MiniProgram( diff --git a/pubspec.yaml b/pubspec.yaml index 6b4ab3c9..048f8ae5 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -109,12 +109,12 @@ version: 1.0.85+2025010802 environment: sdk: '>=2.12.0 <3.0.0' -fluwx: - app_id: 'wxbe340095d2b8fd51' - debug_logging: true - android: - ios: - universal_link: https://lock.skychip.top/apple-app-site-association.json +#fluwx: +# app_id: 'wxbe340095d2b8fd51' +# debug_logging: true +# android: +# ios: +# universal_link: https://lock.skychip.top/apple-app-site-association.json # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions