1、使用的參數(shù)可能是null,undefined。
2轿秧、返回的參數(shù)有重復(fù)。
3咨堤、未捕獲異常淤刃。
處理方法
getList() {
? ? ? this.$http({
? ? ? ? method: 'post',
? ? ? ? url: '/flow/instance/list',
? ? ? ? options: {
? ? ? ? ? noParam: true
? ? ? ? },
? ? ? ? data: this.params
? ? ? }).then(data => {
? ? ? ? if (data.success) {
? ? ? ? ? this.list = data.data.rows;
? ? ? ? ? this.total = data.data.total;
? ? ? ? ? this.list.forEach(item => {
? ? ? ? ? ? let temp = JSON.parse(item.variable);
? ? ? ? ? ? if (temp.ApplyParams.remark.length>=0) {//確保使用的參數(shù)不是null和undefined
? ? ? ? ? ? ? item.remark =temp.ApplyParams.remark;
? ? ? ? ? ? }
? ? ? ? ? })
? ? ? ? }
? ? ? }).catch(() => console.log('promise catch err')); //捕獲異常
? ? },