From e65c4102f0175d666746936381c3dee278358a72 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期二, 27 十月 2020 16:22:00 +0800
Subject: [PATCH] 添加apps.json代理,整理代码

---
 src/pages/desktop/index/App.vue |   37 +++++++------------------------------
 1 files changed, 7 insertions(+), 30 deletions(-)

diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue
index 9b48ad9..9596368 100644
--- a/src/pages/desktop/index/App.vue
+++ b/src/pages/desktop/index/App.vue
@@ -27,13 +27,13 @@
   components: {
     Desktop, NotificationCenter, NoticeTip, Tools, ToolsEntry
   },
-  data () {
+  data() {
     return {
       buttonAuthority: sessionStorage.getItem('buttonAuthoritys') || []
     }
   },
   computed: {
-    isAdmin () {
+    isAdmin() {
       if (
         sessionStorage.getItem('userInfo') &&
         sessionStorage.getItem('userInfo') !== ''
@@ -46,7 +46,7 @@
       return false
     }
   },
-  mounted () {
+  mounted() {
     document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL;
     this.showApps();
 
@@ -79,36 +79,13 @@
     });
   },
   methods: {
-    showApps () {
+    showApps() {
       let _that = this;
 
       getApps().then(rsp => {
         if (rsp && rsp.success) {
           _that.$store.state.desktop.docks = [];
           let installedApps = [];
-          let testObj = {
-            id: 'tjcxjq',
-            create_by: 'test',
-            create_time: '',
-            height: 675,
-            icon: '../../images/app-mid/search.png',
-            installed: true,
-            isDelete: 0,
-            isUpgrade: false,
-            title: '缁熻鏌ヨ(闆嗙兢)',
-            name: '缁熻鏌ヨ(闆嗙兢)',
-            remoteVersion: '',
-            type: '2',
-            update_by: '',
-            update_time: '',
-            url: "/view/searchForCluster/",
-            version: '1.0.0',
-            width: 1344,
-            isDefault: false
-          };
-   
-          console.log(rsp.data);
-          rsp.data.push(testObj);
 
           rsp.data.forEach(function (item) {
             if (item.installed) {
@@ -157,7 +134,7 @@
     addWeather: function (weather) {
       this.$store.commit('desktop/addWeather', weather);
     },
-    screenShot (dock) {
+    screenShot(dock) {
       //鎵惧埌褰撳墠鐨刬frame
       let curIframe = Array.from(document.querySelectorAll('iframe')).find(iframe => iframe.src.indexOf(dock.url) >= 0);
       //淇濆瓨褰撳墠搴旂敤蹇収
@@ -203,12 +180,12 @@
   width: 100%;
   height: 100%;
   background-size: 100% 100%;
-  background-image: url('/images/desktop/background.png');
+  background-image: url("/images/desktop/background.png");
   background-attachment: fixed;
 }
 
 .clearFix:after {
-  content: '';
+  content: "";
   display: block;
   height: 0;
   clear: both;

--
Gitblit v1.8.0