| | |
| | | 跳转模块 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="name" style="width: 400px;" onclick="updateType(this)"> |
| | | <select class="form-control" id="name" style="width: 400px;" onchange="updateType(this)"> |
| | | <option value="" selected disabled>选择跳转模块</option> |
| | | <option value="不跳转">不跳转</option> |
| | | <option value="加入玩湃">加入玩湃</option> |
| | |
| | | 跳转类型 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" style="width: 400px;" > |
| | | <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)"> |
| | | |
| | | </select> |
| | | </div> |
| | |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | document.addEventListener('DOMContentLoaded', function() { |
| | | var selectElement = document.getElementById('page'); |
| | | selectElement.onchange(); |
| | | }); |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | function updateType(e) { |
| | | let name = $("#name").val() |
| | | console.log(name |
| | |
| | | $("#t1").hide() |
| | | $("#t2").hide() |
| | | $("#t3").hide() |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | ajax.set("name",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var pageElement = document.getElementById('page'); |
| | | var event = new Event('change'); |
| | | pageElement.dispatchEvent(event); |
| | | } |
| | | |
| | | |
| | | function updateOne(e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | | if(data!=null){ |
| | | if(data!=null&&data.length>0){ |
| | | $("#t2").show() |
| | | var content1; |
| | | $.each(data, function(k,v) { |
| | | content1 += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#type").empty().append(content1); |
| | | }else { |
| | | console.log("=-======0000") |
| | | $("#t2").hide() |
| | | $("#t2").val("") |
| | | } |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | updateT(document.getElementById("type")); |
| | | |
| | | } |
| | | </script> |
| | | @} |