Fix item code generation
This commit is contained in:
parent
2b1377cc29
commit
57740be0a1
|
@ -114,7 +114,7 @@ def CgiGetCode():
|
|||
if gotchiPoints < 0 or gotchiPoints > 5:
|
||||
output['ResultCode']="ERROR"
|
||||
return
|
||||
if itemId < 0 or itemId > 999:
|
||||
if itemId < 0 or itemId > 99:
|
||||
output['ResultCode']="ERROR"
|
||||
return
|
||||
if codeType < 0 or codeType > 4:
|
||||
|
@ -139,13 +139,13 @@ def CgiGetCode():
|
|||
tamaIndex = GetTamaIndex(loginNo,type)
|
||||
|
||||
iid = str(itemId)
|
||||
while len(iid) != 3:
|
||||
while len(iid) != 2:
|
||||
iid = "0"+iid
|
||||
ggp = str(gotchiPoints)
|
||||
while len(ggp) != 2:
|
||||
ggp = "0"+ggp
|
||||
|
||||
logoutNo = str(codeType)+str(region)+iid+str(tamaIndex[0])+ggp+str(tamaIndex[1])
|
||||
logoutNo = str(codeType)+str(region)+iid[0]+"0"+iid[1]+str(tamaIndex[0])+ggp+str(tamaIndex[1])
|
||||
logoutNo += str(CheckBit(logoutNo,False,9))
|
||||
output['PasswordUp'] = logoutNo[:5]
|
||||
output['PasswordDown'] = logoutNo[5:]
|
||||
|
|
Loading…
Reference in New Issue
Block a user