|
@@ -2,19 +2,24 @@ var name = '';
|
2
|
2
|
var regionCode = '';
|
3
|
3
|
var token = '';
|
4
|
4
|
$().ready(function() {
|
5
|
|
- $(".typeListRight").css('background','#D7D7D7')
|
6
|
|
- .find('.disc').css('background','#FFFFFF');
|
7
|
|
- $(".typeListRight").eq(0).css('background','#5D7DFF')
|
8
|
|
- .find('.disc').css('background','#5D7DFF');
|
9
|
5
|
var qs = parseQueryString(window.location.href);
|
10
|
6
|
console.log(qs)
|
11
|
7
|
name = qs.name;
|
12
|
8
|
regionCode = qs.code;
|
13
|
9
|
token = qs.token;
|
|
10
|
+ cituInfoData();
|
14
|
11
|
goBack();
|
15
|
|
- selectionTypes();
|
16
|
12
|
})
|
17
|
|
-
|
|
13
|
+//初始
|
|
14
|
+function init () {
|
|
15
|
+ $(".typeListRight").css('background','#D7D7D7')
|
|
16
|
+ .find('.disc').css('background','#FFFFFF');
|
|
17
|
+ $(".typeListRight").eq(0).css('background','#5D7DFF')
|
|
18
|
+ .find('.disc').css('background','#5D7DFF');
|
|
19
|
+
|
|
20
|
+ $(".nextStep").css({'background':'#5D7DFF','box-shadow':' 0 0 6px 0 rgba(93, 125, 255, 0.7)','-webkit-box-shadow':' 0 0 6px 0 rgba(93, 125, 255, 0.7)'});
|
|
21
|
+ $(".nextStep").removeAttr('disabled');
|
|
22
|
+}
|
18
|
23
|
//点击进行公积金类型选择
|
19
|
24
|
function selectionTypes () {
|
20
|
25
|
$(".typeListRight").click(function () {
|
|
@@ -29,4 +34,47 @@ function goBack () {
|
29
|
34
|
$("nav i").click(function () {
|
30
|
35
|
history.go(-1)
|
31
|
36
|
})
|
32
|
|
-}
|
|
37
|
+}
|
|
38
|
+
|
|
39
|
+//公积金类型数据
|
|
40
|
+function cituInfoData () {
|
|
41
|
+ console.log(name)
|
|
42
|
+ $.ajax({
|
|
43
|
+ type:"POST",
|
|
44
|
+ url: "/api/city/info",
|
|
45
|
+ headers:{
|
|
46
|
+ 'token': '5dac206be8b1f5736285fc03a08adb3c'
|
|
47
|
+ },
|
|
48
|
+ data:{
|
|
49
|
+ 'region': name
|
|
50
|
+ },
|
|
51
|
+ success: function (res) {
|
|
52
|
+ console.log(res)
|
|
53
|
+ if(res.errno == 0 && res.rst.data){
|
|
54
|
+ var list = res.rst.data.list;
|
|
55
|
+ var html = '';
|
|
56
|
+ if(list.length > 0){
|
|
57
|
+ for(var i = 0 ; i < list.length ; i++){
|
|
58
|
+ html += `<div class="typeList">
|
|
59
|
+ <div class="typeListLeft">
|
|
60
|
+ <h4>${list[i].region}</h4>
|
|
61
|
+ <p>${list[i].parent_region}</p>
|
|
62
|
+ </div>
|
|
63
|
+ <div class="typeListRight">
|
|
64
|
+ <div class="hollowCircle">
|
|
65
|
+ <div class="disc"></div>
|
|
66
|
+ </div>
|
|
67
|
+ </div>
|
|
68
|
+ </div>`
|
|
69
|
+ }
|
|
70
|
+ $(".list").html(html);
|
|
71
|
+ init();
|
|
72
|
+ selectionTypes();
|
|
73
|
+ }
|
|
74
|
+ }else{
|
|
75
|
+ $(".nextStep").css({'background':'#CCCCCC','box-shadow':'none'});
|
|
76
|
+ $(".nextStep").attr('disabled','disabled');
|
|
77
|
+ }
|
|
78
|
+ }
|
|
79
|
+ });
|
|
80
|
+}
|