edit.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <form id="form" action="{:url('adwords/edit')}">
  2. <input type="hidden" name="id" value="{$info.id??0}"/>
  3. <input type="hidden" name="picture" value="{$info.picture??''}" id="picture" />
  4. <input type="hidden" name="group" value="{$info.group?:$group}" />
  5. <table class="formtable">
  6. <tr>
  7. <th>跳转方式:</th>
  8. <td>
  9. <select datatype="*" class="select w300" name="open_type">
  10. <option value="navigate"{if isset($info.open_type) && $info.open_type =='navigate'} selected{/if}>navigate [保留并跳转到新页面]</option>
  11. <option value="redirect"{if isset($info.open_type) && $info.open_type =='redirect'} selected{/if}>redirect [关闭并跳转到新页面]</option>
  12. <option value="switchTab"{if isset($info.open_type) && $info.open_type =='switchTab'} selected{/if}>switchTab [关闭并跳转TabBar页面]</option>
  13. </select>
  14. </td>
  15. </tr>
  16. <tr><th>广告标题:</th><td><input autocomplete="off" class="input w300" datatype="*" type="text" name="title" value="{$info.title??''}" /></td></tr>
  17. <tr><th>链接地址:</th><td>
  18. <input class="input w300" datatype="*" ignore="ignore" type="text" name="link" value="{$info.link??''}" />
  19. <select id="miniapp_apge" class="select readonly w100">
  20. <option value="">路径提示</option>
  21. <optgroup label="同城模块"">
  22. <option value="/pages/info/index">同城首页</option>
  23. </optgroup>
  24. <optgroup label="其它模块"">
  25. <option value="/pages/user/index">用户中心</option>
  26. </optgroup>
  27. </select>
  28. </td></tr>
  29. <tr><th></th>
  30. <td>
  31. <div class="img-review select_img" url="{:url("system/passport.common/upload")}">{if isset($info.open_type) && $info.picture}<img src="{$info.picture??''}">{/if}</div>
  32. </td>
  33. </tr>
  34. <tr>
  35. <th></th>
  36. <td>
  37. <input type="submit" value="确定" class="button button-blue submit" />
  38. <input type="reset" value="重置" class="button button-blank"/>
  39. </td>
  40. </tr>
  41. </table>
  42. </div>
  43. </form>
  44. <script type="text/javascript">
  45. Do('base','layer','form', function () {
  46. $('#form').isForm();
  47. $(".select_img").win();
  48. $("#miniapp_apge").change(function(){
  49. $("input[name='link']").val($(this).val());
  50. });
  51. })
  52. //添加图片
  53. function setImg(show_src){
  54. $("#picture").val(show_src);
  55. $(".img-review").html('<img src="'+show_src+'" style="max-width:400px">');
  56. }
  57. </script>