Commit 3361cf6a by 无尘

fix: 修改数据维度

parent c20aebd5
......@@ -172,13 +172,27 @@ export default {
.then(res => {
that.loadingMember = false;
that.loadingService = false;
that.memberCardData = res.result.cards || [];
that.serviceNumData = res.result.services || [];
if(res.result.cards && res.result.cards.length){
that.memberCardData = that.sortTable(res.result.cards) || [];
}
if(res.result.services && res.result.services.length){
that.serviceNumData = that.sortTable(res.result.services) || [];
}
})
.catch(function(error) {
that.loadingMember = false;
that.loadingService = false;
});
},
/**
* @description: 排序
* @param {Array} arr
* @author: 无尘
*/
sortTable(arr) {
arr.sort(function(a, b) {
return (a.sort - b.sort);
});
}
},
watch: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment