黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
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
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone
{
    /// <summary>
    /// 极光推送消息的处理逻辑
    /// </summary>
    public class HdlJiguangMsgPushLogic
    {
        #region ■ 变量声明___________________________
 
        /// <summary>
        /// 极光推送消息的处理逻辑
        /// </summary>
        private static HdlJiguangMsgPushLogic m_Current = null;
        /// <summary>
        /// 极光推送消息的处理逻辑
        /// </summary>
        public static HdlJiguangMsgPushLogic Current
        {
            get
            {
                if (m_Current == null)
                {
                    m_Current = new HdlJiguangMsgPushLogic();
                }
                return m_Current;
            }
        }
 
        #endregion
 
        #region ■ 处理极光信息推送___________________
 
        /// <summary>
        /// 处理极光信息推送
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="message">信息</param>
        /// <param name="extras">负载数据</param>
        public void AdjustJiguangMsgPush(string title, string message, string extras)
        {
            if (extras.Contains("Offline") == true)
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //此帐号已在别处登录,您被迫下线
                    string msg = Language.StringByID(R.MyInternationalizationString.uHadBeenLoginAndOffLine);
                    var contr = new ShowMsgControl(ShowMsgType.Tip, msg);
                    contr.Show();
                    //账号在别处登陆,被踢下线
                    HdlAccountLogic.Current.ReLoginAgain(HdlUserCenterResourse.UserInfo.Account, false);
                });
                return;
            }
        }
        #endregion
    }
}