From 788b776c5ecffe9989b57eb17fd1eb9ca4cf5f0d Mon Sep 17 00:00:00 2001 From: yj <Administrator@192> Date: 星期五, 07 五月 2021 20:53:52 +0800 Subject: [PATCH] 特价 --- app/src/main/resources/static/app-list.html | 63 +++++++++++++++++-------------- 1 files changed, 35 insertions(+), 28 deletions(-) diff --git a/app/src/main/resources/static/app-list.html b/app/src/main/resources/static/app-list.html index 992df14..8cf956b 100644 --- a/app/src/main/resources/static/app-list.html +++ b/app/src/main/resources/static/app-list.html @@ -35,6 +35,9 @@ overflow:hidden; } + .layui-table-view .layui-table { + width: 100%; + } </style> </head> @@ -90,8 +93,8 @@ <script type="text/html" id="deleteContainer"> <div class="layui-btn-container"> - <a title="鎭㈠" onclick="member_resume(this,{{d.LAY_INDEX }}, {{d.id}})" href="javascript:;"> - <i class="layui-icon"></i> + <a href="javascript:;" onclick="openLinkPage({{d.id}})"> + <i class="layui-icon"></i> </a> <a title="鍒犻櫎" onclick="member_del(this,{{d.LAY_INDEX }},{{d.id}})" href="javascript:;" @@ -99,6 +102,24 @@ <i class="layui-icon"></i> </a> </div> +</script> + +<script> + function openLinkPage(id) { + xadmin.open('娣诲姞鍏氬憳','home.html',null,null,true); + + //閲嶆柊璋冪敤鎵撳紑list椤甸潰锛屽苟涓斿埛鏂般�� + // parent.xadmin.add_tab('home.html','list.action',true); + //鍏抽棴褰撳墠tab椤甸潰 蹇呴』鍚庡叧闂�� + // xadmin.del_tab(); + } + + function member_del(obj, index, id) { + layer.confirm('纭瑕佸垹闄ゅ悧锛�', function (index) { + //鍙戝紓姝ュ垹闄ゆ暟鎹� + app.delete(obj, index, id); + }); + } </script> <script type="text/html" id="statusContainer1"> @@ -127,11 +148,12 @@ </script> - <script type="text/html" id="switchTpl"> - <input type="checkbox" name="sex" value="{{d.state}}" lay-skin="switch" lay-text="鍚敤|鍋滅敤" lay-filter="sexDemo" {{ d.state== 1 ? 'checked': ''}} > + <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="鍚敤|鍋滅敤" lay-filter="stateBox" {{ d.state== 1 ? 'checked': ''}} > </script> -<script>layui.use('laydate', + +<script> + layui.use('laydate', function () { var laydate = layui.laydate; @@ -146,25 +168,6 @@ }); }); -</script> - -<script> - - function member_del(obj, index, id) { - layer.confirm('纭瑕佸垹闄ゅ悧锛�', function (index) { - //鍙戝紓姝ュ垹闄ゆ暟鎹� - app.delete(obj, index, id); - }); - } - - function member_resume(obj, index, id) { - layer.confirm('纭瑕佹仮澶嶅悧锛�', function (index) { - //鍙戝紓姝ュ垹闄ゆ暟鎹� - // $(obj).parents("tr").remove(); - layer.msg('宸叉仮澶�!', {icon: 1, time: 1000}); - }); - } - </script> <script> @@ -282,10 +285,14 @@ }); - //鐩戝惉鎬у埆鎿嶄綔 - layui.form.on('switch(sexDemo)', function(obj){ - // app.update(data.id, params); - layer.tips(this.value + ' ' + this.name + '锛�'+ obj.elem.checked, obj.othis); + //鐩戝惉鐘舵�佹搷浣� + layui.form.on('switch(stateBox)', function(obj){ + var state = 0; + if (obj.elem.checked) { + state = 1; + } + var params = {id: this.value, state: state}; + app.update(this.value, params); }); });</script> -- Gitblit v1.8.0