<form id="form" action="{:url('adwords/edit')}"> <input type="hidden" name="id" value="{$info.id??0}"/> <input type="hidden" name="picture" value="{$info.picture??''}" id="picture" /> <input type="hidden" name="group" value="{$info.group?:$group}" /> <table class="formtable"> <tr> <th>跳转方式:</th> <td> <select datatype="*" class="select w300" name="open_type"> <option value="navigate"{if isset($info.open_type) && $info.open_type =='navigate'} selected{/if}>navigate [保留并跳转到新页面]</option> <option value="redirect"{if isset($info.open_type) && $info.open_type =='redirect'} selected{/if}>redirect [关闭并跳转到新页面]</option> <option value="switchTab"{if isset($info.open_type) && $info.open_type =='switchTab'} selected{/if}>switchTab [关闭并跳转TabBar页面]</option> </select> </td> </tr> <tr><th>广告标题:</th><td><input autocomplete="off" class="input w300" datatype="*" type="text" name="title" value="{$info.title??''}" /></td></tr> <tr><th>链接地址:</th><td> <input class="input w300" datatype="*" ignore="ignore" type="text" name="link" value="{$info.link??''}" /> <select id="miniapp_apge" class="select readonly w100"> <option value="">路径提示</option> <optgroup label="同城模块""> <option value="/pages/info/index">同城首页</option> </optgroup> <optgroup label="其它模块""> <option value="/pages/user/index">用户中心</option> </optgroup> </select> </td></tr> <tr><th></th> <td> <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> </td> </tr> <tr> <th></th> <td> <input type="submit" value="确定" class="button button-blue submit" /> <input type="reset" value="重置" class="button button-blank"/> </td> </tr> </table> </div> </form> <script type="text/javascript"> Do('base','layer','form', function () { $('#form').isForm(); $(".select_img").win(); $("#miniapp_apge").change(function(){ $("input[name='link']").val($(this).val()); }); }) //添加图片 function setImg(show_src){ $("#picture").val(show_src); $(".img-review").html('<img src="'+show_src+'" style="max-width:400px">'); } </script>