添加multishare配置,用来开启关闭3分享

This commit is contained in:
joywayer
2026-07-03 22:20:48 +08:00
parent 113b4d4960
commit d76064c4c5
4 changed files with 45 additions and 16 deletions
+3 -1
View File
@@ -11,7 +11,7 @@
<key>gamestart</key>
<string>gamehall</string>
<key>gameconfig</key>
<string>tsgames.daoqi88.cn-config_test-update_jsonv2_test</string>
<string>tsgames.daoqi88.cn-config-update_jsonv2</string>
<key>market</key>
<string>2</string>
<key>agent</key>
@@ -22,5 +22,7 @@
<string></string>
<key>appleconfig</key>
<string></string>
<key>multishare</key>
<string>0</string>
</dict>
</plist>
+19 -4
View File
@@ -2,16 +2,19 @@
// BundleConfig.swift
// ylgamehall
//
// Bundle ChannelConfig.plist 10 string
// Bundle ChannelConfig.plist 11 string
// docs/H5-Native-Implementation-Design.md §7 / ADR-007
//
// qiniudomain 2026-06-27 CDN
// RemoteConfig audio_domain
//
// - qiniudomain 2026-06-27 CDN
// RemoteConfig audio_domain
// - multishare sharefriend=1
// ("1" = SharePanel / "0" = )
//
import Foundation
/// 10 `BundleConfig.shared` App
/// 11 `BundleConfig.shared` App
///
/// `plutil` `.app/ChannelConfig.plist` +
/// Xcode build ADR-007
@@ -30,6 +33,17 @@ nonisolated public final class BundleConfig: Sendable {
public let appVersion: String
public let other: String
public let appleConfig: String
/// sharefriend=1
/// "1" SharePanel / QQ /
/// "0"
/// "1"
public let multiShare: String
/// SharePanel `multiShare != "0"`
/// /
public var isMultiShareEnabled: Bool {
multiShare != "0"
}
/// bundle plist fixture
public init(bundle: Bundle = .main) {
@@ -44,6 +58,7 @@ nonisolated public final class BundleConfig: Sendable {
appVersion = dict["appversion"] ?? ""
other = dict["other"] ?? ""
appleConfig = dict["appleconfig"] ?? ""
multiShare = dict["multishare"] ?? ""
}
private static func loadPlist(bundle: Bundle) -> [String: String] {
+12 -3
View File
@@ -6,7 +6,10 @@
// ViewController **** mode
//
// dispatchSubGame msext gameController.m:575-597
// - sharefriend == "1" SharePanel /QQ/
// - sharefriend == "1" BundleConfig.isMultiShareEnabled
// SharePanel /QQ/
// - sharefriend == "1" multishare
//
// - WechatShare.share() timeline
//
// dispatchLobby msext NewRootVC.m:453-537 SharePanel
@@ -27,8 +30,14 @@ public enum ShareCenter {
public static func dispatchSubGame(_ content: ShareContent) {
switch content.sharefriend {
case "1":
// / SharePanel
SharePanel.show(content: content)
// /
if BundleConfig.shared.isMultiShareEnabled {
SharePanel.show(content: content)
} else {
// multishare = "0" ,(scene
// / ,)
WechatShare.shared.share(content, scene: .friend)
}
default:
// sharefriend == "2" msext WechatShareManager