| | |
| | | const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) |
| | | const NormalForm = asyncComponent(() => import('@/components/normalform')) |
| | | |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | sessionStorage.setItem('appType', 'mob') // 应用类型 |
| | | document.body.className = '' |
| | | window.GLOB.CacheIndependent = new Map() |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | setTimeout(() => { |
| | | this.getAppPictures() |
| | | }, 1000) |
| | | |
| | | document.onkeydown = (event) => { |
| | | let e = event || window.event |
| | | let keyCode = e.keyCode || e.which || e.charCode |
| | |
| | | } |
| | | |
| | | getAppMessage = (MenuID) => { |
| | | Api.getSystemConfig({ |
| | | Api.getCloudConfig({ |
| | | func: 's_get_keyids', |
| | | bid: sessionStorage.getItem('appId') |
| | | }).then(res => { |
| | |
| | | sessionStorage.setItem('appViewList', JSON.stringify(appViewList)) |
| | | this.props.history.replace('/imdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({MenuID: MenuID, type: 'view'})))) |
| | | window.location.reload() |
| | | }) |
| | | } |
| | | |
| | | getAppPictures = () => { |
| | | if (sessionStorage.getItem('app_pictures')) return |
| | | |
| | | let deffers = [] |
| | | let param = { |
| | | func: 's_url_db_adduptdel', |
| | | PageIndex: 0, // 0 代表全部 |
| | | PageSize: 0, // 0 代表全部 |
| | | type: 'search' |
| | | } |
| | | deffers = [new Promise(resolve => { |
| | | setTimeout(() => { |
| | | Api.getSystemConfig({...param, typecharone: 'image'}).then(res => { |
| | | resolve(res.data) |
| | | }) |
| | | }, 500) |
| | | }), new Promise(resolve => { |
| | | setTimeout(() => { |
| | | Api.getSystemConfig({...param, typecharone: 'video'}).then(res => { |
| | | resolve(res.data) |
| | | }) |
| | | }, 1000) |
| | | }), new Promise(resolve => { |
| | | setTimeout(() => { |
| | | Api.getSystemConfig({...param, typecharone: 'color'}).then(res => { |
| | | resolve(res.data) |
| | | }) |
| | | }, 1500) |
| | | })] |
| | | |
| | | Promise.all(deffers).then(response => { |
| | | sessionStorage.setItem('app_pictures', JSON.stringify(response[0] || [])) |
| | | sessionStorage.setItem('app_videos', JSON.stringify(response[1] || [])) |
| | | sessionStorage.setItem('app_colors', JSON.stringify(response[2] || [])) |
| | | }) |
| | | } |
| | | |
| | |
| | | MenuID: MenuId |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) |
| | | |
| | | Api.getSystemConfig(_param).then(res => { |
| | | Api.getCloudConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | Api.getCloudConfig(param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |