Merge branch 'release'

This commit is contained in:
Liuyf 2025-02-07 15:41:46 +08:00
commit abb27b717a
6 changed files with 51 additions and 13 deletions

View File

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

View File

@ -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) {

View File

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

View File

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

View File

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

View File

@ -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