123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <extend name="Public:base" />
- <block name="content">
- <div class="page-header">
- <h1>
- {$breadcrumb2}
- <small>
- <i class="icon-double-angle-right"></i>
-
- </small>
- </h1>
- </div>
- <div class="row">
- <div class="col-xs-12 search-row">
- <div class="panel-body">
- <ul class="nav nav-tabs">
- <li <?php if($type == 1){ ?>class="active" <?php } ?>><a href="{:U('settings/wxprogram')}">参数配置</a></li>
- <li <?php if($type == 2){ ?>class="active" <?php } ?>><a href="{:U('settings/wxprogram_template')}">模板消息配置</a></li>
-
- </ul>
- </div>
- </div>
-
- <div class="col-xs-12">
- <form class="form-horizontal" id="form" method="post" action="{:U('Settings/save')}">
-
-
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">拼团开团通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_open_pin.value|default=''}" id="weprogram_template_open_pin" name="weprogram_template_open_pin" class="form-control" placeholder="">
- </div>
- </div>
-
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">拼团参与通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_take_pin.value|default=''}" id="weprogram_template_take_pin" name="weprogram_template_take_pin" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">拼团成功通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_success_pin.value|default=''}" id="weprogram_template_success_pin" name="weprogram_template_success_pin" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">拼团失败通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_fail_pin.value|default=''}" id="weprogram_template_fail_pin" name="weprogram_template_fail_pin" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">退款成功通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_refund_order.value|default=''}" id="weprogram_template_refund_order" name="weprogram_template_refund_order" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">参团人数不足通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_tip_pin.value|default=''}" id="weprogram_template_tip_pin" name="weprogram_template_tip_pin" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">订单支付成功通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_pay_order.value|default=''}" id="weprogram_template_pay_order" name="weprogram_template_pay_order" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">抽奖结果通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_lottery_result.value|default=''}" id="weprogram_template_lottery_result" name="weprogram_template_lottery_result" class="form-control" placeholder="">
- </div>
- </div>
- <div class="col-xs-12 top">
- <div class="col-sm-2 ">订单发货通知:</div>
- <div class="col-sm-6">
- <input type="text" value="{$site.weprogram_template_send_order.value|default=''}" id="weprogram_template_send_order" name="weprogram_template_send_order" class="form-control" placeholder="">
- </div>
- </div>
-
- </form>
- <div class="form-group">
- <label class="col-sm-1 control-label no-padding-left"> </label>
- <div class="col-sm-11">
- <button form="form" type="submit" class="btn btn-sm btn-primary">提交</button>
- </div>
- </div>
- </div>
- </div>
- </block>
- <block name="javascript">
- <style>
- .top, .buttom {
- margin-top: 15px;
- }
- </style>
- <script src="__PUBLIC__/fileupload/jquery.ui.widget.js"></script>
- <script src="__PUBLIC__/fileupload/jquery.fileupload.js"></script>
- <script>
- $(function(){
-
- // tooltips on hover button-upload
- $('[data-toggle=\'tooltip\']').tooltip({container: 'body', html: true});
- // Makes tooltips work on ajax generated content
- $(document).ajaxStop(function() {
- $('[data-toggle=\'tooltip\']').tooltip({container: 'body'});
- });
-
-
-
- $(document).delegate('a[data-toggle=\'image\']', 'click', function(e) {
- e.preventDefault();
-
- var index=$(this).attr('num');
-
- //alert(index);
-
- var element = this;
-
- if(index==undefined){
- $(element).popover({
- html: true,
- placement: 'right',
- trigger: 'manual',
- content: function() {
- return '<button type="button" id="thumb-image" class="btn btn-primary"><i class="icon-edit"></i></button> <button type="button" id="button-clear" class="btn btn-danger"><i class="icon-trash"></i></button>';
- }
- });
- }
-
-
- $(element).popover('toggle');
-
- //商品图片
- $('#thumb-image').on('click', function() {
-
- //alert('333');
-
- $('#modal-image').remove();
-
- $('#form-upload').remove();
-
- $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input osctype="btn_upload_image" type="file" name="file" /></form>');
-
- $('#form-upload input[name=\'file\']').trigger('click');
-
- $(element).popover('hide');
-
- $('[osctype="btn_upload_image"]').fileupload({
-
- dataType: 'json',
- url: "{:U('Image/upload_image',array('dir'=>'shop'))}",
- add: function(e, data) {
- $parent = $('#thumb');
- $input = $parent.find('[osctype="image_input"]');
- $img = $parent.find('[osctype="image"]');
- data.formData = {old_goods_image:$input.val()};
- $img.attr('src', "__IMG__/loading.gif");
- data.submit();
- },
- done: function (e,data) {
-
- var image=data.result;
-
- $parent = $('#thumb');
- $input = $parent.find('[osctype="image_input"]');
- $img = $parent.find('[osctype="image"]');
- if(image) {
- // $img.prev('i').hide();
- $img.attr('src', '__ROOT__'+image.image_thumb);
- $img.show();
- $input.val(image.image);
- } else {
- alert('上传失败');
- }
- }
- });
- });
-
-
-
- $('#button-clear').on('click', function() {
- $(element).find('img').attr('src', $(element).find('img').attr('data-placeholder'));
-
- $(element).parent().find('input').attr('value', '');
-
- $(element).popover('hide');
- });
- });
- });
-
- </script>
- </block>
|