guhongwei il y a 4 ans
Parent
commit
0f93b790f6
2 fichiers modifiés avec 7 ajouts et 6 suppressions
  1. 1 1
      src/store/user.js
  2. 6 5
      src/views/dynamic/parts/userTwo.vue

+ 1 - 1
src/store/user.js

@@ -9,7 +9,7 @@ const state = () => ({});
 const mutations = {};
 
 const actions = {
-  async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
+  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
     const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
     return res;
   },

+ 6 - 5
src/views/dynamic/parts/userTwo.vue

@@ -53,10 +53,10 @@ export default {
     dynamic3: require('@/assets/dynamic3.png'),
     dynamic4: require('@/assets/dynamic4.png'),
     detail: {
-      num1: 1,
-      num2: 2,
-      num3: 3,
-      num4: 4,
+      num1: 0,
+      num2: 0,
+      num3: 0,
+      num4: 0,
     },
   }),
   created() {
@@ -70,12 +70,13 @@ export default {
       // 个人,企业
       let res = await this.userQuery();
       let s1 = res.data.filter(f => f.role == '2');
+      console.log(s1);
       let s2 = res.data.filter(f => f.role == '3');
       // 专家
       let exportNum = await this.expertsuserQurty();
       // 发布需求
       let productNum = await this.marketproductQuery();
-      let listData = { num1: s1.length, num2: s2.length, num3: exportNum.data.length, num4: productNum.data.length };
+      let listData = { num1: s2.length, num2: s1.length, num3: exportNum.data.length, num4: productNum.data.length };
       this.$set(this, `detail`, listData);
     },
   },