diff --git a/pages/index/index.vue b/pages/index/index.vue
index 79805fc..982d791 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -12,13 +12,13 @@
待办
- 3
+ {{duty_count}}
我的
- 3
+ {{owner_count}}
@@ -48,7 +48,9 @@
welTitle: "",
imageSrc:"",
currentDate: tool.getTodayDate(),
- wfOptions: []
+ wfOptions: [],
+ duty_count: 0,
+ owner_count: 0
}
},
mounted() {
@@ -59,8 +61,17 @@
// #ifdef MP-WEIXIN
uni.hideHomeButton()
// #endif
+ this.getTicketCount();
},
methods: {
+ getTicketCount() {
+ this.$api.getTicket({category:"duty", page:1, page_size:1}).then(res=>{
+ this.duty_count = res.count;
+ })
+ this.$api.getTicket({category:"owner", page:1, page_size:1}).then(res=>{
+ this.owner_count = res.count;
+ })
+ },
getWfOptions() {
let permissions = auth.getPermissions();
const groups = {};
@@ -146,6 +157,7 @@
color: #2979ff;
font-size: 36rpx;
font-weight: bold;
+ margin-left: 24rpx;
}
.swiper {
diff --git a/utils/api.js b/utils/api.js
index 22369d5..4062bfb 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -27,6 +27,7 @@ export default {
getTransition:(id) => http(`/wf/ticket/${id}/transitions/`, 'GET'),
workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
+
getMroom:(data) => http('/ofm/mroom/', 'GET', data),
//会议室预定
bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),