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