addwxsend.html1
3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<include file="public/layout" />
<body style="background-color: #FFF; overflow: auto;">
<div class="page">
<div class="fixed-bar">
<div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
<div class="subject">
<h3>添加/修改推送消息</h3>
<h5></h5>
</div>
</div>
</div>
<!--表单数据-->
<form method="post" id="addwxsenddForm">
<div class="ncap-form-default">
<dl class="row" >
<dt class="tit" colspan="2">
<label class="" for="typeid"><em>*</em>选择模板</label>
</dt>
<dd class="opt">
<div id="gcategory">
<select name="typeid" id="typeid"
onkeydown="strkeydown(event, this, 'submitBtn')"
class="form-control" >
<option value="0">请选择分类</option>
<foreach name="typelist" item="v" >
<option value="{$v[typeid]}" <if condition="$v[typeid] eq $wxsend[typeid]"> selected="selected" </if>>{$v[typename]}</option>
</foreach>
</select>
</div>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="template_id"><em>*</em>微信template_id参数</label>
</dt>
<dd class="opt">
<input type="text" placeholder="微信template_id参数"
onkeydown="strkeydown(event, this, 'submitBtn')" id="template_id"
class="input-txt" name="template_id" value="{$wxsend.template_id}" >
<span class="err cr" id="err_template_id"></span>
<p class="notic"></p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="ac_name">详细跳转地址</label>
</dt>
<dd class="opt">
<input type="text" placeholder="详细跳转地址"
onkeydown="strkeydown(event, this, 'submitBtn')" id="htmlurl"
class="input-txt" name="htmlurl" value="{$wxsend.htmlurl}">
<span class="err cr" id="err_htmlurl"></span>
<p class="notic"></p>
</dd>
</dl>
<div class="bot"><a href="JavaScript:void(0);" onClick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>
</div>
</form>
</div>
<script>
function checkForm(){
var typeid = $("#typeid").val();
if($.trim(typeid) == '0')
{
set_err_msg("请选择模板","typeid")
return false;
}
var template_id = $("#template_id").val();
if($.trim(template_id) == '')
{
set_err_msg("请输入微信模板Id","template_id")
$("#template_id").focus();
return false;
}
layer.msg('加载中...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '10px', time:100000}) ;
$('#addwxsenddForm').submit();
}
// 上传商品图片成功回调函数
function call_back(fileurl_tmp){
$("#logo").val(fileurl_tmp);
$("#original_img2").attr('onmouseover', "layer.tips('<img src="+fileurl_tmp+">',this,{tips: [1, '#fff']});");
$("#original_img2").attr('src', fileurl_tmp);
}
function set_err_msg(text,elem)
{
layer.msg(text,{icon:2,time:1000});
$("#"+elem).focus();
$("#"+elem).parent().find("span").text(text);
}
</script>
</body>
</html>