全面改为AndroidApi,添加抽奖识别及消息提示

This commit is contained in:
2019-01-29 13:50:29 +08:00
parent 14525ee76e
commit 8c0320c97e
10 changed files with 169 additions and 59 deletions

19
LuckyUser.py Normal file
View File

@ -0,0 +1,19 @@
from User import User
class LuckyUser:
user = None
count = 0
def __init__(self, json=None):
if json:
self.parse(json)
def parse(self, json):
self.user = User()
self.user.ID = json['user_id']
self.user.name = json['user_name']
self.count = int(json["grant_count"])
def __str__(self):
return "用户 {} 获得了 {}".format(self.user,self.count)