From 597636d050b35378f0fc22e623a77c8c18633a1f Mon Sep 17 00:00:00 2001 From: wucao <2787668634@qq.com> Date: Thu, 30 Dec 2021 17:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B3=E5=8F=B0=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 3 ++- resend.py | 3 ++- test/to_shoumeng.py | 17 +++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index b09780b..fe311cd 100644 --- a/app.py +++ b/app.py @@ -14,7 +14,8 @@ def handler_os(properties): os_: str = properties.get('#os', 'Android') if os_.lower() == 'ios': properties['#os'] = 102 - properties['#os'] = 101 + else: + properties['#os'] = 101 def handler_money(properties): diff --git a/resend.py b/resend.py index d676c05..686b4af 100644 --- a/resend.py +++ b/resend.py @@ -13,7 +13,8 @@ def handler_os(properties): os_: str = properties.get('#os', 'Android') if os_.lower() == 'ios': properties['#os'] = 102 - properties['#os'] = 101 + else: + properties['#os'] = 101 def handler_money(properties): diff --git a/test/to_shoumeng.py b/test/to_shoumeng.py index 86f8223..e7b26a5 100644 --- a/test/to_shoumeng.py +++ b/test/to_shoumeng.py @@ -7,21 +7,21 @@ consumer, client = create_consumer() attr_default = dict() -# ʼþÓ³Éä legu->shoumeng +# �¼�ӳ�� legu->shoumeng legu_to_sm_event = { 'create_account': 'role_create', - # '':'role_logout', # ½ÇÉ«µÇ³öÈÕÖ¾ + # '':'role_logout', # ��ɫ�dz���־ 'login': 'role_login', 'level_up': 'role_rank', 'pay': 'role_pay', } -# ÊôÐÔÓ³Éä legu->shoumeng +# ����ӳ�� legu->shoumeng legu_to_sm_attr_base = { - # »ù´¡ÊôÐÔ + # �������� 'channel': 'channel_name', 'svrindex': 'game_server', '#os': 'platform_id', - # '':'sm_user_id', # ÊÖÃËÕ˺ÅID + # '':'sm_user_id', # �����˺�ID 'binduid': 'user_id', '#account_id': 'role_id', 'role_name': 'role_name', @@ -30,12 +30,12 @@ legu_to_sm_attr_base = { 'zhanli': 'power', 'lv': 'role_rank', 'vip': 'role_vip', - # '':'castle_rank', # ³Ç±¤µÈ¼¶ + # '':'castle_rank', # �DZ��ȼ� 'exp': 'exp' } legu_to_sm_attr = { - # µÈ¼¶Éý¼¶ÊôÐÔ + # �ȼ��������� # '':'rank_before', 'lv': 'rank', # '':'rank_change', @@ -60,7 +60,8 @@ def handler_os(properties): os_: str = properties.get('#os', 'Android') if os_.lower() == 'ios': properties['#os'] = 102 - properties['#os'] = 101 + else: + properties['#os'] = 101 for msg in consumer():