Spaces:
Runtime error
Runtime error
tilents
commited on
Commit
·
901d23c
1
Parent(s):
4467fda
change userinfo
Browse files
AppPub/User/Bean/UserInfo.py
CHANGED
@@ -30,8 +30,8 @@ class UserInfo:
|
|
30 |
def HttpPostUserData(self, push_data):
|
31 |
# 定义要发送的数据,这里是一个字典
|
32 |
data = {
|
33 |
-
"sub": self.sub # 假设需要传递的参数名为 "sub"
|
34 |
-
|
35 |
# 添加其他参数和值
|
36 |
}
|
37 |
# 发送POST请求
|
@@ -50,7 +50,7 @@ class UserInfo:
|
|
50 |
def GetUserInfo(self):
|
51 |
data = self.HttpGetUserData()
|
52 |
if not data or "Failed to fetch data" in data or "null" in data:
|
53 |
-
person = User_Data(self.name,
|
54 |
json_string = json.dumps(person.to_json())
|
55 |
print("新用戶:" + json_string) # 註冊一個用戶
|
56 |
result = self.HttpPostUserData(json_string)
|
|
|
30 |
def HttpPostUserData(self, push_data):
|
31 |
# 定义要发送的数据,这里是一个字典
|
32 |
data = {
|
33 |
+
"sub": self.sub, # 假设需要传递的参数名为 "sub"
|
34 |
+
"uservalue": push_data
|
35 |
# 添加其他参数和值
|
36 |
}
|
37 |
# 发送POST请求
|
|
|
50 |
def GetUserInfo(self):
|
51 |
data = self.HttpGetUserData()
|
52 |
if not data or "Failed to fetch data" in data or "null" in data:
|
53 |
+
person = User_Data(self.name, "picture")
|
54 |
json_string = json.dumps(person.to_json())
|
55 |
print("新用戶:" + json_string) # 註冊一個用戶
|
56 |
result = self.HttpPostUserData(json_string)
|