guhongwei 4 lat temu
rodzic
commit
14b791c63e

+ 1 - 0
src/store/login.js

@@ -83,6 +83,7 @@ const actions = {
       let token = _.get(res, `data.data.token`);
       if (token) {
         user = jwt.decode(token);
+        console.log(user);
         commit('setUser', user, { root: true });
       }
     }

+ 13 - 17
src/views/vipCenter/dynamicInfo/index.vue

@@ -54,23 +54,19 @@ export default {
   methods: {
     ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
     ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
-    async searchInfo() {
-      let res = await this.dockFetch(this.user.uid);
-      console.log(res);
-      // for (const val of res.data) {
-      //   console.log(val);
-      //   this.$set(this, `dock_id`, val.id);
-      // }
-      // let arr = await this.transactionslist({ skip, limit, dockid: this.dock_id, ...info });
-      // var zzqt = arr.data.filter(item => item.status === '0');
-      // var dcyx = arr.data.filter(item => item.status === '1');
-      // var jywc = arr.data.filter(item => item.status === '2');
-      // this.$set(this, `zzqtList`, zzqt);
-      // this.$set(this, `zzqtTotal`, zzqt.length);
-      // this.$set(this, `dcyxList`, dcyx);
-      // this.$set(this, `dxyxTotal`, dcyx.length);
-      // this.$set(this, `jywcList`, jywc);
-      // this.$set(this, `jywcTotal`, jywc.length);
+    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.dockFetch(this.user.remark);
+      this.$set(this, `dock_id`, res.data.id);
+      let arr = await this.transactionslist({ skip, limit, dockid: this.dock_id, ...info });
+      var zzqt = arr.data.filter(item => item.status === '0');
+      var dcyx = arr.data.filter(item => item.status === '1');
+      var jywc = arr.data.filter(item => item.status === '2');
+      this.$set(this, `zzqtList`, zzqt);
+      this.$set(this, `zzqtTotal`, zzqt.length);
+      this.$set(this, `dcyxList`, dcyx);
+      this.$set(this, `dxyxTotal`, dcyx.length);
+      this.$set(this, `jywcList`, jywc);
+      this.$set(this, `jywcTotal`, jywc.length);
     },
   },
   computed: {

+ 2 - 2
src/views/vipCenter/statisInfo/parts/achievements.vue

@@ -111,8 +111,8 @@ export default {
   },
   methods: {
     ...dock(['query', 'delete', 'update', 'fetch']),
-    async search() {
-      let res = await this.fetch(this.user.uid);
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.fetch(this.user.remark);
       let arr = res.data.apply.map(item => item.goodsList);
       arr = _.flattenDeep(arr);
       var newArr = arr.filter(item => item.totaltype === '1');

+ 3 - 3
src/views/vipCenter/statisInfo/parts/technology.vue

@@ -111,11 +111,11 @@ export default {
   },
   methods: {
     ...dock(['query', 'delete', 'update', 'fetch']),
-    async search() {
-      let res = await this.fetch(this.user.uid);
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.fetch(this.user.remark);
       let arr = res.data.apply.map(item => item.goodsList);
       arr = _.flattenDeep(arr);
-      var newArr = arr.filter(item => item.totaltype === '1');
+      var newArr = arr.filter(item => item.totaltype === '0');
       this.$set(this, `applyList`, newArr);
       this.$set(this, `total`, newArr.length);
     },