$('.join_identity_id').change(function (e) { const val = $(this).val(); var commonThis = $(this); if (val !== null) { $.ajax({ type: "get", data: { 'q': val, }, url: "/admin/platform/identity_stock", async: true, success: (result => { if (result.status_code == 200) { $('.stock').val(result.value); } else { alert('获取库存失败'); } }) }); } });