a693c79c735ecf9a06fc954895c1880f.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_W['attachurl_remote']); ?>',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : <?php echo json_encode($_W['account']);?>,
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. </head>
  45. <body layadmin-themealias="default">
  46. <div class="layui-fluid">
  47. <div class="layui-card">
  48. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">小程序设置</span></div>
  49. <div class="layui-card-body" style="padding:15px;">
  50. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  51. <div class="layui-form-item">
  52. <label class="layui-form-label">支付模式</label>
  53. <div class="layui-input-block">
  54. <label class='radio-inline'><input type="radio" name="parameter[is_open_yinpay]" value="0" title="微信支付商户" <?php if(empty($data) || $data['is_open_yinpay'] ==0){ ?>checked <?php } ?> onclick="$('#wepro').show();$('#wepro_sub').hide();$('#wepro2').show();$('#wepro_sub2').hide();$('#wepro3').show();$('#wepro_sub3').hide();" /></label>
  55. <label class='radio-inline'><input type="radio" name="parameter[is_open_yinpay]" value="3" title="服务商+特约商户" <?php if( !empty($data) && $data['is_open_yinpay'] ==3 ){ ?>checked <?php } ?> onclick="$('#wepro_sub').show();$('#wepro').hide();$('#wepro_sub2').show();$('#wepro2').hide();$('#wepro_sub3').show();$('#wepro3').hide();" /></label>
  56. </div>
  57. </div>
  58. <div class="layui-form-item">
  59. <label class="layui-form-label">小程序APPID</label>
  60. <div class="layui-input-block">
  61. <input type="text" name="parameter[wepro_appid]" class="form-control" value="<?php echo ($data['wepro_appid']); ?>" />
  62. <span class="layui-form-mid">mp.weixin.qq.com 开发-开发配置</span>
  63. </div>
  64. </div>
  65. <div class="layui-form-item">
  66. <label class="layui-form-label">小程序APPSECRET</label>
  67. <div class="layui-input-block">
  68. <input type="text" name="parameter[wepro_appsecret]" class="form-control" value="<?php echo ($data['wepro_appsecret']); ?>" />
  69. </div>
  70. </div>
  71. <div class="layui-form-item" id="wepro" style="<?php if( !empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==3 ){ ?>display:none;<?php } ?>">
  72. <div class="layui-form-item">
  73. <label class="layui-form-label">商户ID</label>
  74. <div class="layui-input-block">
  75. <input type="text" name="parameter[wepro_partnerid]" class="form-control" value="<?php echo ($data['wepro_partnerid']); ?>" />
  76. </div>
  77. </div>
  78. </div>
  79. <div class="layui-form-item" id="wepro_sub" style="<?php if( empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==0 ){ ?>display:none;<?php } ?>">
  80. <div class="layui-form-item">
  81. <label class="layui-form-label">特约商户商户号</label>
  82. <div class="layui-input-block">
  83. <input type="text" name="parameter[wepro_sub_mch_id]" class="form-control" value="<?php echo ($data['wepro_sub_mch_id']); ?>" />
  84. </div>
  85. </div>
  86. </div>
  87. <div class="layui-form-item">
  88. <label class="layui-form-label" id="wepro2" style="<?php if( !empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==3 ){ ?>display:none;<?php } ?>">支付秘钥</label>
  89. <label class="layui-form-label" id="wepro_sub2" style="<?php if( empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==0 ){ ?>display:none;<?php } ?>">服务商秘钥</label>
  90. <div class="layui-input-block">
  91. <input type="text" name="parameter[wepro_key]" class="form-control" value="<?php echo ($data['wepro_key']); ?>" />
  92. <span class="layui-form-mid">pay.weixin.qq.com 账户中心-api安全</span>
  93. </div>
  94. </div>
  95. <div class="layui-form-item" id="wepro3" style="<?php if( !empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==3 ){ ?>display:none;<?php } ?>">
  96. <div class="layui-form-item">
  97. <label class="layui-input-block">CERT证书文件</label>
  98. <div class="layui-input-block">
  99. <textarea style="height:100px;" name="parameter[wechat_apiclient_cert_pem]" class="layui-textarea" rows="5" placeholder="<?php if( $data[wechat_apiclient_cert_pem]){ ?>为保证安全性,不显示证书内容。若要修改请直接输入<?php } ?>"></textarea>
  100. <div class="layui-form-mid">
  101. <?php if( $data[wechat_apiclient_cert_pem]){ ?>
  102. <span class="label label-primary">已上传</span>
  103. <?php }else{ ?>
  104. <span class="label label-danger">未上传</span>
  105. <?php } ?>从商户平台上下载支付证书,解压并取得其中的<span class="bg-danger">apiclient_cert.pem</span>用记事本打开并复制文件内容,填至此处</div>
  106. </div>
  107. </div>
  108. <div class="layui-form-item">
  109. <label class="layui-input-block">KEY证书秘钥</label>
  110. <div class="layui-input-block">
  111. <textarea style="height:100px;" name="parameter[wechat_apiclient_key_pem]" class="layui-textarea" rows="5" placeholder="<?php if( $data[wechat_apiclient_key_pem]){ ?>为保证安全性,不显示证书内容。若要修改请直接输入<?php } ?>"></textarea>
  112. <div class="layui-form-mid">
  113. <?php if( $data[wechat_apiclient_key_pem]){ ?>
  114. <span class="label label-primary">已上传</span>
  115. <?php }else{ ?>
  116. <span class="label label-danger">未上传</span>
  117. <?php } ?>从商户平台上下载支付证书,解压并取得其中的<span class="bg-danger">apiclient_key.pem</span>用记事本打开并复制文件内容,填至此处
  118. <br/>
  119. <br/>
  120. <a href="https://pay.weixin.qq.com" target="_blank">pay.weixin.qq.com</a>&nbsp;&nbsp;账户中心&nbsp;->&nbsp;api安全&nbsp;->&nbsp;申请证书&nbsp;->&nbsp;查看证书
  121. &nbsp;&nbsp;严格按照腾讯提示
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="layui-form-item" id="wepro_sub3" style="<?php if( empty($data['is_open_yinpay']) || $data['is_open_yinpay'] ==0 ){ ?>display:none;<?php } ?>">
  127. <div class="layui-form-item">
  128. <label class="layui-form-label">服务商公众号AppID</label>
  129. <div class="layui-input-block">
  130. <input type="text" name="parameter[wepro_fuwu_appid]" class="form-control" value="<?php echo ($data['wepro_fuwu_appid']); ?>" />
  131. </div>
  132. </div>
  133. <div class="layui-form-item">
  134. <label class="layui-form-label">服务商商户号</label>
  135. <div class="layui-input-block">
  136. <input type="text" name="parameter[wepro_fuwu_partnerid]" class="form-control" value="<?php echo ($data['wepro_fuwu_partnerid']); ?>" />
  137. </div>
  138. </div>
  139. <div class="layui-form-item">
  140. <label class="layui-form-label">特约商户秘钥</label>
  141. <div class="layui-input-block">
  142. <input type="text" name="parameter[sup_wepro_key]" class="form-control" value="<?php echo ($data['sup_wepro_key']); ?>" />
  143. <span class="layui-form-mid">pay.weixin.qq.com 账户中心-api安全,特约商户提现必须填写特约商户秘钥,CERT证书文件,KEY证书秘钥。</span>
  144. </div>
  145. </div>
  146. <div class="layui-form-item">
  147. <label class="layui-input-block">服务商证书CERT证书文件</label>
  148. <div class="layui-input-block">
  149. <textarea style="height:100px;" name="parameter[sup_wechat_apiclient_cert_pem]" class="layui-textarea" rows="5" placeholder="<?php if( $data[sup_wechat_apiclient_cert_pem]){ ?>为保证安全性,不显示证书内容。若要修改请直接输入<?php } ?>"></textarea>
  150. <div class="layui-form-mid">
  151. <?php if( $data[sup_wechat_apiclient_cert_pem]){ ?>
  152. <span class="label label-primary">已上传</span>
  153. <?php }else{ ?>
  154. <span class="label label-danger">未上传</span>
  155. <?php } ?>从服务商商户平台上下载支付证书,解压并取得其中的<span class="bg-danger">apiclient_cert.pem</span>用记事本打开并复制文件内容,填至此处</div>
  156. </div>
  157. </div>
  158. <div class="layui-form-item">
  159. <label class="layui-input-block">服务商证书KEY证书秘钥</label>
  160. <div class="layui-input-block">
  161. <textarea style="height:100px;" name="parameter[sup_wechat_apiclient_key_pem]" class="layui-textarea" rows="5" placeholder="<?php if( $data[sup_wechat_apiclient_key_pem]){ ?>为保证安全性,不显示证书内容。若要修改请直接输入<?php } ?>"></textarea>
  162. <div class="layui-form-mid">
  163. <?php if( $data[sup_wechat_apiclient_key_pem]){ ?>
  164. <span class="label label-primary">已上传</span>
  165. <?php }else{ ?>
  166. <span class="label label-danger">未上传</span>
  167. <?php } ?>从服务商商户平台上下载支付证书,解压并取得其中的<span class="bg-danger">apiclient_key.pem</span>用记事本打开并复制文件内容,填至此处
  168. <br/>
  169. <br/>
  170. <a href="https://pay.weixin.qq.com" target="_blank">pay.weixin.qq.com</a>&nbsp;&nbsp;账户中心&nbsp;->&nbsp;api安全&nbsp;->&nbsp;申请证书&nbsp;->&nbsp;查看证书
  171. &nbsp;&nbsp;严格按照腾讯提示
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. <div class="layui-form-item">
  177. <label class="layui-form-label"></label>
  178. <div class="layui-input-block">
  179. <input type="submit" lay-submit lay-filter="formDemo" value="提交" class="btn btn-primary" />
  180. </div>
  181. </div>
  182. </form>
  183. </div>
  184. </div>
  185. </div>
  186. <script src="/layuiadmin/layui/layui.js"></script>
  187. <script>
  188. layui.config({
  189. base: '/layuiadmin/' //静态资源所在路径
  190. }).extend({
  191. index: 'lib/index' //主入口模块
  192. }).use('index');
  193. </script>
  194. <script>
  195. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  196. var layer = layui.layer;
  197. var $;
  198. layui.use(['jquery', 'layer','form','colorpicker'], function(){
  199. $ = layui.$;
  200. var form = layui.form;
  201. //监听提交
  202. form.on('submit(formDemo)', function(data){
  203. $.ajax({
  204. url: data.form.action,
  205. type: data.form.method,
  206. data: data.field,
  207. dataType:'json',
  208. success: function (info) {
  209. if(info.status == 0)
  210. {
  211. layer.msg(info.result.message,{icon: 1,time: 2000});
  212. }else if(info.status == 1){
  213. var go_url = location.href;
  214. if( info.result.hasOwnProperty("url") )
  215. {
  216. go_url = info.result.url;
  217. }
  218. layer.msg('操作成功',{time: 1000,
  219. end:function(){
  220. location.href = info.result.url;
  221. }
  222. });
  223. }
  224. }
  225. });
  226. return false;
  227. });
  228. })
  229. </script>
  230. </body>