1 Init() { 2 GetCUseTItems(this.type).then((res) => { 3 if (res.code == 1) { 4 res.data = JSON.parse(res.data.toString()); 5 res.data.forEach((t) => { 6 t.new = false; 7 }); 8 this.list = res.data; 9 } else { 10 this.showTip("获取药品失败!", "error"); 11 } 12 }); 13 }
效果展示: