|
@@ -1,8 +1,8 @@
|
|
|
import json
|
|
|
import requests
|
|
|
from hytest.common import *
|
|
|
-#from pandas.io.formats.style import properties_args
|
|
|
-#from sympy.physics.vector.printing import params
|
|
|
+from pandas.io.formats.style import properties_args
|
|
|
+from sympy.physics.vector.printing import params
|
|
|
|
|
|
from cfg import cfg
|
|
|
from bs4 import BeautifulSoup
|
|
@@ -2167,7 +2167,31 @@ class APIMgr():
|
|
|
headers = GSTORE['headers']
|
|
|
response = self.s.post(f"{cfg.target_host_app}/jyapi/jybx/subscribe/vType/someInfo", headers=headers)
|
|
|
return response
|
|
|
-
|
|
|
+ #聊天内容保存-人工客服跟用户聊天
|
|
|
+ def message_add(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "receiveId": "4759445955430b",
|
|
|
+ "sendId": "475b435a5c440b09",
|
|
|
+ "ownType": 2,
|
|
|
+ "title": "文本",
|
|
|
+ "item": 8,
|
|
|
+ "itemType": 5,
|
|
|
+ "link": "",
|
|
|
+ "fool": 1,
|
|
|
+ "type": 1,
|
|
|
+ "content": "我是剑鱼标讯人工客服,请问有什么可以帮助您的?"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/message/messageAdd", headers=headers , json=json)
|
|
|
+ return response
|
|
|
+ #未读消息总量
|
|
|
+ def message_count(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "userType": 1
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/message/messageCount", headers=headers, json=json)
|
|
|
+ return response
|
|
|
|
|
|
|
|
|
|