截流自动化的商城平台
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.

set.html 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-form-label {
  4. width: 220px;
  5. }
  6. </style>
  7. <div class="wrapper">
  8. <div class="layui-card">
  9. <div class="layui-card-body">
  10. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  11. <div class="layui-colla-item">
  12. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">温馨提示</h2>
  13. <div class="layui-colla-content layui-show">
  14. <p>站点统计功能可以帮你了解用户在网站上的行为,助你优化网站体验,提高访问效果。</p>
  15. </div>
  16. </div>
  17. </div>
  18. <!-- 表单区域-->
  19. <div class="layui-form" style="margin-top: 15px;">
  20. <!--clarity_app_id-->
  21. <div class="layui-form-item">
  22. <label class="layui-form-label">Clarity 应用id:</label>
  23. <div class="layui-input-block">
  24. <div class="layui-col-md6">
  25. <input type="text" name="clarity_app_id" value="{$site_statistic.clarity_app_id|default = ''}" lay-verType="tips" autocomplete="off" class="layui-input">
  26. <div class="layui-form-mid layui-word-aux">
  27. 请访问 <a href="https://clarity.microsoft.com" target="_blank" style="color: #0000FF">Clarity 官网</a> 创建你的 Clarity 统计应用
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="layui-form-item">
  33. <lable class="layui-form-label"></lable>
  34. <div class="layui-input-block">
  35. <button class="layui-btn layui-btn-normal" lay-submit lay-filter="set">确定</button>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <script>
  43. layui.config({
  44. version:"{$front_version}",
  45. base: '/static/lib/' //静态资源所在路径
  46. }).use(['form','element'], function(){
  47. var $ = layui.$,form = layui.form,element = layui.element;
  48. form.on('submit(set)', function(data) {
  49. like.ajax({
  50. url:'{:url("setting.site_statistic/set")}',
  51. data: data.field,
  52. type:"post",
  53. success:function(res)
  54. {
  55. if(res.code === 1) {
  56. layui.layer.msg(res.msg, {
  57. offset: '15px'
  58. , icon: 1
  59. , time: 1000
  60. });
  61. }
  62. }
  63. });
  64. });
  65. });
  66. </script>