fastadmin 关于selectpage查询及二级联动
<input id="c-name" data-rule="required" data-source="user/user/group" data-params='{"custom[group_id]":"1"}' data-field="nickname" class="form-control selectpage" name="row[name]" type="text" value="">
====================
data-params='{"custom[group_id]":"1"}'
条件查询只需加入上面这句代码
==============================
二级联动 :
$("#c-cp_trans_ids").data("params", function (obj) { return {custom: {type: $("#c-cp_trans_id").val()}}; });
第二种方法:
$(document).on("change", "#c-category1", function () { $.post("mall/goods/brands/selectpage",{custom: {catId: $(this).val()},},function(result){ var i = $('#c-brandId').val(); $('#c-brandId').selectPageData(result.list); $('#c-brandId').val(i); $('#c-brandId').selectPageRefresh(); }); });
=================
不成功,在研究.....