wxtempmsg.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. {$breadcrumb2}
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. </small>
  9. </h1>
  10. </div>
  11. <div class="row">
  12. <div class="col-xs-12 search-row">
  13. <div class="panel-body">
  14. <ul class="nav nav-tabs">
  15. <li <?php if($type == 1){ ?>class="active" <?php } ?>><a href="{:U('settings/wxtempmsg')}">参数配置</a></li>
  16. <li <?php if($type == 2){ ?>class="active" <?php } ?>><a href="{:U('settings/sendallwxmsg')}">消息群发</a></li>
  17. <li <?php if($type == 3){ ?>class="active" <?php } ?>><a href="{:U('settings/sendallcuswxmsg')}">客服消息群发</a></li>
  18. <li <?php if($type == 4){ ?>class="active" <?php } ?>><a href="{:U('settings/sendallmodifywxmsg')}">自定义模板消息群发</a></li>
  19. </ul>
  20. </div>
  21. </div>
  22. <div class="col-xs-12">
  23. <div class="alert alert-block alert-success">
  24. 1.http://mp.weixin.qq.com 登录<br/>
  25. 2.添加功能插件——模板消息<br/>
  26. 3.添加模板“IT科技/互联网|电子商务”<br/>
  27. 4.添加模板“消费品/消费品”<br/>
  28. 5.模板库中搜索标题“电子券到账提醒”——详情,添加<br/>
  29. 6.模板库中搜索标题“最新订单信息提醒”——详情,添加<br/>
  30. 7.模板库中搜索标题“商品到货通知”——详情,添加<br/>
  31. 8.我的模板——复制对应的模板id——填写到下方<br/>
  32. 在订单提醒和赠送优惠券等系统触发操作会给用户下发相应的模版消息。<br/>
  33. 下发成功前提是用户关注本公众号。
  34. <!--
  35. 需要到微信公众号管理后台开通模版消息,选择 IT科技/互联网|电子商务,消费品/消费品,添加对应模版消息。
  36. 订单标记发货通知: 编号 TM00505<br/>
  37. 到期提醒:编号 TM00710<br/>
  38. 团购结果通知:编号 TM00353<br/>
  39. 参团提醒: 编号 TM00352<br/>
  40. 退款通知: 编号 TM00004<br/>
  41. 客服处理提醒: 编号 OPENTM202172872<br/>
  42. 中奖结果通知: 编号 OPENTM204632492<br/>
  43. 最新订单信息提醒: 编号 TM204397052<br/>
  44. -->
  45. <!--
  46. 核销成功提醒: 编号 OPENTM206215005<br/>
  47. 电子券到期提醒: 编号 OPENTM228321043
  48. <br/><br/>
  49. 在下单、订单处理、团购成功、退款等系统触发操作会给用户下发相应的模版消息。<br>下发成功前提是用户关注本公众号。
  50. -->
  51. </div>
  52. </div>
  53. <div class="col-xs-12">
  54. <form class="form-horizontal" id="form" method="post" action="{:U('Settings/save')}">
  55. <div class="col-xs-12 top" style="display:none;">
  56. <div class="col-sm-2 ">订单标记发货通知:</div>
  57. <div class="col-sm-6">
  58. <input type="text" value="{$site.deliverNoticeId.value|default=''}" id="deliverNoticeId" name="deliverNoticeId" class="form-control" placeholder="">
  59. </div>
  60. </div>
  61. <div class="col-xs-12 top" style="display:none;">
  62. <div class="col-sm-2 ">到期提醒:</div>
  63. <div class="col-sm-6">
  64. <input type="text" value="{$site.expireId.value|default=''}" id="expireId" name="expireId" class="form-control" placeholder="">
  65. </div>
  66. </div>
  67. <div class="col-xs-12 top" style="display:none;">
  68. <div class="col-sm-2 ">团购结果通知:</div>
  69. <div class="col-sm-6">
  70. <input type="text" value="{$site.groupResultId.value|default=''}" id="groupResultId" name="groupResultId" class="form-control" placeholder="">
  71. </div>
  72. </div>
  73. <div class="col-xs-12 top" style="display:none;">
  74. <div class="col-sm-2 ">参团提醒:</div>
  75. <div class="col-sm-6">
  76. <input type="text" value="{$site.joinGroupId.value|default=''}" id="joinGroupId" name="joinGroupId" class="form-control" placeholder="">
  77. </div>
  78. </div>
  79. <div class="col-xs-12 top" style="display:none;">
  80. <div class="col-sm-2 ">退款通知:</div>
  81. <div class="col-sm-6">
  82. <input type="text" value="{$site.refundNoticeId.value|default=''}" id="refundNoticeId" name="refundNoticeId" class="form-control" placeholder="">
  83. </div>
  84. </div>
  85. <div class="col-xs-12 top" style="display:none;">
  86. <div class="col-sm-2 ">客服处理提醒:</div>
  87. <div class="col-sm-6">
  88. <input type="text" value="{$site.customerResultId.value|default=''}" id="customerResultId" name="customerResultId" class="form-control" placeholder="">
  89. </div>
  90. </div>
  91. <div class="col-xs-12 top" style="display:none;">
  92. <div class="col-sm-2 ">中奖结果通知:</div>
  93. <div class="col-sm-6">
  94. <input type="text" value="{$site.awardResultId.value|default=''}" id="awardResultId" name="awardResultId" class="form-control" placeholder="">
  95. </div>
  96. </div>
  97. <div class="col-xs-12 top" >
  98. <div class="col-sm-2 ">最新订单信息提醒:</div>
  99. <div class="col-sm-6">
  100. <input type="text" value="{$site.newOrdersNoticeId.value|default=''}" id="newOrdersNoticeId" name="newOrdersNoticeId" class="form-control" placeholder="">
  101. </div>
  102. </div>
  103. <div class="col-xs-12 top" style="display:none;">
  104. <div class="col-sm-2 ">核销成功提醒:</div>
  105. <div class="col-sm-6">
  106. <input type="text" value="{$site.verifyNoticeId.value|default=''}" id="verifyNoticeId" name="verifyNoticeId" class="form-control" placeholder="">
  107. </div>
  108. </div>
  109. <div class="col-xs-12 top">
  110. <div class="col-sm-2 ">赠送优惠券提醒:</div>
  111. <div class="col-sm-6">
  112. <input type="text" value="{$site.sendQuanNotice.value|default=''}" id="sendQuanNotice" name="sendQuanNotice" class="form-control" placeholder="">
  113. </div>
  114. </div>
  115. <div class="col-xs-12 top">
  116. <div class="col-sm-2 ">商品到货提醒:</div>
  117. <div class="col-sm-6">
  118. <input type="text" value="{$site.GoodsOnNoticeId.value|default=''}" id="GoodsOnNoticeId" name="GoodsOnNoticeId" class="form-control" placeholder="">
  119. </div>
  120. </div>
  121. </form>
  122. <div class="form-group">
  123. <label class="col-sm-1 control-label no-padding-left"> </label>
  124. <div class="col-sm-11">
  125. <button form="form" type="submit" class="btn btn-sm btn-primary">提交</button>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </block>
  131. <block name="javascript">
  132. <style>
  133. .top, .buttom {
  134. margin-top: 15px;
  135. }
  136. </style>
  137. <script src="__PUBLIC__/fileupload/jquery.ui.widget.js"></script>
  138. <script src="__PUBLIC__/fileupload/jquery.fileupload.js"></script>
  139. <script>
  140. $(function(){
  141. // tooltips on hover button-upload
  142. $('[data-toggle=\'tooltip\']').tooltip({container: 'body', html: true});
  143. // Makes tooltips work on ajax generated content
  144. $(document).ajaxStop(function() {
  145. $('[data-toggle=\'tooltip\']').tooltip({container: 'body'});
  146. });
  147. $(document).delegate('a[data-toggle=\'image\']', 'click', function(e) {
  148. e.preventDefault();
  149. var index=$(this).attr('num');
  150. //alert(index);
  151. var element = this;
  152. if(index==undefined){
  153. $(element).popover({
  154. html: true,
  155. placement: 'right',
  156. trigger: 'manual',
  157. content: function() {
  158. 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>';
  159. }
  160. });
  161. }
  162. $(element).popover('toggle');
  163. //商品图片
  164. $('#thumb-image').on('click', function() {
  165. //alert('333');
  166. $('#modal-image').remove();
  167. $('#form-upload').remove();
  168. $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input osctype="btn_upload_image" type="file" name="file" /></form>');
  169. $('#form-upload input[name=\'file\']').trigger('click');
  170. $(element).popover('hide');
  171. $('[osctype="btn_upload_image"]').fileupload({
  172. dataType: 'json',
  173. url: "{:U('Image/upload_image',array('dir'=>'shop'))}",
  174. add: function(e, data) {
  175. $parent = $('#thumb');
  176. $input = $parent.find('[osctype="image_input"]');
  177. $img = $parent.find('[osctype="image"]');
  178. data.formData = {old_goods_image:$input.val()};
  179. $img.attr('src', "__IMG__/loading.gif");
  180. data.submit();
  181. },
  182. done: function (e,data) {
  183. var image=data.result;
  184. $parent = $('#thumb');
  185. $input = $parent.find('[osctype="image_input"]');
  186. $img = $parent.find('[osctype="image"]');
  187. if(image) {
  188. // $img.prev('i').hide();
  189. $img.attr('src', '__ROOT__'+image.image_thumb);
  190. $img.show();
  191. $input.val(image.image);
  192. } else {
  193. alert('上传失败');
  194. }
  195. }
  196. });
  197. });
  198. $('#button-clear').on('click', function() {
  199. $(element).find('img').attr('src', $(element).find('img').attr('data-placeholder'));
  200. $(element).parent().find('input').attr('value', '');
  201. $(element).popover('hide');
  202. });
  203. });
  204. });
  205. </script>
  206. </block>