function DataShow(type, uuid) { this.type = type; this.uuid = uuid; } DataShow.prototype.showHint = function(){ let htmlText=''; switch (this.type) { case 'locNo': htmlText += '
库位编号:'+ this.uuid +'
'; $.ajax({ url: top.baseUrl + '/three/query/loc/detl/v1?locNo=' + this.uuid, type: "GET", success: function (res) { console.log(res); } }) break case "wrkNo": htmlText+='任务编号:'+ this.uuid +'
'; $.ajax({ url: top.baseUrl + '/three/query/wrk/detl/v1?wrkNo=' + this.uuid, type: "GET", success: function (res) { console.log(res); } }) break default: break } return htmlText; }