<div class="layui-form-item">
<label class="layui-form-label"><span
style='color: red; font-weight: bold'>*</span> 开放时间</label>
<div class="layui-input-block" style="width: 300px">
<input type="radio" name="openTime" value="0" lay-filter="testRadio" title="长期有效" checked>
<input type="radio" name="openTime" value="1" lay-filter="testRadio" title="截止至">
<input type="text" class="layui-input" id="op" name="op" style="display:none"
value="{{\Carbon\Carbon::now()->format('Y-m-d')}}">
</div>
</div>
//单选
form.on('radio(testRadio)', function (data) {
console.log(data);
if (data.value === '1') {
$("#op").css("display", "block");
} else {
$("#op").css("display", "none");
}
});