Browse Source

修改慢的接口

11wqe1 1 tuần trước cách đây
mục cha
commit
2535f3821e
3 tập tin đã thay đổi với 51 bổ sung51 xóa
  1. 27 27
      src/store/modules/user.js
  2. 1 1
      src/views/HomeView.vue
  3. 23 23
      src/views/homepageL.vue

+ 27 - 27
src/store/modules/user.js

@@ -226,23 +226,23 @@ const actions = {
         i.argumentList = JSON.parse(i.argumentList);
       });
 
-      let params3 = [
-				{
-					functionName: "select_schUsuallyApp",
-					userid: "",
-					stand: "cn",
-				},
-			];
-			let res3 = await axios.post(API_CONFIG.baseUrl, params3)
+      // let params3 = [
+			// 	{
+			// 		functionName: "select_schUsuallyApp",
+			// 		userid: "",
+			// 		stand: "cn",
+			// 	},
+			// ];
+			// let res3 = await axios.post(API_CONFIG.baseUrl, params3)
       
 
-			let _list = res3.data[0]
+			// let _list = res3.data[0]
 
-			_list.forEach((i) => {
-				i.json = JSON.parse(i.json);
-			});
+			// _list.forEach((i) => {
+			// 	i.json = JSON.parse(i.json);
+			// });
 
-			let appList = _list;
+			// let appList = _list;
 
       // 第三步
       perData.desktop.list.forEach((i, index) => {
@@ -282,21 +282,21 @@ const actions = {
       // }
 
 
-      if (perData.admin.CampusF && perData.admin.CampusF.appList) {
-				perData.admin.CampusF.appList.forEach((i, index) => {
-					let _index = appList.findIndex((i2) => i.id == i2.id);
+      // if (perData.admin.CampusF && perData.admin.CampusF.appList) {
+			// 	perData.admin.CampusF.appList.forEach((i, index) => {
+			// 		let _index = appList.findIndex((i2) => i.id == i2.id);
           
-					if (_index != -1) {
-						let _setData = appList[_index];
-						_setData.setIcon = i.setIcon;
-						perData.admin.CampusF.appList[index] = _setData;
-					} else {
-						console.log("无应用", i);
-					}
-				});
-        perData.admin.CampusF.appList = perData.admin.CampusF.appList.filter(Boolean);
-        // perData.admin.CampusF.appList = perData.admin.CampusF.appList.filter(i => i.label !== undefined)
-			}
+			// 		if (_index != -1) {
+			// 			let _setData = appList[_index];
+			// 			_setData.setIcon = i.setIcon;
+			// 			perData.admin.CampusF.appList[index] = _setData;
+			// 		} else {
+			// 			console.log("无应用", i);
+			// 		}
+			// 	});
+      //   perData.admin.CampusF.appList = perData.admin.CampusF.appList.filter(Boolean);
+      //   // perData.admin.CampusF.appList = perData.admin.CampusF.appList.filter(i => i.label !== undefined)
+			// }
 
 
 			perData.admin.index.list.forEach((i, index) => {

+ 1 - 1
src/views/HomeView.vue

@@ -559,7 +559,7 @@ export default {
 		async getPer() {
 			this.clearifa = "";
 			// 查询首页应用
-			this.$refs.homepageLRef.getData();
+			// this.$refs.homepageLRef.getData();
 			//查询cocofrow最近使用与收藏
 			if (this.roleUser.type == 1) {
 				this.$refs.sidebarLRef.getData();

+ 23 - 23
src/views/homepageL.vue

@@ -11,7 +11,7 @@
 import topPage from '../components/topPage'
 // import botPage from '../components/botPage'
 import { mapGetters } from 'vuex';
-import { API_CONFIG } from "@/common/apiConfig";
+// import { API_CONFIG } from "@/common/apiConfig";
 
     export default {
         computed: {
@@ -35,7 +35,7 @@ import { API_CONFIG } from "@/common/apiConfig";
             // 获取后台管理设置常见应用
             getadmincocoFlow(){
                 // 获取已添加cocoFlow应用
-                this.$refs.topPageRef.getData()
+                // this.$refs.topPageRef.getData()
 
                 this.$refs.topPageRef.getAdmincocoFlow()
                 console.log('333');
@@ -43,30 +43,30 @@ import { API_CONFIG } from "@/common/apiConfig";
             },
 
             // 查询首页应用
-            getData(){
+            // getData(){
                 
-                let params = [
-                    {
-                        functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
-                        uid: this.roleUser.userid, 
-                        cn: this.$region, 
-                    },
-                ];
+            //     let params = [
+            //         {
+            //             functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称
+            //             uid: this.roleUser.userid, 
+            //             cn: this.$region, 
+            //         },
+            //     ];
                 
-                // 发起请求
-                this.$ajax
-                    .post(API_CONFIG.baseUrl, params)
-                    .then((res) => {
-                        console.log(res);
-                        let data = res.data
-                        // this.CocoFlowList = data[0]
-                        this.hotApp = [data[1],data[2],data[3],data[4],]
+            //     // 发起请求
+            //     this.$ajax
+            //         .post(API_CONFIG.baseUrl, params)
+            //         .then((res) => {
+            //             console.log(res);
+            //             let data = res.data
+            //             // this.CocoFlowList = data[0]
+            //             this.hotApp = [data[1],data[2],data[3],data[4],]
 
-                    })
-                    .catch((err) => {
-                        console.error("请求失败,错误信息:", err);
-                    });
-            },
+            //         })
+            //         .catch((err) => {
+            //             console.error("请求失败,错误信息:", err);
+            //         });
+            // },
             cutUrl(val){
                 this.$emit('AddAppJson',val)
             },