1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- {include file="public/layout" /}
- <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- <div class="page" style="min-width: auto;box-shadow:none;">
- <!-- 操作说明 -->
- <div id="explanation" class="explanation">
- <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
- <h4 title="提示相关设置操作时应注意的要点">提示</h4>
- <span title="收起提示" id="explanationZoom" style="display: block;"></span>
- </div>
- <ul>
- <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>
- </ul>
- </div>
- <form class="form-horizontal" id="post_form" method="post" onsubmit="return false;">
- <div class="ncap-form-default">
- <dl class="row">
- <dt class="tit w120">
- <label for="appid"><em>*</em>AppID</label>
- </dt>
- <dd class="opt" style="width: auto;">
- <input type="text" class="w280" name="security_wechat_appid" value="{$security['security_wechat_appid']|default=''}" autocomplete="off">
- <p class="notic"></p>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit w120">
- <label for="secret"><em>*</em>AppSecret</label>
- </dt>
- <dd class="opt" style="width: auto;">
- <input type="text" class="w280" name="security_wechat_secret" value="{$security['security_wechat_secret']|default=''}" autocomplete="off">
- <p class="notic"></p>
- </dd>
- </dl>
- <div class="bot" style="padding-bottom:0px;">
- <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
- </div>
- </div>
- </form>
- </div>
- <script type="text/javascript">
-
- var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
-
- $("body").bind('keydown', function(event){
- if(event.keyCode ==13){
- checkForm();
- }
- });
-
- function checkForm()
- {
- if($.trim($('input[name=security_wechat_appid]').val()) == ''){
- showErrorMsg('微信应用appid不能为空!');
- $('input[name=security_wechat_appid]').focus();
- return false;
- }
- if($.trim($('input[name=security_wechat_secret]').val()) == ''){
- showErrorMsg('微信应用secret不能为空!');
- $('input[name=security_wechat_secret]').focus();
- return false;
- }
-
- layer_loading('正在处理');
- $.ajax({
- url: "{:url('Security/wechat_edit', ['_ajax'=>1])}",
- type: 'POST',
- dataType: 'JSON',
- data: $('#post_form').serialize(),
- success: function(res) {
- layer.closeAll();
- if (res.code == 1) {
- var _parent = parent;
- var documentOjb = window.parent.document;
- _parent.layer.close(parentObj);
- _parent.layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
- $("#security_wechat_add", documentOjb).hide();
- $("#security_wechat_edit", documentOjb).show();
- $("#is_wechat_add_edit", documentOjb).val('edit');
- var security_wechat_appid = $.trim($('input[name=security_wechat_appid]').val());
- $("#security_wechat_appid_content", documentOjb).val(security_wechat_appid);
- });
- } else {
- showErrorMsg(res.msg);
- }
- },
- error: function(e){
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- }
- </script>
- {include file="public/footer" /}
|