acompetition_detial.js
1.0 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
define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'], function($, undefined, Frontend,
Form, Template, Swiper, Layer) {
var Controller = {
index: function() {
require(['upload'], function(Upload) {
var first_swiper = new Swiper('#first_swiper', {
loop: true, // 循环模式选项
// 如果需要分页器
autoplay:true,
pagination: {
el: '.swiper-pagination',
}
})
$(".change").click(function(){
$(this).text("保存信息")
$("input").removeAttr("disabled")
Upload.api.upload($('#btn-upload'));
$("select").removeAttr("disabled")
$(".add").click(function(){
var len=$(".list").length+1
$(".joiner").append(getPeopleItem(len))
})
})
function getPeopleItem(index) {
return `<div class="list">
<text>人员`+index+`:</text>
<div>
<text>姓名</text>
<input type="text" />
<text>学号</text>
<input type="text" />
</div>
</div>`
}
})
},
}
return Controller;
});