getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.3.1', 'unifunc' => 'content_675650b6ba6035_66151303', 'has_nocache_code' => false, 'file_dependency' => array ( '6f6a88b7fe784c6dcf893a754173ac8f035cbcd4' => array ( 0 => 'admin/product/edit.tpl', 1 => 1733709436, 2 => 'file', ), ), 'includes' => array ( 'file:admin/header.tpl' => 1, 'file:admin/footer.tpl' => 1, ), ))) { function content_675650b6ba6035_66151303 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = '/www/wwwroot/xiaofu.cloud/resources/views/tabler/admin/product'; $_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); ?>

基础信息

商品内容

购买限制
> $(function () { $("#type").change(); }); $("#type").on("change", function () { if (this.value === "bandwidth") { $("#time_option").hide(); $("#class_option").hide(); $("#class_time_option").hide(); $("#bandwidth_option").show(); $("#node_group_option").hide(); $("#speed_limit_option").hide(); $("#ip_limit_option").hide(); $("#time").prop("required", false); $("#class").prop("required", false); $("#class_time").prop("required", false); $("#bandwidth").prop("required", true); $("#node_group").prop("required", false); $("#speed_limit").prop("required", false); $("#ip_limit").prop("required", false); } else if (this.value === "time") { $("#time_option").show(); $("#class_option").show(); $("#class_time_option").show(); $("#bandwidth_option").hide(); $("#node_group_option").show(); $("#speed_limit_option").show(); $("#ip_limit_option").show(); $("#time").prop("required", true); $("#class").prop("required", true); $("#class_time").prop("required", true); $("#bandwidth").prop("required", false); $("#node_group").prop("required", true); $("#speed_limit").prop("required", true); $("#ip_limit").prop("required", true); } else { $("#time_option").show(); $("#class_option").show(); $("#class_time_option").show(); $("#bandwidth_option").show(); $("#node_group_option").show(); $("#speed_limit_option").show(); $("#ip_limit_option").show(); $("#time").prop("required", true); $("#class").prop("required", true); $("#class_time").prop("required", true); $("#bandwidth").prop("required", true); $("#node_group").prop("required", true); $("#speed_limit").prop("required", true); $("#ip_limit").prop("required", true); } }); $("#save-product").click(function () { let emptyFields = $('input[required]').filter(function () { return $(this).val() === ''; }); if (emptyFields.length > 0) { $("#fail-message").text("请填写所有必要栏位"); $("#fail-dialog").modal("show"); } else { $.ajax({ url: '/admin/product/getValue('product')->id;?> ', type: 'PUT', dataType: "json", data: { getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('update_field'), 'key'); $foreach0DoElse = true; foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value) { $foreach0DoElse = false; ?> getValue('key');?> : $('#getValue('key');?> ').val(), getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?> new_user_required: $("#new_user_required").is(":checked"), }, success: function (data) { if (data.ret === 1) { $('#success-message').text(data.msg); $('#success-dialog').modal('show'); window.setTimeout("location.href=top.document.referrer", getValue('config')['jump_delay'];?> ); } else { $('#fail-message').text(data.msg); $('#fail-dialog').modal('show'); } } }) } }); > renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir); } }