状态展示优化

dependabot/npm_and_yarn/fir_admin/url-parse-1.5.10
MMXX 3 years ago
parent a8c1df58ee
commit de511bf90c
  1. 2
      fir_client/vue.config.js
  2. 5
      fir_ser/api/utils/app/iossignapi.py
  3. 5
      fir_ser/api/utils/crontab/ctasks.py
  4. 4
      fir_ser/api/views/supersign.py
  5. 5
      fir_ser/fir_ser/settings.py

@ -82,7 +82,7 @@ if (page) {
} }
} }
const version='1.4.1'; const version='1.4.2';
const pro_base_env = { const pro_base_env = {
baseUrl: 'https://flyapps.cn', baseUrl: 'https://flyapps.cn',

@ -18,7 +18,7 @@ from api.utils.app.shellcmds import shell_command, use_user_pass
from api.utils.apple.appleapiv3 import AppStoreConnectApi from api.utils.apple.appleapiv3 import AppStoreConnectApi
from common.base.baseutils import get_format_time, format_apple_date, make_app_uuid from common.base.baseutils import get_format_time, format_apple_date, make_app_uuid
from common.cache.state import CleanErrorBundleIdSignDataState from common.cache.state import CleanErrorBundleIdSignDataState
from fir_ser.settings import SUPER_SIGN_ROOT from fir_ser.settings import SUPER_SIGN_ROOT, DEVELOPER_WRITE_STATUS
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -237,7 +237,8 @@ class AppDeveloperApiV2(object):
if attr.__name__ in ['active', 'get_device']: if attr.__name__ in ['active', 'get_device']:
return attr(*args, **kwargs) return attr(*args, **kwargs)
else: else:
if AppIOSDeveloperInfo.objects.filter(pk=self.developer_pk, status__in=[1, 3, 4]).first(): if AppIOSDeveloperInfo.objects.filter(pk=self.developer_pk,
status__in=DEVELOPER_WRITE_STATUS).first():
start_time = time.time() start_time = time.time()
logger.info(f'{self.issuer_id} calling {attr.__name__} time:{start_time}') logger.info(f'{self.issuer_id} calling {attr.__name__} time:{start_time}')
result = attr(*args, **kwargs) result = attr(*args, **kwargs)

@ -14,7 +14,8 @@ from api.models import Apps, UserInfo, AppIOSDeveloperInfo
from api.utils.app.supersignutils import IosUtils from api.utils.app.supersignutils import IosUtils
from api.utils.storage.storage import Storage from api.utils.storage.storage import Storage
from api.utils.utils import send_ios_developer_active_status from api.utils.utils import send_ios_developer_active_status
from fir_ser.settings import CACHE_KEY_TEMPLATE, SYNC_CACHE_TO_DATABASE, SUPER_SIGN_ROOT, MSGTEMPLATE from fir_ser.settings import CACHE_KEY_TEMPLATE, SYNC_CACHE_TO_DATABASE, SUPER_SIGN_ROOT, MSGTEMPLATE, \
DEVELOPER_AUTO_CHECK_STATUS
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -65,7 +66,7 @@ def auto_delete_ios_mobile_tmp_file():
def auto_check_ios_developer_active(): def auto_check_ios_developer_active():
all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=[1, 2]) all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=DEVELOPER_AUTO_CHECK_STATUS)
error_issuer_id = {} error_issuer_id = {}
for ios_developer in all_ios_developer: for ios_developer in all_ios_developer:
userinfo = ios_developer.user_id userinfo = ios_developer.user_id

@ -25,7 +25,7 @@ from api.utils.storage.caches import get_app_download_url
from api.utils.utils import get_developer_devices from api.utils.utils import get_developer_devices
from common.base.baseutils import get_choices_dict, get_choices_name_from_key from common.base.baseutils import get_choices_dict, get_choices_name_from_key
from common.cache.state import CleanSignDataState from common.cache.state import CleanSignDataState
from fir_ser.settings import DEVELOPER_USE_STATUS from fir_ser.settings import DEVELOPER_USE_STATUS, DEVELOPER_DISABLED_STATUS
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -73,7 +73,7 @@ class DeveloperView(APIView):
res.data = developer_serializer.data res.data = developer_serializer.data
res.count = developer_obj.count() res.count = developer_obj.count()
res.status_choices = get_choices_dict(AppIOSDeveloperInfo.status_choices, [2, 4, 5]) res.status_choices = get_choices_dict(AppIOSDeveloperInfo.status_choices, DEVELOPER_DISABLED_STATUS)
res.apple_auth_list = get_choices_dict(AppIOSDeveloperInfo.auth_type_choices) res.apple_auth_list = get_choices_dict(AppIOSDeveloperInfo.auth_type_choices)
return Response(res.dict) return Response(res.dict)

@ -249,7 +249,12 @@ USER_FREE_DOWNLOAD_TIMES = 5
AUTH_USER_FREE_DOWNLOAD_TIMES = 10 AUTH_USER_FREE_DOWNLOAD_TIMES = 10
NEW_USER_GIVE_DOWNLOAD_TIMES = 100 NEW_USER_GIVE_DOWNLOAD_TIMES = 100
AUTH_USER_GIVE_DOWNLOAD_TIMES = 200 AUTH_USER_GIVE_DOWNLOAD_TIMES = 200
# (-1, '疑似被封'), (0, '未激活'), (1, '已激活'), (2, '协议待同意'), (3, '维护中'), (4, '证书过期'), (5, '状态异常')
DEVELOPER_USE_STATUS = [1, 2, 3, 4, 5] # 开发者可用状态,详情查看 model.AppIOSDeveloperInfo DEVELOPER_USE_STATUS = [1, 2, 3, 4, 5] # 开发者可用状态,详情查看 model.AppIOSDeveloperInfo
DEVELOPER_AUTO_CHECK_STATUS = [1, 2] # 定时认证自动检测
DEVELOPER_WRITE_STATUS = [1, 3, 4] # 开发者api写操作查询
DEVELOPER_DISABLED_STATUS = [2, 4, 5] # 开发者不可 修改为状态
SYNC_CACHE_TO_DATABASE = { SYNC_CACHE_TO_DATABASE = {
'download_times': 10, # 下载次数同步时间 'download_times': 10, # 下载次数同步时间

Loading…
Cancel
Save