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

share.html 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. {layout name="layout1" /}
  2. <div class="wrapper">
  3. <div class="layui-card">
  4. <div class="layui-card-body">
  5. <div class="layui-collapse like-layui-collapse" style="border:1px dashed #c4c4c4; margin-bottom: 30px;">
  6. <div class="layui-colla-item">
  7. <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
  8. <div class="layui-colla-content layui-show">
  9. *设置商城分享标题,分享简介。
  10. </div>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="layui-form">
  15. <div class="layui-tab layui-tab-card">
  16. <ul class="layui-tab-title">
  17. <li class="layui-this">H5商城</li>
  18. <li>小程序商城</li>
  19. </ul>
  20. <div class="layui-tab-content">
  21. <!-- H5 -->
  22. <div class="layui-tab-item layui-show">
  23. <!-- H5分享标题 -->
  24. <div class="layui-form-item" style="margin-bottom:0;">
  25. <label for="h5_share_title" class="layui-form-label">分享标题:</label>
  26. <div class="layui-input-inline">
  27. <input type="text" id="h5_share_title" name="h5_share_title"
  28. value="{$config.h5.h5_share_title}" autocomplete="off" class="layui-input">
  29. </div>
  30. </div>
  31. <div class="layui-form-item">
  32. <label class="layui-form-label"></label>
  33. <div class="layui-input-block">
  34. <div class="layui-form-mid layui-word-aux">H5商城分享页面时,显示的分享标题</div>
  35. </div>
  36. </div>
  37. <!-- H5分享简介 -->
  38. <div class="layui-form-item" style="margin-bottom:0;">
  39. <label for="h5_share_intro" class="layui-form-label">分享简介:</label>
  40. <div class="layui-input-inline">
  41. <input type="text" id="h5_share_intro" name="h5_share_intro"
  42. value="{$config.h5.h5_share_intro}" autocomplete="off" class="layui-input">
  43. </div>
  44. </div>
  45. <div class="layui-form-item">
  46. <label class="layui-form-label"></label>
  47. <div class="layui-input-block">
  48. <div class="layui-form-mid layui-word-aux">H5商城分享页面时,显示的分享简介</div>
  49. </div>
  50. </div>
  51. <!-- H5分享图片 -->
  52. <div class="layui-form-item">
  53. <label class="layui-form-label">分享图片:</label>
  54. <div class="layui-input-inline">
  55. <div class="like-upload-image">
  56. {if !empty($config.h5.h5_share_image)}
  57. <div class="upload-image-div">
  58. <img src="{$config.file_url}{$config.h5.h5_share_image}" alt="img" style="height: 80px;width:auto">
  59. <input name="h5_share_image" type="hidden" value="{$config.h5.h5_share_image}">
  60. <div class="del-upload-btn">x</div>
  61. </div>
  62. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image h5_share_image"> + 添加图片</a></div>
  63. {else}
  64. <div class="upload-image-elem"><a class="add-upload-image h5_share_image"> + 添加图片</a></div>
  65. {/if}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <!-- 小程序 -->
  71. <div class="layui-tab-item">
  72. <!-- 小程序分享标题 -->
  73. <div class="layui-form-item" style="margin-bottom:0;">
  74. <label for="mnp_share_title" class="layui-form-label">分享标题:</label>
  75. <div class="layui-input-inline">
  76. <input type="text" id="mnp_share_title" name="mnp_share_title"
  77. value="{$config.mnp.mnp_share_title}" autocomplete="off" class="layui-input">
  78. </div>
  79. </div>
  80. <div class="layui-form-item">
  81. <label class="layui-form-label"></label>
  82. <div class="layui-input-block">
  83. <div class="layui-form-mid layui-word-aux">小程序商城分享页面时,显示的分享标题</div>
  84. </div>
  85. </div>
  86. <!-- 小程序分享图片 -->
  87. <div class="layui-form-item">
  88. <label class="layui-form-label">分享图片:</label>
  89. <div class="layui-input-inline">
  90. <div class="like-upload-image">
  91. {if !empty($config.mnp.mnp_share_image)}
  92. <div class="upload-image-div">
  93. <img src="{$config.file_url}{$config.mnp.mnp_share_image}" alt="img" style="height: 80px;width:auto">
  94. <input name="mnp_share_image" type="hidden" value="{$config.mnp.mnp_share_image}">
  95. <div class="del-upload-btn">x</div>
  96. </div>
  97. <div class="upload-image-elem" style="display:none;"><a class="add-upload-image mnp_share_image"> + 添加图片</a></div>
  98. {else}
  99. <div class="upload-image-elem"><a class="add-upload-image mnp_share_image"> + 添加图片</a></div>
  100. {/if}
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <!-- 提交 -->
  106. <div class="layui-form-item" style="margin-top:30px">
  107. <div class="layui-input-block">
  108. <button class="layui-btn layui-bg-blue" lay-submit lay-filter="addSublime">提交</button>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <script>
  117. layui.use(['table', 'form'], function () {
  118. var form = layui.form;
  119. like.delUpload();
  120. $(document).on("click", ".h5_share_image", function () {
  121. like.imageUpload({
  122. limit: 1,
  123. field: "h5_share_image",
  124. that: $(this)
  125. });
  126. });
  127. $(document).on("click", ".mnp_share_image", function () {
  128. like.imageUpload({
  129. limit: 1,
  130. field: "mnp_share_image",
  131. that: $(this)
  132. });
  133. });
  134. // 监听提交
  135. form.on('submit(addSublime)', function (data) {
  136. like.ajax({
  137. url: '{:url("setting.Basic/setShare")}'
  138. , data: data.field
  139. , type: 'post'
  140. , success: function (res) {
  141. if (res.code === 1) {
  142. layer.msg(res.msg, {
  143. offset: '15px'
  144. , icon: 1
  145. , time: 1000
  146. },function () {
  147. location.href = location.href;
  148. });
  149. }
  150. }
  151. });
  152. return false;
  153. });
  154. });
  155. </script>