-- 函数执行链路结构 -- { -- 执行函数 = { -- [200] = {func="必填,返回结果正常后的下一步执行"} -- [400] = {func="必填,设备本身识图等操作异常后的下一步执行"} -- [device_err] = {func="如果设备连续失败后的下一步执行,不配置默认回到main方法"} -- } -- } return { register_task_func = { ----- [注册] ----- device_check = { [200] = {func='main'} }, register_task = { [200] = {func="step1_open_app"}, [400] = {func="register_task"} }, step1_open_app = { [200] = {func="step2_aggre_protocol"}, [400] = {func="step1_open_app"}, device_err = {func="step1_open_app"} }, step2_aggre_protocol={ [200] = {func="step3_fill_email"}, [400] = {func="step1_open_app"}, [499] = {func="register_task"}, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='app store 商店同意协议错误' } } }, [600] = { func = "main", pre_handle = { func = "task_fail", param = { code = 600, reason='app store 头像重复定位' } } }, device_err = {func="step1_open_app"} }, step3_fill_email={ [200] = {func = "step4_fill_name" }, [400] = {func = "step1_open_app" }, [699] = { func = "main", pre_handle = { func = "task_fail", param = { code=699, reason='邮箱已注册' } } }, device_err = {func="step1_open_app"} }, step4_fill_name={ [200] = {func="step5_fill_payment"}, [400] = {func = "step1_open_app"}, device_err = {func="step1_open_app"} }, step5_fill_payment={ [200] = {func="step6_fill_phone"}, [400] = {func = "step1_open_app"}, device_err = {func="step1_open_app"} }, step6_fill_phone={ [200] = {func="step7_fill_phone_code"}, [400] = { func="main", pre_handle = { func = "task_fail", param = { code=400, reason='step6_fill_phone' } } }, device_err = {func="step1_open_app"} }, step7_fill_phone_code={ [200] = {func = "step8_email_code"}, [400] = { func = "main", pre_handle = { func = "task_fail", param = { code=400, reason='step7_fill_phone_code' } } }, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code=500, reason='获取手机验证码失败' } } }, [600] = { func = "main", pre_handle = { func = "task_fail", param = { code=600, reason='手机号使用上限' } } } }, step8_email_code={ [200] = {func = "step9_check_register_res"}, [400] = { func = "main", pre_handle = { func = "task_fail", param = { code=400, reason='step8_email_code' } } }, [600] = { func = "main", pre_handle = { func = "task_fail", param = { code=600, reason='获取邮箱验证码失败' } } }, [698] = { func = "main", pre_handle = { func = "task_fail", param = { code=698, reason='我们遇到了问题,请稍后再试' } } } }, step9_check_register_res={ [200] = {func = "verify_and_backup"}, [400] = { func = "main", pre_handle = { func = "task_fail", param = { code=400, reason='step9_check_register_res' } } }, [240] = { func = "main", pre_handle = { func = "task_fail", param = { code=240, reason='激活icloud失败' } } }, [698] = { func = "main", pre_handle = { func = "task_fail", param = { code=698, reason='我们遇到了问题,请稍后再试' } } } }, verify_and_backup = { [200] = {func = "main"}, [400] = {func = "verify_and_backup"}, [240] = { func = "main", pre_handle = { func = "task_fail", param = { code=240, reason='激活icloud失败' } } } } }, ----- [激活] ----- activate_task_func = { device_check = { [200] = {func='main'} }, activate_task = { [200] = {func="step1_open_app"}, [400] = {func="activate_task"}, [401] = { func = "main", pre_handle = { func = "task_fail", param = { code=401, reason='账号不存在' } } }, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code=499, reason='封号(新IC协议)' } } }, device_err = {func="activate_task"} }, step1_open_app = { [200] = {func="activate_step1_in_account_info"}, [400] = {func="step1_open_app"}, device_err = {func="step1_open_app"} }, activate_step1_in_account_info = { [200] = {func="activate_step2_open_set"}, [400] = {func="step1_open_app"}, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code = 499, reason='账号已被封禁' } } }, device_err = {func="main"} }, activate_step2_open_set = { [200] = {func="activate_step3_open_no_pwd"}, [400] = {func="activate_step2_open_set"}, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code = 499, reason='账号已被封禁' } } }, device_err = {func="activate_step2_open_set"} }, activate_step3_open_no_pwd = { [200] = {func="activate_backup"}, [400] = {func="activate_step2_open_set"}, device_err = {func="activate_step2_open_set"} }, activate_backup = { [200] = {func = "main"} } }, ----- [抓包任务] ----- grab_app_task_func = { device_check = { [200] = {func='main'} }, grab_app_task = { [200] = {func="step1_open_search"}, [400] = {func="grab_app_task"}, [600] = { func = "main", pre_handle = { func = "task_fail", param = { code=600, reason='ad2.plist文件丢失...' } } }, device_err = {func="grab_app_task"} }, step1_open_search = { [200] = {func="main"}, [400] = {func="step1_open_search"}, device_err = {func="grab_app_task"} } }, ----- [沉睡任务] ----- sleep_task_func = { device_check = { [200] = {func='main'} }, get_task_sleep = { [200] = {func="main"} } }, ----- [配置排行任务] ----- set_app_rank_func = { device_check = { [200] = {func='main'} }, set_app_rank_task = { [200] = {func='main'} }, }, ----- [app store订阅] ----- download_task_func = { device_check = { [200] = {func='main'} }, download_restore_account = { [200] = {func='step1_download_app'}, [400] = {func="download_app_task"}, [401] = { func = "main", pre_handle = { func = "download_account_not_found" } }, device_err = {func="download_restore_account"} }, step1_download_app = { [200] = {func='main'}, [400] = {func="step1_download_app"}, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code=499, reason='账号未激活...' } } }, [503] = { func = "main", pre_handle = { func = "task_fail", param = { code=503, reason='账号已订阅该项目...' } } }, } }, ----- [relogin] ----- relogin_task_func = { relogin_check = { [200] = {func='main'} }, relogin_task = { [200] = {func='new_relogin'}, [401] = { func = "main", pre_handle = { func = "task_fail", param = { code = 400, reason='验证码错误' } } } }, new_relogin = { [200] = {func="step2_check_set_app"}, [400] = {func="relogin_task"}, [401] = { func = "main", pre_handle = { func = "task_fail", param = { code = 400, reason='异常弹窗,需要重新派发任务' } } }, [403] = { func = "main", pre_handle = { func = "task_fail", param = { code = 400, reason='异常弹窗,需要重新派发任务' } } }, [498] = { func = "main", pre_handle = { func = "task_fail", param = { code = 498, reason='账号或密码错误' } } }, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code = 499, reason='账号已被封禁' } } }, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='手机验证码获取失败...' } } }, }, step2_check_set_app = { [200] = {func = "main"}, [400] = {func="step2_check_set_app"} }, step1_open_app = { [200] = {func='step2_account_login'}, [400] = {func="step1_open_app"}, }, step2_account_login = { [200] = {func='step3_get_phone_code'}, [299] = {func="step5_verify_icloud"}, [400] = {func="step1_open_app"}, [403] = { func = "main", pre_handle = { func = "task_fail", param = { code = 403, reason='账号被锁定' } } }, [600] = { func = "main", pre_handle = { func = "task_fail", param = { code = 600, reason='账号密码错误' } } }, device_err = {func="step1_open_app"} }, step3_get_phone_code = { [200] = {func='step4_verify_login'}, [400] = {func="step1_open_app"}, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='获取验证码失败' } } }, }, step4_verify_login = { [200] = {func='step5_verify_icloud'}, [400] = {func="step1_open_app"}, }, step5_verify_icloud = { [200] = {func="verify_and_backup"}, [400] = {func="step5_verify_icloud"}, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='验证是否登录icloud失败' } } }, }, verify_and_backup = { [200] = {func = "main"}, [400] = {func = "verify_and_backup"}, [240] = { func = "main", pre_handle = { func = "task_fail", param = { code=240, reason='激活icloud失败' } } } } }, appstore_relogin_task_func = { relogin_task = { [200] = {func='step1_open_app'}, [400] = { func = "main", pre_handle = { func = "task_fail", param = { code = 400, reason='网络异常' } } } }, step1_open_app = { [200] = {func='step2_login_account'}, [400] = {func = "step1_open_app"}, }, step2_login_account = { [200] = {func='step3_open_icloud'}, [400] = {func = "step1_open_app"}, [499] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='账号锁定' } } }, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='封号(需要二次输入密码)' } } } }, step3_open_icloud = { [200] = {func='verify_and_backup'}, [400] = {func = "step3_open_icloud"}, [500] = { func = "main", pre_handle = { func = "task_fail", param = { code = 500, reason='IC激活失败' } } } }, verify_and_backup = { [200] = {func = "main"}, [400] = {func = "verify_and_backup"}, [240] = { func = "main", pre_handle = { func = "task_fail", param = { code=240, reason='激活icloud失败' } } } } }, ----- [更新命令] ----- update_extension_func = { update_extension_check = { [200] = {func='main'} }, run_extension = { [200] = {func='main'}, } } }