index.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <form id="form" action="{:url('card/index')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="logo" value="{$info.logo}" id="logo" />
  4. <table class="formtable">
  5. <tr><th>公司Logo</th><td><div class="img-review fn-cp">{if $info.logo}<img src="{$info.logo}">{/if}</div></td></tr>
  6. <tr><th>公司名称:</th><td><input class="input w350" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  7. <tr><th>公司电话:</th><td><input class="input w350" datatype="*" type="text" name="phone" value="{$info.phone}" /></td></tr>
  8. <tr><th>公司邮箱:</th><td><input class="input w350" datatype="*" type="text" name="email" value="{$info.email}" /></td></tr>
  9. <tr><th>公司地址:</th><td>
  10. <input class="input w350" datatype="*" type="text" name="address" value="{$info.address}" />
  11. <button type="button" class="button button-green lib"><i class="iconfont icon-address_icon"></i>读取经纬</button>
  12. <input readonly="true" autocomplete="off" class="input w100 readonly" datatype="*" type="text" name="longitude" value="{$info.longitude}" />
  13. <input readonly="true" autocomplete="off" class="input w100 readonly" datatype="*" type="text" name="latitude" value="{$info.latitude}" /> <br />
  14. <span class="gray"><i class="iconfont icon-address_icon"></i>地址请包含<span class="red">省市地区</span>完整地址,方便位置定位判断</span>
  15. </td></tr>
  16. <tr><th>公司简介:</th><td><textarea name="content" class="textarea ui-editor">{$info.content|dehtml}</textarea></td></tr>
  17. <tr>
  18. <th></th>
  19. <td>
  20. <input type="submit" value="确定" class="button button-blue submit" />
  21. <input type="reset" value="重置" class="button button-blank"/>
  22. </td>
  23. </tr>
  24. </table>
  25. </form>
  26. <script type="text/javascript">
  27. Do('base','layer','form','editor',function(){
  28. $('#form').isForm({'upload':'{:url("system/passport.common/upload")}'});
  29. $(".img-review").click(function(){
  30. openwin('{:url("system/passport.common/upload",["input" => "setPic"])}')
  31. });
  32. $(".lib").click(function () {
  33. var val = $("input[name='address']").val();
  34. if(val == "" || val == null || val == undefined){
  35. parent.layer.alert('公司地址必须填写');
  36. }else{
  37. openwin('{:url("bestbao/card/baidu")}?address='+val)
  38. }
  39. });
  40. //添加图片
  41. $("#img-win").click(function(){
  42. openwin('{:url("system/passport.common/upload")}')
  43. });
  44. })
  45. //添加图片
  46. function setPic(show_src){
  47. $("#logo").val(show_src);
  48. $(".img-review").html('<img src="'+show_src+'">');
  49. }
  50. //设置经纬度
  51. function setPoint(point){
  52. $("input[name='longitude']").val(point.lng);
  53. $("input[name='latitude']").val(point.lat);
  54. }
  55. </script>