From 61bbd595ee2bc3c67b40878894dcc07174c6eea6 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 24 九月 2024 10:15:30 +0800 Subject: [PATCH] 玩湃微信商户分账 --- cloud-server-management/src/main/webapp/static/modular/system/benefits/tBenefitsVideos_add.js | 45 +++++++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/benefits/tBenefitsVideos_add.js b/cloud-server-management/src/main/webapp/static/modular/system/benefits/tBenefitsVideos_add.js index aacd91f..10414df 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/benefits/tBenefitsVideos_add.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/benefits/tBenefitsVideos_add.js @@ -16,7 +16,7 @@ TQuestion.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, - {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: 'id', field: 'benefitsVideosId', visible: false, align: 'center', valign: 'middle'}, {title: '视频类型', field: 'type', visible: true, align: 'center', valign: 'middle', formatter:function (data) { return {1:"课后练习",2:"运动教学视频",3:"器材教学视频"}[data] @@ -60,19 +60,15 @@ * 选择视频 回显视频封面 * @param e */ -TCompetition.oneChange = function (e) { - var oneId=$(e).val(); - var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ - if(data!=null){ - var content='<option value="">选择市</option>'; - $.each(data, function(k,v) { - content += "<option value='"+v.code+"'>"+v.name+"</option>"; - }); - $("#cCode").empty().append(content); - } - }); - ajax.set("oneId",oneId); - ajax.start(); +TQuestion.oneChange = function () { + let op = $('#siteType option:selected'); + if(op.val() == ""){ + $('#img').attr('src', "") + $('#introduce').text("") + }else{ + $('#img').attr('src', op.attr('coverDrawing')) + $('#introduce').text(op.attr('introduce')) + } }; /** * 点击添加 @@ -125,7 +121,7 @@ state:null }; selected.forEach(function(obj) { - var id = obj.id; + var id = obj.benefitsVideosId; data1.ids.push(id); }); data1.state = 1; @@ -161,7 +157,7 @@ state:null }; selected.forEach(function(obj) { - var id = obj.id; + var id = obj.benefitsVideosId; data1.ids.push(id); }); data1.state = 2; @@ -240,7 +236,7 @@ state:null }; selected.forEach(function(obj) { - var id = obj.id; + var id = obj.benefitsVideosId; data1.ids.push(id); }); data1.state = 3; @@ -286,13 +282,12 @@ data: JSON.stringify(data), contentType: "application/json", success: function (response) { - if (response === 500){ + if (!response){ Feng.error("所选视频已经存在于当前福利视频分类下!"); - window.parent.TQuestion.table.refresh(); - TQuestion.close(); - }else{ Feng.success("添加成功"); + window.parent.TQuestion.table.refresh(); + TQuestion.close(); } }, error: function (xhr, status, error) { @@ -318,7 +313,13 @@ data: JSON.stringify(data), contentType: "application/json", success: function (response) { - Feng.success("添加成功"); + if (!response){ + Feng.error("所选视频已经存在于当前福利视频分类下!"); + }else{ + Feng.success("编辑成功"); + window.parent.TQuestion.table.refresh(); + TQuestion.close(); + } }, error: function (xhr, status, error) { Feng.error("添加失败!" + error); -- Gitblit v1.7.1