截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.html 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-form-label{
  4. width: 150px;
  5. }
  6. .tips{
  7. color: red;
  8. }
  9. </style>
  10. <div class="wrapper">
  11. <div class="layui-card">
  12. <div class="layui-card-body">
  13. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  14. <div class="layui-colla-item">
  15. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  16. <div class="layui-colla-content layui-show">
  17. <p>*填写微信开放平台开发配置,请前往微信开放平台创建应用并完成认证。</p>
  18. <p>*APP应用配置主要用于APP微信登录和微信支付。</p>
  19. <p>*网站应用配置主要用于PC端商城微信扫码登录。</p>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="layui-card-body" pad15>
  25. <div class="layui-form" lay-filter="">
  26. <!--APP应用开发者信息-->
  27. <div class="layui-form-item div-flex">
  28. <fieldset class="layui-elem-field layui-field-title">
  29. <legend>APP应用</legend>
  30. </fieldset>
  31. </div>
  32. <div class="layui-form-item">
  33. <label class="layui-form-label"><span class="tips">*</span>AppID:</label>
  34. <div class="layui-input-block">
  35. <div class="layui-col-md3">
  36. <input type="text" name="app_id" value="{$config.app_id}" lay-verify="required" autocomplete="off" class="layui-input">
  37. </div>
  38. </div>
  39. </div>
  40. <div class="layui-form-item">
  41. <label class="layui-form-label"><span class="tips">*</span>AppSecret:</label>
  42. <div class="layui-input-block">
  43. <div class="layui-col-md3">
  44. <input type="text" name="secret" value="{$config.secret}" lay-verify="required" autocomplete="off" class="layui-input">
  45. </div>
  46. </div>
  47. <div class="layui-form-item">
  48. <label class="layui-form-label"></label>
  49. <span style="color: #a3a3a3;font-size: 9px">登录微信开放平台,查看并设置</span>
  50. </div>
  51. </div>
  52. <!--网站应用开发者信息-->
  53. <div class="layui-form-item div-flex">
  54. <fieldset class="layui-elem-field layui-field-title">
  55. <legend>网站应用</legend>
  56. </fieldset>
  57. </div>
  58. <div class="layui-form-item">
  59. <label class="layui-form-label"><span class="tips">*</span>AppID:</label>
  60. <div class="layui-input-block">
  61. <div class="layui-col-md3">
  62. <input type="text" name="web_app_id" value="{$web_config.web_app_id}" lay-verify="required" autocomplete="off" class="layui-input">
  63. </div>
  64. </div>
  65. </div>
  66. <div class="layui-form-item">
  67. <label class="layui-form-label"><span class="tips">*</span>AppSecret:</label>
  68. <div class="layui-input-block">
  69. <div class="layui-col-md3">
  70. <input type="text" name="web_secret" value="{$web_config.web_secret}" lay-verify="required" autocomplete="off" class="layui-input">
  71. </div>
  72. </div>
  73. <div class="layui-form-item">
  74. <label class="layui-form-label"></label>
  75. <span style="color: #a3a3a3;font-size: 9px">登录微信开放平台,查看并设置</span>
  76. </div>
  77. </div>
  78. <div class="layui-form-item">
  79. <div class="layui-input-block">
  80. <button class="layui-btn layui-btn-sm {$view_theme_color}" lay-submit lay-filter="set">确定</button>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <style>
  88. .layui-table-cell {
  89. height: auto;
  90. }
  91. </style>
  92. <script>
  93. layui.config({
  94. version:"{$front_version}",
  95. base: '/static/lib/' //静态资源所在路径
  96. }).use(['form'], function(){
  97. var $ = layui.$,form = layui.form;
  98. form.on('submit(set)', function (data) {
  99. like.ajax({
  100. url: '{:url("wechat.Op/config")}' //实际使用请改成服务端真实接口
  101. , data: data.field
  102. , type: 'post'
  103. , success: function (res) {
  104. if (res.code == 1) {
  105. layer.msg(res.msg, {
  106. offset: '15px'
  107. , icon: 1
  108. , time: 1000
  109. });
  110. }
  111. }
  112. });
  113. });
  114. });
  115. </script>