hch
2026-01-26 aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using System;
 
/// <summary>
/// 关联界面索引表,用于获取途径,富文本打开界面等情况
/// </summary>
public class UIJumpManager : GameSystemManager<UIJumpManager>
{
 
 
    public override void Init()
    {
    }
 
    public bool CanOpenWin(int winID, bool showTip = false)
    {
        var config = WindowSearchConfig.Get(winID);
        if (config == null)
        {
            return false;
        }
        if (config.FuncID !=0 && !FuncOpen.Instance.IsFuncOpen(config.FuncID, showTip))
        {
            return false;
        }
 
        //活动后续补充
        return true;
    }
 
    public void OpenWindow(int winID, bool showTip = true)
    {
        if (!CanOpenWin(winID, showTip))
        {
            return;
        }
        var config = WindowSearchConfig.Get(winID);
 
        if (config.WinName == "StoreBaseWin")
        {
            //指定商品
            StoreModel.Instance.jumpShopID = int.Parse(config.Extra);
            if (StoreModel.Instance.jumpShopID == 0)
            {
                StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal;
            }
            else
            {
                StoreModel.Instance.selectStoreFuncType = (StoreFunc)StoreConfig.Get(StoreModel.Instance.jumpShopID).ShopType;
            }
        }
 
        if (!UIManager.Instance.IsOpened(config.WinName))
        {
            UIManager.Instance.OpenWindow(config.WinName, config.TabIndex);
        }
        else
        {
            var ui = UIManager.Instance.GetUI(config.WinName) as OneLevelWin;
            ui?.ClickFuncBtn(config.TabIndex);
        }
    }
}