<div class="layui-form-item" style="margin-top: 20px;"> <label class="layui-form-label">公众号</label> <div class="layui-input-block"> <select name="wechat_id" id="wechat_select" lay-search> <option value="">选择公众号</option> </select> </div> </div>
admin.req({ url: n.pageUrls.mp_select, type: 'get', done: function (res) { console.log(res); $.each(res.data.wechat, function (i, m) { $('#wechat_select').append('<option value="' + m.wechat_id + '" >' + m.wechat_name + '</option>'); }) form.render('select'); } })