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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {layout name="layout2" /}
  2. <style>
  3. .layui-form-label {
  4. width: 120px
  5. }
  6. #key-inline {
  7. width: 350px;
  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" style="border:1px dashed #c4c4c4; margin-bottom: 30px;">
  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. *设置地图相关配置。
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="layui-card-body" pad15>
  23. <div class="layui-form" lay-filter="">
  24. <div class="layui-form-item">
  25. <label class="layui-form-label">腾讯地图key:</label>
  26. <div class="layui-input-inline" id="key-inline">
  27. <input type="text" name="tx_map_key" value="{$config.tx_map_key | default = ''}" lay-verify="required" lay-verType="tips" class="layui-input">
  28. </div>
  29. </div>
  30. <div class="layui-form-item">
  31. <label class="layui-form-label">附近店铺</label>
  32. <div class="layui-input-block">
  33. <input type="radio" name="is_open_nearby" value="0" title="关闭" {if $config.is_open_nearby == 0}checked{/if}>
  34. <input type="radio" name="is_open_nearby" value="1" title="开启" {if $config.is_open_nearby == 1}checked{/if}>
  35. </div>
  36. </div>
  37. <div class="layui-form-item">
  38. <label class="layui-form-label"></label>
  39. <div class="layui-input-block layui-word-aux">
  40. 关闭则表示商城首页城市定位不显示及附近店铺板块不显示 <a href="javascript:;" id="img_show">查看效果 <img id="img" style="position: absolute;max-width: 500px;display: none;" src="/static/admin/images/nearby_shops.png"></a>
  41. </div>
  42. </div>
  43. <div class="layui-form-item">
  44. <div class="layui-input-block">
  45. <button class="layui-btn {$view_theme_color}" lay-submit lay-filter="setMap">确定</button>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <script>
  53. layui.use(['table'], function () {
  54. var $ = layui.$
  55. , form = layui.form;
  56. form.on('submit(setMap)', function (data) {
  57. like.ajax({
  58. url: '{:url()}'
  59. , data: data.field
  60. , type: 'post'
  61. , success: function (res) {
  62. if (res.code == 1) {
  63. layui.layer.msg(res.msg, {
  64. offset: '15px'
  65. , icon: 1
  66. , time: 1000
  67. }, function () {
  68. location.href = location.href;
  69. });
  70. }
  71. }
  72. });
  73. });
  74. });
  75. $('#img_show').hover(function() {
  76. $("#img").show();
  77. }, function() {
  78. $("#img").hide();
  79. });
  80. </script>