Merge remote-tracking branch 'origin/develop' into develop_liyi

This commit is contained in:
liyi 2025-02-08 14:39:23 +08:00
commit a422f48c22
7 changed files with 52 additions and 14 deletions

View File

@ -6,7 +6,7 @@
<string>development</string> <string>development</string>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:lock.skychip.top</string> <string>applinks:lock.xhjcn.ltd</string>
</array> </array>
<key>com.apple.external-accessory.wireless-configuration</key> <key>com.apple.external-accessory.wireless-configuration</key>
<true/> <true/>

View File

@ -30,10 +30,10 @@
<key>CFBundleURLIconFile</key> <key>CFBundleURLIconFile</key>
<string></string> <string></string>
<key>CFBundleURLName</key> <key>CFBundleURLName</key>
<string>com.sky.skysmartlock</string> <string>com.xhj.xhjsmartlock</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>skysmartlock</string> <string>xhjsmartlock</string>
<string></string> <string></string>
<string></string> <string></string>
</array> </array>
@ -45,7 +45,7 @@
<string>weixin</string> <string>weixin</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>wxbe340095d2b8fd51</string> <string>wx8e48112e22343817</string>
</array> </array>
</dict> </dict>
</array> </array>

View File

@ -39,6 +39,13 @@ class UmengKey {
typedef dynamic fCallFunction(); typedef dynamic fCallFunction();
class WechatAppInfo {
WechatAppInfo({required this.wechatAppId, required this.universalLink});
String wechatAppId;
String universalLink;
}
class F { class F {
static Flavor? appFlavor; 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 { static bool get isProductionEnv {
switch (appFlavor) { switch (appFlavor) {

View File

@ -49,7 +49,7 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
onTap: () { onTap: () {
WechatManageTool.getAppInfo(() { WechatManageTool.getAppInfo(() {
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram( WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
'wxbe340095d2b8fd51'); F.wechatAppInfo.wechatAppId, F.wechatAppInfo.universalLink);
}); });
}, },
child: Padding( child: Padding(

View File

@ -86,7 +86,8 @@ class _MineSetPageState extends State<MineSetPage>
onTap: () { onTap: () {
WechatManageTool.getAppInfo(() { WechatManageTool.getAppInfo(() {
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram( WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
'wxbe340095d2b8fd51'); F.wechatAppInfo.wechatAppId,
F.wechatAppInfo.universalLink);
}); });
}, },
child: ClipRRect( child: ClipRRect(

View File

@ -23,10 +23,9 @@ class WxPushWeChatMiniProgramTool {
doOnIOS: true); doOnIOS: true);
} }
static Future<void> pushWeChatMiniProgram(String appId) async { static Future<void> pushWeChatMiniProgram(String appId,String _associationUrl) async {
if (!isInit) { if (!isInit) {
isInit = true; isInit = true;
final String _associationUrl = await Storage.getAssociationUrl();
await initWeChatMiniProgram(appId, _associationUrl); await initWeChatMiniProgram(appId, _associationUrl);
final MiniProgram miniProgram = MiniProgram( final MiniProgram miniProgram = MiniProgram(

View File

@ -109,12 +109,12 @@ version: 1.0.85+2025010802
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'
fluwx: #fluwx:
app_id: 'wxbe340095d2b8fd51' # app_id: 'wxbe340095d2b8fd51'
debug_logging: true # debug_logging: true
android: # android:
ios: # ios:
universal_link: https://lock.skychip.top/apple-app-site-association.json # universal_link: https://lock.skychip.top/apple-app-site-association.json
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions