changxin commited on
Commit
fb273d7
1 Parent(s): 98cf4b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,9 +47,9 @@ def fx_datatable(s:str):
47
  def fx_dd(s:str):
48
  headers= {"Content-Type": "application/json"}
49
  url="https://oapi.dingtalk.com/robot/send?access_token=4cbf5cd82f7d214566af77f893ecc9f119b78f5465d3a8fcbe4734bf73c1a7d8"
50
- data={"msgtype": "action_card","action_card": {"title": s,"markdown": "# 万般带不走 半点不由人","single_title": "查看详情","single_url": "https://pbihub.cn/users/44"}}
51
  respose=requests.post(url,json=data,headers=headers)
52
- return '推送成功!'
53
 
54
  demo=gr.Blocks()
55
  with demo:
 
47
  def fx_dd(s:str):
48
  headers= {"Content-Type": "application/json"}
49
  url="https://oapi.dingtalk.com/robot/send?access_token=4cbf5cd82f7d214566af77f893ecc9f119b78f5465d3a8fcbe4734bf73c1a7d8"
50
+ data={'msgtype':'text','text':{'title': '吹牛逼',"content": s}, 'at': {'atMobiles': [], 'isAtAll': True}}
51
  respose=requests.post(url,json=data,headers=headers)
52
+ return response.text
53
 
54
  demo=gr.Blocks()
55
  with demo: