-
Notifications
You must be signed in to change notification settings - Fork 0
/
addgame.html
232 lines (226 loc) · 9.39 KB
/
addgame.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>发布试玩</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="plugins/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="css/global.css" media="all">
<link rel="stylesheet" href="css/addgame.css" media="all">
</head>
<style>
input.layui-input,.layui-form-item select{
width:500px;
}
.layui-input.reward{
width:390px;
}
.layui-input-inline.reward{
width:390px;
}
</style>
<body>
<div style="margin: 15px;">
<div class="layui-form-item">
<div class="layui-elem-quote">
<a href="ReleaseDemo.html">发布试玩</a>>添加试玩
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">试玩名称</label>
<div class="layui-input-inline">
<input type="text" name="gamename" lay-verify="gamename" autocomplete="off" class="layui-input" placeholder="运营商《游戏名称》试玩标题">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">游戏类型</label>
<select name="gametype">
<option value="全部" selected="selected">全部</option>
<option value="页游" >页游</option>
<option value="端游">端游</option>
<option value="棋牌">棋牌</option>
<option value="手游">手游H5</option>
<option value="手游">金融理财</option>
<option value="手游">其他</option>
</select>
</div>
<div class="layui-form-item">
<label class="layui-form-label">注册地址</label>
<div class="layui-input-inline">
<input type="text" name="adress" lay-verify="adress" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">试玩周期</label>
<div class="layui-inline">
<input type="text" class="layui-input" id="starttime" placeholder="yyyy-MM-dd" style="width:243px;">
</div>
<div class="layui-inline">
<input type="text" class="layui-input" id="endtime" placeholder="yyyy-MM-dd" style="width:243px;">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">试玩范围</label>
<div class="layui-input-inline">
<input type="text" name="demorange" lay-verify="demorange" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">更新时间</label>
<div class="layui-input-inline">
<input type="text" name="changetime" lay-verify="changetime" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">金币领取</label>
<div class="layui-input-inline">
<input type="text" name="gold" lay-verify="gold" autocomplete="off" class="layui-input" placeholder="请在试玩周期内自行领取奖励,逾期是否作废?" >
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">温馨提示</label>
<div class="layui-input-inline">
<textarea name="warmprompt" class="warmprompt" placeholder="严禁重复体验,同一IP、同一电脑体验的取最高等级进行奖励。"></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">封面图</label>
<button type="button" class="layui-btn" id="surface">
<i class="layui-icon"></i>上传图片
</button>
<div class="layui-upload-list">
<img class="layui-upload-img" id="surfaceImg">
<p id="demoText"></p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">背景图</label>
<button type="button" class="layui-btn" id="background">
<i class="layui-icon"></i>上传图片
</button>
<div class="layui-upload-list">
<img class="layui-upload-img" id="backgroundImg">
<p id="demoText"></p>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">推荐封面</label>
<button type="button" class="layui-btn" id="recommend">
<i class="layui-icon"></i>上传图片
</button>
<div class="layui-upload-list">
<img class="layui-upload-img" id="recommendImg">
<p id="demoText"></p>
</div>
</div>
<div class="add_award_cont">
<blockquote class="layui-elem-quote layui-quote-nm">
<div class="layui-form-item">
<label class="layui-form-label">大标题</label>
<div class="layui-input-inline">
<input type="text" name="title" lay-verify="title" autocomplete="off" class="layui-input title_input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-inline reward">
<input type="text" name="awardConditions" lay-verify="awardConditions" autocomplete="off" class="layui-input reward" placeholder="奖励条件">
</div>
<div class="layui-input-inline">
<input type="text" name="awardCoin" lay-verify="awardCoin" autocomplete="off" class="layui-input" placeholder="奖励金币">
</div>
<button class="layui-btn layui-btn-danger del_msg_btn">删除</button>
</div>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<button class="layui-btn layui-btn-warm add_msg_btn">添加</button>
</div>
<div class="del_award_btn">
<i class="layui-icon">ဆ</i>
</div>
</blockquote>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<button class="layui-btn layui-btn-normal add_award_btn">添加奖励信息</button>
</div>
</div>
<div class="layui-form-item" style="width:200px;margin:0 auto;">
<div class="layui-input-inline">
<button class="layui-btn">确认</button>
<a href="ReleaseDemo.html" class="layui-btn layui-btn-warm">返回</a>
</div>
</div>
</div>
<script type="text/javascript" src="plugins/layui/laydate/laydate.js"></script>
<script type="text/javascript" src="plugins/layui/layui.js"></script>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script>
laydate.render({
elem: '#starttime'
,type: 'datetime'
});
laydate.render({
elem: '#endtime'
,type: 'datetime'
});
layui.use('upload', function(){
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#surface' //绑定元素
,url: '/upload/' //上传接口
,done: function(res){
//上传完毕回调
}
,error: function(){
//请求异常回调
}
});
});
layui.use('upload', function(){
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#background' //绑定元素
,url: '/upload/' //上传接口
,done: function(res){
//上传完毕回调
}
,error: function(){
//请求异常回调
}
});
});
layui.use('upload', function(){
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#recommend' //绑定元素
,url: '/upload/' //上传接口
,done: function(res){
//上传完毕回调
}
,error: function(){
//请求异常回调
}
});
});
$('.add_award_cont').on('click','.del_msg_btn',function(){
$(this).parents('.layui-form-item').remove();
})
var addmsg = '<div class="layui-form-item"><label class="layui-form-label"></label><div class="layui-input-inline reward"><input type="text" name="awardConditions" lay-verify="awardConditions" autocomplete="off" class="layui-input reward" placeholder="奖励条件"></div><div class="layui-input-inline"><input type="text" name="awardCoin" lay-verify="awardCoin" autocomplete="off" class="layui-input" placeholder="奖励金币"></div><button class="layui-btn layui-btn-danger del_msg_btn">删除</button></div>';
$('.add_award_cont').on('click','.add_msg_btn',function(){
$(this).parents('.layui-form-item').before(addmsg);
})
var addaward = '<blockquote class="layui-elem-quote layui-quote-nm"><div class="layui-form-item"><label class="layui-form-label">大标题</label><div class="layui-input-inline"><input type="text" name="title" lay-verify="title" autocomplete="off" class="layui-input title_input"></div></div><div class="layui-form-item"><label class="layui-form-label"></label><div class="layui-input-inline reward"><input type="text" name="awardConditions" lay-verify="awardConditions" autocomplete="off" class="layui-input reward" placeholder="奖励条件"></div><div class="layui-input-inline"><input type="text" name="awardCoin" lay-verify="awardCoin" autocomplete="off" class="layui-input" placeholder="奖励金币"></div><button class="layui-btn layui-btn-danger del_msg_btn">删除</button></div><div class="layui-form-item"><label class="layui-form-label"></label><button class="layui-btn layui-btn-warm add_msg_btn">添加</button></div><div class="del_award_btn"><i class="layui-icon">ဆ</i></div></blockquote>';
$('.add_award_btn').click(function(){
$(this).parents('.layui-form-item').before(addaward);
})
$('.add_award_cont').on('click','.del_award_btn',function(){
$(this).parents('blockquote').remove();
})
</script>
</body>
</html>