pull/16/head
youngS 4 years ago
parent ea6e2fab44
commit 6c1137afdc
  1. 8
      fir_client/src/main.js
  2. 8
      fir_ser/api/utils/storage/caches.py

@ -17,12 +17,12 @@ import VueCookies from 'vue-cookies'
Vue.use(VueCookies); Vue.use(VueCookies);
//导入全局的geetest.js //导入全局的 geetest.js
import './assets/gt' import '@/assets/gt.js'
//导入store实例 //导入store实例
import store from "./store"; import store from "@/store";
//全局导航守卫 //全局导航守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
@ -157,7 +157,7 @@ Vue.use(Vuex);
import VueLazyload from 'vue-lazyload' import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, { Vue.use(VueLazyload, {
loading: require('./assets/loading.gif'), loading: require('@/assets/loading.gif'),
preLoad: 1 preLoad: 1
}); });

@ -5,7 +5,8 @@
# date: 2020/4/7 # date: 2020/4/7
from django.core.cache import cache 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 import time, os
from django.utils import timezone from django.utils import timezone
from fir_ser.settings import CACHE_KEY_TEMPLATE, SERVER_DOMAIN, SYNC_CACHE_TO_DATABASE, DEFAULT_MOBILEPROVISION, \ 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): def check_user_has_all_download_times(app_obj):
user_id = app_obj.user_id_id 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) return get_user_free_download_times(user_id, auth_status=auth_status) > 0 or check_user_can_download(user_id)

Loading…
Cancel
Save