edit.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <form id="form" action="{:url('popupshop/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_id" value="{$info.group_id}" />
  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 $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 class="input w500" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  18. <tr><th>广告地址(url):</th><td><input class="input w500" datatype="*" ignore="ignore" type="text" name="link" value="{$info.link|dehtml}" /></td></tr>
  19. <tr class="imgs"><th><input type="button" value="选择广告图" class="button button-blank select_img" /></th><td class="review"><img src="{$info.picture}"></td></tr>
  20. <tr>
  21. <th></th>
  22. <td>
  23. <input type="submit" value="确定" class="button button-blue submit" />
  24. <input type="reset" value="重置" class="button button-blank"/>
  25. </td>
  26. </tr>
  27. </table>
  28. </div>
  29. </form>
  30. <script type="text/javascript">
  31. Do('base','layer','form', function () {
  32. $('#form').isForm();
  33. $(".select_img").click(function(){openwin('{:url("system/passport.common/upload")}')});
  34. })
  35. //添加图片
  36. function setImg(show_src){
  37. $("#picture").val(show_src);
  38. $(".review").html('<img src="'+show_src+'">');
  39. }
  40. </script>