Commit d73333e9 by sikang

update script

parent 35eb8cb7
...@@ -3,7 +3,7 @@ echo "1、同盾列表添加最少选择数量" ...@@ -3,7 +3,7 @@ echo "1、同盾列表添加最少选择数量"
echo -n "请输入指令编号:" echo -n "请输入指令编号:"
read commod read commod
if (($commod == '0')) if (($commod == '1'))
then then
chmod a+x thirdpart_list.py chmod a+x thirdpart_list.py
./thirdpart_list.py ./thirdpart_list.py
......
...@@ -25,7 +25,6 @@ def code_loanapplyfragment(path): ...@@ -25,7 +25,6 @@ def code_loanapplyfragment(path):
flag4 = False flag4 = False
brackets = 0 brackets = 0
for line in lines: for line in lines:
if "getPresenter(LoanPresenter.class).checkQualification(\"action_checkQualification\");" in line: if "getPresenter(LoanPresenter.class).checkQualification(\"action_checkQualification\");" in line:
code = "\n\t\t\t\t\tnew LoanApplyProxy(getActivity(), this, productBean).startLoan(basicAck -> {\n" + \ code = "\n\t\t\t\t\tnew LoanApplyProxy(getActivity(), this, productBean).startLoan(basicAck -> {\n" + \
"\t\t\t\t\t\tnew EventSender.Builder(MessageID.LOAN_STATUS_CHANGED).build().sendEvent();\n" + \ "\t\t\t\t\t\tnew EventSender.Builder(MessageID.LOAN_STATUS_CHANGED).build().sendEvent();\n" + \
...@@ -36,7 +35,7 @@ def code_loanapplyfragment(path): ...@@ -36,7 +35,7 @@ def code_loanapplyfragment(path):
if "case \"action_checkQualification\":" in line: if "case \"action_checkQualification\":" in line:
flag3 = True flag3 = True
if flag3: if flag3:
flag3 = "// " + line line = "// " + line
if "break;" in line: if "break;" in line:
flag3 = False; flag3 = False;
...@@ -51,11 +50,13 @@ def code_loanapplyfragment(path): ...@@ -51,11 +50,13 @@ def code_loanapplyfragment(path):
# 1 # 1
if "public void startFaceVerify() {" in line: if "public void startFaceVerify() {" in line:
flag1 = True flag1 = True
brackets = get_brackets(line)
if flag1 and brackets > 0: if flag1:
line = "// " + line line = "// " + line
brackets += get_brackets(line) brackets += get_brackets(line)
if brackets == 0:
flag1=False
f_w.write(line) f_w.write(line)
print ("code_LoanAppFragment updated !") print ("code_LoanAppFragment updated !")
return return
...@@ -153,14 +154,12 @@ def code_certifyprogress(path): ...@@ -153,14 +154,12 @@ def code_certifyprogress(path):
"\t\t\t\taccountFragment.setArguments(getIntent().getExtras());\n" + \ "\t\t\t\taccountFragment.setArguments(getIntent().getExtras());\n" + \
"\t\t\t\tstartFragment(accountFragment, false);\n" "\t\t\t\tstartFragment(accountFragment, false);\n"
line = line + code line = line + code
f_w.write(line)
f_w.write(line)
print ("code_fragments updated !") print ("code_fragments updated !")
return return
for root, dirs, files in os.walk("../../app/src/main"): for root, dirs, files in os.walk("../../../app/src/main"):
directory = os.path.join(os.getcwd(), root) directory = os.path.join(os.getcwd(), root)
for file in files: for file in files:
if file.endswith("LoanApplyFragment.java"): if file.endswith("LoanApplyFragment.java"):
...@@ -172,7 +171,7 @@ for root, dirs, files in os.walk("../../app/src/main"): ...@@ -172,7 +171,7 @@ for root, dirs, files in os.walk("../../app/src/main"):
code_certifyactivity(path) code_certifyactivity(path)
elif file.endswith("IdentityInfoFragment.java") or file.endswith( elif file.endswith("IdentityInfoFragment.java") or file.endswith(
"PersonalInfoFragment.java") or file.endswith( "PersonalInfoFragment.java") or file.endswith(
"ContactInfoFragment.java") or file.endswith("ProfessionalFragment.java") "ContactInfoFragment.java") or file.endswith("ProfessionalFragment.java"):
path = os.path.join(directory, file) path = os.path.join(directory, file)
code_fragments(path) code_fragments(path)
elif file.endswith("CertifyProgressActivity.java"): elif file.endswith("CertifyProgressActivity.java"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment