Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

microsite.htm 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="overflow-y: scroll;min-width:auto;">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page" style="min-width: auto;box-shadow:none;">
  7. {include file="canal/bar" /}
  8. <!-- 操作说明 -->
  9. <div id="explanation" class="explanation">
  10. <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
  11. <h4 title="提示相关设置操作时应注意的要点">提示</h4>
  12. <span title="收起提示" id="explanationZoom" style="display: block;"></span>
  13. </div>
  14. <ul>
  15. <li>先完善微信公众号的配置</li>
  16. <li>微信号、二维码是在微站点开启 <span style="color: red;">强制微信模式</span> 时在PC和移动端展示</li>
  17. </ul>
  18. </div>
  19. <form class="form-horizontal" id="postMicrosite" method="post">
  20. <div class="ncap-form-default">
  21. <dl class="row">
  22. <dt class="tit">
  23. <label>微站点模式</label>
  24. <input type="hidden" id="shop_micro" value="{$usersConfig.shop_micro|default=0}">
  25. </dt>
  26. <dd class="opt" style="line-height: 30px;">
  27. <label>
  28. <input type="radio" name="shop[shop_micro]" id="shop_micro1" value="1" {if condition="isset($usersConfig.shop_micro) && $usersConfig.shop_micro == 1"} checked="checked" {/if} onclick="DetectConfig(1);"/>开启
  29. </label>
  30. &nbsp;&nbsp;&nbsp;
  31. <label>
  32. <input type="radio" name="shop[shop_micro]" id="shop_micro0" value="0" {if condition="empty($usersConfig.shop_micro)"} checked="checked" {/if}/>关闭
  33. </label>
  34. &nbsp;&nbsp;&nbsp;
  35. <p class="notic">开启后,在微信里访问不需要注册或登录,需要先配置下方微信参数</p>
  36. </dd>
  37. </dl>
  38. <dl class="row">
  39. <dt class="tit">
  40. <label>强制微信模式</label>
  41. <input type="hidden" id="shop_force_use_wechat" value="{$usersConfig.shop_force_use_wechat|default=0}">
  42. </dt>
  43. <dd class="opt" style="line-height: 30px;">
  44. <label>
  45. <input type="radio" name="shop[shop_force_use_wechat]" id="shop_force_use_wechat1" value="1" {if condition="isset($usersConfig.shop_force_use_wechat) && $usersConfig.shop_force_use_wechat == 1"} checked="checked" {/if} onclick="DetectConfig(2);"/>开启
  46. </label>
  47. &nbsp;&nbsp;&nbsp;
  48. <label>
  49. <input type="radio" name="shop[shop_force_use_wechat]" id="shop_force_use_wechat0" value="0" {if condition="empty($usersConfig.shop_force_use_wechat)"} checked="checked" {/if} onclick="DetectConfig(3);"/>关闭
  50. </label>
  51. &nbsp;&nbsp;&nbsp;
  52. <p class="notic">开启后,只能在微信内访问,需要先开启微站点模式</p>
  53. </dd>
  54. </dl>
  55. <dl class="row">
  56. <dt class="tit">
  57. <label for="wechat_name">公众号的微信号</label>
  58. </dt>
  59. <dd class="opt">
  60. <input type="text" name="login[wechat_name]" id="wechat_name" value="{$login.wechat_name|default=''}" class="input-txt">
  61. <p class="notic"></p>
  62. </dd>
  63. </dl>
  64. <dl class="row">
  65. <dt class="tit">
  66. <label for="wechat_pic">公众号的二维码</label>
  67. </dt>
  68. <dd class="opt">
  69. <div class="input-file-show">
  70. <span class="show">
  71. <a id="img_a_wechat_pic" class="nyroModal" rel="gal" href="{$login.wechat_pic|default='javascript:void(0);'}?t={php}echo time();{/php}" target="_blank">
  72. <i id="img_i_wechat_pic" class="fa fa-picture-o" {notempty name="$login.wechat_pic"}onmouseover="layer_tips=layer.tips('<img src={$login.wechat_pic|default=''}?t={php}echo time();{/php} width=300 height=300>',this,{tips: [1, '#fff']});"{/notempty} onmouseout="layer.close(layer_tips);"></i>
  73. </a>
  74. </span>
  75. <span class="type-file-box">
  76. <input type="text" id="wechat_pic" name="login[wechat_pic]" value="{$login.wechat_pic|default=''}" class="type-file-text" autocomplete="off">
  77. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  78. <input class="type-file-file" onclick="GetUploadify(1, '', 'allimg', 'wechat_pic_call_back')" size="30" hidefocus="true" nc_type="change_site_logo" title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  79. </span>
  80. </div>
  81. <span class="err"></span>
  82. <p class="notic"></p>
  83. </dd>
  84. </dl>
  85. <dl class="row">
  86. <div class="bot" style="padding-bottom:0px;">
  87. <input type="hidden" id="WX_appid" value="{$login.appid|default=''}">
  88. <a href="JavaScript:void(0);" onclick="submit_microsite();" class="ncap-btn-big ncap-btn-green">确认提交</a>
  89. </div>
  90. </dl>
  91. </div>
  92. </form>
  93. </div>
  94. <script type="text/javascript">
  95. // 提交
  96. function submit_microsite(){
  97. layer_loading("正在处理");
  98. $.ajax({
  99. url: "{:url('System/microsite', ['_ajax'=>1])}",
  100. type: 'POST',
  101. dataType: 'JSON',
  102. data: $('#postMicrosite').serialize(),
  103. success: function(res){
  104. layer.closeAll();
  105. if (1 == res.code) {
  106. layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
  107. window.location.reload();
  108. });
  109. } else {
  110. var icon = 2;
  111. try{
  112. if (res.data.icon) {
  113. icon = res.data.icon;
  114. }
  115. }catch(e){}
  116. showErrorAlert(res.msg, icon);
  117. return false;
  118. }
  119. },
  120. error: function(e){
  121. layer.closeAll();
  122. showErrorMsg(e.responseText);
  123. return false;
  124. }
  125. });
  126. }
  127. // 检测是否配置微信参数
  128. function DetectConfig(type) {
  129. if (3 == type) {
  130. $('#shop_micro0').removeAttr("disabled");
  131. return false;
  132. }
  133. var WX_appid = $('#WX_appid');
  134. if (!WX_appid.val() || '' == WX_appid.val()) {
  135. if (1 == type) {
  136. $("#shop_micro0").click();
  137. } else if (2 == type) {
  138. $("#shop_force_use_wechat0").click();
  139. }
  140. showErrorAlert('请先完善微信公众号配置');
  141. return false;
  142. }
  143. if (2 == type) {
  144. // 设置微信端开启
  145. $("#shop_force_use_wechat1, #shop_micro1").attr('checked', true);
  146. $('#shop_micro0').attr("disabled", "disabled");
  147. }
  148. }
  149. // 加载图片显示
  150. function wechat_pic_call_back(fileurl_tmp) {
  151. $("#wechat_pic").val(fileurl_tmp);
  152. $("#img_a_wechat_pic").attr('href', fileurl_tmp);
  153. $("#img_i_wechat_pic").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" width=300 height=300>',this,{tips: [1, '#fff']});");
  154. }
  155. </script>
  156. {include file="public/footer" /}