consumer exceed
This commit is contained in:
parent
add0356940
commit
1d91970f70
|
@ -69,9 +69,9 @@ App({
|
|||
globalData: {
|
||||
userInfo: {},
|
||||
userinfo: {}, // 服务器传回的消费者信息
|
||||
host: 'https://apitest.ahctc.cn',
|
||||
//host: 'https://apitest.ahctc.cn',
|
||||
mediahost: 'https://apitest.ahctc.cn',
|
||||
//host: 'http://127.0.0.1:8000',
|
||||
host: 'http://127.0.0.1:8000',
|
||||
//mediahost: 'http://127.0.0.1:8000',
|
||||
token : '',
|
||||
}
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": false,
|
||||
"userConfirmedUseCompilerModuleSwitch": false
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"compileHotReLoad": false,
|
||||
"useIsolateContext": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.10.3",
|
||||
|
|
|
@ -4,6 +4,7 @@ from crm.models import Consumer
|
|||
from rest_framework.permissions import IsAuthenticated
|
||||
from django.core.cache import cache
|
||||
from django.utils import timezone
|
||||
from datetime import datetime
|
||||
# 学员接口列表
|
||||
ConsumerPerms = [
|
||||
'paper_view',
|
||||
|
@ -23,7 +24,7 @@ VistorPerms = [
|
|||
]
|
||||
def get_consumerperm_list(consumer):
|
||||
perms = consumer.role.perms.values_list('code', flat=True)
|
||||
if consumer.exceed_date < timezone.now():
|
||||
if consumer.exceed_date < datetime.date(timezone.now()):
|
||||
perms.append('account_exceed')
|
||||
cache.get_or_set('cperms_'+str(consumer.id), perms)
|
||||
return perms
|
||||
|
|
Loading…
Reference in New Issue