edit.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <form id="form" action="{:url('adwords/edit')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="picture" value="{$info.picture}" id="picture" />
  4. <input type="hidden" name="group" value="{$info.group}" />
  5. <table class="formtable">
  6. <tr>
  7. <th>打开方式:</th>
  8. <td>
  9. <select datatype="*" class="select w400" name="open_type">
  10. <option value="navigate"{if $info.open_type =='navigate'} selected{/if}>navigate [保留并跳转到新页面]</option>
  11. <option value="redirect"{if $info.open_type =='redirect'} selected{/if}>redirect [关闭并跳转到新页面]</option>
  12. <option value="switchTab"{if $info.open_type =='switchTab'} selected{/if}>switchTab [关闭并跳转TabBar页面]</option>
  13. </select>
  14. <span class="gray">仅支持微信小程序端</span>
  15. </td>
  16. </tr>
  17. <tr><th>图标标题:</th><td><input autocomplete="off" class="input w400" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  18. <tr><th>链接地址:</th><td>
  19. <select id="miniapp_apge" class="select w400 readonly mb5">
  20. <optgroup label="路径提示">
  21. {foreach $lists as $vo}
  22. <option value="/pages/category/index?category_id={$vo.id}">{$vo.title}</option>
  23. {/foreach}
  24. </optgroup>
  25. </select><span class="gray"></span><br />
  26. <textarea autocomplete="off" class="textarea w400 h90" datatype="*" ignore="ignore" type="text" name="link" />{$info.link|dehtml}</textarea>
  27. </td></tr>
  28. <tr class="imgs"><th><input url="{:url('system/passport.common/upload')}" type="button" value="选择图片" class="button button-blank select_img" /></th><td class="review"><img src="{$info.picture}" class=""></td></tr>
  29. <tr>
  30. <th></th>
  31. <td>
  32. <input type="submit" value="确定" class="button button-blue submit" />
  33. <input type="reset" value="重置" class="button button-blank"/>
  34. </td>
  35. </tr>
  36. </table>
  37. </div>
  38. </form>
  39. <script type="text/javascript">
  40. Do('base','layer','form', function () {
  41. $('#form').isForm();
  42. $(".select_img").win();
  43. $("#miniapp_apge").click(function(){
  44. $("textarea[name='link']").val($(this).val());
  45. });
  46. })
  47. //添加图片
  48. function setImg(show_src){
  49. $("#picture").val(show_src);
  50. $(".review").html('<img src="'+show_src+'">');
  51. }
  52. </script>