From 6c1137afdc95baf3c90904ee1f3bbd3337e71328 Mon Sep 17 00:00:00 2001 From: youngS Date: Fri, 9 Apr 2021 17:55:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/src/main.js | 8 ++++---- fir_ser/api/utils/storage/caches.py | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/fir_client/src/main.js b/fir_client/src/main.js index b2d38bd..12a3fb0 100644 --- a/fir_client/src/main.js +++ b/fir_client/src/main.js @@ -17,12 +17,12 @@ import VueCookies from 'vue-cookies' Vue.use(VueCookies); -//导入全局的geetest.js -import './assets/gt' +//导入全局的 geetest.js +import '@/assets/gt.js' //导入store实例 -import store from "./store"; +import store from "@/store"; //全局导航守卫 router.beforeEach((to, from, next) => { @@ -157,7 +157,7 @@ Vue.use(Vuex); import VueLazyload from 'vue-lazyload' Vue.use(VueLazyload, { - loading: require('./assets/loading.gif'), + loading: require('@/assets/loading.gif'), preLoad: 1 }); diff --git a/fir_ser/api/utils/storage/caches.py b/fir_ser/api/utils/storage/caches.py index 556c47c..de3389b 100644 --- a/fir_ser/api/utils/storage/caches.py +++ b/fir_ser/api/utils/storage/caches.py @@ -5,7 +5,8 @@ # date: 2020/4/7 from django.core.cache import cache -from api.models import Apps, UserInfo, AppReleaseInfo, AppUDID, APPToDeveloper, APPSuperSignUsedInfo +from api.models import Apps, UserInfo, AppReleaseInfo, AppUDID, APPToDeveloper, APPSuperSignUsedInfo, \ + UserCertificationInfo import time, os from django.utils import timezone from fir_ser.settings import CACHE_KEY_TEMPLATE, SERVER_DOMAIN, SYNC_CACHE_TO_DATABASE, DEFAULT_MOBILEPROVISION, \ @@ -374,7 +375,10 @@ def add_user_download_times(user_id, download_times=0): def check_user_has_all_download_times(app_obj): user_id = app_obj.user_id_id - auth_status = app_obj.user_id__certification__status + user_cert_obj = UserCertificationInfo.objects.filter(user_id=user_id).first() + auth_status = False + if user_cert_obj and user_cert_obj.status == 2: + auth_status = True return get_user_free_download_times(user_id, auth_status=auth_status) > 0 or check_user_can_download(user_id)