Ver Fonte

添加Apptype 字段

zhangyong há 11 meses atrás
pai
commit
2b3a5b454e
2 ficheiros alterados com 4 adições e 1 exclusões
  1. 2 1
      common/material.py
  2. 2 0
      wx_gzh/wx_message_data.py

+ 2 - 1
common/material.py

@@ -19,8 +19,9 @@ class Material():
         for row in wx_message[1:]:
             name = row[0]
             cookie = row[1]
+            apptype = row[2]
             if name:
-                number = {"name": name, "cookie": cookie}
+                number = {"name": name, "cookie": cookie, "apptype": apptype}
                 list.append(number)
             else:
                 return list

+ 2 - 0
wx_gzh/wx_message_data.py

@@ -39,6 +39,7 @@ class messageData():
     def wx_data(cls, data_list):
         name = data_list['name']
         cookie = data_list['cookie']
+        apptype = data_list['apptype']
         first_data, text_path = cls.create_folders(name)
         url = "https://mp.weixin.qq.com/wxopen/wasysnotify?action=get&msg_type=1&lang=zh_CN&f=json&ajax=1&begin=0&count=50"
         payload = {}
@@ -80,6 +81,7 @@ class messageData():
                         (f"url", str(itme["url"])),
                         (f"channel", name),
                         ("timestamp", str(int(time.time()))),
+                        ("appType", str(apptype))
                     ]
                     if first_data:
                         if first_data == str(id):