smartpush 1.5.4__py3-none-any.whl → 1.5.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartpush/account/__init__.py +0 -0
- smartpush/account/operate_account.py +36 -0
- smartpush/base/request_base.py +0 -1
- smartpush/form/form_after.py +11 -2
- {smartpush-1.5.4.dist-info → smartpush-1.5.6.dist-info}/METADATA +1 -1
- {smartpush-1.5.4.dist-info → smartpush-1.5.6.dist-info}/RECORD +8 -7
- smartpush/form/test_form_after.py +0 -2
- {smartpush-1.5.4.dist-info → smartpush-1.5.6.dist-info}/WHEEL +0 -0
- {smartpush-1.5.4.dist-info → smartpush-1.5.6.dist-info}/top_level.txt +0 -0
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import json
|
2
|
+
import requests
|
3
|
+
|
4
|
+
|
5
|
+
def del_merchant_sub_account(cookies, ac_host, merchantId, platform, num=None):
|
6
|
+
"""删除店铺未验证子账号"""
|
7
|
+
if num is None or num == "":
|
8
|
+
num = 49
|
9
|
+
# 查询店铺所有子账号
|
10
|
+
role_url = ac_host + "/role/getMerchantRoles"
|
11
|
+
role_headers = {
|
12
|
+
'cookie': cookies
|
13
|
+
}
|
14
|
+
params = {"merchantId": merchantId, "plat": platform}
|
15
|
+
del_roles = {}
|
16
|
+
role_result = json.loads(requests.request("GET", url=role_url, params=params, headers=role_headers).text)
|
17
|
+
if num > len(role_result["resultData"]["merchantRoleInfos"]):
|
18
|
+
num = len(role_result["resultData"]["merchantRoleInfos"])
|
19
|
+
for i in range(num):
|
20
|
+
if not (role_result["resultData"]["merchantRoleInfos"][i]["status"] == "1" or
|
21
|
+
role_result["resultData"]["merchantRoleInfos"][i]["role"] == "owner"):
|
22
|
+
del_roles[i] = role_result["resultData"]["merchantRoleInfos"][i]
|
23
|
+
del_roles[i]["plat"] = role_result["resultData"]["plat"]
|
24
|
+
del_roles[i]["merchantId"] = merchantId
|
25
|
+
del del_roles[i]["status"]
|
26
|
+
del del_roles[i]["name"]
|
27
|
+
|
28
|
+
# 删除子账号
|
29
|
+
del_role_url = ac_host + "/role/delMerchantRole"
|
30
|
+
role_headers["content-type"] = 'application/json'
|
31
|
+
results = []
|
32
|
+
for i in del_roles.values():
|
33
|
+
del_role_result = requests.request("POST", url=del_role_url, headers=role_headers, data=json.dumps(i)).text
|
34
|
+
results.append({i["email"]: del_role_result})
|
35
|
+
|
36
|
+
print(f"已删除账号: {results}")
|
smartpush/base/request_base.py
CHANGED
smartpush/form/form_after.py
CHANGED
@@ -77,8 +77,8 @@ class FormAfter(FormRequestBase):
|
|
77
77
|
|
78
78
|
def callDeleteForm(self, merchant_id):
|
79
79
|
requestParam = {"formId": self.form_id, "merchant_id": merchant_id}
|
80
|
-
result = self.request(url=
|
81
|
-
assert result['code']
|
80
|
+
result = self.request(method=URL.deleteForm.method,url=URL.deleteForm.url, params=requestParam)
|
81
|
+
assert result['code'] == 1
|
82
82
|
print(f"删除id:{self.form_id}表单成功")
|
83
83
|
|
84
84
|
# -------- 处理数据 --------------
|
@@ -152,3 +152,12 @@ class FormAfter(FormRequestBase):
|
|
152
152
|
|
153
153
|
def getCrowdPersonList(self, _id, page=1, pageSize=20, filter_type="email", filter_value=""):
|
154
154
|
self.callCrowdPersonList(self, _id, page, pageSize, filter_type, filter_value)
|
155
|
+
|
156
|
+
if __name__ == '__main__':
|
157
|
+
heard = {
|
158
|
+
'cookie': 'osudb_appid=SMARTPUSH;osudb_oar=#01#SID0000130BNXOsK5n5eE9jRh/qvw4GkPUL+3WXTwjU1L8VyW4x8OsSN2Z2/Dt4aoaLuvY8+7q9DWFuwOYuZEvYlUl28lCuZSliDRKgR25jsvr/a7AhjqltByzrs9QzPyaHJwgI1LND0Xt4QVU2c5FxQlCfex5;osudb_subappid=1;osudb_uid=4213785247;ecom_http_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTI2Mzg0NzUsImp0aSI6IjU3O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A0NjQ3NTkzNywic2NvcGUiOlsiZW1haWwtbWFya2V0IiwiY29va2llIiwic2wtZWNvbS1lbWFpbC1tYXJrZXQtbmV3LXRlc3QiLCJlbWFpbC1tYXJrZXQtbmV3LWRldi1mcyIsImFwaS11Yy1lYzIiLCJhcGktc3UtZWMyIiwiYXBpLWVtLWVjMiIsImZsb3ctcGx1Z2luIiwiYXBpLXNwLW1hcmtldC1lYzIiXSwiY2xpZW50X2lkIjoiZW1haWwtbWFya2V0In0.T9u3uzrxEulBSMWB-mqkyxEsu6tB-7FVqt9nBhkxPAo',
|
160
|
+
'Content-Type': 'application/json'}
|
161
|
+
host = 'https://test.smartpushedm.com/bff/api-em-ec2'
|
162
|
+
after = FormAfter(form_id=19238, headers=heard, host=host)
|
163
|
+
print(after.callGetFormInfo())
|
@@ -1,8 +1,10 @@
|
|
1
1
|
smartpush/__init__.py,sha256=XJrl1vhGATHSeSVqKmPXxYqxyseriUpvY5tLIXir3EE,24
|
2
2
|
smartpush/get_jira_info.py,sha256=OYaDV6VPAmkGKYLlRnsi1ZyKHU8xEiVnjsYrc41ZR0U,17910
|
3
|
+
smartpush/account/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
smartpush/account/operate_account.py,sha256=nzJLLAEwNElavZeWVqnA_MSGTBzQrSrknmezYBwtvWs,1525
|
3
5
|
smartpush/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
6
|
smartpush/base/faker_data.py,sha256=TOd5EKVImxZpsKEW_dtKa2iqiUGqU7OBkOM8pvqKVUc,24643
|
5
|
-
smartpush/base/request_base.py,sha256=
|
7
|
+
smartpush/base/request_base.py,sha256=JCkISn2mp_Aaugv_ZaNtFQrVaHtjQPxGgko6kCXOdlk,1848
|
6
8
|
smartpush/base/url_enum.py,sha256=_RcBMjDMWS_KOAK9T0HKG9msOWZLJGiKYKC4W5lOKjU,965
|
7
9
|
smartpush/export/__init__.py,sha256=D9GbWcmwnetEndFDty5XbVienFK1WjqV2yYcQp3CM84,99
|
8
10
|
smartpush/export/basic/ExcelExportChecker.py,sha256=3IAeu1kjFS4MpDxjVB1htAcRA1BtfpH3xEkZyP4htAA,19963
|
@@ -12,18 +14,17 @@ smartpush/export/basic/__init__.py,sha256=6tcrS-2NSlsJo-UwEsnGUmwCf7jgOsh_UEbM0F
|
|
12
14
|
smartpush/flow/MockFlow.py,sha256=MI8WIMZyKlxrV5QVs8rXX6iD07Ldl37_L5Yb5FWqHzU,8595
|
13
15
|
smartpush/flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
16
|
smartpush/form/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
smartpush/form/form_after.py,sha256=
|
17
|
+
smartpush/form/form_after.py,sha256=j68HXkeCNCqjCkn3QFZbqutsKNMB7pLEzbuZPfFc2Q8,9395
|
16
18
|
smartpush/form/form_assert.py,sha256=wPIRfQHhr7lN1fFd-mp0z_qKMtF4jfrNxRWvp2xfqCg,257
|
17
19
|
smartpush/form/form_before.py,sha256=CCvAC_2yWPlnQGtjEA8LPLy9853Nq3nNjcL2GewFWIs,175
|
18
20
|
smartpush/form/form_client_operation.py,sha256=gg-5uHXCyMa_ypBSYPYFVxXdwZdYBJsNtUCqayknMBw,303
|
19
|
-
smartpush/form/test_form_after.py,sha256=aZglf2k2BUqKgL7FDMGX25rQ_ulj5kCd4R70hQzx4zs,58
|
20
21
|
smartpush/utils/DataTypeUtils.py,sha256=BC7ioztO3vAfKd1EOoNvXdVuXYY8qjNskV1DP7LhW-M,1082
|
21
22
|
smartpush/utils/EmailUtlis.py,sha256=DAHd73bJ8hiJCLEXtD0xcwxPD7SOPSmBB7Jvlf6gN6s,11201
|
22
23
|
smartpush/utils/ListDictUtils.py,sha256=Fm5_d7UyY6xB8gySMPdl5jIFSRhXZcYXdYW-_L1alcE,1640
|
23
24
|
smartpush/utils/StringUtils.py,sha256=n8mo9k0JQN63MReImgv-66JxmmymOGknR8pH2fkQrAo,4139
|
24
25
|
smartpush/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
26
|
smartpush/utils/form_utils.py,sha256=ld-g_Dm_ZlnagQt7imYfUc87bcBRVlTctywuLtzmjXQ,849
|
26
|
-
smartpush-1.5.
|
27
|
-
smartpush-1.5.
|
28
|
-
smartpush-1.5.
|
29
|
-
smartpush-1.5.
|
27
|
+
smartpush-1.5.6.dist-info/METADATA,sha256=6KmjOu4G6bt-vHKfqmIs31lW_QRfpw6G7rk-Rhi8C5k,131
|
28
|
+
smartpush-1.5.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
29
|
+
smartpush-1.5.6.dist-info/top_level.txt,sha256=5_CXqu08EfbPaKLjuSAOAqCmGU6shiatwDU_ViBGCmg,10
|
30
|
+
smartpush-1.5.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|