modify_domain_index.html
4.67 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
<include file="public/layout" />
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<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="handlepost" action="" enctype="multipart/form-data" name="form1">
<input type="hidden" name="store_id" value="{$store_id}">
<div class="ncap-form-default">
<dl class="row">
<dt class="tit">
<em></em>request合法域名
</dt>
<dd class="opt">
<textarea name="requestdomain" rows="6" class="tarea" id="requestdomain"></textarea>
<span class="err cr"></span>
<p class="notic">多个按逗号分开</p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<em></em>scoket合法域名
</dt>
<dd class="opt">
<textarea name="wsrequestdomain" rows="6" class="tarea" id="wsrequestdomain"></textarea>
<span class="err cr"></span>
<p class="notic">多个按逗号分开</p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<em></em>uploadFile合法域名
</dt>
<dd class="opt">
<textarea name="uploaddomain" rows="6" class="tarea" id="uploaddomain"></textarea>
<span class="err cr"></span>
<p class="notic">多个按逗号分开</p>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<em></em>downloadFile合法域名
</dt>
<dd class="opt">
<textarea name="downloaddomain" rows="6" class="tarea" id="downloaddomain"></textarea>
<span class="err cr"></span>
<p class="notic">多个按逗号分开</p>
</dd>
</dl>
<div class="bot">
<a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" id="sumbitbtn" onclick="adsubmit()">确认提交</a>
</div>
</div>
</form>
<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 type="text/javascript">
$(function () {
$.ajax({
url: "{:U('Weapp/modify_domain')}",
type:'get',
data:{'action':'get','stoid':'{$stoid}'},
dataType:'json',
success:function(res){
if(res.errcode==0){
$("#requestdomain").val(res.requestdomain);
$("#wsrequestdomain").val(res.wsrequestdomain);
$("#uploaddomain").val(res.uploaddomain);
$("#downloaddomain").val(res.downloaddomain);
}
else
{
layer.msg(res.errmsg, {icon: 2,time: 3000});
}
}
});
})
function adsubmit(){
layer.msg('加载中...', {icon: 16,shade: [0.5, '#f5f5f5'],scrollbar: false,offset: '10px', time:100000}) ;
if($('#requestdomain').val() == ''){
layer.msg('request合法域名不能为空!', {icon: 2,time: 1000});
$("#requestdomain").focus();
$("#requestdomain").parent().find("span").text("request合法域名不能为空");
return false;
}
$.ajax({
url: "{:U('Weapp/modify_domain',array('action'=>set,'stoid'=>$stoid))}",
type:'post',
data: $("#handlepost").serialize(),
dataType:'json',
success:function(res){
if(res.errcode==0){
layer.msg('修改成功', {icon: 1,time: 1000});
setTimeout(function () {
location.href=location.href;
},1000)
}
else
{
layer.msg(res.errcode+res.errmsg, {icon: 2,time: 3000});
}
}
});
}
</script>
</html>