Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

wechat_edit.htm 4.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="min-width: auto;box-shadow:none;">
  6. <!-- 操作说明 -->
  7. <div id="explanation" class="explanation">
  8. <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
  9. <h4 title="提示相关设置操作时应注意的要点">提示</h4>
  10. <span title="收起提示" id="explanationZoom" style="display: block;"></span>
  11. </div>
  12. <ul>
  13. <li>获取微信网站应用配置appid/appsecret,点击<a href="javascript:void(0);" data-href="https://www.eyoucms.com/plus/view.php?aid=17633&origin_eycms=1" onclick="parent_openFullframe(this, '获取微信扫描登录的应用配置appid/appsecret');" style="color: red;">【查看教程】</a></li>
  14. </ul>
  15. </div>
  16. <form class="form-horizontal" id="post_form" method="post" onsubmit="return false;">
  17. <div class="ncap-form-default">
  18. <dl class="row">
  19. <dt class="tit w120">
  20. <label for="appid"><em>*</em>AppID</label>
  21. </dt>
  22. <dd class="opt" style="width: auto;">
  23. <input type="text" class="w280" name="security_wechat_appid" value="{$security['security_wechat_appid']|default=''}" autocomplete="off">
  24. <p class="notic"></p>
  25. </dd>
  26. </dl>
  27. <dl class="row">
  28. <dt class="tit w120">
  29. <label for="secret"><em>*</em>AppSecret</label>
  30. </dt>
  31. <dd class="opt" style="width: auto;">
  32. <input type="text" class="w280" name="security_wechat_secret" value="{$security['security_wechat_secret']|default=''}" autocomplete="off">
  33. <p class="notic"></p>
  34. </dd>
  35. </dl>
  36. <div class="bot" style="padding-bottom:0px;">
  37. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  38. </div>
  39. </div>
  40. </form>
  41. </div>
  42. <script type="text/javascript">
  43. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  44. $("body").bind('keydown', function(event){
  45. if(event.keyCode ==13){
  46. checkForm();
  47. }
  48. });
  49. function checkForm()
  50. {
  51. if($.trim($('input[name=security_wechat_appid]').val()) == ''){
  52. showErrorMsg('微信应用appid不能为空!');
  53. $('input[name=security_wechat_appid]').focus();
  54. return false;
  55. }
  56. if($.trim($('input[name=security_wechat_secret]').val()) == ''){
  57. showErrorMsg('微信应用secret不能为空!');
  58. $('input[name=security_wechat_secret]').focus();
  59. return false;
  60. }
  61. layer_loading('正在处理');
  62. $.ajax({
  63. url: "{:url('Security/wechat_edit', ['_ajax'=>1])}",
  64. type: 'POST',
  65. dataType: 'JSON',
  66. data: $('#post_form').serialize(),
  67. success: function(res) {
  68. layer.closeAll();
  69. if (res.code == 1) {
  70. var _parent = parent;
  71. var documentOjb = window.parent.document;
  72. _parent.layer.close(parentObj);
  73. _parent.layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
  74. $("#security_wechat_add", documentOjb).hide();
  75. $("#security_wechat_edit", documentOjb).show();
  76. $("#is_wechat_add_edit", documentOjb).val('edit');
  77. var security_wechat_appid = $.trim($('input[name=security_wechat_appid]').val());
  78. $("#security_wechat_appid_content", documentOjb).val(security_wechat_appid);
  79. });
  80. } else {
  81. showErrorMsg(res.msg);
  82. }
  83. },
  84. error: function(e){
  85. layer.closeAll();
  86. showErrorAlert(e.responseText);
  87. }
  88. });
  89. }
  90. </script>
  91. {include file="public/footer" /}