123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579 |
- <?php /* Smarty version 2.6.17, created on 2018-05-26 12:15:27
- compiled from admin/activity/page_show.html */ ?>
- <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin/activity/page_show.html', 50, false),array('modifier', 'in_array', 'admin/activity/page_show.html', 62, false),)), $this); ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <style>
- .set-nav {
- margin: 0 auto;
- }
- .set-nav-hr {
- background-color: #ddd;
- height: 1px;
- position: relative;
- }
- .form-group label {
- font-weight: 600;
- }
- .checkbox-inline, .radio-inline {
- font-weight: 400!important;
- }
- .rowlabel {
- font-weight: 300!important;
- }
- .music_play_hide {
- display:none;
- }
- </style>
- <div id="activity_container">
- <form id="activity_form">
- <div class="activity_center">
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_nav.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['id']; ?>
- ">
- <div class="form-group">
- <label>标题:</label>
- <input name="events_name" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['events_name']; ?>
- ">
- </div>
- <div class="form-group">
- <label class="control-label">列表默认图<small class="text-danger">(JPG、PNG,640x320,小于60k)</small></label>
- <div>
- <img id="img_url_tag" src="<?php if ($this->_tpl_vars['eventData']['img_url']): ?><?php echo $this->_tpl_vars['eventData']['img_url']; ?>
- <?php else: ?>http://placehold.it/320x160&text=640x320<?php endif; ?>" style="width:200px;" class="img-thumbnail">
- <input id="img_url_input" name="img_url" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['img_url']; ?>
- ">
- <input id="image_upload" type="button" value="选择图片" >
- </div>
- </div>
- <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE'): ?>
- <div class="form-group">
- <label class="control-label">开始时间:</label>
- <input name="begin_time" type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['eventData']['begin_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d %H:%M:%S') : smarty_modifier_date_format($_tmp, '%Y-%m-%d %H:%M:%S')); ?>
- " class="form-control" style="max-width:250px;min-width:200px;">
- </div>
- <div class="form-group">
- <label class="control-label">结束时间:</label>
- <input name="end_time" type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['eventData']['end_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d %H:%M:%S') : smarty_modifier_date_format($_tmp, '%Y-%m-%d %H:%M:%S')); ?>
- " class="form-control" style="max-width:250px;min-width:200px;">
- </div>
- <?php endif; ?>
- <div class="form-group">
- <label class="control-label">发布到哪些列表</label>
- <div>
- <?php $_from = $this->_tpl_vars['platformList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['platfrom']):
- ?>
- <label class="checkbox-inline">
- <input disabled name="platform_ids[]" type="checkbox" value="<?php echo $this->_tpl_vars['platfrom']['id']; ?>
- " <?php if (((is_array($_tmp=$this->_tpl_vars['platfrom']['id'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['platFormIds']) : in_array($_tmp, $this->_tpl_vars['platFormIds']))): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['platfrom']['name']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- <div class="note">注:创建后不可修改</div>
- </div>
-
- <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] == 'TYPE_EVENTS_OTHER'): ?>
- <div class="form-group">
- <label>跳转URL:</label>
- <input name="other_url" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['other_url']; ?>
- ">
- </div>
- <?php endif; ?>
- <div class="form-group">
- <label class="control-label">选择分类</label>
- <div>
- <select id="cotegory_id" name="category_id">
- <option value="0" selected>选择分类名称</option>
- <?php $_from = $this->_tpl_vars['categoryList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['cate']):
- ?>
- <option value="<?php echo $this->_tpl_vars['cate']['id']; ?>
- " <?php if ($this->_tpl_vars['cate']['id'] == $this->_tpl_vars['eventData']['category_id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['cate']['name']; ?>
- </option>
- <?php endforeach; endif; unset($_from); ?>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label">是否推荐到焦点图</label>
- <div>
- <?php $_from = $this->_tpl_vars['focusDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="focus_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
- " <?php if ($this->_tpl_vars['eventData']['focus_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label">是否置顶</label>
- <div>
- <?php $_from = $this->_tpl_vars['topDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="top_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
- " <?php if ($this->_tpl_vars['eventData']['top_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
-
- <div class="form-group">
- <label class="control-label">是否用户登录</label>
- <div>
- <?php $_from = $this->_tpl_vars['authorize']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['authid'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="authorize" type="radio" value="<?php echo $this->_tpl_vars['authid']; ?>
- " <?php if ($this->_tpl_vars['eventData']['authorize'] == $this->_tpl_vars['authid']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
-
- <div class="form-group">
- <label class="control-label">是否在列表中出现</label>
- <div>
- <?php $_from = $this->_tpl_vars['listDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="list_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
- " <?php if ($this->_tpl_vars['eventData']['list_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
-
- <?php if ($this->_tpl_vars['displayDesc'][$this->_tpl_vars['eventData']['display']]['kw'] != 'EVENT_DISPLAY_UNFINISHED'): ?>
- <div class="form-group">
- <label class="control-label">当前发布状态</label>
- <div>
- <?php $_from = $this->_tpl_vars['displayDesc']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
- ?>
- <?php if ($this->_tpl_vars['info']['kw'] != 'EVENT_DISPLAY_UNFINISHED'): ?>
- <label class="radio-inline">
- <input name="display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
- " <?php if ($this->_tpl_vars['eventData']['display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endif; ?>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if (! ((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['deliveryFormNotType']) : in_array($_tmp, $this->_tpl_vars['deliveryFormNotType']))): ?>
- <div class="form-group">
- <label class="control-label">当前奖品发货状态</label>
- <div>
- <?php $_from = $this->_tpl_vars['deliveryDesc']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="delivery" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
- " <?php if ($this->_tpl_vars['eventData']['delivery'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if (! ((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['weixinFormNotType']) : in_array($_tmp, $this->_tpl_vars['weixinFormNotType']))): ?>
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">设置微信分享</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <div class="form-group">
- <label class="control-label rowlabel">分享用图:<small class="text-danger">JPG、PNG,200*200,小于20k</small></label>
- <div>
- <img id="share_image_tag" src="<?php if ($this->_tpl_vars['eventData']['weixinShare']['imgUrl']): ?><?php echo $this->_tpl_vars['eventData']['weixinShare']['imgUrl']; ?>
- <?php else: ?>http://placehold.it/200&text=200x200<?php endif; ?>" style="width:150px;" class="img-thumbnail">
- <input id="share_image_input" name='wx_img_url' type="hidden" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['imgUrl']; ?>
- ">
- <input id="share_image_upload" type="button" value="选择图片" >
- </div>
- </div>
- <div class="row">
- <div class="col-md-6">
- <div class="form-group">
- <label class="control-label rowlabel">标题:<small class="text-danger"><24个字</small></label>
- <input name="weixinShare_title" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['title']; ?>
- ">
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">分享内容:<small class="text-danger"><36个字</small></label>
- <input name="weixinShare_content" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['content']; ?>
- ">
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">用户分享后跳转地址:</label>
- <input name="weixinShare_jump_url" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['jump_url']; ?>
- ">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE' && $this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_CUT_SCREEN' && $this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_OTHER'): ?>
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">设置参与规则</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <div class="row">
- <div class="col-md-3">
- <p>允许每天用户参与次数:</p>
- <input name="participation_user_num" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_user_num']; ?>
- " style="max-width:;">
- </div>
- <div class="col-md-3">
- <p>允许每天IP参与次数:</p>
- <input name="participation_ip_num" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_ip_num']; ?>
- " style="max-width:;">
- </div>
- <div class="col-md-3">
- <p>允许用户参与次数:</p>
- <input type="text" name="participation_user_all_num" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_user_all_num']; ?>
- " style="max-width:;">
- </div>
- <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] == 'TYPE_EVENTS_TURNTABLE'): ?>
- <div class="col-md-3">
- <p>允许用户获奖次数:</p>
- <input type="text" name="winning_user_num" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['winning_user_num']; ?>
- " style="max-width:;">
- </div>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['cutDirectionFormNotType']) : in_array($_tmp, $this->_tpl_vars['cutDirectionFormNotType']))): ?>
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">切屏方向</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <div>
- <label class="radio-inline">
- <input name="cut_fx" type="radio" value="fadeInUp" <?php if ($this->_tpl_vars['eventData']['cut_fx'] == 'fadeInUp'): ?>checked<?php endif; ?> > 从下向上翻页
- </label>
- <label class="checkbox-inline">
- <input name="cut_fx" type="radio" value="fadeInRight" <?php if ($this->_tpl_vars['eventData']['cut_fx'] == 'fadeInRight'): ?>checked<?php endif; ?> > 从右向左翻页
- </label>
- </div>
- <div class='note'>调整切屏方向,将改变切屏方式及部分内容显示的效果,一旦选定,尽量不要修改</div>
- </div>
- </div>
- </div>
- <?php endif; ?>
-
- <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">专题音乐设置</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <div>
- <a href="javascript:;" class="music_play_or_pause <?php if (! $this->_tpl_vars['eventData']['music_url']): ?>music_play_hide<?php endif; ?> button button-caution button-circle button-tiny" data-type="play">播</a>
- <input id="music_input" name="music_url" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['music_url']; ?>
- ">
- <input id="music_upload" type="button" value="选择音乐" >
- </div>
- <div>
- <p></p>
- <span class="">音乐图标放置:</span>
- <?php $_from = $this->_tpl_vars['getMusicPosition']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['posid'] => $this->_tpl_vars['info']):
- ?>
- <label class="radio-inline">
- <input name="music_position" type="radio" value="<?php echo $this->_tpl_vars['posid']; ?>
- " <?php if ($this->_tpl_vars['eventData']['music_position'] == $this->_tpl_vars['posid']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
- </label>
- <?php endforeach; endif; unset($_from); ?>
- </div>
- </div>
- <div>目前只支持MP3格式,小于20k</div>
- </div>
- </div>
-
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">加载动画设置</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <div class="row">
- <div class="col-md-3">
- <p>加载背景色:</p>
- <input id="loading_bg_input" name="loading_bg_color" type="text" class="form-control" style="width:;" value="<?php echo $this->_tpl_vars['eventData']['loading_bg_color']; ?>
- ">
- </div>
- <div class="col-md-3">
- <p>加载动画、文本颜色:</p>
- <input id="loading_text_input" name="loading_text_color" type="text" class="form-control" style="width:;" value="<?php echo $this->_tpl_vars['eventData']['loading_text_color']; ?>
- ">
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <a id="activity_submit" href="javascript:;" class="button button-3d button-primary button-rounded"><i class="fa fa-refresh fa-spin" style="display:none;"></i> 保存设置</a>
- </div>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_right.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <div style="clear:both;"></div>
- </form>
- </div>
- <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
- <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.js"></script>
- <link rel="stylesheet" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.css">
- <?php endif; ?>
- <script>
- KISSY.use('node, io, jquery, gallery/datetimepicker/2.0.0/index, gallery/xplayer/2.1.0/index', function (S, Node, IO, jQuery, Datetimepicker, Xplayer) {
- var $ = S.all;
-
- //日期
- new Datetimepicker({
- start : 'input[name=begin_time]'
- });
- //日期
- new Datetimepicker({
- start : 'input[name=end_time]'
- });
-
- var XiamiPlay = new Xplayer({
- "autoplay": false
- });
-
- <?php if ($this->_tpl_vars['eventData']['music_url']): ?>
- XiamiPlay.load({
- 'url' : '<?php echo $this->_tpl_vars['eventData']['music_url']; ?>
- ',
- });
- <?php endif; ?>
-
- <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
- //选择音乐
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#music_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=mp3',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#music_input').val(data.url);
- $(".music_play_or_pause").removeClass('music_play_hide');
- XiamiPlay.load({
- 'url' : data.url,
- });
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
-
- $(".music_play_or_pause").on("click", function() {
- if ($(this).attr('data-type') == 'play') {
- XiamiPlay.play();
- $(this).attr('data-type', 'pause').text('停');
- } else {
- XiamiPlay.pause();
- $(this).attr('data-type', 'play').text('播');
- }
- });
- <?php endif; ?>
-
- var activity_submit_status = false; //按钮状态
- function submit_button_active() {
- activity_submit_status = true;
- $("#activity_submit").addClass('active').all('i').show();
- }
- function submit_button_default() {
- activity_submit_status = false;
- $("#activity_submit").removeClass('active').all('i').hide();
- }
-
- $("#activity_submit").on('click', function () {
- if (activity_submit_status) {
- return false;
- }
- submit_button_active();
-
- //表单验证
- var events_name = S.trim($("input[name=events_name]").val());
- if (!events_name) {
- alert('请填写活动标题');
- submit_button_default();
- return false;
- }
-
- var img_url = $("input[name=img_url]").val();
- if (!img_url) {
- alert('请选择列表默认图片');
- submit_button_default();
- return false;
- }
-
- var type = $("input[name=type]:checked").val();
- if (type <= 0) {
- alert('请选择活动类型');
- submit_button_default();
- return false;
- }
-
- <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE'): ?>
- var begin_time = $("input[name=begin_time]").val();
- var end_time = $("input[name=end_time]").val();
- if (!begin_time || !end_time) {
- alert('请设置活动时间');
- submit_button_default();
- return false;
- }
- <?php endif; ?>
-
- formData = IO.serialize("#activity_form");
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Activity_SetBasics&a=ReqUp'
- , data: formData
- , success: function (data) {
- if (data.ok) { //ok
- var url = data.msg;
- location.href = url;
- } else {
- alert('操作失败,原因:'+data.msg);
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
- });
- //设置微信分享
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#share_image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#share_image_input').val(data.url);
- K('#share_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //列表默认图
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#image_upload')[0],
- fieldName : 'imgFile',
- url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
- afterUpload : function(data) {
- if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
- K('#img_url_input').val(data.url);
- K('#img_url_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
- $("#loading_bg_input").minicolors({
- defaultValue: '<?php echo $this->_tpl_vars['eventData']['loading_bg_color']; ?>
- '
- });
- $("#loading_text_input").minicolors({
- defaultValue: '<?php echo $this->_tpl_vars['eventData']['loading_text_color']; ?>
- '
- });
- <?php endif; ?>
- </script>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
|