|
|
|
@ -1,6 +1,6 @@ |
|
|
|
// pages/administ/index.js
|
|
|
|
import Scene from './scene' |
|
|
|
import { getMessageList } from "../../api/saas" |
|
|
|
import { getMessageList, getFactoryLicence } from "../../api/saas" |
|
|
|
import { headerFactoryId } from "../../api/user" |
|
|
|
const event = require('../../utils/event') |
|
|
|
const util = require('../../utils/util') |
|
|
|
@ -75,6 +75,7 @@ Scene({ |
|
|
|
factory.index = nIndex |
|
|
|
children.push(factory) |
|
|
|
} |
|
|
|
this.checkLincense() |
|
|
|
enterprise.children = children |
|
|
|
this.data.items.push(enterprise) |
|
|
|
} |
|
|
|
@ -169,9 +170,22 @@ Scene({ |
|
|
|
if (pageView && this.data.tabIndex != 3) { |
|
|
|
pageView.fetchStatisticsInfo(true) |
|
|
|
} |
|
|
|
this.checkLincense() |
|
|
|
event.emit('EventMessage', { what: 999, desc: 'changeFactory' }) |
|
|
|
this.setData({ visible: false, factoryId: detail.id, factoryName: detail.text }) |
|
|
|
}, |
|
|
|
checkLincense: function(){ |
|
|
|
getFactoryLicence().then(result => { |
|
|
|
if(!result.data.expirationTime){ |
|
|
|
return |
|
|
|
} |
|
|
|
app.userInfo.expirationTime = result.data.expirationTime.substring(0, 10) |
|
|
|
app.userInfo.isExpiration = result.data.isExpiration |
|
|
|
if(app.userInfo.isExpiration && this.onAttention){ |
|
|
|
this.onAttention('您打包站的授权已过期,部分功能将无法使用,为了顺利使用,请您去续费。') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
onUnload: function(){ |
|
|
|
event.remove('EventMessage', this) |
|
|
|
if(this.data.setInter) { |
|
|
|
|