getCompiled()->isFresh($_smarty_tpl, array ( 'version' => '5.3.1', 'unifunc' => 'content_67d005507ff3b2_55216174', 'has_nocache_code' => false, 'file_dependency' => array ( '0b4b3ad6d55cfa9605ea325dc1f6ae5bb7e84968' => array ( 0 => 'admin/product/create.tpl', 1 => 1740366544, 2 => 'file', ), ), 'includes' => array ( 'file:admin/header.tpl' => 1, 'file:admin/footer.tpl' => 1, ), ))) { function content_67d005507ff3b2_55216174 (\Smarty\Template $_smarty_tpl) { $_smarty_current_dir = '/www/wwwroot/fuuu.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); } }); $("#create-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", type: "POST", 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); } }