message.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. {include file="common/header"/}
  2. <div class="LM-container">
  3. <div class="LM-main">
  4. <fieldset class="layui-elem-field layui-field-title">
  5. </fieldset>
  6. <form class="layui-form layui-form-pane" lay-filter="form">
  7. <input type="hidden" name="id" id="id">
  8. <div class="layui-form-item">
  9. <label class="layui-form-label">手机号</label>
  10. <div class="layui-input-inline">
  11. <input type="text" name="phone" value="" class="layui-input">
  12. </div>
  13. </div>
  14. <div class="layui-form-item">
  15. <label class="layui-form-label">银行卡持卡人</label>
  16. <div class="layui-input-inline">
  17. <input type="text" name="name" value="" class="layui-input">
  18. </div>
  19. </div>
  20. <div class="layui-form-item">
  21. <label class="layui-form-label">银行卡名称</label>
  22. <div class="layui-input-inline">
  23. <input type="text" name="bank_name" value="" class="layui-input">
  24. </div>
  25. </div>
  26. <div class="layui-form-item">
  27. <label class="layui-form-label">银行卡号</label>
  28. <div class="layui-input-inline">
  29. <input type="text" name="bank_number" value="" class="layui-input">
  30. </div>
  31. </div>
  32. <div class="layui-form-item">
  33. <label class="layui-form-label">开户支行</label>
  34. <div class="layui-input-inline">
  35. <input type="text" name="bank_branch" value="" class="layui-input">
  36. </div>
  37. </div>
  38. <div class="layui-form-item">
  39. <label class="layui-form-label">支付宝账号</label>
  40. <div class="layui-input-inline">
  41. <input type="text" name="ali_pay" value="" class="layui-input">
  42. </div>
  43. </div>
  44. <div class="layui-form-item">
  45. <label class="layui-form-label">微信账号</label>
  46. <div class="layui-input-inline">
  47. <input type="text" name="wx_pay" value="" class="layui-input">
  48. </div>
  49. </div>
  50. <div class="layui-form-item">
  51. <label class="layui-form-label">支付宝收款码</label>
  52. <input type="hidden" name="ali_pay_image" id="logo">
  53. <div class="layui-input-block">
  54. <div class="layui-upload">
  55. <button type="button" class="layui-btn layui-btn-primary" id="logoBtn"><i
  56. class="icon icon-upload3"></i>{:lang('upload')}
  57. </button>
  58. <div class="layui-upload-list">
  59. <img class="layui-upload-img" id="site_logo">
  60. <p id="demoText"></p>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="layui-form-mid layui-word-aux">
  65. 支付宝收款码
  66. </div>
  67. </div>
  68. <div class="layui-form-item">
  69. <label class="layui-form-label">微信收款码</label>
  70. <input type="hidden" name="wx_pay_image" id="logos">
  71. <div class="layui-input-block">
  72. <div class="layui-upload">
  73. <button type="button" class="layui-btn layui-btn-primary" id="logoBtns"><i
  74. class="icon icon-upload3"></i>{:lang('upload')}
  75. </button>
  76. <div class="layui-upload-list">
  77. <img class="layui-upload-img" id="site_logos">
  78. <p id="demoTexts"></p>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="layui-form-mid layui-word-aux">
  83. 微信收款码。
  84. </div>
  85. </div>
  86. <div class="layui-form-item">
  87. <div class="layui-input-inline">
  88. <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
  89. <!--<a href="{:url('hlep')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>-->
  90. </div>
  91. </div>
  92. </form>
  93. </div>
  94. </div>
  95. {include file="common/footer"/}
  96. <script>
  97. layui.use(['form', 'layer','upload','laydate'], function () {
  98. var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload;
  99. var info = '';
  100. var config = {$user|raw};
  101. console.log("user",config)
  102. //日期范围
  103. form.val("form", config);
  104. $('#site_logo').attr('src',config.ali_pay_image);
  105. $('#site_logos').attr('src',config.wx_pay_image);
  106. if(info){
  107. }
  108. form.render();
  109. form.on('submit(submit)', function (data) {
  110. console.log("data",data.field)
  111. loading =layer.load(1, {shade: [0.1,'#fff']});
  112. $.post("", data.field, function (res) {
  113. layer.close(loading);
  114. if (res.code== 200) {
  115. layer.msg(res.msg, {time: 1800, icon: 1}, function () {
  116. // location.href = res.url;
  117. // location.href = res.url;
  118. });
  119. } else {
  120. layer.msg(res.msg, {time: 1800, icon: 2});
  121. }
  122. },"json");
  123. });
  124. //普通图片上传
  125. var uploadInst = upload.render({
  126. elem: '#logoBtn'
  127. ,url: '{:url("uploads/uploads")}'
  128. ,before: function(obj){
  129. //预读本地文件示例,不支持ie8
  130. obj.preview(function(index, file, result){
  131. $('#site_logo').attr('src', result); //图片链接(base64)
  132. });
  133. }
  134. ,done: function(res){
  135. //上传成功
  136. if(res.code>0){
  137. $('#logo').val(res.url);
  138. }else{
  139. //如果上传失败
  140. return layer.msg('上传失败');
  141. }
  142. }
  143. ,error: function(){
  144. //演示失败状态,并实现重传
  145. var demoText = $('#demoText');
  146. demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
  147. demoText.find('.demo-reload').on('click', function(){
  148. uploadInst.upload();
  149. });
  150. }
  151. });
  152. //普通图片上传
  153. var uploadInsts = upload.render({
  154. elem: '#logoBtns'
  155. ,url: '{:url("uploads/uploads")}'
  156. ,before: function(obj){
  157. //预读本地文件示例,不支持ie8
  158. obj.preview(function(index, file, result){
  159. $('#site_logos').attr('src', result); //图片链接(base64)
  160. });
  161. }
  162. ,done: function(res){
  163. //上传成功
  164. if(res.code>0){
  165. $('#logos').val(res.url);
  166. }else{
  167. //如果上传失败
  168. return layer.msg('上传失败');
  169. }
  170. }
  171. ,error: function(){
  172. //演示失败状态,并实现重传
  173. var demoText = $('#demoTexts');
  174. demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
  175. demoText.find('.demo-reload').on('click', function(){
  176. uploadInsts.upload();
  177. });
  178. }
  179. });
  180. });
  181. </script>