123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <{include file="get_kindeditor.html"}>
- <script type="text/javascript" src="<{$web_cfg.cdn}>/public/static/js/jquery-1.7.2.min.js"></script>
- <link rel="stylesheet" href="<{$web_cfg.cdn}>/public/static/js/jquery.minicolors.css" />
- <script type="text/javascript" src="<{$web_cfg.cdn}>/public/static/js/jquery.minicolors.js"></script>
- <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>
- <form id="add_platform_form">
- <input name="id" type="hidden" value="<{$platformData.id}>">
- <div class="col-md-5" style="padding-left: 30px;">
- <div class="form-group">
- <label class="control-label">编辑列表信息</label>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">描述</label>
- <input name="desc" type="text" class="form-control" value="<{$platformData.desc}>">
- <span class="note">平台的描述信息</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">名称</label>
- <input name="name" type="text" class="form-control" value="<{$platformData.name}>">
- <span class="note">页面标题使用</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">URL短地址</label>
- <input name="url" type="text" class="form-control" value="<{$platformData.url}>">
- <span class="note">短地址使用</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">色值</label>
- <input name="color" type="text" class="form-control" value="<{$platformData.color}>">
- <span class="note">页面统一颜色</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">关注地址</label>
- <input name="follow_url" type="text" class="form-control" value="<{$platformData.follow_url}>">
- <span class="note">导航栏“关注”链接地址</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“活动”按钮图片</label>
- <div>
- <img id="home_image_tag" src="<{$platformData.home_img_url}>" style="width:30px;" class="img-thumbnail">
- <input id="home_image_input" name='home_img_url' type="hidden" value="<{$platformData.home_img_url}>">
- <input id="home_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="home_image_tag_hover" src="<{$platformData.home_img_url_hover}>" style="width:30px;" class="img-thumbnail">
- <input id="home_image_input_hover" name='home_img_url_hover' type="hidden" value="<{$platformData.home_img_url_hover}>">
- <input id="home_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='home_img_text' value="<{if $platformData.home_img_text}><{$platformData.home_img_text}><{else}>活动<{/if}>">
- <span class="note">导航活动按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“关注”按钮图片</label>
- <div>
- <img id="follow_image_tag" src="<{$platformData.follow_img_url}>" style="width:30px;" class="img-thumbnail">
- <input id="follow_image_input" name='follow_img_url' type="hidden" value="<{$platformData.follow_img_url}>">
- <input id="follow_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="follow_image_tag_hover" src="<{$platformData.follow_img_url_hover}>" style="width:30px;" class="img-thumbnail">
- <input id="follow_image_input_hover" name='follow_img_url_hover' type="hidden" value="<{$platformData.follow_img_url_hover}>">
- <input id="follow_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='follow_img_text' value="<{if $platformData.follow_img_text}><{$platformData.follow_img_text}><{else}>关注<{/if}>">
- <span class="note">导航关注按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“我的”按钮图片</label>
- <div>
- <img id="gift_image_tag" src="<{$platformData.gift_img_url}>" style="width:30px;" class="img-thumbnail">
- <input id="gift_image_input" name='gift_img_url' type="hidden" value="<{$platformData.gift_img_url}>">
- <input id="gift_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="gift_image_tag_hover" src="<{$platformData.gift_img_url_hover}>" style="width:30px;" class="img-thumbnail">
- <input id="gift_image_input_hover" name='gift_img_url_hover' type="hidden" value="<{$platformData.gift_img_url_hover}>">
- <input id="gift_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='gift_img_text' value="<{if $platformData.gift_img_text}><{$platformData.gift_img_text}><{else}>我的<{/if}>">
- <span class="note">导航我的按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“分享”按钮图片</label>
- <div>
- <img id="share_image_tag" src="<{$platformData.share_img_url}>" style="width:30px;" class="img-thumbnail">
- <input id="share_image_input" name='share_img_url' type="hidden" value="<{$platformData.share_img_url}>">
- <input id="share_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="share_image_tag_hover" src="<{$platformData.share_img_url_hover}>" style="width:30px;" class="img-thumbnail">
- <input id="share_image_input_hover" name='share_img_url_hover' type="hidden" value="<{$platformData.share_img_url_hover}>">
- <input id="share_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='share_img_text' value="<{if $platformData.share_img_text}><{$platformData.share_img_text}><{else}>分享<{/if}>">
- <span class="note">导航分享按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">“招商”按钮图片</label>
- <div>
- <img id="zs_image_tag" src="<{$platformData.zs_img_url}>" style="width:30px;" class="img-thumbnail">
- <input id="zs_image_input" name='zs_img_url' type="hidden" value="<{$platformData.zs_img_url}>">
- <input id="zs_image_upload" type="button" value="默认图片" >
- </div>
- <div>
- <img id="zs_image_tag_hover" src="<{$platformData.zs_img_url_hover}>" style="width:30px;" class="img-thumbnail">
- <input id="zs_image_input_hover" name='zs_img_url_hover' type="hidden" value="<{$platformData.zs_img_url_hover}>">
- <input id="zs_image_upload_hover" type="button" value="选中图片" >
- </div>
- <label class="control-label rowlabel">按钮文字</label><input type="text" class="form-control" name='zs_img_text' value="<{if $platformData.zs_img_text}><{$platformData.zs_img_text}><{else}>招商<{/if}>">
- <br />
- <label class="control-label rowlabel">招商地址</label><input type="text" class="form-control" name='zs_img_link' value="<{if $platformData.zs_img_link}><{$platformData.zs_img_link}><{/if}>">
- <span class="note">导航招商按钮图片。36*36 PNG 图片</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享图:</label>
- <div>
- <img id="weixinShare_image_tag" src="<{$platformData.weixinShare_img_url}>" style="width:150px;" class="img-thumbnail">
- <input id="weixinShare_image_input" name='weixinShare_img_url' type="hidden" value="<{$platformData.weixinShare_img_url}>">
- <input id="weixinShare_image_upload" type="button" value="选择图片" >
- </div>
- <span class="note">默认微信分享的图片 JPG、PNG,200*200,小于20k</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享标题:</label>
- <input name="weixinShare_title" type="text" class="form-control" value="<{$platformData.weixinShare_title}>">
- <span class="note">少于24个字</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">微信分享内容:</label>
- <input name="weixinShare_content" type="text" class="form-control" value="<{$platformData.weixinShare_content}>">
- <span class="note">少于36个字</span>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">广告代码:</label>
- <textarea name="ad" class="form-control" placeholder="<{$platformData.ad}>"></textarea>
- </div>
-
- <div>
- <a id="add_platform_btn" href="javascript:;" class="button button-primary button-small">修改列表</a>
- </div>
- </div>
- </form>
- <script>
- KISSY.use('node, io', function (S, Node, IO) {
- var $ = S.all;
-
- $("#add_platform_btn").on('click', function () {
- var desc = $("input[name=desc]").val();
- if (!desc) {
- alert('请填写描述信息');
- return false;
- }
-
- var name = $("input[name=name]").val();
- if (!name) {
- alert('请填写名称');
- return false;
- }
-
- var url = $("input[name=url]").val();
- if (!url) {
- alert('请填短地址');
- return false;
- }
-
-
-
- var data = IO.serialize("#add_platform_form");
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Platform_index&a=PageList&a=ReqUp'
- , data: data
- , success: function (data) {
- if (data.ok) { //ok
- var url = data.msg;
- location.href = VG.conf.root_domain + '/?c=Admin_Platform_index&a=PageList';
- } else {
- alert('操作失败,原因:'+data.msg);
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
- });
- //取色器
- $(document).ready( function() {
- $("input[name=color]").minicolors({
- defaultValue: '#FFFFFF'
- });
- });
- //home image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#home_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('#home_image_input').val(data.url);
- K('#home_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('#home_image_upload_hover')[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('#home_image_input_hover').val(data.url);
- K('#home_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //follow image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#follow_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('#follow_image_input').val(data.url);
- K('#follow_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('#follow_image_upload_hover')[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('#follow_image_input_hover').val(data.url);
- K('#follow_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //share image
- 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('#share_image_upload_hover')[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_hover').val(data.url);
- K('#share_image_tag_hover').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('#zs_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('#zs_image_input').val(data.url);
- K('#zs_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('#zs_image_upload_hover')[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('#zs_image_input_hover').val(data.url);
- K('#zs_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- //gift image
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#gift_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('#gift_image_input').val(data.url);
- K('#gift_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('#gift_image_upload_hover')[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('#gift_image_input_hover').val(data.url);
- K('#gift_image_tag_hover').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- // weixin share
- KindEditor.ready(function(K) {
- var uploadbutton = K.uploadbutton({
- button : K('#weixinShare_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('#weixinShare_image_input').val(data.url);
- K('#weixinShare_image_tag').attr('src', data.url);
- } else {
- alert(data.message);
- }
- },
- afterError : function(str) {
- alert('自定义错误信息: ' + str);
- }
- });
- uploadbutton.fileBox.change(function(e) {
- uploadbutton.submit();
- });
- });
- </script>
- <{include file="./admin/bottom.html"}>
|