water.html
17.3 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<include file="public/layout" />
<style>
.span_1 {
float: left;
margin-left: 0px;
height: 130px;
line-height: 130px;
}
.span_1 ul {
list-style: none;
padding: 0px;
}
.span_1 ul li {
border: 1px solid #CCC;
height: 40px;
padding: 0px 10px;
margin-left: -1px;
margin-top: -1px;
line-height: 40px;
}
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="subject">
<h3>商城设置</h3>
<h5>网站全局内容基本选项设置</h5>
</div>
<ul class="tab-base nc-row">
<li><a href="{:U('System/index')}"><span>商城信息</span></a></li>
<li><a href="{:U('System/index',array('inc_type'=>'basic'))}" ><span>基本设置</span></a></li>
<li><a href="{:U('System/index',array('inc_type'=>'shopping'))}" ><span>购物设置</span></a></li>
<li><a href="{:U('System/index',array('inc_type'=>'sms'))}" ><span>短信设置</span></a></li>
<!--<li><a href="{:U('System/index',array('inc_type'=>'smtp'))}" ><span>邮件设置</span></a></li>-->
<li><a href="{:U('System/index',array('inc_type'=>'water'))}" class="current"><span>水印设置</span></a></li>
<li><a href="{:U('System/index',array('inc_type'=>'distribut'))}" ><span>分销设置</span></a></li>
<if condition="$isopencard"><li><a href="{:U('System/index',array('inc_type'=>'cardsetup'))}"><span>PLUS设置</span></a></li></if>
<!--<li><a href="{:U('System/index',array('inc_type'=>'wap'))}" ><span>WAP设置</span></a></li>-->
<!--<li><a href="{:U('System/index',array('inc_type'=>'extend'))}" ><span>扩展设置</span></a></li>-->
</ul>
</div>
</div>
<!-- 操作说明 -->
<!--<div class="explanation" id="explanation">
<div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
<span id="explanationZoom" title="收起提示"></span> </div>
<ul>
<li>系统平台全局设置,包括基础设置、购物、短信、邮件、水印和分销等相关模块。</li>
</ul>
</div>-->
<form method="post" id="handlepost" action="{:U('System/handle')}">
<input type="hidden" name="inc_type" value="{$inc_type}">
<div class="ncap-form-default">
<dl class="row">
<dt class="tit">商品图片添加水印</dt>
<dd class="opt">
<div class="onoff">
<label for="is_mark1" class="cb-enable <if condition='$config[is_mark] eq 1'>selected</if>" >开启</label>
<label for="is_mark0" class="cb-disable <if condition='$config[is_mark] eq 0'>selected</if>" >关闭</label>
<input id="is_mark1" name="is_mark" value="1" onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['is_mark'] eq 1">checked</if> type="radio">
<input id="is_mark0" name="is_mark" value="0" onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['is_mark'] eq 0">checked</if> type="radio">
</div>
<p class="notic">商品图片添加水印</p>
</dd>
</dl>
<dl class="row" style="">
<dt class="tit">水印类型</dt>
<dd class="opt">
<div class="onoff">
<label for="mark_type0" class="cb-enable <if condition="$config['mark_type'] eq 'img'">selected</if>" >图片</label>
<label for="mark_type1" class="cb-disable <if condition="$config['mark_type'] eq 'text'">selected</if>" >文字</label>
<input id="mark_type0" onclick="setwarter('img')" onkeydown="strkeydown(event, this, 'sumbitbtn')"
name="mark_type" value="img" <if condition="$config['mark_type'] eq 'img'">checked</if> type="radio">
<input id="mark_type1" onclick="setwarter('text')" onkeydown="strkeydown(event, this, 'sumbitbtn')"
name="mark_type" value="text" <if condition="$config['mark_type'] eq 'text'">checked</if> type="radio">
</div>
<p class="notic">水印类型</p>
</dd>
</dl>
<dl class="row" id="texttr" style="">
<dt class="tit">
<label for="mark_txt">水印文字</label>
</dt>
<dd class="opt">
<input name="mark_text" id="mark_text" maxlength="120"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
value="{$config.mark_text}" class="input-txt" type="text" />
<p class="notic">水印文字</p>
</dd>
</dl>
<dl class="row" id="imgtr" >
<dt class="tit">
<label for="mark_img">水印图片</label>
</dt>
<dd class="opt">
<div class="ncsc-goods-default-pic">
<div class="goodspic-uplaod">
<div style="">
<img id="original_img2" src="{:getImg($config.mark_img,'__PUBLIC__/images/default_goods_image_240.gif')}" style="width:120px;border:#eee solid 1px" onMouseOver="layer.tips('<img src={:getImg($config.mark_img,'__PUBLIC__/images/default_goods_image_240.gif')}>',this, {tips: [1, '#fff']});" onMouseOut="layer.closeAll();">
</div>
<input type="hidden" id="mark_img" name="mark_img"
onkeydown="strkeydown(event, this, 'submitbtn')"
value="{$config.mark_img}" class="type-file-text">
<p class="hint">请上传图片格式文件,<Font color="red">大小建议为:240*60像素,格式为PNG。</Font> </p>
<div class="handle">
<div class="ncsc-upload-btn">
<a onClick="GetUploadify_new(1,'mark_img','logo','{$erpid}','store_config','store_id','mark_img','{$config.store_id}','call_back')" >
<p><i class="icon-upload-alt"></i>图片上传</p>
</a>
</div>
</div>
</div>
</div>
</dd>
</dl>
<dl class="row" style="display: none">
<dt class="tit">水印添加条件</dt>
<dd class="opt">
<ul class="nofloat">
<li>
<input pattern="^\d{1,}$" value="{$config.mark_width}" maxlength="6"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
onkeyup="this.value=this.value.replace(/\D/g,'')"
name="mark_width" id="mark_width" checked="checked" type="text">
<span class="err">只能输入整数</span>
<label for="mark_width">图片宽度 单位像素(px)</label>
</li>
<li>
<input pattern="^\d{1,}$" value="{$config.mark_height}" maxlength="6"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
onkeyup="this.value=this.value.replace(/\D/g,'')"
name="mark_height" id="mark_height" checked="checked" type="text">
<label for="mark_height">图片高度 单位像素(px)</label>
</li>
</ul>
<p class="notic">水印的宽度和高度</p>
</dd>
</dl>
<dl class="row" id="imgtr1">
<dt class="tit">
<label for="mark_degree">水印透明度</label>
</dt>
<dd class="opt">
<input pattern="^\d{1,}$"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
onChange="$('#mark_degree2').empty().html(this.value);"
name="mark_degree" id="mark_degree" value="{$config.mark_degree}" class="input-txt" type="range" min="0" step="2" max="100">
<span class="err" id="mark_degree2">{$config.mark_degree}</span>
<p class="notic">0代表完全透明,100代表不透明</p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="mark_degree">JPEG 水印质量</label>
</dt>
<dd class="opt">
<input pattern="^\d{1,}$"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
onChange="$('#mark_quality2').empty().html(this.value);"
name="mark_quality" id="mark_quality" value="{$config.mark_quality}" class="input-txt" type="range" min="0" step="2" max="100">
<span class="err" id="mark_quality2">{$config.mark_quality}</span>
<p class="notic">水印质量请设置为0-100之间的数字,决定 jpg 格式图片的质量</p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="mark_degree">JPEG 水印位置</label>
</dt>
<dd class="opt">
<div style="height:124px; background:#fff">
<span class="span_1">
<ul>
<li><input id='pradio1' type="radio" name="mark_position" value="1"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '1'">checked</if>
> <label for='pradio1'>顶部居左</label>
</li>
<li><input id='pradio2' type="radio" name="mark_position" value="2"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '2'">checked</if>
> <label for='pradio2'>中部居左</label>
</li>
<li><input id='pradio3' type="radio" name="mark_position" value="3"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '3'">checked</if>
> <label for='pradio3'>底部居左</label>
</li>
</ul>
</span>
<span class="span_1">
<ul>
<li><input id='pradio4' type="radio" name="mark_position" value="4"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '4'">checked</if>
> <label for='pradio4'>顶部居中</label>
</li>
<li><input id='pradio5' type="radio" name="mark_position" value="5"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '5'">checked</if>
> <label for='pradio5'>中部居中</label>
</li>
<li><input id='pradio6' type="radio" name="mark_position" value="6"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '6'">checked</if>
> <label for='pradio6'>底部居中</label>
</li>
</ul>
</span>
<span class="span_1">
<ul>
<li><input id='pradio7' type="radio" name="mark_position" value="7"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '7'">checked</if>
> <label for='pradio7'>顶部居右</label>
</li>
<li><input id='pradio8' type="radio" name="mark_position" value="8"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '8'">checked</if>
> <label for='pradio8'>中部居右</label>
</li>
<li><input id='pradio9' type="radio" name="mark_position" value="9"
onkeydown="strkeydown(event, this, 'sumbitbtn')"
<if condition="$config['mark_position'] eq '9'">checked</if>
> <label for='pradio9'>底部居右</label>
</li>
</ul>
</span>
<div style="clear:both;"></div>
</div>
</dd>
</dl>
<div class="bot"><a id="sumbitbtn" href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onClick="$('#handlepost').submit()">确认提交</a></div>
</div>
</form>
<input TYPE="hidden" id="qclurl" value="{$qclurl}" name="qclurl">
</div>
<div id="goTop"> <a href="JavaScript:void(0);" id="btntop"><i class="fa fa-angle-up"></i></a><a href="JavaScript:void(0);" id="btnbottom"><i class="fa fa-angle-down"></i></a></div>
</body>
<script>
function adsubmit(){
layer.msg('加载中...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '10px', time:100000}) ;
$('#handlepost').submit();
}
$(document).ready(function(){
get_province();
var marktype = "{$config['mark_type']}";
if(marktype == 'text'){
$('#texttr').show();
$('#imgtr1').hide();
$('#imgtr').hide();
}else{
$('#imgtr').show();
$('#imgtr1').show();
$('#texttr').hide();
}
});
// 上传水印图片成功回调函数
function call_back(fileurl_tmp){
var getqclurl=$("#qclurl").val();
$("#mark_img").val(fileurl_tmp);
$("#original_img2").attr('onmouseover', "layer.tips('<img src="+fileurl_tmp+">',this,{tips: [1, '#fff']});");
$("#original_img2").attr('src', fileurl_tmp);
}
function setwarter(marktype){
if(marktype == 'text'){
$('#texttr').show();
$('#imgtr').hide();
$('#imgtr1').hide();
}else{
$('#texttr').hide();
$('#imgtr1').show();
$('#imgtr').show();
}
}
</script>
</html>