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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-form-label {
  4. width: 140px;
  5. }
  6. </style>
  7. <div class="wrapper">
  8. <div class="layui-card">
  9. <!--操作提示-->
  10. <div class="layui-card-body">
  11. <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
  12. <div class="layui-colla-item">
  13. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  14. <div class="layui-colla-content layui-show">
  15. <p>*商城名称、商城Logo、默认图片等信息的配置</p>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="layui-tab layui-tab-card" lay-filter="like-tabs">
  21. <ul class="layui-tab-title">
  22. <li data-type='1' class="layui-this">商城信息</li>
  23. <li data-type='2'>平台信息</li>
  24. <li data-type='3'>商家信息</li>
  25. </ul>
  26. <div class="layui-tab-content">
  27. <!--商城信息-->
  28. <div class="layui-tab-item layui-show">
  29. {include file="setting/basic/website_base"/}
  30. </div>
  31. <!--平台信息-->
  32. <div class="layui-tab-item">
  33. {include file="setting/basic/website_platform"/}
  34. </div>
  35. <!--商家信息-->
  36. <div class="layui-tab-item">
  37. {include file="setting/basic/website_shop"/}
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <script>
  44. layui.use(['table', 'form'], function () {
  45. var $ = layui.$
  46. , form = layui.form;
  47. like.delUpload();
  48. //商城设置
  49. $(document).on("click", ".web_favicon", function () {
  50. like.imageUpload({
  51. limit: 1,
  52. field: "web_favicon",
  53. that: $(this)
  54. });
  55. });
  56. $(document).on("click", ".client_login_logo", function () {
  57. like.imageUpload({
  58. limit: 1,
  59. field: "client_login_logo",
  60. that: $(this)
  61. });
  62. });
  63. $(document).on("click", ".pc_client_login_logo", function () {
  64. like.imageUpload({
  65. limit: 1,
  66. field: "pc_client_login_logo",
  67. that: $(this)
  68. });
  69. });
  70. $(document).on("click", ".user_image", function () {
  71. like.imageUpload({
  72. limit: 1,
  73. field: "user_image",
  74. that: $(this)
  75. });
  76. });
  77. $(document).on("click", ".goods_image", function () {
  78. like.imageUpload({
  79. limit: 1,
  80. field: "goods_image",
  81. that: $(this)
  82. });
  83. });
  84. //平台
  85. $(document).on("click", ".platform_login_logo", function () {
  86. like.imageUpload({
  87. limit: 1,
  88. field: "platform_login_logo",
  89. that: $(this)
  90. });
  91. });
  92. $(document).on("click", ".platform_login_image", function () {
  93. like.imageUpload({
  94. limit: 1,
  95. field: "platform_login_image",
  96. that: $(this)
  97. });
  98. });
  99. $(document).on("click", ".platform_admin_logo", function () {
  100. like.imageUpload({
  101. limit: 1,
  102. field: "platform_admin_logo",
  103. that: $(this)
  104. });
  105. });
  106. //商家
  107. $(document).on("click", ".shop_login_logo", function () {
  108. like.imageUpload({
  109. limit: 1,
  110. field: "shop_login_logo",
  111. that: $(this)
  112. });
  113. });
  114. $(document).on("click", ".shop_login_image", function () {
  115. like.imageUpload({
  116. limit: 1,
  117. field: "shop_login_image",
  118. that: $(this)
  119. });
  120. });
  121. $(document).on("click", ".shop_admin_logo", function () {
  122. like.imageUpload({
  123. limit: 1,
  124. field: "shop_admin_logo",
  125. that: $(this)
  126. });
  127. });
  128. $(document).on("click", ".shop_default_logo", function () {
  129. like.imageUpload({
  130. limit: 1,
  131. field: "shop_default_logo",
  132. that: $(this)
  133. });
  134. });
  135. $(document).on("click", ".shop_default_bg", function () {
  136. like.imageUpload({
  137. limit: 1,
  138. field: "shop_default_bg",
  139. that: $(this)
  140. });
  141. });
  142. form.on('submit(setWebsite)', function (data) {
  143. submit('{:url("setting.Basic/setWebsite")}',data.field);
  144. });
  145. form.on('submit(setPlatform)', function (data) {
  146. submit('{:url("setting.Basic/setWebsite")}',data.field);
  147. });
  148. form.on('submit(setShop)', function (data) {
  149. submit('{:url("setting.Basic/setWebsite")}',data.field);
  150. });
  151. function submit(url, data) {
  152. like.ajax({
  153. url: url
  154. , data: data
  155. , type: 'post'
  156. , success: function (res) {
  157. if (res.code == 1) {
  158. layer.msg(res.msg, {
  159. offset: '15px'
  160. , icon: 1
  161. , time: 1500
  162. }, function () {
  163. location.href = location.href;
  164. });
  165. }
  166. }
  167. });
  168. }
  169. });
  170. </script>