dcompetition_detial.js
1.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
define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'], function($, undefined, Frontend,
Form, Template, Swiper, Layer) {
var Controller = {
index: function() {
// console.log(true)
var first_swiper = new Swiper ('#first_swiper', {
loop: true, // 循环模式选项
// 如果需要分页器
autoplay:true,
pagination: {
el: '.swiper-pagination',
}
})
$("#apply").click(function(){
layer.open({
type: 1,
title:['请选择分类','font-size:1rem;'],
area:['50rem','28rem'],
scrollbar:false,
content: $('#modal2') //这里content是一个DOM,注意:最好该元素要存放在body最外层,否则可能被其它的相对元素所影响
});
});
$(document).on("click",".go-sign",function(){
var that = this;
var url = $(that).data("url");
$.ajax({
type:'post',
url:url,
dataType:'json',
success:function(res){
if(parseInt(res.code)==0){
Layer.msg(res.msg,{icon:2});
}else{
location.href = url;
}
}
});
});
},
}
return Controller;
});