From 7b487d4c819bc67021cf224c5042066bf73df1e3 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期六, 28 十月 2023 17:01:00 +0800
Subject: [PATCH] 10.28。2
---
cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_edit_two.html | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_edit_two.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_edit_two.html
index 0844d59..fe20194 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_edit_two.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tShop/TShop_edit_two.html
@@ -11,7 +11,7 @@
跳转模块
</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="不跳转">不跳转</option>
<option value="加入玩湃">加入玩湃</option>
<option value="开始课程">开始课程</option>
@@ -39,7 +39,7 @@
跳转类型
</button>
</div>
- <select class="form-control" id="type" style="width: 400px;" >
+ <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)">
@for(obj in list1){
<option value="${obj.id}" ${obj.id == item.typeId ? 'selected=selected' : ''}>${obj.name}</option>
@}
@@ -76,12 +76,15 @@
<script src="${ctxPath}/modular/system/tShop/tShopOtherOne.js"></script>
<script>
-
-
-
laydate.render({
elem: '#time',
range:true
+ });
+
+
+ document.addEventListener('DOMContentLoaded', function() {
+ var selectElement = document.getElementById('page');
+ selectElement.onchange();
});
function updateType(e) {
@@ -92,6 +95,9 @@
$("#t1").hide()
$("#t2").hide()
$("#t3").hide()
+ $("#t1").val("")
+ $("#t2").val("")
+ $("#t3").val("")
}else {
$("#t1").show()
$("#t2").show()
@@ -117,12 +123,23 @@
}
+ function updateT(e) {
+ var oneId = $('#type option:selected').text();
+ console.log(oneId);
+ if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){
+ $("#t3").hide()
+ $("#t2").val("")
+ }else{
+ $("#t3").show()
+ $("#t3").val("")
+ }
+ }
+
function updateOne(e) {
var oneId=$(e).val();
var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){
if(data!=null&&data.length>0){
$("#t2").show()
-
var content1;
$.each(data, function(k,v) {
content1 += "<option value='"+v.id+"'>"+v.name+"</option>";
@@ -131,12 +148,21 @@
}else {
console.log("=-======0000")
$("#t2").hide()
+ $("#t2").val("")
}
});
+ if (oneId==2 || oneId==25|| oneId==27){
+ $("#t3").val("")
+
+ $("#t3").hide()
+ }
+
ajax.set("id",oneId);
ajax.start();
+ updateT(document.getElementById("type"));
+
}
window.onload = function() {
--
Gitblit v1.7.1