文件

469 行
17 KiB
HTML
可执行文件

<html>
<!--[1.3.12]-->
<head>
<meta charset="UTF-8"/>
<title></title>
<link href="__PUBLIC__/user/css/base.css" rel="stylesheet">
<style type="text/css">
center {
width: 120px;
float: left;
margin-left: 140px;
border: 1px dashed #ddd;
height: 104px;
margin: 10px 4% 10px 10px;
border-radius: 5px;
background: #fff;
}
a {
text-decoration: none !important;
cursor: pointer;
}
a:hover {
text-decoration: none !important;
}
select {
height: 30px;
width: 80px;
font-family: "微软雅黑";
color: #777;
}
.mi-form-select .select2-container .select2-choice {
width: 140px;
}
.select2-container .select2-default {
color: #444 !important;
}
.span6 {
float: left;
width: 100%;
overflow: hidden;
}
.clear {
clear: both;
width: 100%;
height: 0px;
}
.btn,
.mi-button-text {
height: 32px;
color: #fff;
overflow: visible;
background: #009688;
border: 1px solid #009688;
border-radius: 3px;
font-size: 14px;
padding: 0 75px;
}
div.chosen-select {
padding-right: 0px !important;
}
.img img,
.img span {
float: left;
}
.img span {
top: 15%;
left: 10px;
}
.remind-tip {
clear: both;
}
.mi-form-item-line {
width: 100%;
border: 1px solid #ddd;
padding: 14px 0 0;
margin-bottom: 10px;
padding-top: 35px;
border-radius: 3px;
background: #Fff;
}
.mi-form-item {
width: 100%;
}
.mi-button-mblue a {
text-decoration: none;
line-height: 32px !important;
}
.content .title span {
border-bottom: 0;
}
.content .titlechange span {
border-bottom: 0;
z-index: 999;
position: relative;
margin-top: 21px;
margin-left: 20px;
height: 18px;
font-size: 14px;
padding: 0 5px;
}
.custormm span {
border-bottom: 2px solid #009688 !important;
}
.titlechanged span {
display: block;
margin-top: -25px !important;
margin-bottom: 40px;
font-family: "Microsoft Yahei";
}
.content .titlechange span {
border-bottom: 0;
z-index: 999;
position: relative;
margin-top: 21px;
background: white;
margin-left: 20px;
height: 18px;
font-size: 14px;
padding: 0 5px;;
}
.titlechanged span {
display: block;
margin-top: -25px !important;
margin-bottom: 14px;
font-family: "Microsoft Yahei";
}
.massge .sign .mi-label {
width: 70px;
margin-left: 100px;
text-align: left;
}
.mi-form-item-line .mi-form-item-line {
border-left: 0;
border-right: 0;
}
#pengyouquan div {
height: 45px;
line-height: 32px;
width: 360px;
}
#pengyouquan div input {
/*float:right;*/
}
#pengyouquan div select {
border: 1px solid #ddd;
width: 80px;
border-radius: 3px;
}
#content-main img {
vertical-align: middle;
}
.pact_pic span.del-pic {
display: block;
position: absolute;
color: #fff;
top: 0px;
right: 0px;
width: 18px;
height: 18px;
font-size: 14px;
line-height: 16px;
border-radius: 9px;
background-color: rgba(153, 153, 153, 0.6);
text-align: center;
opacity: 0;
cursor: pointer;
-ms-transition: background-color 100ms;
-moz-transition: background-color 100ms;
-webkit-transition: background-color 100ms;
transition: background-color 100ms;
}
.pact_pic:hover span.del-pic {
opacity: 1;
}
.pact_pic span.del-pic:hover {
background-color: #000;
opacity: 1;
}
.line select {
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 3px;
}
.topcy {
width: 100%;
height: 58px;
background: #fff;
border: 1px solid #ddd;
border-bottom: none;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.topcy h3{
line-height: 58px;
box-sizing: border-box;
padding-left: 6%;
font-size: 20px;
}
.content input[type="text"] {
width: 350px;
height: 40px;
color: rgb(120, 120, 120);
text-indent: 1em;
border-width: 1px;
border-style: solid;
border-color: rgb(221, 221, 221);
border-image: initial;
border-radius: 4px;
}
</style>
<script src="__PUBLIC__/jquery/js/jquery-2.0.3.min.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini" style="cursor: pointer;">
<link rel="stylesheet" href="__PUBLIC__/user/css/uemprod.css">
<link rel="stylesheet" href="__PUBLIC__/user/css/css_uemprod_localFix.css">
<link href="__PUBLIC__/user/css/kindeditor_addmulti_img.css" rel="stylesheet">
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet">
<script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
<div id="container" class="ui-container">
<div class="content" style="margin-top:20px;">
<div class="container" style="float: left;margin-left: 20px;width: 60%;margin-bottom: -8px;">
<div class="topcy">
<h3>
商家公众号设置
</h3>
</div>
<form method="post" class="mi-form" id="submits">
<div class="sign fn-clear">
<div class="sign-form">
<div class="mi-form-item-line">
<div class="massge">
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>公众号名称
</label>
<input data-val="true" value="{$cache['name']}" id="name" name="name"
placeholder="请输入商家的公众号信息" type="text">
<div class="remind-tip">
</div>
</div>
</div>
<div class="massge">
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>appid
</label>
<input name="appid" id="appid" placeholder="请输入Appid" type="text"
value="{$cache['appid']}">
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
请填写微信公众平台后台的AppId
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>Appsercet
</label>
<input name="appsecret" placeholder="请输入Appsercet" id="Appsercet"
type="text" value="{$cache['appsecret']}">
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
请填写微信公众平台后台的Appsercet
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>token
</label>
<input name="token" placeholder="请输入token" id="token" type="text"
value="{$cache['token']}">
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
请填写微信公众平台后台的对接服务器填写的token值
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>服务器配置说明
</label>
<input name="LoginName" readonly placeholder="在微信公众平台中填写" type="text"
value="{$url}">
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
请填写微信公众平台后台的对接服务器填写的参数
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>ip白名单配置
</label>
<input name="LoginName" readonly placeholder="在微信公众平台中填写" type="text"
value="{$_SERVER['REMOTE_ADDR']}" >
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
请填写微信公众平台的ip白名单配置
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
<span class="required">*</span>上传JS文件
</label>
<button type="button" class="layui-btn" id="files"
style="background-color: #009688;border-radius: 4px">
<i class="layui-icon">&#xe67c;</i>上传文件
</button>
<input type="hidden" value="" class="insrc">
<div class="remind-tip" style="color: #ccc">
<label class="mi-label">
</label>
设置JS接口安全域名,需要上传的文件。 (txt文本)
</div>
</div>
</div>
<div class="span6">
<div class="mi-form-item fn-clear">
<label class="mi-label">
</label>
<a href="javascript:;" id="mys" style="font-size: 12px">点击查看微信公众号接入手册</a>
</div>
</div>
<div class="fn-clear clear">
</div>
<p style="text-align:center;height:90px">
<input type="button" id="addwx" class="btn" value="提交" style="">
<input type="button" class="btn" value="返回配置" id="bank" style="">
</p>
<div class="fn-clear clear">
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
$('#bank').click(function () {
// window.location.href = "{:U('wxconfig')}"
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
})
$('#addwx').click(function () {
//submits
var appsecret = $('#Appsercet').val();
var appid = $('#appid').val();
var name = $('#name').val();
var token = $('#token').val();
var wxjssrc = $('.insrc').val();
var data = {name: name, appid: appid, appsecret: appsecret, token: token, wxjssrc: wxjssrc};
$.ajax({
url: "{:U('wxupdate')}",
type: "post",
data: data,
success: function (re) {
if (re.success) {
layer.msg(re.msg)
} else {
layer.msg(re.msg)
}
}
})
})
</script>
<script>
//一般直接写在一个js文件中
layui.use(['layer', 'form', 'upload'], function () {
var layer = layui.layer, form = layui.form;
var laydate = layui.laydate;
$('#mys').click(function () {
layer.open({
title: "微信公众号接入说明",
area: ['50%', '80%'],
type: 2,
content: "{:U('Wxconfig/morejs')}",
});
})
//文件上传
var upload = layui.upload;
//执行实例
upload.render({
elem: '#files' //绑定元素
, url: '{:U("uploads")}' //上传接口
, accept: 'file'
, exts: 'txt'
, done: function (res, index, upload) {
console.log(res);
if (res.status == 1) {
$('.insrc').val(res.name);
top.layer.alert(res.msg);
}
else {
top.layer.alert(res.error_info);
}
}
});
});
</script>
</body>
</html>