| | |
| | | let intro = $('#intro').val(); |
| | | let coverImg = $('#coverImg').val(); |
| | | let homeBackdropImg = $('#homeBackdropImg').val(); |
| | | let type = $('#type').val(); |
| | | let drawIntegral = $('#drawIntegral').val(); |
| | | let loseIntegral = $('#loseIntegral').val(); |
| | | let content = editor.getContent(); |
| | | if("" == registrationClosingTime){ |
| | | registrationClosingTime = null; |
| | | } |
| | | let contentOne = editor1.getContent(); |
| | | if(null == name || '' == name){ |
| | | Feng.error("请填写有效的比赛名称"); |
| | | return |
| | |
| | | return |
| | | } |
| | | if(null == basePeople || '' == basePeople){ |
| | | Feng.error("请填写有效的基础报名人数"); |
| | | return |
| | | basePeople = 0; |
| | | } |
| | | if(null == participationIntegral || '' == participationIntegral){ |
| | | Feng.error("请填写有效的参赛可获积分"); |
| | | return |
| | | participationIntegral = 0; |
| | | } |
| | | if(null == winIntegral || '' == winIntegral){ |
| | | Feng.error("请填写有效的胜场可获积分"); |
| | | return |
| | | winIntegral = 0; |
| | | } |
| | | if(null == address || '' == address){ |
| | | Feng.error("请填写有效的比赛地点"); |
| | |
| | | Feng.error("请填写有效的赛事简介"); |
| | | return |
| | | } |
| | | if(null == coverImg || '' == coverImg){ |
| | | Feng.error("请上传有效的比赛封面图"); |
| | | return |
| | | } |
| | | if(null == homeBackdropImg || '' == homeBackdropImg){ |
| | | Feng.error("请上传有效的首页默认背景图"); |
| | | return |
| | | } |
| | | if(WorldCupInfo.goodsPicArray1 == 0){ |
| | | Feng.error("请上传有效的比赛图片"); |
| | | return |
| | | } |
| | | // if(null == coverImg || '' == coverImg){ |
| | | // Feng.error("请上传有效的比赛封面图"); |
| | | // return |
| | | // } |
| | | // if(null == homeBackdropImg || '' == homeBackdropImg){ |
| | | // Feng.error("请上传有效的首页默认背景图"); |
| | | // return |
| | | // } |
| | | // if(WorldCupInfo.goodsPicArray1 == 0){ |
| | | // Feng.error("请上传有效的比赛图片"); |
| | | // return |
| | | // } |
| | | if(null == content || '' == content){ |
| | | Feng.error("请填写有效的比赛详情"); |
| | | return |
| | | } |
| | | if(null == contentOne || '' == contentOne){ |
| | | Feng.error("请填写有效的参赛协议"); |
| | | return |
| | | } |
| | | let data = { |
| | | 'name': name, |
| | | 'startTime': new Date(startTime + " 00:00:00"), |
| | | 'endTime': new Date(endTime + " 23:59:59"), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | 'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1), |
| | | 'intro': intro, |
| | | 'content': content, |
| | | 'stores': JSON.stringify(WorldCupInfo.stores) |
| | | 'stores': JSON.stringify(WorldCupInfo.stores), |
| | | 'type': type, |
| | | 'drawIntegral': drawIntegral, |
| | | 'loseIntegral': loseIntegral, |
| | | 'contentOne': contentOne |
| | | } |
| | | if(null != registrationClosingTime && '' != registrationClosingTime){ |
| | | data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59"); |
| | | } |
| | | |
| | | //提交信息 |
| | |
| | | if (res.code==200){ |
| | | Feng.success("添加成功!"); |
| | | WorldCupInfo.close(); |
| | | window.parent.WorldCup.refresh(); |
| | | window.parent.WorldCup.search(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | let coverImg = $('#coverImg').val(); |
| | | let homeBackdropImg = $('#homeBackdropImg').val(); |
| | | let content = editor.getContent(); |
| | | if("" == registrationClosingTime){ |
| | | registrationClosingTime = null; |
| | | } |
| | | let type = $('#type').val(); |
| | | let drawIntegral = $('#drawIntegral').val(); |
| | | let loseIntegral = $('#loseIntegral').val(); |
| | | let contentOne = editor1.getContent(); |
| | | if(null == name || '' == name){ |
| | | Feng.error("请填写有效的比赛名称"); |
| | | return |
| | |
| | | return |
| | | } |
| | | if(null == basePeople || '' == basePeople){ |
| | | Feng.error("请填写有效的基础报名人数"); |
| | | return |
| | | basePeople = 0; |
| | | } |
| | | if(null == participationIntegral || '' == participationIntegral){ |
| | | Feng.error("请填写有效的参赛可获积分"); |
| | | return |
| | | participationIntegral = 0; |
| | | } |
| | | if(null == winIntegral || '' == winIntegral){ |
| | | Feng.error("请填写有效的胜场可获积分"); |
| | | return |
| | | winIntegral = 0; |
| | | } |
| | | if(null == address || '' == address){ |
| | | Feng.error("请填写有效的比赛地点"); |
| | |
| | | Feng.error("请填写有效的赛事简介"); |
| | | return |
| | | } |
| | | if(null == coverImg || '' == coverImg){ |
| | | Feng.error("请上传有效的比赛封面图"); |
| | | return |
| | | } |
| | | if(null == homeBackdropImg || '' == homeBackdropImg){ |
| | | Feng.error("请上传有效的首页默认背景图"); |
| | | return |
| | | } |
| | | if(WorldCupInfo.goodsPicArray1 == 0){ |
| | | Feng.error("请上传有效的比赛图片"); |
| | | return |
| | | } |
| | | // if(null == coverImg || '' == coverImg){ |
| | | // Feng.error("请上传有效的比赛封面图1"); |
| | | // return |
| | | // } |
| | | // if(null == homeBackdropImg || '' == homeBackdropImg){ |
| | | // Feng.error("请上传有效的首页默认背景图"); |
| | | // return |
| | | // } |
| | | // if(WorldCupInfo.goodsPicArray1 == 0){ |
| | | // Feng.error("请上传有效的比赛图片"); |
| | | // return |
| | | // } |
| | | if(null == content || '' == content){ |
| | | Feng.error("请填写有效的比赛详情"); |
| | | return |
| | | } |
| | | if(null == contentOne || '' == contentOne){ |
| | | Feng.error("请填写有效的参赛协议"); |
| | | return |
| | | } |
| | | |
| | | let data = { |
| | | 'id': $('#id').val(), |
| | | 'name': name, |
| | | 'startTime': new Date(startTime + " 00:00:00"), |
| | | 'endTime': new Date(endTime + " 23:59:59"), |
| | | 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), |
| | | 'startAge': startAge, |
| | | 'endAge': endAge, |
| | | 'gender': gender, |
| | |
| | | 'infoImg': JSON.stringify(WorldCupInfo.goodsPicArray1), |
| | | 'intro': intro, |
| | | 'content': content, |
| | | 'stores': JSON.stringify(WorldCupInfo.stores) |
| | | 'stores': JSON.stringify(WorldCupInfo.stores), |
| | | 'type': type, |
| | | 'drawIntegral': drawIntegral, |
| | | 'loseIntegral': loseIntegral, |
| | | 'contentOne': contentOne |
| | | } |
| | | if(null != registrationClosingTime && '' != registrationClosingTime){ |
| | | data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59"); |
| | | } |
| | | |
| | | //提交信息 |
| | |
| | | if (res.code==200){ |
| | | Feng.success("编辑成功!"); |
| | | WorldCupInfo.close(); |
| | | window.parent.WorldCup.refresh(); |
| | | window.parent.WorldCup.search(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | $('.cash').hide(); |
| | | } |
| | | if(v == 2){ |
| | | $('.classHour').hide(); |
| | | $('.paiCoin').hide(); |
| | | } |
| | | if(v == 3){ |
| | | $('.paiCoin').hide(); |
| | | $('.classHour').hide(); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | WorldCupInfo.initStore = function (){ |
| | | let html = ''; |
| | | let page = $('#page').val(); |
| | | for (let i = 0; i < WorldCupInfo.stores.length; i++) { |
| | | let item = WorldCupInfo.stores[i]; |
| | | html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td><td><button style="height: 30px;\n' + |
| | | ' line-height: 30px;\n' + |
| | | ' font-size: 14px;\n' + |
| | | ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' |
| | | html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td>'; |
| | | if("info" != page){ |
| | | html += '<td><button style="height: 30px;\n' + |
| | | ' line-height: 30px;\n' + |
| | | ' font-size: 14px;\n' + |
| | | ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' |
| | | }else{ |
| | | html += '</tr>'; |
| | | } |
| | | } |
| | | $('#stores tbody').html(html); |
| | | } |
| | |
| | | |
| | | |
| | | var editor = null; |
| | | var editor1 = null; |
| | | $(function () { |
| | | //初始化编辑器 |
| | | editor = UE.getEditor('content'); |
| | | editor1 = UE.getEditor('contentOne'); |
| | | }); |