haoxuan
2023-08-31 401524fb5661d57ffb2229d683fe4de85b65fd1c
src/pages/desktop/index/App.vue
@@ -20,6 +20,8 @@
import { getApps } from '@/api/app'
import { findAllSdk } from '@/api/taskMange'
import config from '../../../../package.json'
export default {
  name: 'app',
  components: {
@@ -65,14 +67,13 @@
        id: 'N2',
        icon: '/images/desktop/message.png',
        tip: '消息',
        title: 'SmartAi',
        body: 'v1.0.0',
        title: 'SmartAI',
        body: 'V' + config.version,
        time: new Date()
      }, true);
    }, 1000);
    window.addEventListener('message', (e) => {
      if (e.data.msg == 'AppUpdate') {
        console.log('应用更新')
        this.showApps();
      }
    });
@@ -85,6 +86,7 @@
        if (rsp && rsp.success) {
          _that.$store.state.desktop.docks = [];
          let installedApps = [];
          rsp.data
          rsp.data.forEach(function (item) {
            if (item.installed) {
              let temp = {
@@ -108,7 +110,7 @@
                width: item.width,
                isDefault: item.isDefault
              }
              // 判断权限
              if (_that.isAdmin || _that.buttonAuthority.indexOf(item.package) >= 0) {
                _that.$store.commit('desktop/addDock', temp);