index.html
7.9 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
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">系统设置</a></li>
</ul>
<div class="row margin-top-20">
<div class="col-md-6">
<form class="js-ajax-form" action="{:url('zj_system/edit')}" method="post">
<div class="tab-content">
<div class="tab-pane active" id="A">
<div class="form-group">
<label for="mobile"><span class="form-required">*</span>退款客服电话</label>
<div>
<input type="text" class="form-control" required value="{$one.mobile}" id="mobile" name="mobile">
</div>
</div>
<div class="form-group">
<label><span class="form-required">*</span>关于我们-背景图</label>
<div style="text-align: center;">
<input type="hidden" name="about_img" id="thumbnai2"
value="{$one.about_img|default=''}">
<a href="javascript:uploadOneImage('图片上传','#thumbnai2');">
<if condition="empty($one.about_img)">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnai2-preview"
width="135" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_preview_url($one.about_img)}"
id="thumbnai2-preview"
width="135" style="cursor: pointer"/>
</if>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnai2" value="取消图片">
</div>
</div>
<div class="form-group">
<label><span class="form-required">*</span>关于我们-公司简介</label>
<div>
<script type="text/plain" id="content" name="about">{:cmf_replace_content_file_url(htmlspecialchars_decode($one.about))}</script>
</div>
</div>
<div class="form-group">
<label for="integral"><span class="form-required">*</span>返佣比例</label>
<div>
<input type="number" class="form-control" required id="integral" value="{$one.integral}" name="integral">
</div>
</div>
<div class="form-group">
<label for="integral"><span class="form-required">*</span>发货人信息</label>
<div>
<div class="col-md-5">发货人:<input type="text" required style="width: 80%;display: inline-block;" class="form-control" id="name" value="{$one.name}" name="name"></div>
<div class="col-md-5">手机号:<input type="number" required style="width: 80%;display: inline-block;" class="form-control" id="fmobile" value="{$one.fmobile}" name="fmobile"></div>
</div>
</div>
<br/>
<br/>
<br/>
<div class="form-group">
<label><span class="form-required">*</span>发货地址</label><br/>
<div class="col-md-3">省:<select required class="form-control " name="province" style="width: 80%;display: inline-block;" id="province" onchange="province1(this)"></select></div>
<div class="col-md-3">市:<select required class="form-control " name="city" style="width: 80%;display: inline-block;" id="city" onchange="city1(this)"></select></div>
<div class="col-md-3">区:<select required class="form-control " name="county" style="width: 80%;display: inline-block;" id="county"></select></div>
</div>
<br/>
<br/>
<br/>
<div class="form-group">
<label for="integral"><span class="form-required">*</span>详细地址</label>
<div>
<input type="text" required class="form-control" id="place" value="{$one.place}" name="place">
</div>
</div>
</div>
<div class="form-group">
<input type="hidden" name="id" value="{$one.id}">
<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/city-picker.js"></script>
<script>
$('.btn-cancel-thumbnai2').click(function () {
$('#thumbnai2-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnai2').val('');
});
var pla=$.rawCitiesData
var ci=document.getElementById('city')
var co=document.getElementById('county')
$(function () {
var pr=document.getElementById('province')
var arr1=[];
var arr2=[];
for (i=0;i<pla.length;i++){
if (pla[i].name=="{$one.province}"){
arr1=pla[i].sub
for (l=0;l<arr1.length;l++){
if (arr1[l].name=="{$one.city}"){
arr2=arr1[l].sub
}
}
}
}
ff(pr,pla,"{$one.province}")
ff(ci,arr1,"{$one.city}")
ff(co,arr2,"{$one.county}")
})
//选择省
function province1(_this) {
var arr1=[];
for (i=0;i<pla.length;i++){
if (pla[i].name==_this.value){
arr1=pla[i].sub
}
}
rem(ci)
rem(co)
ff(ci,arr1)
}
//选择市
function city1(_this) {
var pr=document.getElementById('province')
var arr1=[];
for (i=0;i<pla.length;i++){
if (pla[i].name==pr.value){
for (l=0;l<pla[i].sub.length;l++){
if (pla[i].sub[l].name==_this.value){
arr1=pla[i].sub[l].sub
}
}
}
}
rem(co)
ff(co,arr1)
}
//添加option
function ff(_this,arr,_name) {
for(i=0;i<arr.length;i++){
var opt=document.createElement('option');
if (arr[i].name==_name){
opt.selected=true;
}
opt.text=arr[i].name;
opt.value=arr[i].name;
_this.add(opt);
}
}
//删除option
function rem(_this) {
for(i=_this.options.length-1;i>=0;i--){
_this.remove(i)
}
}
</script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function () {
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
});
</script>
</body>
</html>