Browse Source

no message

linwenxin 6 months ago
parent
commit
d529b25816

+ 2 - 2
src/packageMine/pages/coreLssuedFile/detail.vue

@@ -24,6 +24,7 @@
 
 <script>
 import { mapState } from 'vuex'
+import { getUserInfo } from '@/common/utils/util'
 export default {
   data() {
     return {
@@ -58,7 +59,6 @@ export default {
     this.id = options.id
   },
   mounted() {
-    console.log(this?.userInfo && this?.userInfo?.workerNumber)
     this.getData()
   },
   methods: {
@@ -86,7 +86,7 @@ export default {
       this.$api
         .get('/worker/comlist/record', {
           comListId: this.id,
-          workerNumber: this?.userInfo?.workerNumber
+          workerNumber: (await getUserInfo()).workerNumber
         })
         .then(({ data }) => {
           this.dataList = data

+ 3 - 3
src/packageMine/pages/coreLssuedFile/index.vue

@@ -28,6 +28,7 @@
 
 <script>
 import { mapState } from 'vuex'
+import { getUserInfo } from '@/common/utils/util'
 export default {
   data() {
     return {
@@ -53,7 +54,6 @@ export default {
     ...mapState(['userInfo', 'isLogin', 'userId'])
   },
   mounted() {
-    console.log(this?.userInfo, this?.userInfo?.workerNumber)
     this.getData()
   },
   methods: {
@@ -64,7 +64,7 @@ export default {
       })
     },
     //获取数据
-    getData() {
+    async getData() {
       this.$api
         .get('/worker/comlist/list', {
           pageNum: this.pageNum,
@@ -72,7 +72,7 @@ export default {
           remark: this.remark,
           status: this.status,
           title: this.title,
-          workerNumber: this?.userInfo?.workerNumber
+          workerNumber: (await getUserInfo()).workerNumber
         })
         .then(res => {
           this.dataList = res.data.records