|
@@ -385,6 +385,8 @@ class CommonService:
|
|
|
|
|
|
@staticmethod
|
|
|
def decode_data(content, start=1, end=4):
|
|
|
+ if not content:
|
|
|
+ return ''
|
|
|
try:
|
|
|
for i in range(start, end):
|
|
|
if i == 1:
|
|
@@ -408,6 +410,8 @@ class CommonService:
|
|
|
|
|
|
@staticmethod
|
|
|
def encode_data(content, start=1, end=4):
|
|
|
+ if not content:
|
|
|
+ return ''
|
|
|
for i in range(start, end):
|
|
|
if i == 1:
|
|
|
content = CommonService.RandomStr(3, False) + content + CommonService.RandomStr(3, False)
|