This commit is contained in:
hackrobot
2024-04-10 22:32:38 +08:00
parent 6954770fd6
commit 90b8506f6a
2 changed files with 11 additions and 10 deletions

20
main.py
View File

@@ -334,17 +334,17 @@ def kp(event_data):
# new_wxid='wxid_4413224132412') # new_wxid='wxid_4413224132412')
# 发送小程序 # 发送小程序
# utils.sendminiProgram(data, account_wxid, wxid, planetXml) utils.sendminiProgram(data, account_wxid, wxid, planetXml)
# H5链接 # H5链接
WXBotService.send_link_message( # WXBotService.send_link_message(
account_wxid, # account_wxid,
wxid, # wxid,
title="欢迎加入微信群", # title="欢迎加入微信群",
desc="请查看规则", # desc="请查看规则",
url=f'https://link.hackrobot.cn?wxid={wxid}', # url=f'https://link.hackrobot.cn?wxid={wxid}',
pic= # pic=
"https://www.hackrobot.cn/wp-content/uploads/2023/05/cropped-cropped-Screenshot-2023-05-22-at-17.26.38.png" # "https://www.hackrobot.cn/wp-content/uploads/2023/05/cropped-cropped-Screenshot-2023-05-22-at-17.26.38.png"
) # )
# if msg in ['腾讯云']: # if msg in ['腾讯云']:
# # 发送小程序 # # 发送小程序

View File

@@ -38,6 +38,7 @@ def saveWxidInfo(account_wxid, wxid,openId=None,h5openid=None):
db_user = crud.get_user_by_wxid(db=SessionLocal(), wxid=wxid) db_user = crud.get_user_by_wxid(db=SessionLocal(), wxid=wxid)
if db_user: if db_user:
print("wxid already registered") print("wxid already registered")
# 更新数据
# return db_user # return db_user
else: else:
new_user=crud.create_user(db=SessionLocal(), user=friendItemObj) new_user=crud.create_user(db=SessionLocal(), user=friendItemObj)