chengjie 1 yıl önce
ebeveyn
işleme
3d0d57ae19
78 değiştirilmiş dosya ile 6340 ekleme ve 208 silme
  1. 8 5
      app.js
  2. 25 5
      app.json
  3. 588 1
      app.wxss
  4. BIN
      pages/images/fs_a01.png
  5. BIN
      pages/images/icon_del_02.png
  6. BIN
      pages/images/icon_down_01.png
  7. BIN
      pages/images/icon_filter_02.png
  8. BIN
      pages/images/icon_nextpage_4.png
  9. BIN
      pages/images/icon_save_01.png
  10. BIN
      pages/images/icon_sys_13.png
  11. BIN
      pages/images/icon_up_01.png
  12. BIN
      pages/images/line_02.png
  13. BIN
      pages/images/logo_16b.png
  14. BIN
      pages/images/logo_16s.png
  15. BIN
      pages/images/pic_01.png
  16. BIN
      pages/images/pic_04.png
  17. BIN
      pages/images/toolbook.png
  18. BIN
      pages/images/universalpic_del_gray_14x14.png
  19. BIN
      pages/images/universalpic_dustbin_black_24x30.png
  20. BIN
      pages/images/universalpic_exclamation_white_120x120.png
  21. 231 40
      pages/index/index.js
  22. 1 20
      pages/index/index.wxml
  23. 64 0
      pages/main/collect.js
  24. 3 0
      pages/main/collect.json
  25. 77 0
      pages/main/collect.wxml
  26. 57 0
      pages/main/collect.wxss
  27. 23 4
      pages/main/default.js
  28. 4 4
      pages/main/default.json
  29. 39 39
      pages/main/default.wxml
  30. 112 71
      pages/main/default.wxss
  31. 68 0
      pages/main/district.js
  32. 3 0
      pages/main/district.json
  33. 99 0
      pages/main/district.wxml
  34. 136 0
      pages/main/district.wxss
  35. 65 0
      pages/main/docs.js
  36. 3 0
      pages/main/docs.json
  37. 39 0
      pages/main/docs.wxml
  38. 74 0
      pages/main/docs.wxss
  39. 248 0
      pages/main/feedback.js
  40. 3 0
      pages/main/feedback.json
  41. 47 0
      pages/main/feedback.wxml
  42. 111 0
      pages/main/feedback.wxss
  43. 39 0
      pages/main/imagelist.js
  44. 3 0
      pages/main/imagelist.json
  45. 3 0
      pages/main/imagelist.wxml
  46. 15 0
      pages/main/imagelist.wxss
  47. 321 0
      pages/main/map.js
  48. 3 0
      pages/main/map.json
  49. 39 0
      pages/main/map.wxml
  50. 101 0
      pages/main/map.wxss
  51. 134 0
      pages/main/recruitment.js
  52. 3 0
      pages/main/recruitment.json
  53. 173 0
      pages/main/recruitment.wxml
  54. 109 0
      pages/main/recruitment.wxss
  55. 215 0
      pages/main/school.js
  56. 3 0
      pages/main/school.json
  57. 326 0
      pages/main/school.wxml
  58. 466 0
      pages/main/school.wxss
  59. 439 0
      pages/main/scoreline.js
  60. 3 0
      pages/main/scoreline.json
  61. 145 0
      pages/main/scoreline.wxml
  62. 225 0
      pages/main/scoreline.wxss
  63. 147 0
      pages/main/search.js
  64. 3 0
      pages/main/search.json
  65. 100 0
      pages/main/search.wxml
  66. 215 0
      pages/main/search.wxss
  67. 36 0
      pages/main/subscribe.js
  68. 3 0
      pages/main/subscribe.json
  69. 8 0
      pages/main/subscribe.wxml
  70. 38 0
      pages/main/subscribe.wxss
  71. 28 0
      pages/main/webview.js
  72. 3 0
      pages/main/webview.json
  73. 1 0
      pages/main/webview.wxml
  74. 1 0
      pages/main/webview.wxss
  75. 191 0
      pages/template/componentList.wxml
  76. 4 2
      project.private.config.json
  77. 577 17
      utils/constant.js
  78. 92 0
      utils/main.js

+ 8 - 5
app.js

@@ -1,13 +1,12 @@
1 1
 // app.js
2 2
 App({
3
-
4 3
   globalData: {
5
-    Version: "0.1.1",
4
+    Version: "1.0.12",
6 5
     IsProduction: true,
7 6
     //IsProduction: false,
8
-    ShareTitle: "上海中考信息查询",
7
+    ShareTitle: "上海中考招生信息查询工具",
9 8
     SharePath: "pages/index/index",
10
-    ShareImage: '../images/program_screenshot_main.png',
9
+    ShareImage: '../images/fs_a01.png',
11 10
     ProgramID: 173,
12 11
     ProgramName: "秒过分数线",
13 12
     AppID: "wx39bc498e7fdacb6b",
@@ -22,8 +21,12 @@ App({
22 21
     IsOppo: false,
23 22
     systemInfo: null,
24 23
     userInfo: null,
24
+    Key: "kylx365_chengjie",
25
+    IV: "kylx365hongliren",
25 26
     SourceID: 0,//来源ID
26
-    
27
+    IsGoto:true,//可以跳转
28
+    WebViewUrl:"",//webview的链接
29
+    PageCount:100,//每一页翻页数
27 30
   },
28 31
   onLaunch: function (options) {
29 32
     this.getSystemInfo();

+ 25 - 5
app.json

@@ -1,15 +1,35 @@
1 1
 {
2
-  "pages":[
2
+  "pages": [
3
+    "pages/index/index",
4
+    "pages/main/webview",
5
+    "pages/main/docs",
6
+    "pages/main/search",
7
+    "pages/main/collect",
8
+    "pages/main/recruitment",
3 9
     "pages/main/default",
4
-    "pages/index/index"
10
+    "pages/main/school",
11
+    "pages/main/scoreline",
12
+    "pages/main/map",
13
+    "pages/main/subscribe",
14
+    "pages/main/feedback",
15
+    "pages/main/imagelist",
16
+    "pages/main/district"
17
+  ],
18
+  "permission": {
19
+    "scope.userLocation": {
20
+      "desc": "你的位置信息将用于小程序位置接口的效果展示"
21
+    }
22
+  },
23
+  "requiredPrivateInfos": [
24
+    "getLocation"
5 25
   ],
6 26
   "window": {
7
-    "navigationBarBackgroundColor": "#ffffff",
27
+    "navigationBarBackgroundColor": "#F0F0F0",
8 28
     "navigationBarTitleText": "秒过分数线",
9 29
     "navigationBarTextStyle": "black",
10
-    "backgroundColor": "#ffffff",
30
+    "backgroundColor": "#F0F0F0",
11 31
     "enablePullDownRefresh": false
12 32
   },
13 33
   "style": "v2",
14 34
   "sitemapLocation": "sitemap.json"
15
-}
35
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 588 - 1
app.wxss


BIN
pages/images/fs_a01.png


BIN
pages/images/icon_del_02.png


BIN
pages/images/icon_down_01.png


BIN
pages/images/icon_filter_02.png


BIN
pages/images/icon_nextpage_4.png


BIN
pages/images/icon_save_01.png


BIN
pages/images/icon_sys_13.png


BIN
pages/images/icon_up_01.png


BIN
pages/images/line_02.png


BIN
pages/images/logo_16b.png


BIN
pages/images/logo_16s.png


BIN
pages/images/pic_01.png


BIN
pages/images/pic_04.png


BIN
pages/images/toolbook.png


BIN
pages/images/universalpic_del_gray_14x14.png


BIN
pages/images/universalpic_dustbin_black_24x30.png


BIN
pages/images/universalpic_exclamation_white_120x120.png


+ 231 - 40
pages/index/index.js

@@ -1,48 +1,239 @@
1
-// index.js
2
-// 获取应用实例
3
-const app = getApp()
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+var timeout1 = 0, timeout3=0;
7
+var timeoutRedirect=0;
4 8
 
5 9
 Page({
6 10
   data: {
7
-    motto: 'Hello World',
8
-    userInfo: {},
9
-    hasUserInfo: false,
10
-    canIUse: wx.canIUse('button.open-type.getUserInfo'),
11
-    canIUseGetUserProfile: false,
12
-    canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
13
-  },
14
-  // 事件处理函数
15
-  bindViewTap() {
16
-    wx.navigateTo({
17
-      url: '../logs/logs'
18
-    })
11
+    Sentence:1,
19 12
   },
20
-  onLoad() {
21
-    if (wx.getUserProfile) {
22
-      this.setData({
23
-        canIUseGetUserProfile: true
24
-      })
25
-    }
13
+  onPullDownRefresh: function () {
14
+    wx.reLaunch({
15
+      url: './index',
16
+    })
26 17
   },
27
-  getUserProfile(e) {
28
-    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
29
-    wx.getUserProfile({
30
-      desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
31
-      success: (res) => {
32
-        console.log(res)
18
+  onLoad: function (options) {
19
+    console.log("Time1:" + new Date().getTime());
20
+    if (options) {
21
+      if (options.UserID) {
22
+        console.log("UserID:" + options.UserID);
23
+        app.globalData.introducer = options.UserID;
24
+      }
25
+      if (options.SourceID) {
26
+        console.log("SourceID:" + options.SourceID);
27
+        app.globalData.SourceID = options.SourceID;
28
+      }
29
+      // 扫码介绍人
30
+      if (options.scene) {
31
+        var scene = decodeURIComponent(options.scene);
32
+        console.log("scene:" + scene);
33
+        if (scene.indexOf("type=article")>=0){
34
+          app.globalData.SourceID=scene.substr(scene.indexOf("ID=") + 3);
35
+          this.setData({
36
+            gotoType: "other",
37
+            gotoUrl: '../main/docs?ID=' + app.globalData.SourceID,
38
+          });        
39
+        }        
40
+        else if (scene.indexOf("type=web")>=0){
41
+          app.globalData.SourceID=scene.substr(scene.indexOf("ID=") + 3);
42
+        }        
43
+        else{
44
+          var introducer = 0;
45
+          if (scene.indexOf("UserID") >= 0)
46
+            introducer = scene.substr(scene.indexOf("UserID") + 7);
47
+          console.log("introducer:" + introducer);
48
+          app.globalData.introducer = scene;
49
+        }
50
+      }
51
+
52
+      if (options.type == "school") {
33 53
         this.setData({
34
-          userInfo: res.userInfo,
35
-          hasUserInfo: true
36
-        })
54
+          gotoType: "other",
55
+          gotoUrl: '../main/school?ID=' + options.ID,
56
+        });
37 57
       }
38
-    })
39
-  },
40
-  getUserInfo(e) {
41
-    // 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息
42
-    console.log(e)
58
+      else if (options.type == "district") {
59
+        this.setData({
60
+          gotoType: "other",
61
+          gotoUrl: '../main/district?ID=' + options.ID+'&Name='+options.Name,
62
+        });
63
+      }
64
+      else if (options.type == "recruitment") {
65
+        this.setData({
66
+          gotoType: "other",
67
+          gotoUrl: '../main/recruitment?PanelType=' + options.PanelType+'&DistrictID='+options.DistrictID,
68
+        });
69
+      }
70
+      else if (options.type == "scoreline") {
71
+        this.setData({
72
+          gotoType: "other",
73
+          gotoUrl: '../main/scoreline?PageType='+options.type+'&ScoreTypeID='+options.ScoreTypeID+'&DistrictID=' + options.ID+"&YearIndex="+options.YearIndex,
74
+        });
75
+      }
76
+      else if (options.type == "docs") {
77
+        this.setData({
78
+          gotoType: "other",
79
+          gotoUrl: '../main/docs?ID=' + options.ID,
80
+        });
81
+      }
82
+      
83
+    }
43 84
     this.setData({
44
-      userInfo: e.detail.userInfo,
45
-      hasUserInfo: true
46
-    })
47
-  }
48
-})
85
+      IsRefresh: false,
86
+      Containnerheight: main.getWindowHeight(),
87
+      Sentence:common.random(1, 9),
88
+    });
89
+
90
+    this.updateProgram();
91
+
92
+    this.getUserInfo();
93
+
94
+    var that = this;
95
+    timeout1 = setTimeout(function () {
96
+      that.setData({
97
+        IsRefresh: true,
98
+      })
99
+    }, 15000);
100
+  },
101
+  //得到用户信息
102
+  getUserInfo: function (cb) {
103
+    var that = this
104
+    //调用登录接口
105
+    wx.login({
106
+      success: function (res0) {
107
+        app.globalData.userInfo = {};
108
+        app.globalData.userInfo.Code = res0.code;
109
+        console.log("Time2:" + new Date().getTime());
110
+        app.globalData.userInfo.nickName = "陌生用户";
111
+        app.globalData.userInfo.language = "";
112
+        app.globalData.userInfo.gender = "0";
113
+        app.globalData.userInfo.city = "";
114
+        app.globalData.userInfo.province = "";
115
+        app.globalData.userInfo.country = "";
116
+        app.globalData.userInfo.avatarUrl = "../images/universalpic_face_default_blue_120x120.png";
117
+        that.login(app.globalData.userInfo);        
118
+      },
119
+      fail: function () {}
120
+    });
121
+  },
122
+
123
+  login: function (param) {
124
+    var that = this;
125
+    main.getLocalHost(function () {
126
+      main.postData('MPSLogin', {
127
+        Code: param.Code,
128
+        NickName: param.nickName,
129
+        Language: param.language,
130
+        Gender: param.gender,
131
+        City: param.city,
132
+        Province: param.province,
133
+        Country: param.country,
134
+        AvatarUrl: param.avatarUrl,
135
+        Introducer: app.globalData.introducer,
136
+        UserSource: app.globalData.userSource,
137
+        SourceID: app.globalData.SourceID,
138
+        LastUserSource: app.globalData.userSource,
139
+        Brand: app.globalData.systemInfo.brand,
140
+        Model: app.globalData.systemInfo.model,
141
+        PixelRatio: app.globalData.systemInfo.pixelRatio,
142
+        ScreenWidth: app.globalData.systemInfo.screenWidth,
143
+        ScreenHeight: app.globalData.systemInfo.screenHeight,
144
+        WindowWidth: app.globalData.systemInfo.windowWidth,
145
+        WindowHeight: app.globalData.systemInfo.windowHeight,
146
+        WXLanguage: app.globalData.systemInfo.language,
147
+        WXVersion: app.globalData.systemInfo.version,
148
+        System: app.globalData.systemInfo.system,
149
+        Platform: app.globalData.systemInfo.platform,
150
+        SDKVersion: app.globalData.systemInfo.SDKVersion,
151
+        ProgramVersion: app.globalData.Version,
152
+      }, function (data) {
153
+        console.log("Time4:" + new Date().getTime());
154
+        if (!data) {
155
+          timeout3 = setTimeout(function () {
156
+            that.getUserInfo();
157
+            console.log("reboot:" + new Date().getTime());
158
+          }, 2000);
159
+        }
160
+        else {
161
+          app.globalData.userInfo = data;
162
+
163
+          var isShow = data.IsShow;
164
+          if (isShow == -1) {
165
+            isShow = 0;
166
+          }
167
+          else {
168
+            var systemInfo = wx.getSystemInfoSync();
169
+            if (isShow == 0 && systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
170
+              isShow = 1;
171
+            }
172
+          }
173
+
174
+          app.globalData.userInfo.IsShow = isShow;
175
+          if (app.globalData.userInfo.IsMember == 1)
176
+            app.globalData.IsLocked = 0;
177
+
178
+          wx.removeStorageSync("UserID");
179
+          wx.removeStorageSync("UserName");
180
+          wx.removeStorageSync("CollectList");
181
+
182
+          if (that.data.gotoType == "other"){
183
+            app.globalData.GotoUrl = that.data.gotoUrl;
184
+            var url = '../main/default';
185
+            wx.redirectTo({
186
+              url: url,
187
+            });
188
+          }
189
+          else{
190
+         
191
+            var url = '../main/default';
192
+            timeoutRedirect=setTimeout(function () {
193
+              console.log("Time5:" + new Date().getTime());
194
+              clearTimeout(timeout1);
195
+              wx.redirectTo({
196
+                url: url,
197
+              });
198
+            }, 200);
199
+          }
200
+                    
201
+          that.getBaiduToken();
202
+        }
203
+      });
204
+    });
205
+  },
206
+  getBaiduToken: function () {
207
+    main.getBaiduToken();
208
+  },
209
+  
210
+  updateProgram: function () {
211
+    const updateManager = wx.getUpdateManager();
212
+
213
+    updateManager.onCheckForUpdate(function (res) {
214
+      // 请求完新版本信息的回调
215
+    });
216
+
217
+    updateManager.onUpdateReady(function () {
218
+      clearTimeout(timeoutRedirect);
219
+      wx.showModal({
220
+        title: '更新提示',
221
+        content: '新版本已经准备好,重启应用',
222
+        showCancel:false,
223
+        success: function (res) {
224
+          wx.removeStorageSync("UserID");
225
+          wx.removeStorageSync("UserName");
226
+          updateManager.applyUpdate();
227
+        }
228
+      });
229
+    });
230
+  },
231
+  
232
+  onShareAppMessage: function () {
233
+    return {
234
+      title: app.globalData.ShareTitle,
235
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
236
+      imageUrl: app.globalData.ShareImage,
237
+    }
238
+  },
239
+})

+ 1 - 20
pages/index/index.wxml

@@ -1,23 +1,4 @@
1 1
 <!--index.wxml-->
2 2
 <view class="container">
3
-  <view class="userinfo">
4
-    <block wx:if="{{canIUseOpenData}}">
5
-      <view class="userinfo-avatar" bindtap="bindViewTap">
6
-        <open-data type="userAvatarUrl"></open-data>
7
-      </view>
8
-      <open-data type="userNickName"></open-data>
9
-    </block>
10
-    <block wx:elif="{{!hasUserInfo}}">
11
-      <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
12
-      <button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
13
-      <view wx:else> 请使用1.4.4及以上版本基础库 </view>
14
-    </block>
15
-    <block wx:else>
16
-      <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
17
-      <text class="userinfo-nickname">{{userInfo.nickName}}</text>
18
-    </block>
19
-  </view>
20
-  <view class="usermotto">
21
-    <text class="user-motto">{{motto}}</text>
22
-  </view>
3
+  
23 4
 </view>

+ 64 - 0
pages/main/collect.js

@@ -0,0 +1,64 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    SchoolType1:constant.arrSchoolType1,
10
+    ImagePath: app.globalData.uploadImageUrl,
11
+  },
12
+  onLoad: function (options) {
13
+    var that = this;
14
+    that.setData({
15
+      Containnerheight: main.getWindowHeight(),
16
+      SchoolType1Index:0,
17
+    });
18
+  },
19
+  onShow:function(res){
20
+    this.init();
21
+  },
22
+  init:function(){
23
+    var that = this;
24
+    main.getCollect(function(data){
25
+      if (data){
26
+        var arr=[data["收藏的高中"],data["收藏的初中"]];
27
+        that.setData({
28
+          SchoolCollect:arr,
29
+          SchoolCurrent: arr[that.data.SchoolType1Index],
30
+        });
31
+      }
32
+    });
33
+  },
34
+  onSelect:function(event){
35
+    var that=this;
36
+    main.onSelect(that,event,function(obj,e,result){
37
+      if (e.currentTarget.dataset.object=="SchoolType1"){
38
+        that.setData({
39
+          SchoolType1Index:e.currentTarget.dataset.index,
40
+          SchoolCurrent:that.data.SchoolCollect[e.currentTarget.dataset.index],
41
+        });
42
+      }
43
+    });   
44
+  },
45
+  goto: function (e) {
46
+    main.goto(e);
47
+  },
48
+  gotoMap:function(e){
49
+    if (this.data.SchoolCurrent.length>0){
50
+      main.goto({currentTarget:{dataset:{url:"map?PageType=3"}}});
51
+    }
52
+    else
53
+      main.goto(e);
54
+  },
55
+  onShareTimeline: function () {
56
+    return this.onShareAppMessage();
57
+  },
58
+  onShareAppMessage: function () {
59
+    return {
60
+      title: app.globalData.ShareTitle,
61
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
62
+    }
63
+  },
64
+})

+ 3 - 0
pages/main/collect.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "学校收藏"
3
+}

+ 77 - 0
pages/main/collect.wxml

@@ -0,0 +1,77 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTop FlexRow">
3
+    <view style="width: 40rpx;"></view>
4
+    <view class="panelTop1 FlexColumn" wx:for="{{SchoolType1}}" wx:key="index" 
5
+    bindtap="onSelect" data-object="SchoolType1" data-index="{{index}}" data-clicktype="radio">
6
+      <view class="panelTop1Text01 panelTop1Text01{{item.CSS}}">收藏的{{item.Name}}</view>
7
+      <view class="panelTop1Line01 panelTop1Line01{{item.CSS}} panelTop1Line02"></view>
8
+    </view>
9
+  </view>
10
+  <view style="height: 100rpx;"></view>
11
+  
12
+  <view class="FlexColumn" wx:if="{{SchoolCurrent.length==0}}">
13
+    <image class="icon_sys_12" src="../images/icon_sys_12.png"></image>
14
+    <view class="text02">还没收藏</view>
15
+    <view class="text03">点击学校名称或搜索,在学校主页中收藏</view>
16
+  </view>
17
+  <view class="panelBasicCss FlexColumn" wx:if="{{SchoolCurrent.length>0}}">
18
+    <view class="panelSchoolList FlexColumn" wx:for="{{SchoolCurrent}}" wx:key="index" bindtap="goto" data-url="school?ID={{item.ID}}">
19
+      
20
+      <block wx:if="{{item.Pinyin!=item.Pinyin2}}">
21
+        <view class="panelSchoolList1 FlexRow" >
22
+          <view class="panelSchoolList01">{{item.Pinyin}}</view>
23
+        </view>
24
+        <view class="panelLine"></view>
25
+      </block>
26
+      
27
+      <view class="panelSchoolList1 FlexRow">
28
+        <view class="FlexRow">
29
+          <image class="panelSchoolList1imgLogo" wx:if="{{item.ImageLogo}}" src="{{ImagePath}}web/_School/{{item.ImageLogo}}"></image>
30
+          <view class="panelSchoolList1imgLogo" wx:if="{{!item.ImageLogo && item.SchoolType1=='高中'}}"></view>
31
+          <view style="width: 30rpx;" wx:if="{{!item.ImageLogo && item.SchoolType1=='初中'}}"></view>
32
+          <view class="panelSchoolList11 FlexColumn">
33
+            <view class="panelSchoolList1Text01">{{item.SchoolFullName}}</view>
34
+            <view class="panelSchoolList111 FlexRow" wx:if="{{item.SchoolType1=='高中'}}">
35
+              <view class="panelSchoolList1Text02">{{item.SchoolType2Short}}</view>
36
+              <view class="panelLine2" wx:if="{{item.PublicOrPrivate}}"></view>
37
+              <view class="panelSchoolList1Text02">{{item.PublicOrPrivate}}</view>
38
+              <view class="panelLine2" wx:if="{{item.Accommodation}}"></view>
39
+              <view class="panelSchoolList1Text02">{{item.Accommodation}}</view>
40
+              <view class="panelLine2" wx:if="{{item.SchoolNumber}}"></view>
41
+              <view class="panelSchoolList1Text02">{{item.SchoolNumber}}</view>
42
+            </view>
43
+          </view>
44
+        </view>       
45
+        <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
46
+      </view>
47
+      <view class="panelLine"></view>
48
+    </view>
49
+
50
+    <view style="height: 60rpx;"></view>  
51
+  </view>
52
+  <view style="height: 250rpx;"></view>
53
+
54
+  <view class="panelFooterBig FlexColumn">
55
+    <view class="panelFooterBig1">横向对比收藏的{{SchoolType1[SchoolType1Index].Name}}</view>
56
+    
57
+    <block wx:if="{{SchoolType1Index==0}}">
58
+      <view class="FlexRow">
59
+        <view class="panelFooterBigBtn panelFooterBigBtn2 FlexRow" catchtap="gotoMap" data-url="scoreline?PageType=collect&DistrictID=-1&SchoolType1={{SchoolType1[SchoolType1Index].Name}}&YearIndex=0">
60
+          <view>校址地图</view>
61
+        </view>
62
+        <view style="width:20rpx;"></view>
63
+        <view class="panelFooterBigBtn panelFooterBigBtn2 FlexRow" catchtap="goto" data-url="scoreline?PageType=collect&DistrictID=-1&SchoolType1={{SchoolType1[SchoolType1Index].Name}}&YearIndex=0">
64
+          <image class="icon_compared_01" src="../images/icon_compared_01.png"></image>
65
+          <view>{{SchoolType1[SchoolType1Index].Remark}}</view>
66
+        </view>
67
+      </view>
68
+      
69
+    </block>
70
+    <block wx:if="{{SchoolType1Index==1}}">
71
+      <view class="panelFooterBigBtn FlexRow" catchtap="goto" data-url="scoreline?PageType=collect&DistrictID=-1&SchoolType1={{SchoolType1[SchoolType1Index].Name}}&YearIndex=0">
72
+        <image class="icon_compared_01" src="../images/icon_compared_01.png"></image>
73
+        <view>{{SchoolType1[SchoolType1Index].Remark}}</view>
74
+      </view>
75
+    </block>
76
+  </view>
77
+</view>

+ 57 - 0
pages/main/collect.wxss

@@ -0,0 +1,57 @@
1
+
2
+.icon_sys_12{
3
+  width:50rpx;
4
+  height:60rpx;
5
+  margin-top: 280rpx;
6
+}
7
+
8
+.text02{
9
+  font-size: 36rpx;
10
+  margin-top: 30rpx;
11
+}
12
+
13
+.text03{
14
+  font-size: 24rpx;
15
+  font-weight: 400;
16
+  margin-top: 10rpx;
17
+}
18
+
19
+.panelFooterBig{
20
+  width:100%;
21
+  background-color: #fff;
22
+  height:210rpx;
23
+  position: fixed;
24
+  bottom: 0;
25
+  z-index: 100;
26
+  justify-content: flex-start;
27
+  border-top:2rpx solid #E2E2E2;
28
+}
29
+
30
+.panelFooterBig1{
31
+  font-size:20rpx;
32
+  align-self: start;
33
+  margin: 32rpx 0 0 40rpx;
34
+}
35
+.panelFooterBigBtn{
36
+  background-color: #FCE9E3;
37
+  width:690rpx;
38
+  height:90rpx;
39
+  border: 3rpx solid #EB5C28;
40
+  border-radius: 10rpx;
41
+  margin-top: 20rpx;
42
+  color:#EB5C28;
43
+  font-size: 28rpx;
44
+}
45
+
46
+
47
+.panelFooterBigBtn2{
48
+  width:335rpx;
49
+  height:90rpx;
50
+}
51
+
52
+
53
+.icon_compared_01{
54
+  width:24rpx;
55
+  height:24rpx;
56
+  margin-right: 20rpx;
57
+}

+ 23 - 4
pages/main/default.js

@@ -6,19 +6,38 @@ const app = getApp();
6 6
 
7 7
 Page({
8 8
   data: {
9
-    IsSelect: true,
10
-    District:constant.arrDistrict,
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+    ArticleList:constant.arrArticleList,
11
+    District:constant.arrDistrict,  
12
+    Version:app.globalData.Version,  
11 13
   },
12 14
   onLoad: function (options) {
13 15
     var that = this;
14 16
     that.setData({
15 17
       Containnerheight: main.getWindowHeight(),
16 18
     });
17
-    
19
+
20
+    if (app.globalData.GotoUrl) {
21
+      //console.log(app.globalData.GotoUrl);
22
+      wx.navigateTo({
23
+        url: app.globalData.GotoUrl,
24
+      });
25
+      app.globalData.GotoUrl = "";
26
+    }
27
+    else{
28
+      //获得收藏学校数据
29
+      main.getCollect();
30
+    }
31
+  },
32
+  goto: function (e) {
33
+    main.goto(e);
34
+  },
35
+  onShareTimeline: function () {
36
+    return this.onShareAppMessage();
18 37
   },
19 38
   onShareAppMessage: function () {
20 39
     return {
21
-      title: app.globalData.ShareTitle,
40
+      title: "上海中考招生信息查询工具",
22 41
       path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
23 42
       imageUrl: app.globalData.ShareImage,
24 43
     }

+ 4 - 4
pages/main/default.json

@@ -1,7 +1,7 @@
1 1
 {
2
-  "navigationBarBackgroundColor": "#FFCC00",
2
+  "navigationBarBackgroundColor": "#F8C324",
3 3
   "navigationBarTextStyle": "black",
4
-  "backgroundColor": "#FFCC00",
5
-  "backgroundColorTop": "#FFCC00",
6
-  "backgroundColorBottom": "#FFCC00"
4
+  "navigationBarTitleText": "",
5
+  "backgroundColorTop":"#F8C324",
6
+  "backgroundColorBottom":"#F8C324"
7 7
 }

+ 39 - 39
pages/main/default.wxml

@@ -1,17 +1,15 @@
1 1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2 2
   <image class="pic_01" src="../images/pic_01.png"></image>
3 3
   <view class="panel1 FlexColumn">
4
+    <image class="pic_04" src="../images/pic_04.png"></image>
4 5
     <view class="panel11 FlexColumn">
5
-      <view class="panel111 FlexRow">
6
+      <view class="panel111 FlexRow" bindtap="goto" data-url="search">
6 7
         <image class="icon_magnifier_01" src="../images/icon_magnifier_01.png" ></image>
7 8
         <view class="text01">搜学校</view>
8 9
       </view>
9
-      <image class="line01" src="../images/line_01.png"></image>
10
-
11
-      <view class="text02">选区查志愿</view>
12
-
10
+      
13 11
       <view class="panel112 FlexRow">
14
-        <view class="panel1121 FlexRow" wx:for="{{District}}" wx:key="index">
12
+        <view class="panel1121 FlexRow" wx:for="{{District}}" wx:key="index" bindtap="goto" data-url="district?ID={{item.ID}}&Name={{item.Name}}">
15 13
           <view class="panel11211 FlexColumn">
16 14
             <view class="text03">{{item.Name}}</view>
17 15
             <view class="text04">{{item.Count}}所高中</view>
@@ -19,27 +17,16 @@
19 17
           <image class="imgLogo" src="../images/logo_{{item.ID}}s.png"></image>
20 18
         </view>
21 19
       </view>
22
-
23
-      <view class="line02"></view>
24
-
25
-      <view class="panel113 FlexRow">
26
-        <view class="panel1131">
27
-          <image class="icon_fav_03" src="../images/icon_fav_03.png"></image>
28
-        </view>
29
-
30
-        <view class="panel1132 FlexColumn">
31
-          <view class="text03">收藏学校</view>
32
-          <view class="text05">可以对比收藏的学校</view>
20
+      <view class="panel113 FlexRow" bindtap="goto" data-url="collect">
21
+        <view class="panel1131 FlexRow">
22
+          <image class="icon_fav_01" src="../images/icon_fav_01.png"></image>
23
+          <view class="panel11311 FlexColumn">
24
+            <view class="text03">收藏学校</view>
25
+            <view class="text05">制作自己的对比清单</view>
26
+          </view>
33 27
         </view>
34 28
         <image class="pic_02" src="../images/pic_02.png"></image>
35
-       
36
-      </view>
37
-
38
-      <view class="line02"></view>
39
-
40
-      <view class="panel1133 FlexRow">
41
-        <view class="text03">纠错与建议</view>
42
-        <image class="icon_nextpage_1" src="../images/icon_nextpage_1.png"></image>
29
+        <view class="panel1132"></view>
43 30
       </view>
44 31
 
45 32
       <view class="line03 FlexColumn">
@@ -50,22 +37,35 @@
50 37
   </view>
51 38
 
52 39
   <view class="panel2 FlexColumn">
53
-    <image class="toolbook" src="../images/toolbook.png"></image>
54
-    <view class="line04"></view>
55 40
     <view class="text06">参考文章</view>
56
-
57
-    <block wx:for="{{[1,2,3,4]}}">
58
-      <view class="panel21 FlexRow">
59
-        <view class="panel211 FlexColumn">
60
-          <view class="text05">数据图表</view>
61
-          <view class="text07">上海16区2023年统一招生平行志愿各区情况汇总</view>
41
+    <view class="panel21 FlexColumn" >
42
+      <view class="panel211 FlexColumn" wx:for="{{ArticleList}}" wx:key="index" bindtap="goto" data-url="docs?ID={{item.ID}}">
43
+        <view class="panel2111 FlexRow">
44
+          <view class="panel21111 FlexColumn">
45
+            <view class="panel211111 FlexRow">
46
+              <image wx:if="{{item.Logo}}" class="imgLogo2" src="../images/{{item.Logo}}"></image>
47
+              <view class="text08">{{item.Category}}</view>
48
+            </view>
49
+            <view class="text07">{{item.Title}}</view>
50
+          </view>
51
+          <image wx:if="{{item.TitleImage}}" class="TitleImage" src="{{ImagePath}}web/_ScoreLine/{{item.TitleImage}}"></image>
62 52
         </view>
63
-        <image class="articleImage" src="../images/pic_03.png"></image> 
53
+        
54
+        <view class="line04"></view>
64 55
       </view>
65
-      <view class="line04"></view>
66
-    </block>
67
-    <view class="footerHeight"></view>
56
+    </view>
57
+    <view style="height:30rpx;"></view>
58
+    <view class="panel1133 FlexRow" bindtap="goto" data-url="feedback">
59
+      <view class="text03 text031">纠错与建议</view>
60
+      <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
61
+    </view>
62
+    <view class="line04" style="margin-top: 0;"></view>
63
+    <view class="panel2 FlexRow">
64
+      <text class="text09">
65
+        <text class="text10">诚恳声明:</text>本产品所有图文内容来自网络,仅供家长对上海地区招生计划有大致了解。由于有可能存在错谬,故不能作为填报志愿的决策依据,请务必以当时当地教育局和学校提供的信息为准。我们将认真对待用户提供的纠错和建议,尽可能刊载正确信息。
66
+      </text>
67
+    </view>
68
+    <text class="text11" bindtap="goto" data-url="webview?url=https://mp.weixin.qq.com/s/nBQA9X-PwkdlxKaIjLOf5w">©2023 秒过分数线 版本 {{Version}}</text>
69
+    <view style="height:100rpx;"></view>
68 70
   </view>
69
-
70
-  
71 71
 </view>

+ 112 - 71
pages/main/default.wxss

@@ -1,14 +1,22 @@
1 1
 .container{
2 2
   width:100%;
3
-  background-color: #FFCC00;
3
+  background-color: #F8C324;
4 4
 }
5 5
 .pic_01{
6 6
   width: 100%;
7
-  height:254rpx;
7
+  height:234rpx;
8 8
 }
9 9
 
10 10
 .panel1{
11 11
   width:100%;
12
+  position: relative;
13
+}
14
+
15
+.pic_04{
16
+  width:100%;
17
+  height:700rpx;
18
+  position: absolute;
19
+  bottom:0;
12 20
 }
13 21
 
14 22
 .panel11{
@@ -17,7 +25,7 @@
17 25
   border-top-right-radius: 30rpx;
18 26
   background-color: #fff;
19 27
   min-height: 100rpx;
20
-  margin-top: 60rpx;
28
+  margin-top: 40rpx;
21 29
   position: relative;
22 30
 }
23 31
 
@@ -26,7 +34,7 @@
26 34
   height:70rpx;
27 35
   background-color: #F2F2F2;
28 36
   border-radius: 14rpx;
29
-  margin: 40rpx 0 40rpx 0;
37
+  margin: 50rpx 0 30rpx 0;
30 38
   justify-content: flex-start;
31 39
 }
32 40
 
@@ -37,8 +45,9 @@
37 45
 }
38 46
 
39 47
 .text01{
40
-  font-size:28rpx;
41
-  margin-left: 20rpx;
48
+  font-size: 24rpx;
49
+  margin-left: 10rpx;
50
+  font-weight: 400;
42 51
 }
43 52
 
44 53
 .line01{
@@ -51,12 +60,14 @@
51 60
   margin-top: 50rpx;
52 61
   align-self: flex-start;
53 62
   margin-left:40rpx;
63
+  font-weight: 700;
54 64
 }
55 65
 
56 66
 .panel112{
57
-  width: 650rpx;
67
+  width: 630rpx;
68
+  margin-left: 20rpx;
58 69
   flex-wrap: wrap;
59
-  margin-top: 30rpx;
70
+  margin-top: 10rpx;
60 71
   justify-content: flex-start;
61 72
   align-items: flex-start;
62 73
 }
@@ -64,22 +75,24 @@
64 75
 .panel1121{
65 76
   width:190rpx;
66 77
   height:121rpx;
67
-  border-radius: 10rpx;
68
-  background-color: #f2f2f2;
69
-  margin: 0 0 20rpx 20rpx;
78
+  margin-right: 20rpx;
70 79
   align-items: flex-start;
71
-  justify-content: flex-start;
80
+  justify-content: space-between;
72 81
 }
73 82
 
74 83
 .panel11211{
75 84
   align-items: flex-start;
76
-  margin-right: 34rpx;
77
-  margin: 30rpx 34rpx 0 16rpx;
85
+  margin: 30rpx 0 0 16rpx;
78 86
 }
79 87
 
80 88
 .text03{
81 89
   font-size:28rpx;
90
+  white-space: nowrap;
91
+}
92
+.text031{
93
+  margin-left: 40rpx;
82 94
 }
95
+
83 96
 .text04{
84 97
   font-size:18rpx;
85 98
 }
@@ -87,74 +100,66 @@
87 100
 .imgLogo{
88 101
   width:34rpx;
89 102
   height:34rpx;
90
-  margin-top: 36rpx;
103
+  margin: 34rpx 22rpx 0 0;
91 104
 }
92 105
 
93
-.line02{
94
-  width:610rpx;
95
-  height:1rpx;
96
-  background-color: #E3E3E3;
97
-  margin-top: 40rpx;
98
-}
99 106
 
100 107
 .panel113{
101 108
   width:610rpx;
102
-  height:180rpx;
103
-  background-color: #E0E0D8;
104
-  border-radius: 10rpx;
105
-  margin-top: 40rpx;
109
+  height:120rpx;
110
+  background-color: #f2f2f2;
111
+  border-radius: 20rpx;
112
+  margin: 30rpx 0 60rpx 0;
106 113
   position: relative;
107 114
   overflow: hidden;
108 115
 }
109 116
 
110 117
 .panel1131{
111
-  width:230rpx;
112
-  height:250rpx;
113
-  background-color: #F18B66;
114
-  border-radius: 68rpx;
115 118
   position: absolute;
116
-  top:-178rpx;
117
-  left:-120rpx;
119
+  top:32rpx;
120
+  left:30rpx;
121
+  justify-content: flex-start;
122
+  align-items: flex-start;
118 123
 }
119 124
 
120
-.icon_fav_03{
121
-  width:34rpx;
122
-  height:34rpx;
125
+.panel1132{
126
+  width:265rpx;
127
+  height:14rpx;
123 128
   position: absolute;
124
-  right:47rpx;
125
-  bottom:20rpx;
129
+  bottom:0;
130
+  left:0;
131
+  background-color: #F49673;
126 132
 }
127 133
 
128
-.panel1132{
129
-  position: absolute;
130
-  top:92rpx;
131
-  left:20rpx;
134
+.icon_fav_01{
135
+  width:24rpx;
136
+  height:24rpx;
137
+}
138
+
139
+.panel11311{
140
+  margin: -7rpx 0 0 11rpx;
132 141
   align-items: flex-start;
133 142
 }
134 143
 
135 144
 .text05{
136 145
   font-size: 20rpx;
146
+  font-weight: 400;
137 147
 }
138 148
 
139 149
 .pic_02{
140
-  width:300rpx;
141
-  height:180rpx;
150
+  width:200rpx;
151
+  height:120rpx;
142 152
   position: absolute;
143 153
   right:0;
144 154
 }
145 155
 
146 156
 .panel1133{
147
-  width:601rpx;
148
-  height:140rpx;
157
+  width:100%;
158
+  height:100rpx;
149 159
   justify-content: space-between;
160
+  background-color: #fff;
150 161
 }
151 162
 
152
-.icon_nextpage_1{
153
-  width:16rpx;
154
-  height:26rpx;
155
-}
156
-
157
-
158 163
 .line03{
159 164
   width:750rpx;
160 165
   height:20rpx;
@@ -167,44 +172,80 @@
167 172
   background-color: #fff;
168 173
 }
169 174
 
170
-.toolbook{
171
-  width:670rpx;
172
-  height:180rpx;
173
-  margin: 60rpx 0;
174
-}
175
-
176
-.line04{
177
-  width:670rpx;
178
-  height:1rpx;
179
-  background-color: #E3E3E3;
180
-}
181
-
182
-
183 175
 .text06{
184 176
   font-size: 36rpx;
185
-  margin: 60rpx 0 40rpx 0;
177
+  margin: 60rpx 0 0 0;
186 178
   align-self: flex-start;
187 179
   margin-left:40rpx;
188 180
 }
189 181
 
190 182
 .panel21{
191 183
   width: 670rpx;
192
-  justify-content: space-between;
193
-  margin: 30rpx 0;
194 184
 }
195 185
 .panel211{
186
+  width: 100%;
187
+  margin-top: 30rpx;
188
+}
189
+.panel2111{
190
+  width: 100%;
191
+  justify-content: space-between;
192
+}
193
+.panel21111{
194
+  width: 450rpx;
196 195
   align-items: flex-start;
197
-  width: 440rpx;
198 196
 }
199 197
 
198
+.panel211111{  
199
+  margin-top: 16rpx;
200
+}
201
+
202
+.text08{
203
+  font-size: 20rpx;
204
+  color:#9B9B9B;
205
+  margin-left: 10rpx;
206
+  height:22rpx;
207
+}
200 208
 .text07{
209
+  margin-top: 17rpx;
201 210
   font-size:28rpx;
202 211
   font-weight: 400;
212
+  width:450rpx;
203 213
 }
204 214
 
205
-.articleImage{
206
-  width:180rpx;
207
-  height:118rpx;
208
-  border-radius: 6rpx;
215
+.line04{
216
+  width:670rpx;
217
+  height:1rpx;
218
+  background-color: #E3E3E3;
219
+  margin-top: 30rpx;
220
+}
221
+
222
+.imgLogo2{
223
+  width:24rpx;
224
+  height:22rpx;
225
+}
226
+
227
+.TitleImage{
228
+  width:160rpx;
229
+  height:84rpx;
230
+  border:1rpx solid #E3E3E3;
231
+  border-radius: 10rpx;
232
+}
233
+
234
+.text09{
235
+  font-size: 20rpx;
236
+  font-weight: 400;
237
+  width: 670rpx;
238
+  margin-top: 30rpx;
209 239
 }
210 240
 
241
+.text10{
242
+  font-weight: 700;
243
+}
244
+
245
+.text11{
246
+  font-size: 20rpx;
247
+  margin: 100rpx 50rpx 0 0;
248
+  align-self:flex-end;
249
+  font-weight: 400;
250
+  color:#787878;
251
+}

+ 68 - 0
pages/main/district.js

@@ -0,0 +1,68 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+    DistrictID: "01",
11
+    SchoolType:constant.arrSchoolType,
12
+    Article:[
13
+      {ID:1,Title:"市实验性示范性高中、市特色普通高中、\n市级优秀体育学生、艺术骨干学生",Url:"recruitment?PanelType=1&DistrictID="},
14
+      {ID:2,Title:"国际课程班和中外合作办学高中",Url:"recruitment?PanelType=2&DistrictID="},
15
+      {ID:3,Title:"中本贯通、五年一贯制、中高职费通",Url:"subscribe?"},
16
+    ],
17
+  },
18
+  onLoad: function (options) {
19
+    var that = this;
20
+    that.setData({
21
+      Containnerheight: main.getWindowHeight(),
22
+      DistrictID:options.ID,
23
+      DistrictName:options.Name,
24
+    });
25
+    that.init();
26
+  },
27
+  init:function(){
28
+    var that = this;
29
+    var id=Number(that.data.DistrictID);
30
+    main.getData("GetMPSSchool?SelectType=structure&DistrictID="+id, function (data) {
31
+      if (data) {
32
+        that.setData({
33
+          SchoolAll: data,
34
+          SchoolCurrent:data[0].List
35
+        });
36
+      }
37
+    });
38
+  },
39
+  onSelect:function(event){
40
+    var that=this;
41
+    main.onSelect(that,event,function(obj,e,result){
42
+      if (e.currentTarget.dataset.object=="SchoolType"){
43
+        that.setData({
44
+          SchoolCurrent:that.data.SchoolAll[e.currentTarget.dataset.index].List
45
+        });
46
+      }
47
+    });   
48
+  },
49
+  goto: function (e) {
50
+    main.goto(e);
51
+  },
52
+  returnTop:function(){
53
+    main.returnTop();
54
+  },
55
+  onShareTimeline: function () {
56
+    return this.onShareAppMessage();
57
+  },
58
+  onShareAppMessage: function () {
59
+    var that=this;
60
+    var url=that.data.ImagePath+"web/_ScoreLine/fs_b"+that.data.DistrictID+".png";
61
+    
62
+    return {
63
+      title: that.data.DistrictName+"中考招生信息",
64
+      path: app.globalData.SharePath + '?type=district&ID='+that.data.DistrictID+'&Name='+that.data.DistrictName+'&UserID=' + app.globalData.userInfo.UserID,
65
+      imageUrl: url,
66
+    }
67
+  },
68
+})

+ 3 - 0
pages/main/district.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 99 - 0
pages/main/district.wxml

@@ -0,0 +1,99 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexRow">
3
+    <view class="text01">{{DistrictName}}</view>
4
+    <image class="logo_01b" src="../images/logo_{{DistrictID}}b.png"></image>
5
+  </view>
6
+  <view class="panelBasicCss panel2 FlexColumn">
7
+    <view class="text02">中招速查</view>
8
+    <view class="panel21 FlexRow">
9
+      <view class="panel211 FlexColumn" bindtap="goto" data-url="scoreline?PageType=scoreline&ScoreTypeID=2&DistrictID={{DistrictID}}&YearIndex=0">
10
+        <image class="icon_sys_05" src="../images/icon_sys_05.png"></image>
11
+        <view class="text03">名额到区</view>
12
+      </view>
13
+      <view class="panel211 FlexColumn" bindtap="goto" data-url="scoreline?PageType=scoreline&ScoreTypeID=3&DistrictID={{DistrictID}}&YearIndex=0">
14
+        <image class="icon_sys_05" src="../images/icon_sys_07.png"></image>
15
+        <view class="text03">名额到校</view>
16
+      </view>
17
+      <view class="panel211 FlexColumn" bindtap="goto" data-url="scoreline?PageType=scoreline&ScoreTypeID=4&DistrictID={{DistrictID}}&YearIndex=0">
18
+        <image class="icon_sys_05" src="../images/icon_sys_09.png"></image>
19
+        <view class="text03">1-15志愿</view>
20
+      </view>
21
+    </view>
22
+    <view class="text04">自主招生</view>
23
+    <view class="panel22 FlexRow" wx:for="{{Article}}" wx:key="index" bindtap="goto" data-url="{{item.Url}}{{DistrictID}}">
24
+      <view class="panel221 FlexColumn">
25
+        <image class="icon_sys_03" src="../images/icon_sys_03.png"></image>
26
+      </view>
27
+      <view class="panel222 FlexColumn" >
28
+        <view class="panel2221 FlexRow">
29
+          <text class="text05">{{item.Title}}</text>
30
+          <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
31
+        </view>
32
+        <view class="line02"></view>
33
+      </view>
34
+    </view>
35
+    <view style="height: 20rpx;"></view>
36
+  </view>
37
+
38
+  <view class="panelBasicCss panel3 FlexRow" bindtap="goto" data-url="map?PageType=2&DistrictID={{DistrictID}}&DistrictName={{DistrictName}}">
39
+    <view class="text06">本区高中地图</view>
40
+    <view class="panel31 FlexRow">
41
+      <image class="pic_03" src="../images/pic_03.png"></image>
42
+      <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
43
+    </view>
44
+  </view>
45
+  
46
+  <view class="panelBasicCss panel3 FlexColumn">
47
+    <view class="text07">本区学校名录</view>
48
+    <view class="panelRadio radio2 FlexRow">
49
+      <view class="panelRadio1 panelRadio1{{item.CSS}}" wx:for="{{SchoolType}}" wx:key="index"
50
+      bindtap="onSelect" data-object="SchoolType" data-index="{{index}}" data-clicktype="radio">{{item.Name}}</view>
51
+    </view>
52
+    <view class="panelSchoolList FlexColumn" wx:for="{{SchoolCurrent}}" wx:key="index" bindtap="goto" data-url="school?ID={{item.ID}}">
53
+      
54
+      <block wx:if="{{item.Pinyin!=item.Pinyin2}}">
55
+        <view class="panelSchoolList1 FlexRow" >
56
+          <view class="panelSchoolList01">{{item.Pinyin}}</view>
57
+        </view>
58
+        <view class="panelLine"></view>
59
+      </block>
60
+      
61
+      <view class="panelSchoolList1 FlexRow">
62
+        <view class="FlexRow">
63
+          <image class="panelSchoolList1imgLogo" wx:if="{{item.ImageLogo}}" src="{{ImagePath}}web/_School/{{item.ImageLogo}}"></image>
64
+          <view class="panelSchoolList1imgLogo" wx:if="{{!item.ImageLogo && item.SchoolType1=='高中'}}"></view>
65
+          <view style="width: 30rpx;" wx:if="{{!item.ImageLogo && item.SchoolType1=='初中'}}"></view>
66
+          <view class="panelSchoolList11 FlexColumn">
67
+            <view class="panelSchoolList1Text01">{{item.SchoolFullName}}</view>
68
+            <view class="panelSchoolList111 FlexRow" wx:if="{{item.SchoolType1=='高中'}}">
69
+              <view class="panelSchoolList1Text02">{{item.SchoolType2Short}}</view>
70
+              <view class="panelLine2" wx:if="{{item.PublicOrPrivate}}"></view>
71
+              <view class="panelSchoolList1Text02">{{item.PublicOrPrivate}}</view>
72
+              <view class="panelLine2" wx:if="{{item.Accommodation}}"></view>
73
+              <view class="panelSchoolList1Text02">{{item.Accommodation}}</view>
74
+              <view class="panelLine2" wx:if="{{item.SchoolNumber}}"></view>
75
+              <view class="panelSchoolList1Text02">{{item.SchoolNumber}}</view>
76
+            </view>
77
+          </view>
78
+        </view>       
79
+        <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
80
+      </view>
81
+      <view class="panelLine"></view>
82
+    </view>
83
+    <view style="height: 50rpx;"></view>
84
+  </view>
85
+  <view style="height: 210rpx;"></view>
86
+
87
+  <view class="panelFooter FlexRow">
88
+    <view class="panelFooter1 FlexRow">
89
+      <button open-type='share' class="share FlexRow">
90
+        <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_share_01.png"></image>
91
+        <view class="panelFooterBottom">转发</view>
92
+      </button>
93
+    </view>
94
+    <view class="panelFooter3 FlexRow" catchtap="returnTop">
95
+      <view class="panelFooterLine panelFooterBottom"></view>
96
+      <image class="panelFooterBottom panelFooter_icon_b2t_01" src="../images/icon_b2t_01.png"></image>
97
+    </view>
98
+  </view>
99
+</view>

+ 136 - 0
pages/main/district.wxss

@@ -0,0 +1,136 @@
1
+.panel1{
2
+  width:710rpx;
3
+  justify-content: space-between;
4
+  margin-top: 30rpx;
5
+  align-items: flex-start;
6
+}
7
+
8
+.text01{
9
+  margin-left: 40rpx;
10
+  font-size: 72rpx;
11
+}
12
+
13
+.logo_01b{
14
+  width:140rpx;
15
+  height:120rpx;
16
+  margin-right: 40rpx;
17
+}
18
+
19
+.text02{
20
+  margin: 60rpx 0 0 40rpx;
21
+  font-size: 36rpx;
22
+  align-self: flex-start;
23
+}
24
+
25
+.panel2{
26
+  margin-top: 0;
27
+}
28
+
29
+
30
+.panel21{
31
+  margin-top: 40rpx;
32
+  width: 652rpx;
33
+  justify-content: space-between;
34
+}
35
+
36
+.panel211{
37
+  width:204rpx;
38
+  height:158rpx;
39
+  border-radius: 10rpx;
40
+  background-color: #F2F2F2;
41
+}
42
+
43
+.icon_sys_05{
44
+  width:28rpx;
45
+  height:28rpx;
46
+}
47
+
48
+.text03{
49
+  margin: 10rpx 0 0 0;
50
+  font-size: 28rpx;
51
+}
52
+
53
+.line01{
54
+  width:650rpx;
55
+  height:1rpx;
56
+  background-color: #E3E3E3;
57
+  margin-top: 40rpx;
58
+}
59
+
60
+.text04{
61
+  margin: 50rpx 0 40rpx 40rpx;
62
+  font-size: 28rpx;
63
+  align-self: flex-start;
64
+}
65
+
66
+.panel22{
67
+  width:100%;
68
+  justify-content: flex-start;
69
+  align-items: flex-start;
70
+}
71
+
72
+.panel221{
73
+  width:60rpx;
74
+  height:60rpx;
75
+  border-radius: 50%;
76
+  background-color: #F0F0F0;
77
+  margin-left: 40rpx;
78
+}
79
+.icon_sys_03{
80
+  width:28rpx;
81
+  height:26rpx;
82
+}
83
+
84
+
85
+.panel222{
86
+  width:580rpx;
87
+  margin-left: 30rpx;
88
+  align-items: flex-start;
89
+}
90
+
91
+.panel2221{
92
+  width:100%;
93
+  height:66rpx;
94
+  justify-content: space-between;
95
+}
96
+
97
+.text05{
98
+  font-size: 24rpx;
99
+  font-weight: 400;
100
+}
101
+
102
+.line02{
103
+  width:540rpx;
104
+  height:1rpx;
105
+  background-color: #E3E3E3;
106
+  margin: 30rpx 0 30rpx 0;
107
+}
108
+
109
+.panel3{  
110
+  min-height:200rpx;
111
+  justify-content: space-between;
112
+}
113
+
114
+.text06{
115
+  font-size: 36rpx;
116
+  margin-left: 40rpx;
117
+}
118
+
119
+.pic_03{
120
+  width:100rpx;
121
+  height:100rpx;
122
+  border-radius: 10rpx;
123
+  margin-right: 40rpx;
124
+}
125
+
126
+.text07{
127
+  font-size: 36rpx;
128
+  margin:60rpx 0 0 40rpx;
129
+  align-self: start;
130
+}
131
+
132
+.radio2{
133
+  margin: 40rpx 0 30rpx 0;
134
+}
135
+
136
+/* ***************** */

+ 65 - 0
pages/main/docs.js

@@ -0,0 +1,65 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+    ArticleList:constant.arrArticleList,
11
+  },
12
+  onLoad: function (options) {
13
+    var that = this;
14
+    var id=options.ID;
15
+    var arr=[];
16
+    var title="";
17
+    for(var i=0;i<that.data.ArticleList.length;i++){
18
+      if (id==that.data.ArticleList[i].ID){
19
+        arr=that.data.ArticleList[i].Content;
20
+        title=that.data.ArticleList[i].TitleShort;
21
+        break;
22
+      }
23
+    }
24
+    that.setData({
25
+      Containnerheight: main.getWindowHeight(),
26
+      ImageArr:arr,
27
+      ArticleID:options.ID,
28
+      Title:title,
29
+    });
30
+  },
31
+  showImage: function (e) {
32
+    var image = e.currentTarget.dataset.url;
33
+    image=this.data.ImagePath+"web/_ScoreLine/"+image;
34
+    wx.previewImage({
35
+      current: image,
36
+      urls: [image]
37
+    });    
38
+  },
39
+  goto: function (e) {
40
+    var url=e.currentTarget.dataset.url;
41
+    wx.navigateTo({
42
+      url: url,
43
+    });
44
+  },
45
+  redirectTo: function (e) {
46
+    var url=e.currentTarget.dataset.url;
47
+    wx.redirectTo({
48
+      url: url,
49
+    });
50
+  },
51
+  reLaunch: function (e) {
52
+    wx.reLaunch({
53
+      url: 'default',
54
+    })
55
+  },
56
+  onShareTimeline: function () {
57
+    return this.onShareAppMessage();
58
+  },
59
+  onShareAppMessage: function () {
60
+    return {
61
+      title: this.data.Title,
62
+      path: app.globalData.SharePath + '?type=docs&ID='+this.data.ArticleID+'&UserID=' + app.globalData.userInfo.UserID,
63
+    }
64
+  },
65
+})

+ 3 - 0
pages/main/docs.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 39 - 0
pages/main/docs.wxml

@@ -0,0 +1,39 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <image bindtap="{{item.Fun}}" lazy-load="true"  data-url="{{item.Url}}" class="img" mode="widthFix" wx:for="{{ImageArr}}" wx:key="index" src="{{ImagePath}}web/_ScoreLine/{{item.Name}}"></image>
3
+  <view class="panel2 FlexColumn">
4
+    <view class="text06">参考文章</view>
5
+    <view class="panel21 FlexColumn" >
6
+      <view class="panel211 FlexColumn" wx:for="{{ArticleList}}" wx:key="index" bindtap="redirectTo" data-url="docs?ID={{item.ID}}">
7
+        <view class="panel2111 FlexRow">
8
+          <view class="panel21111 FlexColumn">
9
+            <view class="panel211111 FlexRow">
10
+              <image wx:if="{{item.Logo}}" class="imgLogo2" src="../images/{{item.Logo}}"></image>
11
+              <view class="text08">{{item.Category}}</view>
12
+            </view>
13
+            <view class="text07">{{item.Title}}</view>
14
+          </view>
15
+          <image wx:if="{{item.TitleImage}}" class="TitleImage" src="{{ImagePath}}web/_ScoreLine/{{item.TitleImage}}"></image>
16
+        </view>
17
+        
18
+        <view class="line04"></view>
19
+      </view>
20
+      
21
+    </view>
22
+    <view style="height:210rpx;"></view>
23
+  </view>
24
+
25
+  <view class="panelFooter FlexRow" >
26
+    <view class="panelFooter1 FlexRow" wx:if="{{!IsCollect}}" catchtap="collectSchool" data-index="1">
27
+      <button open-type='share' class="share FlexRow">
28
+        <image class="icon_share_01" src="../images/icon_share_01.png"></image>
29
+        <view>转发</view>
30
+      </button>
31
+      
32
+    </view>
33
+    
34
+    <view class="panelFooter0 FlexRow" bindtap="reLaunch">
35
+      <view class="panelFooterLine"></view>
36
+      <view style="margin-left: 30rpx;">回首页</view>
37
+    </view>
38
+  </view>
39
+</view>

+ 74 - 0
pages/main/docs.wxss

@@ -0,0 +1,74 @@
1
+.img{
2
+  width:100%;
3
+}
4
+
5
+
6
+.panel2{
7
+  width: 100%;
8
+  background-color: #f2f2f2;
9
+}
10
+
11
+.text06{
12
+  font-size: 36rpx;
13
+  margin: 60rpx 0 0 0;
14
+  align-self: flex-start;
15
+  margin-left:40rpx;
16
+}
17
+
18
+.panel21{
19
+  width: 670rpx;
20
+}
21
+.panel211{
22
+  width: 100%;
23
+  margin-top: 30rpx;
24
+}
25
+.panel2111{
26
+  width: 100%;
27
+  justify-content: space-between;
28
+}
29
+.panel21111{
30
+  width: 450rpx;
31
+  align-items: flex-start;
32
+}
33
+
34
+.panel211111{  
35
+  margin-top: 16rpx;
36
+}
37
+
38
+.text08{
39
+  font-size: 20rpx;
40
+  color:#9B9B9B;
41
+  margin-left: 10rpx;
42
+  height:22rpx;
43
+}
44
+.text07{
45
+  margin-top: 17rpx;
46
+  font-size:28rpx;
47
+  font-weight: 400;
48
+  width:450rpx;
49
+}
50
+
51
+.line04{
52
+  width:670rpx;
53
+  height:1rpx;
54
+  background-color: #E3E3E3;
55
+  margin-top: 30rpx;
56
+}
57
+
58
+.imgLogo2{
59
+  width:24rpx;
60
+  height:22rpx;
61
+}
62
+
63
+.TitleImage{
64
+  width:160rpx;
65
+  height:84rpx;
66
+  border:1rpx solid #E3E3E3;
67
+  border-radius: 10rpx;
68
+}
69
+
70
+.icon_share_01{
71
+  width:24rpx;
72
+  height:24rpx;
73
+  margin-right: 10rpx;
74
+}

+ 248 - 0
pages/main/feedback.js

@@ -0,0 +1,248 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    Feedback:constant.arrFeedback,
10
+    ImageArr:[],
11
+    ImagePath: app.globalData.uploadImageUrl,
12
+  },
13
+  onLoad: function (options) {
14
+    var that = this;
15
+    var feedbackType=0;
16
+    if (options.type){
17
+      that.data.Feedback[0].CSS="";
18
+      that.data.Feedback[options.type].CSS="Selected";
19
+    }
20
+
21
+    that.setData({
22
+      Containnerheight: main.getWindowHeight(),
23
+      Feedback:that.data.Feedback,
24
+    });
25
+  },
26
+  bindKeyInput:function(e){
27
+    var that=this;
28
+    that.setData({
29
+      InputValue:e.detail.value,
30
+    });
31
+  },
32
+  bindKeyInput2:function(e){
33
+    var that=this;
34
+    that.setData({
35
+      InputValue2:e.detail.value,
36
+    });
37
+  },
38
+  saveFeedback:function(){
39
+    var that=this;
40
+    if (!that.data.InputValue){
41
+      wx.showToast({
42
+        title: '请填写内容',
43
+      });
44
+    }
45
+    else if (that.data.InputValue.length<5){
46
+      wx.showToast({
47
+        title: '请多写点内容',
48
+      });
49
+    }
50
+    else{
51
+
52
+      wx.showLoading({
53
+        title: '保存中',
54
+        mask: true,
55
+      });
56
+      
57
+
58
+      that.uploadImageAll(that.data.ImageArr,function (success,arrResult) {
59
+        if (success) {
60
+          wx.hideLoading();         
61
+          var param={};
62
+          param.UserID=app.globalData.userInfo.UserID;
63
+          param.Content=that.data.InputValue;
64
+          param.ContactTa=that.data.InputValue2;
65
+          param.FeedbackType=[];
66
+          for(var i=0;i<that.data.Feedback.length;i++){
67
+            if (that.data.Feedback[i].CSS=="Selected")
68
+              param.FeedbackType.push(that.data.Feedback[i].Name);
69
+          }
70
+          param.FeedbackType=param.FeedbackType.join(",");
71
+          
72
+          if (arrResult.length>0)
73
+            param.ImageUrl1=arrResult[0].Target;
74
+          if (arrResult.length>1)
75
+            param.ImageUrl2=arrResult[1].Target;
76
+          if (arrResult.length>2)
77
+            param.ImageUrl3=arrResult[2].Target;
78
+          if (arrResult.length>3)
79
+            param.ImageUrl4=arrResult[3].Target;
80
+            
81
+          main.postData('MPSFeedback', param, function (data) {
82
+            wx.showModal({
83
+              title: '提醒',
84
+              content: '您的反馈已经收到,我们会尽快处理。感谢您的支持!',
85
+              showCancel: false,
86
+              complete: (res) => {
87
+                if (res.confirm) {
88
+                  wx.navigateBack({
89
+                    delta: 1
90
+                  });
91
+                }
92
+              }
93
+            });
94
+          });
95
+
96
+        } else {
97
+          wx.showToast({
98
+            title: '图片上传失败',
99
+            image: "../images/universalpic_exclamation_white_120x120.png",
100
+            mask: true,
101
+          });
102
+        }
103
+      });
104
+    }
105
+  },
106
+  //选择图片上传
107
+  uploadImageField: function () {
108
+    //console.log("uploadImageStart");
109
+    var that = this;
110
+
111
+    //若是安卓机
112
+    if (app.globalData.IsAndroid) {
113
+      selectImage(that);
114
+    } else {
115
+      wx.showActionSheet({
116
+        itemList: ['拍照', '从手机相册选择'],
117
+        success(res) {
118
+          if (res.tapIndex == 0) {
119
+            wx.chooseImage({
120
+              count: 1,
121
+              sizeType: ['compressed'],
122
+              sourceType: ['camera'],
123
+              success(res2) {
124
+                wx.showLoading({
125
+                  title: '请稍候',
126
+                  mask: true,
127
+                });
128
+                setTimeout(function () {
129
+                  wx.hideLoading();
130
+                  selectImage(that);
131
+                }, 2000);
132
+              },
133
+            });
134
+          } else if (res.tapIndex == 1) {
135
+            selectImage(that);
136
+          }
137
+        },
138
+        fail(res) {
139
+          console.log(res.errMsg)
140
+        }
141
+      });
142
+    }
143
+
144
+    function selectImage(that) {
145
+      var sizeType = ['album'];
146
+      //若是安卓机
147
+      if (app.globalData.IsAndroid)
148
+        sizeType = ['album', 'camera'];
149
+
150
+      wx.chooseImage({
151
+        count: 1,
152
+        sizeType: ['compressed'],
153
+        sourceType: sizeType,
154
+        success(res) {
155
+          // tempFilePath可以作为img标签的src属性显示图片
156
+          var tempFilePaths = res.tempFilePaths;
157
+          //console.log(tempFilePaths[0]);
158
+          //that.data.FieldContent = that.data.FieldContent + "[图 url='" + tempFilePaths[0] + "']" + tempFilePaths[0] + "[/图]";
159
+          that.data.ImageArr.push(tempFilePaths[0]);
160
+          that.setData({
161
+            ImageArr:that.data.ImageArr,
162
+          });
163
+        },
164
+        fail: function () {
165
+
166
+        }
167
+      });
168
+    }
169
+  },
170
+  uploadFileToServer: function (file, callback) {
171
+    var url = common.Encrypt("MiaoguoUploadFile2");
172
+    wx.showLoading({
173
+      title: '上传中',
174
+      mask: true,
175
+    });
176
+    url=app.globalData.serverUrl + url;
177
+    wx.uploadFile({
178
+      url: url,
179
+      filePath: file,
180
+      name: 'file',
181
+      success(res) {
182
+        var err = JSON.parse(res.data);
183
+        if (err.errcode == 10000) {
184
+          wx.hideLoading();
185
+          callback(err.result);
186
+        } else {
187
+          wx.hideLoading();
188
+          wx.showModal({
189
+            title: '上传文件失败1',
190
+            showCancel: false,
191
+            content: JSON.stringify(err.errMsg),
192
+          });
193
+        }
194
+      },
195
+      fail: function (err) {
196
+        wx.hideLoading();
197
+        wx.showModal({
198
+          title: '上传文件失败2',
199
+          showCancel: false,
200
+          content: JSON.stringify(err)+" url:"+url,
201
+        });
202
+      }
203
+    });
204
+  },
205
+
206
+  uploadImageAll: function (arr, callback) {
207
+    var that = this;
208
+    var b = false;
209
+    var arrResult = [];
210
+    for (var i = 0; i < arr.length; i++) {
211
+      var source = arr[i];
212
+      that.uploadFileToServer(source, function (data) {
213
+        if (data) {
214
+          var result = data;
215
+          result.Target = app.globalData.uploadImageUrl + result.Target;
216
+          arrResult.push(result);
217
+        }
218
+      });
219
+    }
220
+
221
+    //检查是否上传成功
222
+    setTimeout(function () {
223
+      if (arrResult.length==arr.length)
224
+        callback(true, arrResult);
225
+    }, 2000);
226
+  },
227
+  goto: function (e) {
228
+    main.goto(e);
229
+  },
230
+  onSelect:function(event){
231
+    var that=this;
232
+    main.onSelect(that,event,function(obj,e,result){
233
+      if (e.currentTarget.dataset.object=="Feedback"){
234
+        
235
+      }
236
+    });   
237
+  },
238
+  onShareTimeline: function () {
239
+    return this.onShareAppMessage();
240
+  },
241
+  onShareAppMessage: function () {
242
+    return {
243
+      title: app.globalData.ShareTitle,
244
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
245
+      imageUrl: app.globalData.ShareImage,
246
+    }
247
+  },
248
+})

+ 3 - 0
pages/main/feedback.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "用户反馈"
3
+}

+ 47 - 0
pages/main/feedback.wxml

@@ -0,0 +1,47 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelBasicCss panel1 FlexColumn">
3
+    <view class="text01">本次反馈属于以下哪一种</view>
4
+    <view class="panel11 FlexRow">
5
+      <view class="panelCheckbox panelCheckbox{{item.CSS}} FlexRow" wx:for="{{Feedback}}" wx:key="index"
6
+        bindtap="onSelect" data-object="Feedback" data-index="{{index}}" data-clicktype="checkbox">
7
+        <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
8
+          <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
9
+        </view>
10
+        <view>{{item.Name}}</view>
11
+      </view>
12
+    </view> 
13
+  </view>
14
+  <view class="panelBasicCss panel2 FlexColumn">
15
+    <view class="text01">留言</view>
16
+    <view class="panelLine3"></view>
17
+    <textarea class="text02" bindinput="bindKeyInput" value="{{InputValue}}" maxlength="800" placeholder="请填写至少5个汉字以上内容,以便我们准确理解您的意思。" placeholder-style="color:#787878;font-size:28rpx;font-weight:400;" />
18
+  </view>
19
+  <view class="panelBasicCss panel3 FlexColumn">
20
+    <view class="panel31 FlexRow">
21
+      <view class="text04">相关截图(选填)</view>
22
+      <view class="text03 FlexRow">
23
+        {{ImageArr.length}} / 4
24
+      </view>
25
+    </view>
26
+    <view class="text05">劳烦提供截图,并将错处做个记号。万分感谢。</view>
27
+    <view class="panel32 FlexRow">
28
+      <view class="panel311 FlexColumn" wx:for="{{ImageArr}}" wx:key="index">
29
+        <image class="ImageUpload" mode="aspectFill" src="{{item}}"></image>
30
+      </view>
31
+      <view class="panel311 FlexColumn" wx:key="index" wx:if="{{ImageArr.length<4}}" bindtap="uploadImageField">
32
+        <image class="icon_add_01" src="../images/icon_add_01.png"></image>
33
+      </view>
34
+    </view>
35
+  </view>
36
+
37
+  <view class="panelBasicCss panel4 FlexColumn">
38
+    <view class="text01">联系方式</view>
39
+    <view class="text05">劳烦提供截图,并将错处做个记号。万分感谢。</view>
40
+    <view class="panelLine3"></view>
41
+    <textarea class="text06" bindinput="bindKeyInput2" value="{{InputValue2}}" maxlength="100" placeholder="微信号(首选)、邮箱" placeholder-style="color:#787878;font-size:28rpx;font-weight:400;" />
42
+  </view>
43
+  
44
+  <view class="btn" bindtap="saveFeedback">提交</view>
45
+
46
+  <view style="height:200rpx"></view>
47
+</view>

+ 111 - 0
pages/main/feedback.wxss

@@ -0,0 +1,111 @@
1
+.panel1{
2
+  height:223rpx;
3
+  align-items: flex-start;
4
+}
5
+
6
+.text01{
7
+  font-size:32rpx;
8
+  margin:0 0 0 40rpx;
9
+  align-self: start;
10
+}
11
+.panel11{
12
+  margin:30rpx 0 0 40rpx;
13
+}
14
+
15
+.panel2{
16
+  height:526rpx;
17
+}
18
+
19
+.panelLine3{
20
+  width:630rpx;
21
+  background-color: #d2d2d2;
22
+  height:1rpx;
23
+  margin-top: 30rpx;
24
+}
25
+
26
+.text02{
27
+  width:630rpx;
28
+  height:320rpx;
29
+  font-size: 28rpx;
30
+  font-weight: 400;
31
+  color:#2e2e2e;
32
+  margin-top: 30rpx;
33
+}
34
+
35
+.text03{
36
+  font-family: 'Roboto-Black';
37
+  font-size: 32rpx;
38
+}
39
+
40
+.panel3{
41
+  justify-content: flex-start;
42
+}
43
+
44
+.panel31{
45
+  width:630rpx;
46
+  justify-content: space-between;
47
+  margin-top: 50rpx;
48
+}
49
+
50
+.text04{
51
+  font-size:32rpx;
52
+  align-self: start;
53
+}
54
+.text05{
55
+  font-size:24rpx;
56
+  font-weight: 400;
57
+  align-self: start;
58
+  margin:4rpx 0 0 40rpx;
59
+}
60
+
61
+.panel32{
62
+  justify-content: flex-start;
63
+  margin-top: 30rpx;
64
+  min-width: 630rpx;
65
+}
66
+
67
+.panel311{
68
+  width:140rpx;
69
+  height:140rpx;
70
+  border-radius: 10rpx;
71
+  background-color: #f0f0f0;
72
+  border:1rpx solid #d2d2d2;
73
+  margin: 0 20rpx 50rpx 0;
74
+}
75
+
76
+.ImageUpload{
77
+  width:140rpx;
78
+  height:140rpx;
79
+  border-radius: 10rpx;
80
+}
81
+
82
+.icon_add_01{
83
+  width:30rpx;
84
+  height:30rpx;
85
+}
86
+
87
+.panel4{
88
+  min-height:283rpx;
89
+}
90
+
91
+.text06{
92
+  width:630rpx;
93
+  height:50rpx;
94
+  font-size: 28rpx;
95
+  font-weight: 400;
96
+  color:#2e2e2e;
97
+  margin-top: 30rpx;
98
+}
99
+
100
+.btn{
101
+  width:710rpx;
102
+  height:110rpx;
103
+  line-height: 110rpx;
104
+  text-align: center;
105
+  border: 3rpx solid #EB5C28;
106
+  margin-top: 40rpx;
107
+  border-radius: 20rpx;
108
+  background-color: #FCE9E3;
109
+  color:#EB5C28;
110
+  font-size: 36rpx;
111
+}

+ 39 - 0
pages/main/imagelist.js

@@ -0,0 +1,39 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: { 
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+  },
11
+  onLoad: function (options) {
12
+    var that = this;
13
+    var arr=options.ImageOtherStr.split(",");
14
+
15
+    var title="校园风光·"+options.SchoolShortName;
16
+    
17
+    that.setData({
18
+      Containnerheight: main.getWindowHeight(),
19
+      SchoolFullName:options.SchoolFullName,
20
+      ImageOtherArr:arr,
21
+      Title:title,
22
+      ID:options.ID,
23
+    });
24
+    wx.setNavigationBarTitle({
25
+      title: title,
26
+    });
27
+  },
28
+  onShareTimeline: function () {
29
+    return this.onShareAppMessage();
30
+  },
31
+  onShareAppMessage: function () {
32
+    var that=this;
33
+    var title=that.data.Title;
34
+    return {
35
+      title: title,
36
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID+'&type=school&ID='+that.data.ID,
37
+    }
38
+  },
39
+})

+ 3 - 0
pages/main/imagelist.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 3 - 0
pages/main/imagelist.wxml

@@ -0,0 +1,3 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <image class="img" mode="widthFix" src="{{ImagePath}}web/_School/{{item}}" wx:for="{{ImageOtherArr}}" wx:key="index"></image>
3
+</view>

+ 15 - 0
pages/main/imagelist.wxss

@@ -0,0 +1,15 @@
1
+.container{
2
+  justify-content: flex-start;
3
+}
4
+
5
+.text01{
6
+  font-size:48rpx;
7
+  font-weight: 400;
8
+  margin: 60rpx 0 50rpx 30rpx;
9
+  align-self: start;
10
+}
11
+
12
+.img{
13
+  width: 750rpx;
14
+  margin-bottom: 20rpx;
15
+}

+ 321 - 0
pages/main/map.js

@@ -0,0 +1,321 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+var mapSetting = {
8
+  latitude: 31.232116445550176,
9
+  longitude: 121.47281159374998,
10
+  scale: 9,
11
+};
12
+
13
+Page({
14
+  data: {
15
+    latitude: mapSetting.latitude,
16
+    longitude: mapSetting.longitude,
17
+    scale: mapSetting.scale,
18
+    markers: [],
19
+    SchoolType: constant.arrSchoolType,
20
+  },
21
+  onReady: function (e) {
22
+    this.mapCtx = wx.createMapContext('myMap');
23
+  },
24
+  onLoad: function (options) {
25
+    var that = this;
26
+    that.setData({
27
+      Containnerheight: main.getWindowHeight(),
28
+      PageType: options.PageType,
29
+      SchoolTypeIndex: -1,
30
+      Options: options,
31
+      School: [],
32
+    });
33
+
34
+    var title = "";
35
+    if (options.PageType == 1) {
36
+      title = "校址·" + options.SchoolShortName;
37
+      for (var j = 0; j < that.data.SchoolType.length; j++) {
38
+        that.data.SchoolType[j].CSS = "";
39
+      }
40
+      that.setData({
41
+        SchoolType: that.data.SchoolType,
42
+        SchoolName:options.SchoolShortName,
43
+      });
44
+    } else if (options.PageType == 2) {
45
+      title = "地图·" + options.DistrictName;
46
+      that.setData({
47
+        SchoolTypeIndex: 0,
48
+        DistrictName:options.DistrictName,
49
+      });
50
+    } else if (options.PageType == 3) {
51
+      for (var j = 0; j < that.data.SchoolType.length; j++) {
52
+        that.data.SchoolType[j].CSS = "Selected";
53
+      }
54
+      that.setData({
55
+        SchoolType: that.data.SchoolType
56
+      });
57
+      title = "高中校址地图";
58
+      that.setData({
59
+        SchoolTypeIndex: 0,
60
+      });
61
+    }
62
+
63
+    wx.setNavigationBarTitle({
64
+      title: title,
65
+    });
66
+
67
+    that.setMap();
68
+  },
69
+  mapChange: function (e) {
70
+    if (e.type == "end") {
71
+      mapSetting = {
72
+        latitude: e.detail.centerLocation.latitude,
73
+        longitude: e.detail.centerLocation.longitude,
74
+        scale: e.detail.scale,
75
+      };
76
+    }
77
+  },
78
+  onSelect: function (event) {
79
+    var that = this;
80
+    main.onSelect(that, event, function (obj, e, result) {
81
+      if (e.currentTarget.dataset.object == "SchoolType") {
82
+
83
+        var selectIndex = e.currentTarget.dataset.index;
84
+        var selectText = that.data.SchoolType[selectIndex].Name;
85
+        var isSelect = that.data.SchoolType[selectIndex].CSS == "Selected";
86
+
87
+        that.setData({
88
+          SchoolType: that.data.SchoolType,
89
+          latitude: mapSetting.latitude,
90
+          longitude: mapSetting.longitude,
91
+          scale: mapSetting.scale,
92
+        });
93
+        that.setMap();
94
+      }
95
+    });
96
+  },
97
+  setMap: function () {
98
+    var that = this;
99
+    var markers = [];
100
+
101
+    that.getCurrentPosition(that, markers, function (markers) {
102
+      that.getCurrentSchoolPosition(that, markers, function (markers) {
103
+        that.getSchoolPosition(that, markers, function (markers) {
104
+          that.setData({
105
+            markers: markers,
106
+          });
107
+        });
108
+      });
109
+    });
110
+  },
111
+
112
+  getCurrentPosition: function (obj, markers, callback) {
113
+    var that = this;
114
+    wx.getLocation({
115
+      type: 'wgs84',
116
+      success(res) {
117
+        var mypos = {
118
+          id: 9999,
119
+          latitude: res.latitude,
120
+          longitude: res.longitude,
121
+          zIndex: 10,
122
+          callout: {
123
+            content: "我的位置",
124
+            color: '#EB5C28',
125
+            fontSize: 14,
126
+            borderWidth: 2,
127
+            borderRadius: 10,
128
+            borderColor: '#EB5C28',
129
+            padding: 5,
130
+            display: 'ALWAYS',
131
+            textAlign: 'center'
132
+          },
133
+        }
134
+        markers.push(mypos);
135
+        callback(markers);
136
+      },
137
+      fail(res) {
138
+        callback(markers);
139
+      }
140
+    });
141
+  },
142
+  getCurrentSchoolPosition: function (obj, markers, callback) {
143
+
144
+    if (obj.data.Options.ID) {
145
+      var arr1 = obj.data.Options.Coordinates.split(",");
146
+
147
+      obj.setData({
148
+        Address: obj.data.Options.Address,
149
+      });
150
+
151
+      var pos = {
152
+        id: Number(obj.data.Options.ID),
153
+        latitude: arr1[0],
154
+        longitude: arr1[1],
155
+        zIndex: 9,
156
+        callout: {
157
+          content: obj.data.Options.Name,
158
+          color: '#EB5C28',
159
+          fontSize: 14,
160
+          borderWidth: 2,
161
+          borderRadius: 10,
162
+          borderColor: '#EB5C28',
163
+          padding: 5,
164
+          display: 'ALWAYS',
165
+          textAlign: 'center'
166
+        },
167
+      }
168
+      markers.push(pos);
169
+    }
170
+    callback(markers);
171
+
172
+  },
173
+  getDistrict: function (obj, markers, callback) {
174
+    var that=this;
175
+    if (obj.data.School.length > 0)
176
+      callback(markers);
177
+    else {
178
+      var arr=[];
179
+      if (that.data.PageType == 3) {
180
+        main.getCollect(function(data){
181
+          arr=getSchool(data["收藏的高中"]);
182
+          obj.setData({
183
+            School: arr,
184
+          });
185
+          callback(markers);
186
+        });
187
+      } else {
188
+        wx.showLoading();
189
+        main.getData("GetMPSSchool?SchoolType1=高中&DistrictID=" + Number(obj.data.Options.DistrictID), function (data) {
190
+          arr=getSchool(data);
191
+          obj.setData({
192
+            School: arr,
193
+          });
194
+          callback(markers);
195
+          setTimeout(function () {
196
+            wx.hideLoading();
197
+          }, 800);
198
+        });
199
+      }
200
+      
201
+    }
202
+
203
+    function getSchool(data){
204
+      var arr = [];
205
+      for (var i = 0; i < data.length; i++) {
206
+        var item = data[i];
207
+        var school = {};
208
+        school.ID = item.ID;
209
+        school.Name = item.SchoolShortName;
210
+        school.IsSchoolType2Short = false;
211
+        if (item.SchoolType2Short == "市重点")
212
+          school.IsSchoolType2Short = true;
213
+        if (item.Coordinates) {
214
+          var arr1 = item.Coordinates.split(",");
215
+          school.Latitude = arr1[0];
216
+          school.Longitude = arr1[1];
217
+          if (item.SchoolType2Short == "区重点(特色)")
218
+            item.SchoolType2Short = item.SchoolType2Short.substr(0, 3);
219
+          school.SchoolType2Short = item.SchoolType2Short;
220
+          arr.push(school);
221
+        }
222
+      }
223
+      return arr;
224
+    }
225
+  },
226
+  getSchoolPosition: function (obj, markers, callback) {
227
+    var that = this;
228
+    obj.getDistrict(obj, markers, function (markers) {
229
+
230
+      for (var i = 0; i < obj.data.School.length; i++) {
231
+        var item = obj.data.School[i];
232
+
233
+        item.IsSchoolType2Short = false;
234
+        for (var j = 0; j < that.data.SchoolType.length; j++) {
235
+          if (that.data.SchoolType[j].CSS == "Selected" &&
236
+            item.SchoolType2Short == that.data.SchoolType[j].Name)
237
+            item.IsSchoolType2Short = true;
238
+        }
239
+
240
+        if (item.IsSchoolType2Short &&
241
+          (!obj.data.Options.ID || (obj.data.Options.ID && obj.data.Options.ID != item.ID))) {
242
+          var pos = {
243
+            id: item.ID,
244
+            latitude: item.Latitude,
245
+            longitude: item.Longitude,
246
+            alpha: 0.8,
247
+            callout: {
248
+              content: item.Name,
249
+              color: '#4D4D4D',
250
+              fontSize: 14,
251
+              borderWidth: 2,
252
+              borderRadius: 10,
253
+              borderColor: '#4D4D4D',
254
+              bgColor: '#fff',
255
+              padding: 5,
256
+              display: 'ALWAYS',
257
+              textAlign: 'center'
258
+            },
259
+          }
260
+          markers.push(pos);
261
+        }
262
+      }
263
+      callback(markers);
264
+    });
265
+  },
266
+  goto: function (e) {
267
+    main.goto(e);
268
+  },
269
+  copyUrl:function(e){
270
+    var url=e.currentTarget.dataset.url;
271
+    wx.setClipboardData({
272
+      data: url,
273
+      success (res) {
274
+        wx.showToast({
275
+          title: '已复制',
276
+        });
277
+      }
278
+    });
279
+  },
280
+  onMarkerTap(e) {
281
+    //console.log('@@ markertap', e)
282
+    this.gotoSchool(e);
283
+  },
284
+  onCalloutTap(e) {
285
+    //console.log('@@ onCalloutTap', e)
286
+    this.gotoSchool(e);
287
+  },
288
+  onLabelTap(e) {
289
+    //console.log('@@ labletap', e)
290
+    this.gotoSchool(e);
291
+  },
292
+  gotoSchool(e){
293
+    var id=e.detail.markerId;
294
+    if (id<9999)
295
+      main.goto({currentTarget:{dataset:{url:"school?ID="+id}}});
296
+  },
297
+  onShareTimeline: function () {
298
+    return this.onShareAppMessage();
299
+  },
300
+  onShareAppMessage: function () {
301
+    var that=this;
302
+    var title="上海中招";
303
+    var path=app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID;
304
+    if (that.data.PageType == 1) {
305
+      title+="校址·"+that.data.SchoolName;
306
+      path+='&type=school&ID='+that.data.Options.ID;
307
+    }
308
+    else if (that.data.PageType == 2) {
309
+      title+="学校地图·"+that.data.DistrictName;
310
+      path+='&type=district&ID='+that.data.DistriceID+'&Name='+that.data.DistrictName;
311
+    }
312
+    else{
313
+      title=app.globalData.ShareTitle;
314
+    }
315
+    debugger;
316
+    return {
317
+      title: title,
318
+      path: path
319
+    }
320
+  },
321
+})

+ 3 - 0
pages/main/map.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 39 - 0
pages/main/map.wxml

@@ -0,0 +1,39 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelMap FlexColumn">
3
+    <view class="panelMap1 FlexRow" wx:if="{{PageType==1}}" bindtap="copyUrl" data-url="{{Address}}">
4
+      <image class="icon_loc_01" src="../images/icon_loc_01.png"></image>
5
+      <text class="panelMapAddress">{{Address}}</text>
6
+      <view class="panelMapAddress1">复制</view>
7
+    </view>
8
+    <view class="panelBasicCss panelMap2 FlexRow">
9
+      <view class="FlexRow">
10
+        <image class="panelCheckbox_icon_filter_01" src="../images/icon_filter_01.png"></image>
11
+        <view class="panelMap21" wx:if="{{PageType==1}}">本区其它高中</view>
12
+        <view class="panelCheckbox panelCheckbox{{item.CSS}} FlexRow" wx:for="{{SchoolType}}" wx:key="index" wx:if="{{item.SchoolType1=='高中'}}"
13
+        bindtap="onSelect" data-object="SchoolType" data-index="{{index}}" data-clicktype="checkbox">
14
+          <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
15
+            <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
16
+          </view>
17
+          <view>{{item.Name}}</view>
18
+        </view>
19
+      </view>
20
+    </view>
21
+  </view>
22
+  <map class="map" style='min-height:{{Containnerheight}}rpx;' 
23
+    id="myMap" 
24
+    latitude="{{latitude}}"
25
+    longitude="{{longitude}}" 
26
+    markers="{{markers}}" 
27
+    scale="{{scale}}" 
28
+    bindregionchange="mapChange"
29
+    bindmarkertap="onMarkerTap"
30
+    bindcallouttap="onCalloutTap"
31
+    bindlabeltap="onLabelTap">
32
+  </map>
33
+
34
+  <view class="panelFooter FlexRow" >
35
+    <view class="panelFooter2 FlexRow"  catchtap="goto" data-url="feedback">
36
+      <view class="panelFooterBottom panelFooter211">纠错</view>
37
+    </view>
38
+  </view>
39
+</view>

+ 101 - 0
pages/main/map.wxss

@@ -0,0 +1,101 @@
1
+.panelMap{
2
+  position: fixed;
3
+  width:100%;
4
+  top:0rpx;
5
+  z-index: 10;
6
+  background-color: #F0F0F0;
7
+  border-bottom: 2rpx solid #e2e2e2;
8
+}
9
+.panelMap1{
10
+  margin-top: 30rpx;
11
+  width:100%;
12
+  justify-content: flex-start;
13
+}
14
+
15
+.icon_loc_01{
16
+  width:20rpx;
17
+  height:24rpx;
18
+  margin-left: 50rpx;
19
+}
20
+
21
+.panelMapAddress{
22
+  font-size:28rpx;
23
+  margin-left: 24rpx;
24
+  font-weight: 400;
25
+}
26
+.panelMapAddress1{
27
+  font-size:28rpx;
28
+  margin-left: 20rpx;
29
+  color:#EB5C28;
30
+}
31
+
32
+.panelMap2{
33
+  margin-top: 30rpx;
34
+  height: 88rpx;
35
+  justify-content: space-between;
36
+  margin-bottom: 30rpx;
37
+}
38
+
39
+.panelMap21{
40
+  font-size: 20rpx;
41
+  margin-right: 30rpx;
42
+}
43
+
44
+.panelLine3{
45
+  margin-left: 28rpx;
46
+  width:2rpx;
47
+  height:50rpx;
48
+  background-color: #d2d2d2;
49
+}
50
+
51
+
52
+.panelMap22{
53
+  width:116rpx;
54
+  height:80rpx;
55
+  line-height: 80rpx;
56
+  text-align: center;
57
+  color:#EB5C28;
58
+  font-size:28rpx;
59
+}
60
+
61
+.panelCheckbox{
62
+  padding: 0 15rpx;
63
+}
64
+
65
+/* ************ */
66
+
67
+.map{
68
+  width:100%;
69
+  margin-top: 30rpx;
70
+}
71
+
72
+.customCallout {
73
+  box-sizing: border-box;
74
+  background-color: #fff; 
75
+  border: 1px solid #ccc;
76
+  border-radius: 30px;
77
+  width: 150px;
78
+  height: 40px;
79
+  display: inline-flex;
80
+  padding: 5px 20px;
81
+  justify-content: center;
82
+  align-items: center;
83
+}
84
+
85
+.circle {
86
+  width: 20px;
87
+  height: 20px;
88
+  border: 1px solid #ccc;
89
+  border-radius: 50%;
90
+}
91
+
92
+.icon {
93
+  width: 16px;
94
+  height: 16px;
95
+}
96
+
97
+.content {
98
+  flex: 0 1 auto;
99
+  margin: 0 10px;
100
+  font-size: 14px;
101
+}

+ 134 - 0
pages/main/recruitment.js

@@ -0,0 +1,134 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+var DistrictName="";
7
+Page({
8
+  data: {
9
+    Years:constant.arrYear,
10
+    YearIndex:0,
11
+    District:[],
12
+    ListNullData:false,
13
+    PublicOrPrivate2:constant.arrPublicOrPrivate2,
14
+    PanelType:1,//1是自主招生,2是国际班
15
+  },
16
+  onLoad: function (options) {
17
+    var that = this;
18
+
19
+    var districtID=0;
20
+
21
+    var title="自招·市重点和特高";
22
+    if (Number(options.PanelType)==2){
23
+      districtID=-1;
24
+      title="自招·国际和中外合办";
25
+    }
26
+    else{
27
+      districtID=Number(options.DistrictID);
28
+      var arr=[{ID:0,Name:"委属",CSS:""}];
29
+      for(var i=0;i<constant.arrDistrict.length;i++){
30
+        var obj={};
31
+        obj.ID=Number(constant.arrDistrict[i].ID);
32
+        obj.Name=constant.arrDistrict[i].Name.substr(0,2);
33
+        obj.CSS="";
34
+        arr.push(obj);
35
+      }
36
+      arr[districtID].CSS="Selected";
37
+      DistrictName=arr[districtID].Name;
38
+    }
39
+
40
+    that.setData({
41
+      Containnerheight: main.getWindowHeight(),
42
+      District:arr,
43
+      PanelType:options.PanelType,
44
+      DistrictID:districtID,
45
+      YearIndex:0,
46
+    });    
47
+
48
+    wx.setNavigationBarTitle({
49
+      title: title,
50
+    });
51
+
52
+    that.init();
53
+  },
54
+  init:function(){
55
+    var that = this;
56
+    var districtID=Number(that.data.DistrictID);
57
+    var year=that.data.Years[that.data.YearIndex].Name;
58
+    var scoreTypeID="自主招生";
59
+    wx.showLoading();
60
+    main.getData("GetMPSScore?ScoreYear="+year+"&ScoreType="+scoreTypeID+"&DistrictID="+districtID, function (data) {
61
+      if (data) {
62
+        for(var i=0;i<data.length;i++){
63
+          var item=data[i];
64
+          item.IsPublicOrPrivate=true;
65
+        }
66
+        for(var i=0;i<that.data.PublicOrPrivate2.length;i++){
67
+          var item=that.data.PublicOrPrivate2[i];
68
+          item.CSS="Selected";
69
+        }
70
+        
71
+        that.setData({
72
+          List:data,
73
+          PublicOrPrivate2:that.data.PublicOrPrivate2,
74
+        });
75
+      }
76
+      setTimeout(function(){
77
+        wx.hideLoading();
78
+      },800);
79
+    });
80
+  },
81
+  
82
+  onSelect:function(event){
83
+    var that=this;
84
+    main.onSelect(that,event,function(obj,e,result){
85
+      if (e.currentTarget.dataset.object=="District"){
86
+        that.setData({
87
+          DistrictID:e.currentTarget.dataset.index,
88
+        });
89
+        that.init();
90
+      }
91
+      else if (e.currentTarget.dataset.object=="Years"){
92
+        that.setData({
93
+          YearIndex:e.currentTarget.dataset.index,
94
+        });
95
+        that.init();
96
+      }
97
+      else if (e.currentTarget.dataset.object=="PublicOrPrivate2"){
98
+        var selectIndex=e.currentTarget.dataset.index;
99
+        var selectText=that.data.PublicOrPrivate2[selectIndex].Name;
100
+        var isSelect=that.data.PublicOrPrivate2[selectIndex].CSS=="Selected";
101
+        
102
+        var isNull=true;
103
+        for(var i=0;i<that.data.List.length;i++){
104
+          var item=that.data.List[i];
105
+          if (selectText==item.PublicOrPrivate)
106
+            item.IsPublicOrPrivate=isSelect;   
107
+            
108
+          if (item.IsPublicOrPrivate)
109
+            isNull=false;
110
+        }
111
+        that.setData({
112
+          List:that.data.List,
113
+          ListNullData:isNull,
114
+        });
115
+      }
116
+    });   
117
+  },
118
+  goto: function (e) {
119
+    main.goto(e);
120
+  },
121
+  onShareTimeline: function () {
122
+    return this.onShareAppMessage();
123
+  },
124
+  onShareAppMessage: function () {
125
+    var that=this;
126
+    var title="上海中招自主招生";
127
+    if (that.data.DistrictID>=0)
128
+      title="上海中招自主招生·"+DistrictName;
129
+    return {
130
+      title: title,
131
+      path: app.globalData.SharePath + '?type=recruitment&PanelType='+that.data.PanelType+'&DistrictID='+that.data.DistrictID+'&UserID=' + app.globalData.userInfo.UserID,
132
+    }
133
+  },
134
+})

+ 3 - 0
pages/main/recruitment.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 173 - 0
pages/main/recruitment.wxml

@@ -0,0 +1,173 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panelTop FlexRow">
3
+    <view style="width: 40rpx;"></view>
4
+    <view class="panelTop1 FlexColumn" wx:for="{{Years}}" wx:key="index" bindtap="onSelect" data-object="Years" data-index="{{index}}" data-clicktype="radio">
5
+      <view class="panelTop1Text01 panelTop1Text01{{item.CSS}}">{{item.Name}}年</view>
6
+      <view class="panelTop1Line01 panelTop1Line01{{item.CSS}}"></view>
7
+    </view>
8
+  </view>
9
+  <view style="height: 100rpx;"></view>
10
+
11
+  <!-- 自主招生 -->
12
+  <view class="panelBasicCss panelTop0" wx:if="{{PanelType==1}}">
13
+    <view class="panelTop00 FlexRow">
14
+      <view class="panelTop01 panelTop01{{item.CSS}}" wx:for="{{District}}" wx:key="index" bindtap="onSelect" data-object="District" data-index="{{index}}" data-clicktype="radio">
15
+        <view class="panelTop01Text panelTop01Text{{item.CSS}}">{{item.Name}}</view>
16
+      </view>
17
+    </view>
18
+  </view>
19
+
20
+  <!-- 国际班招生 -->
21
+  <view class="panelBasicCss panelTop2 FlexRow" wx:if="{{PanelType==2}}">
22
+    <image class="panelCheckbox_icon_filter_01 icon_filter_01" src="../images/icon_filter_01.png"></image>
23
+    <view class="panelTop21 FlexRow">
24
+      <!-- 公办民办 -->
25
+      <view class="panelCheckbox checkbox2 panelCheckbox{{item.CSS}} FlexRow" wx:for="{{PublicOrPrivate2}}" wx:key="index" bindtap="onSelect" data-object="PublicOrPrivate2" data-index="{{index}}" data-clicktype="checkbox">
26
+        <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
27
+          <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
28
+        </view>
29
+        <view>{{item.Name}}</view>
30
+      </view>
31
+    </view>
32
+  </view>
33
+
34
+  <view class="panelBasicCss panelMain FlexColumn">
35
+    <view style="height:20rpx;"></view>
36
+
37
+
38
+    <view class="panelItem FlexColumn" wx:for="{{List}}" wx:key="index" wx:if="{{((PanelType==1 && item['学科']>0) || (PanelType==2 && item['国际']>0)) && item.IsPublicOrPrivate}}" bindtap="goto" data-url="school?ID={{item.ID}}">
39
+      <view class="panelItem1 FlexColumn">
40
+        <view class="panelText01">{{item.SchoolFullName}}</view>
41
+        <view class="FlexRow">
42
+          <view class="panelItem11 FlexRow">
43
+            <view>
44
+              <block wx:if="{{PanelType==2}}">{{item.DistrictNameArea}}</block> {{item.SchoolType2Short}}
45
+            </view>
46
+            <view class="panelLine2"></view>
47
+            <view>{{item.PublicOrPrivate}}</view>
48
+            <view class="panelLine2" wx:if="{{item.Accommodation}}"></view>
49
+            <view>{{item.Accommodation}}</view>
50
+          </view>
51
+        </view>
52
+      </view>
53
+      <view class="panelItem2 FlexRow">
54
+        <block wx:if="{{PanelType==1}}">
55
+          <view class="panelItem21 FlexColumn">
56
+            <view>学科优秀生</view>
57
+            <view class="panelItem210 FlexRow">
58
+              <view class="panelText02">{{item['学科']}}</view>
59
+              <view class="panelItem211 FlexRow" wx:if="{{item['学科差']!==null}}">
60
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['学科差']>0}}"></image>
61
+                <view class="panelScoreNumber02" wx:if="{{item['学科差']>0}}">{{item['学科差']}}</view>
62
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['学科差']<0}}"></image>
63
+                <view class="panelScoreNumber03" wx:if="{{item['学科差']<0}}">{{-item['学科差']}}</view>
64
+                <view class="panelScoreText04" wx:if="{{item['学科差']==0}}">平</view>
65
+              </view>
66
+            </view>
67
+          </view>
68
+          <view class="panelLine4"></view>
69
+          <view class="panelItem21 FlexColumn">
70
+            <view>优秀体育生</view>
71
+            <view class="panelItem210 FlexRow">
72
+              <view class="panelText02 panelText02{{item['体育']}}">{{item['体育']}}</view>
73
+              <view class="panelItem211 FlexRow" wx:if="{{item['体育差']!==null}}">
74
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['体育差']>0}}"></image>
75
+                <view class="panelScoreNumber02" wx:if="{{item['体育差']>0}}">{{item['体育差']}}</view>
76
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['体育差']<0}}"></image>
77
+                <view class="panelScoreNumber03" wx:if="{{item['体育差']<0}}">{{-item['体育差']}}</view>
78
+                <view class="panelScoreText04" wx:if="{{item['体育差']==0}}">平</view>
79
+              </view>
80
+            </view>
81
+          </view>
82
+          <view class="panelLine4"></view>
83
+          <view class="panelItem21 FlexColumn">
84
+            <view>艺术骨干生</view>
85
+            <view class="panelItem210 FlexRow">
86
+              <view class="panelText02 panelText02{{item['艺术']}}">{{item['艺术']}}</view>
87
+              <view class="panelItem211 FlexRow" wx:if="{{item['艺术差']!==null}}">
88
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['艺术差']>0}}"></image>
89
+                <view class="panelScoreNumber02" wx:if="{{item['艺术差']>0}}">{{item['艺术差']}}</view>
90
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['艺术差']<0}}"></image>
91
+                <view class="panelScoreNumber03" wx:if="{{item['艺术差']<0}}">{{-item['艺术差']}}</view>
92
+                <view class="panelScoreText04" wx:if="{{item['艺术差']==0}}">平</view>
93
+              </view>
94
+            </view>
95
+
96
+          </view>
97
+        </block>
98
+        <block wx:if="{{PanelType==2}}">
99
+
100
+          <view class="panelItem21 panelItem22 FlexColumn">
101
+            <view>招生总数</view>
102
+            <view class="panelItem210 FlexRow">
103
+              <view class="panelText02">{{item['国际']}}</view>
104
+              <view class="panelItem211 FlexRow" wx:if="{{item['国际差']!==null}}">
105
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['国际差']>0}}"></image>
106
+                <view class="panelScoreNumber02" wx:if="{{item['国际差']>0}}">{{item['国际差']}}</view>
107
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['国际差']<0}}"></image>
108
+                <view class="panelScoreNumber03" wx:if="{{item['国际差']<0}}">{{-item['国际差']}}</view>
109
+                <view class="panelScoreText04" wx:if="{{item['国际差']==0}}">平</view>
110
+              </view>
111
+            </view>
112
+          </view>
113
+          <view class="panelLine4 panelLine5"></view>
114
+          <view class="panelItem21 panelItem23 FlexColumn">
115
+            <view>本市生源</view>
116
+            <view class="panelItem210 FlexRow">
117
+              <view class="panelText02 panelText02{{item['国际(本市)']}}">{{item['国际(本市)']}}</view>
118
+              <view class="panelItem211 FlexRow" wx:if="{{item['国际(本市)差']!==null}}">
119
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['国际(本市)差']>0}}"></image>
120
+                <view class="panelScoreNumber02" wx:if="{{item['国际(本市)差']>0}}">{{item['国际(本市)差']}}</view>
121
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['国际(本市)差']<0}}"></image>
122
+                <view class="panelScoreNumber03" wx:if="{{item['国际(本市)差']<0}}">{{-item['国际(本市)差']}}</view>
123
+                <view class="panelScoreText04" wx:if="{{item['国际(本市)差']==0}}">平</view>
124
+              </view>
125
+            </view>
126
+          </view>
127
+          <view class="panelItem21 panelItem24 FlexColumn">
128
+            <view>非本市生源</view>
129
+            <view class="panelItem210 FlexRow">
130
+              <view class="panelText02 panelText02{{item['国际(非本市)']}}">{{item['国际(非本市)']}}</view>
131
+              <view class="panelItem211 FlexRow" wx:if="{{item['国际(非本市)差']!==null}}">
132
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item['国际(非本市)差']>0}}"></image>
133
+                <view class="panelScoreNumber02" wx:if="{{item['国际(非本市)差']>0}}">{{item['国际(非本市)差']}}</view>
134
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item['国际(非本市)差']<0}}"></image>
135
+                <view class="panelScoreNumber03" wx:if="{{item['国际(非本市)差']<0}}">{{-item['国际(非本市)差']}}</view>
136
+                <view class="panelScoreText04" wx:if="{{item['国际(非本市)差']==0}}">平</view>
137
+              </view>
138
+            </view>
139
+
140
+          </view>
141
+        </block>
142
+      </view>
143
+
144
+      <view class="panelLine panelLine3"></view>
145
+    </view>
146
+
147
+    <view class="panelFooter FlexRow">
148
+      <view class="panelFooter1 FlexRow">
149
+        <button open-type='share' class="share FlexRow">
150
+          <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_share_01.png"></image>
151
+          <view class="panelFooterBottom">转发</view>
152
+        </button>
153
+      </view>
154
+      <view class="panelFooter2 FlexRow"  catchtap="goto" data-url="feedback">
155
+        <view class="panelFooterLine panelFooterBottom" wx:if="{{PageType=='scoreline'}}"></view>
156
+        <view class="panelFooterBottom panelFooter21">纠错</view>
157
+      </view>
158
+      <view class="panelFooter3 FlexRow" catchtap="returnTop">
159
+        <view class="panelFooterLine panelFooterBottom"></view>
160
+        <image class="panelFooterBottom panelFooter_icon_b2t_01" src="../images/icon_b2t_01.png"></image>
161
+      </view>
162
+    </view>
163
+
164
+    <block wx:if="{{ListNullData}}">
165
+      <image class="icon_sys_121" src="../images/icon_sys_12.png"></image>
166
+      <view class="textNull">没有内容</view>
167
+    </block>
168
+
169
+    <view style="height:50rpx;"></view>
170
+  </view>
171
+
172
+  <view style="height: 210rpx;"></view>
173
+</view>

+ 109 - 0
pages/main/recruitment.wxss

@@ -0,0 +1,109 @@
1
+
2
+.panelTop2{
3
+  height:88rpx;
4
+  justify-content: flex-start;
5
+}
6
+
7
+.panelMain{
8
+
9
+}
10
+.panelItem{
11
+  width:100%;
12
+  align-items: flex-end;
13
+}
14
+
15
+.panelItem1{
16
+  width:680rpx;
17
+  align-items: flex-start;
18
+  margin-top: 30rpx;
19
+}
20
+
21
+.panelText01{
22
+  font-size: 28rpx;
23
+  font-weight: 400;
24
+  margin-bottom: 10rpx;
25
+}
26
+.panelText03{
27
+  width:200rpx;
28
+}
29
+.panelItem11{
30
+  font-size: 24rpx;
31
+  font-weight: 400;
32
+  margin-right: 30rpx;
33
+  color:#787878;
34
+}
35
+
36
+
37
+.panelItem2{
38
+  width:680rpx;
39
+  justify-content: flex-start;
40
+  font-size: 20rpx;
41
+  font-weight: 400;
42
+  margin-top: 30rpx;
43
+  color:#787878;
44
+  position: relative;
45
+}
46
+
47
+
48
+.panelText02{
49
+  font-size:32rpx;
50
+  font-family: 'Roboto-Black';
51
+  color:#2E2E2E;
52
+}
53
+.panelText020{
54
+  color:#9B9B9B;
55
+}
56
+
57
+.panelItem21{
58
+  width:190rpx;
59
+  align-items: flex-start;
60
+}
61
+
62
+.panelItem210{
63
+  margin-top: 4rpx;
64
+}
65
+
66
+.panelItem22{
67
+  width: 410rpx;
68
+}
69
+
70
+.panelItem23{
71
+  position: absolute;
72
+  left:360rpx;
73
+}
74
+
75
+.panelItem24{
76
+  position: absolute;
77
+  left:540rpx;
78
+}
79
+
80
+.panelItem211{
81
+  margin-left: 10rpx;
82
+}
83
+
84
+.icon_sys_121{
85
+  width:50rpx;
86
+  height:60rpx;
87
+  margin-top: 120rpx;
88
+}
89
+
90
+.textNull{
91
+  font-size: 36rpx;
92
+  margin: 30rpx 0 110rpx 0;
93
+}
94
+
95
+.panelLine4{
96
+  width:2rpx;
97
+  height:30rpx;
98
+  background-color: #d2d2d2;
99
+  margin-right: 88rpx;
100
+}
101
+
102
+.panelLine5{
103
+  position: absolute;
104
+  left:290rpx;
105
+}
106
+
107
+.panelLine3{
108
+  margin-top:30rpx;
109
+}

+ 215 - 0
pages/main/school.js

@@ -0,0 +1,215 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    PageType:"school",
10
+    ScoreTypeID:1,//四种得分类型
11
+    IsFold:false,
12
+    Years:constant.arrYear,
13
+    YearIndex:0,
14
+    ImagePath: app.globalData.uploadImageUrl,
15
+    ScoreType:constant.arrScoreType,
16
+    TailScore:constant.arrTailScore,
17
+  },
18
+  onLoad: function (options) {
19
+    var that = this;
20
+    that.setData({
21
+      Containnerheight: main.getWindowHeight(),
22
+      SchoolID:options.ID,
23
+      IsCollect:false,
24
+    });
25
+    if (!options.ID){
26
+      wx.navigateBack({
27
+        delta: 1,
28
+      });
29
+    }
30
+    else
31
+      that.init();
32
+
33
+  },
34
+  init:function(){
35
+    var that = this;
36
+    wx.showLoading({title:"加载中"});
37
+    main.getData("GetMPSSchoolInfo?SchoolID="+that.data.SchoolID, function (data) {
38
+      if (data) {
39
+        var list=[];
40
+        that.data.ScoreTypeID=1;
41
+        if (data['1-15志愿'] && !(data['自主招生'])){
42
+          that.data.ScoreTypeID=4;
43
+          var name=that.data.ScoreType[that.data.ScoreTypeID-1].Name;
44
+          list=data[name][that.data.YearIndex].List;
45
+        }
46
+        else if (data['名额到校'] && data.SchoolType1=='初中'){
47
+          that.data.ScoreTypeID=3;
48
+          var name=that.data.ScoreType[that.data.ScoreTypeID-1].Name;
49
+          list=data[name][that.data.YearIndex].List;
50
+        }
51
+
52
+        wx.setNavigationBarTitle({
53
+          title: data.SchoolType1,
54
+        });
55
+
56
+        var schoolList=wx.getStorageSync('CollectList');
57
+        if (schoolList && schoolList["收藏的"+data.SchoolType1]){
58
+          schoolList=schoolList["收藏的"+data.SchoolType1];
59
+          for(var i=0;i<schoolList.length;i++){
60
+            
61
+            if (that.data.SchoolID==schoolList[i].ID){
62
+              that.setData({
63
+                IsCollect:true,
64
+              });
65
+              break;
66
+            }
67
+          }
68
+        }
69
+
70
+        //data.Website="http://www.gezhi.sh.cn/infoweb/index.aspx?wzid=2";
71
+        
72
+        if (data.Website && data.Website.length>26){
73
+          var str1=data.Website.substr(0,26);
74
+          var str2=data.Website.substr(26);
75
+          data.WebsiteStr=str1+"\n"+str2;
76
+        }
77
+        else
78
+          data.WebsiteStr=data.Website;
79
+        
80
+        if (data.ImageOther)
81
+          data.ImageOtherStr=data.ImageOther.join(",");
82
+
83
+        //将保存的用户习惯(显示列表样式)提取出来
84
+        var isListAll=wx.getStorageSync('TailScore');
85
+        if (isListAll){
86
+          that.data.TailScore[0].CSS="Selected";
87
+        }
88
+
89
+        that.setData({
90
+          Info:data,
91
+          ScoreTypeID:that.data.ScoreTypeID,
92
+          List:list,
93
+          IsListAll:isListAll,
94
+          TailScore:that.data.TailScore,
95
+          Title:data.SchoolType1,
96
+        });
97
+      }
98
+      setTimeout(function(){
99
+        wx.hideLoading();
100
+      },800);
101
+    });
102
+  },
103
+  collectSchool:function(e){
104
+    var that=this;
105
+    var IsCollect=Number(e.currentTarget.dataset.index);
106
+    main.getData("UpdateMPSSchoolCollect?SchoolID="+that.data.SchoolID+"&UserID="+app.globalData.userInfo.UserID+"&IsCollect="+IsCollect, function (data) {
107
+      
108
+      var title="收藏完成";
109
+      if (!IsCollect)
110
+        title="取消收藏完成";
111
+      wx.showToast({
112
+        title: title,
113
+      });
114
+      that.setData({
115
+        IsCollect:IsCollect,
116
+      });
117
+      wx.removeStorageSync('CollectList');
118
+      //获得收藏学校数据
119
+      main.getCollect();
120
+    });
121
+  },
122
+  goto: function (e) {
123
+    // var url=e.currentTarget.dataset.url;
124
+    // if (url.indexOf("PageType=school")>0){
125
+    //   url=url.replace("PageType=school&","");
126
+    //   if (url.substr(url.length-3)!="ID="){
127
+    //     wx.redirectTo({
128
+    //       url: url,
129
+    //     });
130
+    //   }
131
+    // }
132
+    // else{    
133
+    //   var b=true;
134
+    //   if (e.currentTarget.dataset.url.substr(0,3)=="map" && !e.currentTarget.dataset.isgoto)
135
+    //     b=false;
136
+    //   if (b)
137
+    //     main.goto(e);
138
+    // }
139
+
140
+    main.goto(e);
141
+  },
142
+  onSelect:function(event){
143
+    var that=this;
144
+    main.onSelect(that,event,function(obj,e,result){
145
+      if (e.currentTarget.dataset.object=="TailScore"){
146
+        that.setData({
147
+          IsListAll: result,
148
+        });
149
+        wx.setStorageSync('TailScore', result);
150
+      }
151
+      else if (e.currentTarget.dataset.object=="ScoreType"){
152
+        var name=that.data.ScoreType[e.currentTarget.dataset.index].Name;
153
+        var list=[];
154
+        if (that.data.Info[name])
155
+          list=that.data.Info[name][that.data.YearIndex].List;
156
+        that.setData({
157
+          ScoreTypeID: e.currentTarget.dataset.index+1,
158
+          List:list,
159
+        });
160
+      }
161
+      else if (e.currentTarget.dataset.object=="Years"){
162
+
163
+        var name=that.data.ScoreType[that.data.ScoreTypeID-1].Name;
164
+        var list=that.data.Info[name][e.currentTarget.dataset.index].List;
165
+        that.setData({
166
+          List:list,
167
+          YearIndex:e.currentTarget.dataset.index
168
+        });
169
+      }
170
+    });   
171
+  },
172
+  onFold:function(e){
173
+    var that=this;
174
+    that.setData({
175
+      IsFold: !that.data.IsFold,
176
+    });
177
+  },
178
+  copyUrl:function(e){
179
+    var url=e.currentTarget.dataset.url;
180
+    wx.setClipboardData({
181
+      data: url,
182
+      success (res) {
183
+        wx.showToast({
184
+          title: '已复制',
185
+        });
186
+      }
187
+    });
188
+  },
189
+  returnTop:function(){
190
+    main.returnTop();
191
+  },
192
+  onShareTimeline: function () {
193
+    return this.onShareAppMessage();
194
+  },
195
+  onUpdateTitle:function(){
196
+    if (app.globalData.userInfo.UserID<6){
197
+      wx.setNavigationBarTitle({
198
+        title: "秒过分数线·小程序",
199
+      });
200
+    }
201
+  },
202
+  onShareAppMessage: function () {
203
+    var that=this;
204
+    var name="中考招生信息:";
205
+    if (that.data.Info.SchoolType1=="初中")
206
+      name+=that.data.Info.SchoolFullName;
207
+    else
208
+      name+=that.data.Info.SchoolShortName;
209
+    
210
+    return {
211
+      title: name,
212
+      path: app.globalData.SharePath+'?UserID=' + app.globalData.userInfo.UserID+'&type=school&ID=' + that.data.Info.ID,
213
+    }
214
+  },
215
+})

+ 3 - 0
pages/main/school.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 326 - 0
pages/main/school.wxml

@@ -0,0 +1,326 @@
1
+<import src="../template/componentList.wxml" />
2
+
3
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
4
+  <view class="panelSchool1 panelBasicCss FlexColumn">
5
+    
6
+    <image wx:if="{{Info.ImageUrl && Info.SchoolType1=='高中'}}" class="panelSchoolImage" src="{{ImagePath}}web/_School/{{Info.ImageUrl}}"></image>
7
+    <image wx:if="{{Info.ImageLogo && Info.SchoolType1=='高中'}}" class="panelSchoolLogo" src="{{ImagePath}}web/_School/{{Info.ImageLogo}}"></image>
8
+    
9
+    <view wx:if="{{!Info.ImageUrl && Info.SchoolType1=='高中'}}" class="panelNullImage FlexColumn">
10
+      <image class="icon_sys_13" src="../images/icon_sys_13.png"></image>
11
+      <view class="">暂无学校图片</view>
12
+
13
+      <view class="btnHelp" bindtap="goto" data-url="feedback?type=1">帮忙补充</view>
14
+    </view>
15
+    <view class="panelSchoolText01">{{Info.SchoolFullName}}</view>
16
+    <view class="panelSchool11 FlexRow">
17
+      <view class="panelSchoolText02">{{Info.District}}</view>
18
+      <block wx:if="{{Info.PublicOrPrivate}}">
19
+        <view class="panelLine2"></view>
20
+        <view class="panelSchoolText02">{{Info.PublicOrPrivate}}</view>
21
+      </block>
22
+      <block wx:if="{{Info.SchoolType1=='初中'}}">
23
+        <view class="panelLine2"></view>
24
+        <view class="panelSchoolText02">{{Info.SchoolType1}}</view>
25
+      </block>
26
+    </view>
27
+    <view wx:if="{{Info.SchoolType2}}" class="panelSchoolText03">{{Info.SchoolType2}}<block wx:if="{{Info.SchoolType2Short!='一般高中'}}">({{Info.SchoolType2Short}})</block></view>
28
+    <view wx:if="{{Info.SchoolType1=='高中'}}" class="panelSchool12 FlexRow">
29
+      <view class="panelSchool121 FlexColumn">
30
+        <view class="panelSchoolText04">学校简称</view>
31
+        <text class="panelSchoolText05">{{Info.SchoolShortName}}
32
+        <block wx:if="{{0}}">\n{{Info.SchoolOtherName}}</block></text>
33
+      </view>
34
+      <view class="FlexColumn">
35
+        <view class="panelSchoolText04">招生代码</view>
36
+        <view class="panelSchoolText06">{{Info.SchoolNumber}}</view>
37
+      </view>
38
+      <view class="panelSchool122 FlexColumn">
39
+        <view class="panelSchoolText04">寄宿条件</view>
40
+        <view class="panelSchoolText05">{{Info.Accommodation}}</view>
41
+      </view>
42
+    </view>
43
+
44
+    <view wx:if="{{!Info.HasSameName}}" style="height: 30rpx;"></view>
45
+    <view wx:if="{{Info.HasSameName}}" class="panelMarginTop panelLine"></view>
46
+    <view wx:if="{{Info.HasSameName}}" class="panelSchool13 FlexRow" bindtap="goto" data-url="school?PageType={{PageType}}&ID={{Info.HasSameName}}">
47
+      <view class="panelSchool41">同校<block wx:if="{{Info.SchoolType1=='高中'}}">初中</block><block wx:if="{{Info.SchoolType1=='初中'}}">高中</block>部主页</view>
48
+      <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
49
+    </view>
50
+    <view style="height: 20rpx;"></view>
51
+  </view>
52
+
53
+  <view class="panelBasicCss panelMain FlexColumn" wx:if="{{Info.HasData}}">
54
+    <block wx:if="{{Info['自主招生']}}">
55
+      <view class="panelSchoolText08">招生计划{{Info['自主招生'][Info['自主招生'].length-2].ScoreYear}}</view>
56
+      <view class="panelSchool31 FlexRow">
57
+        <view class="panelSchool311 FlexColumn" wx:for="{{ScoreType}}" wx:key="index">
58
+          <view class="panelSchoolText04">{{item.Name}}</view>
59
+          <image class="icon_sys_04" src="../images/{{item.Icon}}.png"></image>
60
+          <view class="panelSchoolText06" wx:if="{{Info[item.Name][Info[item.Name].length-2].Total}}">
61
+            {{Info[item.Name][Info[item.Name].length-2].Total}}
62
+          </view>
63
+          <view class="panelSchoolText061" wx:if="{{!Info[item.Name][Info[item.Name].length-2].Total}}">
64
+            无
65
+          </view>
66
+          <view class="panelSchool3111 FlexRow">
67
+            <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue>0}}"></image>
68
+            <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue<0}}"></image>
69
+            <view class="panelSchoolText090" wx:if="{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue>0}}">{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue}}</view>
70
+            <view class="panelSchoolText091" wx:if="{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue<0}}">{{-Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue}}</view>
71
+            <view class="panelSchoolText092" wx:if="{{Info[item.Name][Info[item.Name].length-1].TotalDifferenceValue==0}}">持平</view>
72
+          </view>
73
+        </view>
74
+      </view>
75
+      <view class="panelSchoolLine02"></view>
76
+      <view class="panelSchoolText04 panelSchoolText10">{{Info['自主招生'][Info['自主招生'].length-1].ScoreYear}}年计划</view>
77
+      <view class="panelSchool31 FlexRow">
78
+        <block wx:for="{{ScoreType}}" wx:key="index">
79
+          <view class="panelSchoolText11 panelSchoolText111" wx:if="{{Info[item.Name][Info[item.Name].length-1].Total}}">
80
+          {{Info[item.Name][Info[item.Name].length-1].Total}}
81
+          </view>
82
+          <view class="panelSchoolText11 panelSchoolText111 panelSchoolText1111" wx:if="{{!Info[item.Name][Info[item.Name].length-1].Total}}">
83
+            无
84
+          </view>
85
+        </block>
86
+      </view>
87
+      <image class="line_02" src="../images/line_02.png"></image>
88
+
89
+      <view class="panelRadio radio2 FlexRow">
90
+        <view class="panelRadio1 radio21 panelRadio1{{item.CSS}}" wx:for="{{ScoreType}}" wx:key="index"
91
+        bindtap="onSelect" data-object="ScoreType" data-index="{{index}}" data-clicktype="radio">{{item.Name}}</view>
92
+      </view>
93
+
94
+      <!-- 自主招生 -->
95
+      <view wx:if="{{ScoreTypeID==1}}" class="panelSchoolIndependent FlexColumn">
96
+        <view class="panelSchoolIndependent1 FlexRow">
97
+          <view class="panelSchoolIndependentText1"></view>
98
+          <view class="panelSchoolText13 panelSchoolText112">{{Info['自主招生'][Info['自主招生'].length-2].ScoreYear}}年</view>
99
+          <view class="panelSchoolText13 ">{{Info['自主招生'][Info['自主招生'].length-1].ScoreYear}}年</view>
100
+        </view>
101
+        <view class="panelLine"></view>
102
+        
103
+        <!-- 学科 -->
104
+        <block wx:if="{{Info['自主招生'][Info['自主招生'].length-2].List[0].PlanNum}}">
105
+        <view class="panelSchoolIndependent1 FlexRow">
106
+          <view class="panelSchoolIndependentText1 panelSchoolText13 panelSchoolText131 FlexColumn"><view>市实验示范性高中</view><view>(学科优秀学生)</view></view>
107
+          <view class="panelSchoolText11 panelSchoolText112">{{Info['自主招生'][Info['自主招生'].length-2].List[0].PlanNum}}</view>
108
+          <view class="panelSchoolText11 ">{{Info['自主招生'][Info['自主招生'].length-1].List[0].PlanNum}}</view>
109
+        </view>
110
+        <view class="panelLine"></view>
111
+        </block>
112
+        
113
+        <!-- 体育 -->
114
+        <block wx:if="{{Info['自主招生'][Info['自主招生'].length-2].List[1].PlanNum}}">
115
+        <view class="panelSchoolIndependent1 FlexRow">
116
+          <view class="panelSchoolIndependentText1 panelSchoolText13">市级优秀体育学生</view>
117
+          <view class="panelSchoolText11 panelSchoolText112">{{Info['自主招生'][Info['自主招生'].length-2].List[1].PlanNum}}</view>
118
+          <view class="panelSchoolText11 ">{{Info['自主招生'][Info['自主招生'].length-1].List[1].PlanNum}}</view>
119
+        </view>
120
+        <view class="panelSchoolIndependent2 FlexColumn">
121
+          <text class="panelSchoolText16">{{Info['自主招生'][Info['自主招生'].length-2].ScoreYear}}年项目\n{{Info['自主招生'][Info['自主招生'].length-2].List[1].SchoolTargetRemark2}}</text>
122
+        </view>
123
+        <view class="panelLine"></view>
124
+        </block>
125
+        
126
+        <!-- 艺术 -->
127
+        <block wx:if="{{Info['自主招生'][Info['自主招生'].length-2].List[2].PlanNum}}">
128
+        <view class="panelSchoolIndependent1 FlexRow">
129
+          <view class="panelSchoolIndependentText1 panelSchoolText13">市级艺术骨干学生</view>
130
+          <view class="panelSchoolText11 panelSchoolText112">{{Info['自主招生'][Info['自主招生'].length-2].List[2].PlanNum}}</view>
131
+          <view class="panelSchoolText11 ">{{Info['自主招生'][Info['自主招生'].length-1].List[2].PlanNum}}</view>
132
+        </view>
133
+        <view class="panelSchoolIndependent2 FlexColumn">
134
+          <text class="panelSchoolText16">{{Info['自主招生'][Info['自主招生'].length-2].ScoreYear}}年项目\n{{Info['自主招生'][Info['自主招生'].length-2].List[2].SchoolTargetRemark2}}</text>
135
+        </view>
136
+        <view class="panelLine"></view>
137
+        </block>
138
+        
139
+        <!-- 国际 -->
140
+        <block wx:if="{{Info['自主招生'][Info['自主招生'].length-2].List[3].PlanNum || Info['自主招生'][Info['自主招生'].length-2].List[4].PlanNum}}">
141
+        <view class="panelSchoolText13 panelSchoolIndependent4">国际课程班和中外合作办学高中</view>
142
+        <view class="panelSchoolIndependent3 FlexRow">
143
+          <view class="panelSchoolIndependentText2 panelSchoolText13">本市生源</view>
144
+          <view class="panelSchoolText11 panelSchoolText112">{{Info['自主招生'][Info['自主招生'].length-2].List[3].PlanNum}}</view>
145
+          <view class="panelSchoolText11 ">{{Info['自主招生'][Info['自主招生'].length-1].List[3].PlanNum}}</view>
146
+        </view>
147
+        <view class="panelSchoolIndependent3 FlexRow">
148
+          <view class="panelSchoolIndependentText2 panelSchoolText13">非本市生源</view>
149
+          <view class="panelSchoolText11 panelSchoolText112">
150
+          <block wx:if="{{!Info['自主招生'][Info['自主招生'].length-2].List[4].PlanNum}}">0</block>{{Info['自主招生'][Info['自主招生'].length-2].List[4].PlanNum}}</view>
151
+          <view class="panelSchoolText11 ">
152
+          <block wx:if="{{!Info['自主招生'][Info['自主招生'].length-1].List[4].PlanNum}}">0</block>{{Info['自主招生'][Info['自主招生'].length-1].List[4].PlanNum}}</view>
153
+        </view>
154
+        <view class="panelLine"></view>
155
+        </block>
156
+      </view>
157
+    </block>
158
+
159
+    <block wx:if="{{Info['1-15志愿'] && !Info['自主招生']}}">
160
+      <view class="panelSchoolText17">统一招生</view>
161
+      <view class="panelSchoolText18">1至15志愿(平行志愿)</view>
162
+    </block>
163
+    
164
+    <block wx:if="{{Info['名额到校'] && Info.SchoolType1=='初中'}}">
165
+      <view class="panelSchoolText17">名额分配综合评价录取志愿</view>
166
+      <view class="panelSchoolText18">名额分配到本校</view>
167
+    </block>
168
+
169
+    <!-- 名额到区、名额到校、1-15志愿 -->
170
+    <block wx:if="{{ScoreTypeID!=1 && Info[ScoreType[ScoreTypeID-1].Name]}}" >
171
+      <view class="panelTool1 panelTool1_1 FlexRow">
172
+        <view class="panelCheckbox panelCheckbox{{item.CSS}} checkMarginTop FlexRow" wx:for="{{TailScore}}" wx:key="index" 
173
+        bindtap="onSelect" data-object="TailScore" data-index="0" data-clicktype="checkbox">
174
+          <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
175
+            <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
176
+          </view>
177
+          <view>{{item.Name}}</view>
178
+        </view>
179
+      </view>
180
+      <view class="panelMarginTop panelLine"></view>
181
+    
182
+      <view class="panelRadio2 panelMarginTop FlexRow">
183
+        <view class="panelRadio21 panelRadio21{{item.CSS}}" wx:for="{{Years}}" wx:key="index"
184
+        bindtap="onSelect" data-object="Years" data-index="{{index}}" data-clicktype="radio">{{item.Name}}</view>
185
+      </view>
186
+
187
+      <view class="panelMarginTop panelLine"></view>
188
+      
189
+      <template is="componentList" data="{{IsListAll:IsListAll,ScoreTypeID:ScoreTypeID,List:List,PageType:PageType,SchoolType1:Info.SchoolType1,IsSearch:IsSearch,SearchNull:SearchNull}}" />
190
+      
191
+    </block>
192
+
193
+    <!-- 名额到区、名额到校、1-15志愿 -->
194
+    <block wx:if="{{ScoreTypeID!=1 && !Info[ScoreType[ScoreTypeID-1].Name]}}" >
195
+      <view class="panelSchoolText19">该校不属于“{{ScoreType[ScoreTypeID-1].Name}}”可填报的学校。</view>
196
+      <view class="panelLine"></view>
197
+      <view class="panelSchool22 panelSchool221 FlexRow" bindtap="goto" data-url="docs?ID=1">
198
+        <text class="panelSchoolText07">哪类学校属于“名额分配”可填报学校?</text>
199
+        <image class="icon_nextpage_4" src="../images/icon_nextpage_4.png"></image>
200
+      </view>
201
+    </block>
202
+    
203
+    <view style="height:50rpx;"></view>
204
+  </view>
205
+
206
+  <view class="panelBasicCss FlexColumn" wx:if="{{Info.ImageOther}}">
207
+    <view class="panelSchoolText08">校园风光</view>    
208
+    <view class="panelScrollView" bindtap="goto" data-url="imagelist?ID={{Info.ID}}&SchoolFullName={{Info.SchoolFullName}}&SchoolShortName={{Info.SchoolShortName}}&ImageOtherStr={{Info.ImageOtherStr}}">
209
+      <image lazy-load="true" mode="aspectFill" class="scrollItem" src="{{ImagePath}}web/_School/{{item}}" wx:for="{{Info.ImageOther}}" wx:key="index" wx:if="{{index<9}}" />
210
+    </view>   
211
+  </view>
212
+  
213
+  <view class="panelBasicCss panelSchool5 FlexRow" bindtap="goto" data-url="map?PageType=1&ID={{Info.ID}}&Name={{Info.SchoolShortName}}&Coordinates={{Info.Coordinates}}&SchoolType2Short={{Info.SchoolType2Short}}&SchoolShortName={{Info.SchoolShortName}}&Address={{Info.Address}}&DistrictID={{Info.District2}}" data-isgoto="{{Info.Coordinates}}"  wx:if="{{Info.Address || Info.Coordinates}}">
214
+    <view class="panelSchool51 FlexColumn">
215
+      <view class="panelSchool411">校址</view>
216
+      <view class="panelSchool512 FlexRow">
217
+        <image class="icon_loc_01" src="../images/icon_loc_01.png"></image>
218
+        <text class="panelSchoolText09"><block wx:if="{{Info.Address}}">{{Info.Address}}</block></text>
219
+      </view>
220
+    </view>
221
+    <view class="panelSchool52 FlexRow">
222
+      <block wx:if="{{Info.Coordinates}}">
223
+        <image class="pic_03" src="../images/pic_03.png"></image>
224
+        <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
225
+      </block>
226
+    </view>
227
+  </view>
228
+
229
+  <view class="panelBasicCss FlexColumn" wx:if="{{Info.SchoolType1=='高中'}}">
230
+    <block wx:if="{{Info.SchoolType2Short=='区重点(特色)'}}">
231
+      <view class="panelSchoolText082">特色高中办校重点</view>    
232
+      <view class="panelSchoolText08 panelSchoolText083">美育特色</view>    
233
+      <text class="panelContent">{{Info.Introduction2}}</text>
234
+      <view class="panelSchool22 FlexRow" bindtap="goto" data-url="docs?ID=2">
235
+        <view>上海市19所特色高中情況汇总</view>
236
+        <image class="icon_nextpage_4" src="../images/icon_nextpage_4.png"></image>
237
+      </view>
238
+      <view class="panelLine"></view>
239
+    </block>
240
+    <view class="panelSchoolText081">
241
+      <block wx:if="{{Info.SchoolType2Short=='区重点(特色)'}}">更多</block>简介
242
+      <view class="panelFold FlexColumn" bindtap="onFold">
243
+        <view class="panelFold1 FlexColumn">
244
+          <image wx:if="{{!IsFold}}" class="icon_fold_04" src="../images/icon_fold_03.png"></image>
245
+          <image wx:if="{{IsFold}}" class="icon_fold_04" src="../images/icon_fold_04.png"></image>
246
+        </view>
247
+      </view>
248
+    </view>
249
+    
250
+    <text class="panelContent"  wx:if="{{IsFold}}"><block wx:if="{{Info.Introduction}}">{{Info.Introduction}}</block>
251
+    </text>
252
+  </view>
253
+
254
+  <view class="panelBasicCss panelSchool4 FlexColumn" wx:if="{{Info.Website || Info.ImageQRCode}}">
255
+    <view class="panelSchool40 FlexRow">
256
+      <view class="panelSchool41 FlexColumn">
257
+        <view class="panelSchool411">学校官媒</view>
258
+        <view class="panelSchool412 FlexRow" wx:if="{{Info.Website}}" bindtap="copyUrl" data-url="{{Info.Website}}">
259
+          <image class="icon_web_01" src="../images/icon_web_01.png"></image>
260
+          <text user-select="true" class="panelSchoolText12">{{Info.WebsiteStr}}</text>
261
+        </view>
262
+        <view class="panelSchool413 FlexRow" wx:if="{{Info.ImageQRCode}}">
263
+          <image class="icon_web_01" src="../images/icon_web_02.png"></image>
264
+          <text class="panelSchoolText13">长按二维码\n关注学校官方公众号</text>
265
+        </view>      
266
+      </view>
267
+      <image wx:if="{{Info.ImageQRCode}}" show-menu-by-longpress="true" 
268
+      data-image="{{Info.ImageQRCode}}" class="panelSchoolQRCode" src="{{ImagePath}}web/_School/{{Info.ImageQRCode}}"></image>
269
+    </view>
270
+  </view>
271
+
272
+  <view class="panelBasicCss FlexColumn" wx:if="{{Info.SchoolType1=='初中'}}">
273
+    <view style="height: 20rpx;"></view>
274
+    <view class="panelSchool13 FlexRow" bindtap="goto" data-url="scoreline?PageType=scoreline&ScoreTypeID=4&DistrictID={{Info.District2}}&YearIndex=0">
275
+      <view class="panelSchool41 FlexRow">
276
+        <image class="icon_sys_09" src="../images/icon_sys_09.png"></image>
277
+        <view>查询所在区1-15志愿</view>
278
+      </view>
279
+      <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
280
+    </view>
281
+    <view class="panelLine"></view>
282
+    <view class="panelSchool13 FlexRow" bindtap="goto" data-url="scoreline?PageType=scoreline&ScoreTypeID=2&DistrictID={{Info.District2}}&YearIndex=0">
283
+      <view class="panelSchool41 FlexRow">
284
+        <image class="icon_sys_09" src="../images/icon_sys_05.png"></image>
285
+        <view>查询所在区名额分配到区</view>
286
+      </view>
287
+      <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
288
+    </view>
289
+    <view style="height: 20rpx;"></view>
290
+  </view>
291
+
292
+  <view class="panelSchoolText14" catchtap="goto" data-url="feedback">
293
+    本页内容来自学校官网、官方公众号、微博等网络资料的整理,整理过程中可能会有偏差,如您发现错误,欢迎协助<text class="panelSchoolText15">纠正</text>。
294
+  </view>
295
+
296
+  <view style="height: 210rpx;"></view>
297
+
298
+  <view style="width: 100%;height:100rpx;z-index: 5; position: fixed;bottom:0;" bindtap="onUpdateTitle"></view>
299
+
300
+  <view class="panelFooter FlexRow" >
301
+    <view class="panelFooter1 FlexRow" wx:if="{{!IsCollect}}" catchtap="collectSchool" data-index="1">
302
+      <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_fav_02.png"></image>
303
+      <view class="panelFooterBottom">收藏</view>
304
+    </view>
305
+    <view class="panelFooter1 panelFooter1Collect FlexRow" wx:if="{{IsCollect}}" catchtap="collectSchool" data-index="0">
306
+      <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_fav_03.png"></image>
307
+      <view class="panelFooterBottom">已收藏</view>
308
+    </view>
309
+    
310
+    <view class="panelFooter0 FlexRow">
311
+      <view class="panelFooterLine panelFooterBottom"></view>
312
+      <button open-type='share' class="share FlexRow">
313
+        <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_share_01.png"></image>
314
+        <view class="panelFooterBottom">转发</view>
315
+      </button>
316
+    </view>
317
+    <view class="panelFooter2 FlexRow" catchtap="goto" data-url="feedback">
318
+      <view class="panelFooterLine panelFooterBottom"></view>
319
+      <view  class="panelFooter21 panelFooterBottom">纠错</view>
320
+    </view>
321
+    <view class="panelFooter3 FlexRow" catchtap="returnTop">
322
+      <view class="panelFooterLine panelFooterBottom"></view>
323
+      <image class="panelFooter_icon_b2t_01 panelFooterBottom" src="../images/icon_b2t_01.png"></image>
324
+    </view>
325
+  </view>
326
+</view>

+ 466 - 0
pages/main/school.wxss

@@ -0,0 +1,466 @@
1
+.panelSchool1{
2
+  margin-top: 35rpx;
3
+}
4
+
5
+.panelNullImage{
6
+  width:710rpx;
7
+  height:380rpx;
8
+  background-color: #E3E3E3;
9
+  border-top-left-radius: 20rpx;
10
+  border-top-right-radius: 20rpx;
11
+  color:#9B9B9B;
12
+  font-size:28rpx;
13
+  position: relative;
14
+}
15
+
16
+.icon_sys_13{
17
+  width: 60rpx;
18
+  height:60rpx;
19
+  margin-bottom: 20rpx;
20
+}
21
+
22
+.btnHelp{
23
+  width:100rpx;
24
+  height:40rpx;
25
+  line-height: 40rpx;
26
+  background-color: #fff;
27
+  color:#EB5C28;
28
+  font-size:20rpx;
29
+  border-radius: 10rpx;
30
+  text-align: center;
31
+  position: absolute;
32
+  right:40rpx;
33
+  bottom:40rpx;
34
+}
35
+
36
+.panelSchoolImage{
37
+  width:100%;
38
+  height:380rpx;
39
+  border-top-left-radius: 20rpx;
40
+  border-top-right-radius: 20rpx;
41
+}
42
+
43
+.panelSchoolLogo{
44
+  width:120rpx;
45
+  height:120rpx;
46
+  border-radius: 50%;
47
+  position: absolute;
48
+  left:60rpx;
49
+  top:290rpx;
50
+}
51
+
52
+.panelSchoolText01{
53
+  font-size: 48rpx;
54
+  font-weight: 700rpx;
55
+  align-self: start;
56
+  margin:50rpx 0 0 40rpx;
57
+}
58
+
59
+.panelSchool11{
60
+  align-self: start;
61
+  margin:20rpx 0 0 40rpx;
62
+  font-weight: 400;
63
+  font-size: 24rpx;
64
+  color:#787878;
65
+  justify-content: flex-start;
66
+}
67
+
68
+
69
+.panelSchoolText03{
70
+  font-size: 24rpx;
71
+  font-weight: 400;
72
+  align-self: start;
73
+  margin:10rpx 0 0 40rpx;
74
+}
75
+
76
+.panelSchool12{
77
+  width:630rpx;
78
+  justify-content: space-between;
79
+  margin: 60rpx 0 0 0;
80
+}
81
+
82
+.panelSchool121{
83
+  align-items: flex-start;
84
+}
85
+.panelSchool122{
86
+  align-items: flex-end;
87
+}
88
+
89
+.panelSchoolText04{
90
+  color:#9B9B9B;
91
+  margin-bottom: 4rpx;
92
+  font-size: 20rpx;
93
+}
94
+.panelSchoolText05{
95
+  font-size: 28rpx;
96
+  height:40rpx;
97
+}
98
+.panelSchoolText06{
99
+  font-size: 34rpx;
100
+  font-family: 'Roboto-Black';
101
+}
102
+.panelSchoolText061{
103
+  font-size: 28rpx;
104
+  font-weight: 400;
105
+}
106
+
107
+.panelSchool13{
108
+  width:100%;
109
+  height:93rpx;
110
+  justify-content: space-between;
111
+  font-size: 24rpx;
112
+  font-weight: 400;
113
+}
114
+
115
+.panelMarginTop{
116
+  margin-top: 30rpx;
117
+}
118
+
119
+.icon_nextpage_4{
120
+  width:12rpx;
121
+  height:18rpx;
122
+  margin-left: 10rpx;
123
+}
124
+
125
+.panelSchool21{
126
+  width:630rpx;
127
+  height:152rpx;
128
+  align-items: flex-start;
129
+}
130
+.panelSchool22{
131
+  width:630rpx;
132
+  height:93rpx;
133
+  justify-content: flex-start;
134
+  font-size: 24rpx;
135
+  color:#EB5C28;
136
+  margin: -40rpx 0 20rpx 0;
137
+}
138
+
139
+.panelSchoolText08{
140
+  align-self: start;
141
+  margin: 50rpx 0 40rpx 40rpx;
142
+}
143
+
144
+.panelSchoolText081{
145
+  width: 670rpx;
146
+  align-self: start;
147
+  margin: 50rpx 0 40rpx 40rpx;
148
+  position: relative;
149
+}
150
+.panelSchoolText082{
151
+  align-self: start;
152
+  margin: 50rpx 0 0 40rpx;
153
+  color:#9B9B9B;
154
+  font-size:20rpx;
155
+}
156
+.panelSchoolText083{
157
+  margin: 4rpx 0 30rpx 40rpx;
158
+}
159
+.panelSchool31{
160
+  width: 100%;
161
+}
162
+.panelSchool311{
163
+  width:176rpx;
164
+  height:187rpx;
165
+  justify-content: flex-start;
166
+}
167
+
168
+.panelSchool3111{
169
+  width: 100%;
170
+}
171
+
172
+.icon_sys_04{
173
+  width: 28rpx;
174
+  height: 28rpx;
175
+  margin: 20rpx 0 10rpx 0;
176
+}
177
+.icon_sys_09{
178
+  width: 28rpx;
179
+  height: 28rpx;
180
+  margin-right: 20rpx;
181
+}
182
+
183
+
184
+.panelSchoolText09{
185
+  font-size: 24rpx;
186
+  font-weight: 400;
187
+}
188
+
189
+.panelSchoolText090{
190
+  font-size: 24rpx;
191
+  color:#FE6659;  
192
+  font-family: 'Roboto-Black';
193
+}
194
+.panelSchoolText091{
195
+  font-size: 24rpx;
196
+  color:#03AF69;
197
+  font-family: 'Roboto-Black';
198
+}
199
+.panelSchoolText092{
200
+  font-size: 20rpx;
201
+  color:#4D4D4D;
202
+}
203
+
204
+.panelSchoolLine02{
205
+  width:630rpx;
206
+  height: 1rpx;
207
+  background-color: #E3E3E3;
208
+}
209
+
210
+.panelSchoolText10{
211
+  font-size: 20rpx;
212
+  align-self: start;
213
+  margin:30rpx 0 0 40rpx;
214
+}
215
+
216
+.panelSchoolText11{
217
+  font-size: 32rpx;
218
+  font-family: 'Roboto-Black';
219
+}
220
+
221
+.panelSchoolText111{
222
+  width:176rpx;
223
+  margin: 30rpx 0 50rpx 0;
224
+  text-align: center;
225
+}
226
+.panelSchoolText1111{
227
+  font-size:24rpx;
228
+  font-weight: 400;
229
+}
230
+
231
+.panelSchoolText112{
232
+  width:162rpx;
233
+}
234
+
235
+.line_02{
236
+  width: 710rpx;
237
+  height: 6rpx;
238
+}
239
+
240
+.radio2{
241
+  margin: 60rpx 0 20rpx 0;
242
+}
243
+.radio21{
244
+  margin: 0 10rpx;
245
+}
246
+
247
+.panelSchoolIndependent{
248
+  width:100%;
249
+  margin-top: 20rpx;
250
+  align-items: flex-start;
251
+}
252
+.panelSchoolIndependent1{
253
+  justify-content: flex-start;
254
+}
255
+
256
+.panelSchoolIndependentText1{
257
+  width:360rpx;
258
+  height:98rpx;
259
+  line-height: 98rpx;
260
+  margin-left: 40rpx;
261
+}
262
+.panelSchoolIndependent2{
263
+  width:670rpx;
264
+  height:124rpx;
265
+  border-radius: 10rpx;
266
+  background-color: #f8f8f8;
267
+  margin:0 0 30rpx 20rpx;
268
+  align-items: flex-start;
269
+}
270
+
271
+.panelSchoolIndependent3{
272
+  justify-content: flex-start;
273
+  margin-bottom: 30rpx;
274
+}
275
+
276
+.panelSchoolIndependentText2{
277
+  width:360rpx;
278
+  margin-left: 40rpx;
279
+}
280
+
281
+.panelSchoolText16{
282
+  font-size:20rpx;
283
+  font-weight: 400;
284
+  margin-left: 30rpx;
285
+  width:610rpx;
286
+}
287
+
288
+.panelSchoolIndependent4{
289
+  margin: 30rpx 0 13rpx 40rpx;
290
+}
291
+
292
+.panelTool1{
293
+  width:418rpx;
294
+  margin: 40rpx 0 0 30rpx;
295
+  align-self: start;
296
+}
297
+
298
+.panelTool1_1{
299
+  margin-left: 20rpx;
300
+}
301
+
302
+.panelSchool4{
303
+  height:300rpx;
304
+  justify-content: flex-start;
305
+}
306
+
307
+.panelSchool40{
308
+  width: 100%;
309
+  justify-content: space-between;
310
+}
311
+.panelSchool41{
312
+  align-items: flex-start;
313
+  margin-left: 40rpx;
314
+}
315
+
316
+.panelSchool411{
317
+  font-size: 36rpx;
318
+}
319
+
320
+.panelSchool412{
321
+  margin: 30rpx 0 20rpx 0;
322
+  align-items: flex-start;
323
+}
324
+
325
+.panelSchool413{
326
+  align-items: flex-start;
327
+}
328
+
329
+.icon_web_01{
330
+  margin-top: 6rpx;
331
+  width:24rpx;
332
+  height:24rpx;
333
+  margin-right: 20rpx;
334
+}
335
+
336
+.panelSchoolText12{
337
+  font-size: 28rpx;
338
+  font-family: 'Roboto-Black';
339
+  width:360rpx;
340
+}
341
+.panelSchoolText13{
342
+  font-size: 24rpx;
343
+  font-weight: 400;
344
+}
345
+.panelSchoolText131{
346
+  line-height: 40rpx;
347
+  height:126rpx;
348
+  align-items: flex-start;
349
+}
350
+
351
+.panelSchoolText17{
352
+  font-size: 24rpx;
353
+  margin: 50rpx 0 0 40rpx;
354
+  font-weight: 400;
355
+  align-self: start;
356
+}
357
+.panelSchoolText18{
358
+  font-size: 36rpx;
359
+  margin: 0 0 0 40rpx;
360
+  align-self: start;
361
+}
362
+
363
+.panelSchoolQRCode{
364
+  width:200rpx;
365
+  height:200rpx;
366
+  margin: 50rpx 40rpx 50rpx 0;
367
+}
368
+
369
+.panelScrollView{
370
+  margin: -10rpx 0 30rpx 0;
371
+  width: 666rpx;
372
+  justify-content: flex-start;
373
+  align-items: flex-start;
374
+}
375
+
376
+.scrollItem{
377
+  width:210rpx;
378
+  height:210rpx;
379
+  border-radius: 10rpx;
380
+  margin: 0 5rpx;
381
+  border:1rpx solid #d2d2d2;
382
+}
383
+
384
+
385
+.panelSchool5{
386
+  justify-content: space-between;
387
+  height:220rpx;
388
+}
389
+
390
+.panelSchool51{
391
+  align-items: flex-start;
392
+  margin-left: 40rpx;
393
+}
394
+
395
+.panelSchool512{
396
+  margin-top: 30rpx;
397
+}
398
+
399
+.panelSchool52{
400
+  width:213rpx;
401
+  justify-content: flex-start;
402
+}
403
+
404
+.icon_loc_01{
405
+  width:20rpx;
406
+  height:24rpx;
407
+  margin-right: 20rpx;
408
+}
409
+.pic_03{
410
+  width:120rpx;
411
+  height:120rpx;
412
+  margin-right: 37rpx;
413
+  border-radius: 20rpx;
414
+}
415
+
416
+.panelFold{
417
+  width:154rpx;
418
+  height:100rpx;
419
+  position: absolute;
420
+  right:0rpx;
421
+  top:-30rpx;
422
+}
423
+
424
+.panelFold1{
425
+  width:34rpx;
426
+  height:34rpx;
427
+  background-color: #EB5C28;
428
+  border-radius: 50%;
429
+}
430
+
431
+.icon_fold_04{
432
+  width:18rpx;
433
+  height:10rpx;
434
+}
435
+
436
+.panelContent{
437
+  width:630rpx;
438
+  font-size: 28rpx;
439
+  font-weight: 400;
440
+  margin-bottom: 50rpx;
441
+}
442
+
443
+.panelSchoolText14{
444
+  width:630rpx;
445
+  font-size:20rpx;
446
+  font-weight: 400;
447
+  margin-top: 60rpx;
448
+}
449
+
450
+.panelSchoolText15{
451
+  font-size:20rpx;
452
+  font-weight: 700;
453
+  color:#EB5C28;
454
+  text-decoration: underline;
455
+}
456
+
457
+.panelSchoolText19{
458
+  margin: 60rpx 0 30rpx 40rpx;
459
+  font-size: 24rpx;
460
+  font-weight: 400;
461
+  align-self: start;
462
+}
463
+.panelSchool221{
464
+  margin: 30rpx 0 0 0;
465
+  height:43rpx;
466
+}

+ 439 - 0
pages/main/scoreline.js

@@ -0,0 +1,439 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+var canPage=true;
7
+
8
+Page({
9
+  data: {
10
+    PageType:"scoreline",
11
+    DistrictID:1,
12
+    ScoreTypeID:1,
13
+    Years:constant.arrYear,
14
+    YearIndex:0,
15
+    IsSearch:false,
16
+    Accommodation:constant.arrAccommodation,
17
+    TailScore:constant.arrTailScore,
18
+    PublicOrPrivate:constant.arrPublicOrPrivate,
19
+    LocalOrNolocal:constant.arrLocalOrNolocal,
20
+  },
21
+  onLoad: function (options) {
22
+    var that = this;
23
+    that.setData({
24
+      Containnerheight: main.getWindowHeight(),
25
+      ScoreTypeID:options.ScoreTypeID,
26
+      DistrictID:options.DistrictID,
27
+      YearIndex:options.YearIndex,
28
+      PageType:options.PageType,
29
+      SchoolType1:options.SchoolType1,
30
+      IsSearch:false,
31
+      IsFocus:false,
32
+      PageCount:app.globalData.PageCount,//翻页数
33
+    });
34
+
35
+    var b=true;
36
+    var title="";
37
+    if (options.PageType=="collect"){
38
+
39
+      var collectSchool=wx.getStorageSync('CollectList');
40
+      var schoolCount=0;
41
+      if (options.SchoolType1=="高中")
42
+        schoolCount=collectSchool.收藏的高中.length;
43
+      else 
44
+        schoolCount=collectSchool.收藏的初中.length;
45
+      that.setData({
46
+        SchoolCount:schoolCount,
47
+      });
48
+
49
+      if (schoolCount==0){
50
+        that.setData({
51
+          List:[],
52
+        });
53
+        b=false;
54
+      }
55
+      else{
56
+        var arr=[];
57
+      
58
+        var name="";
59
+        for(var i=0;i<constant.arrDistrict.length;i++){
60
+          var obj={};
61
+          obj.ID=Number(constant.arrDistrict[i].ID);
62
+          obj.Name=constant.arrDistrict[i].Name.substr(0,2);
63
+          obj.CSS="";
64
+          arr.push(obj);
65
+        }
66
+        that.setData({
67
+          SchoolType1:options.SchoolType1,
68
+          District:arr,
69
+          DistrictName:name,
70
+        });
71
+      }
72
+      title="对比·"+options.SchoolType1;
73
+    }
74
+    else{
75
+      title=constant.arrScoreType[that.data.ScoreTypeID-1].Name+'·'+constant.arrDistrict[that.data.DistrictID-1].Name;
76
+    }
77
+
78
+    wx.setNavigationBarTitle({
79
+      title: title,
80
+    });
81
+
82
+    that.setData({
83
+      Title: title,
84
+    });
85
+    
86
+    if (b)
87
+      that.init();
88
+    
89
+  },
90
+  onPullDownRefresh: function () {
91
+    var that=this;
92
+    //debugger;
93
+    wx.redirectTo({
94
+      url: 'scoreline?PageType='+that.data.PageType+'&ScoreTypeID='+that.data.ScoreTypeID+'&SchoolType1='+that.data.SchoolType1+'&DistrictID='+that.data.DistrictID+"&YearIndex="+that.data.YearIndex,
95
+    })
96
+    wx.stopPullDownRefresh();
97
+  },
98
+  init:function(){
99
+    var that = this;
100
+    var districtID=Number(that.data.DistrictID);
101
+    var year=that.data.Years[that.data.YearIndex].Name;
102
+    for(var i=0;i<that.data.Years.length;i++){
103
+      that.data.Years[i].CSS="";
104
+    }
105
+    that.data.Years[that.data.YearIndex].CSS="Selected";
106
+
107
+    that.setData({
108
+      IsSearch:false,
109
+      IsFocus:false,
110
+      SearchNull:false,
111
+      ContrastNull:false,
112
+      InputValue:"",
113
+      Years:that.data.Years,
114
+    });
115
+    
116
+    var url="";
117
+    var canSelect=true;
118
+    if (that.data.PageType=="collect"){
119
+      if (districtID==-1 && that.data.SchoolType1=="高中")
120
+        canSelect=false;
121
+      url="GetMPSScoreByCollect?SchoolType1="+that.data.SchoolType1+"&UserID="+app.globalData.userInfo.UserID+"&ScoreYear="+year+"&DistrictID="+districtID;
122
+    }
123
+    else{
124
+      canSelect=true;
125
+      var scoreTypeID=constant.arrScoreType[that.data.ScoreTypeID-1].Name;
126
+      url="GetMPSScore?ScoreYear="+year+"&ScoreType="+scoreTypeID+"&DistrictID="+districtID;
127
+    }
128
+
129
+    if (canSelect){
130
+      wx.showLoading({
131
+        title: '加载中',
132
+      });
133
+      main.getData(url, function (data) {
134
+        if (data) {
135
+          
136
+          for(var i=0;i<data.length;i++){
137
+            var item=data[i];
138
+            item.IsAccommodation=true;
139
+            item.IsPublicOrPrivate=true;
140
+            item.IsLocalOrNolocal=true;
141
+            item.IsSearchResult=true;
142
+          }
143
+  
144
+          // 是否住宿全部选中
145
+          for(var i=0;i<constant.arrAccommodation.length;i++)
146
+            constant.arrAccommodation[i].CSS="Selected";
147
+  
148
+          //若是高中收藏对比
149
+          data=realData2(that,data);
150
+          //名额到校将收藏初中提前显示
151
+          data=realData(that,data);
152
+  
153
+          //将保存的用户习惯(显示列表样式)提取出来
154
+          var isListAll=wx.getStorageSync('TailScore');
155
+          if (isListAll){
156
+            that.data.TailScore[0].CSS="Selected";
157
+          }
158
+  
159
+          var pageCount=data.length;
160
+          if (that.data.ScoreTypeID==3)
161
+            pageCount=app.globalData.PageCount;
162
+          
163
+          //debugger;
164
+
165
+          var isContrastNull=false;
166
+          if (data.length==0 && that.data.SchoolCount>0)
167
+            isContrastNull=true;
168
+  
169
+          that.setData({
170
+            Accommodation:constant.arrAccommodation,
171
+            List:data,
172
+            IsSearch:false,
173
+            IsListAll:isListAll,
174
+            TailScore:that.data.TailScore,
175
+            PageCount:pageCount,
176
+            PageFilterCount:data.length,
177
+            ContrastNull:isContrastNull,
178
+          });
179
+  
180
+        }
181
+
182
+        var timeTimeout=2000;
183
+        if (that.data.ScoreTypeID==3 && that.data.DistrictID==11){
184
+          timeTimeout=3000;
185
+          if (app.globalData.IsAndroid)
186
+            timeTimeout=4000;
187
+        }
188
+
189
+        setTimeout(function(){
190
+          wx.hideLoading();
191
+        },timeTimeout);
192
+      });
193
+    }
194
+    
195
+
196
+    function realData(obj,data){
197
+      //名额到校将收藏初中提前显示
198
+      if (obj.data.ScoreTypeID==3){
199
+        //debugger;
200
+        var schoolList=wx.getStorageSync('CollectList')["收藏的初中"];
201
+        if (schoolList && schoolList.length>0){
202
+          var arr=[];
203
+          for(var i=0;i<data.length;i++){
204
+            var item=data[i];            
205
+            for(var j=0;j<schoolList.length;j++){
206
+              if (item.SchoolOfGraduation==schoolList[j].ID){
207
+                item.IsCollect=true;
208
+                arr.push(item);
209
+                data.splice(i,1);
210
+                i--;
211
+                break;
212
+              }
213
+            }
214
+          }
215
+          if (arr.length>0){
216
+            for(var i=arr.length-1;i>=0;i--){
217
+              data.unshift(arr[i]);
218
+            }
219
+          }
220
+        }
221
+      }
222
+      return data;
223
+    }
224
+
225
+    function realData2(obj,data){
226
+      //若是高中收藏对比
227
+      if (obj.data.SchoolType1=='高中' && obj.data.PageType=="collect"){
228
+        var schoolList=wx.getStorageSync('CollectList')["收藏的高中"];
229
+        for(var i=0;i<data.length;i++){
230
+          var item=data[i];            
231
+          for(var j=0;j<schoolList.length;j++){
232
+            if (item.ID==schoolList[j].ID){
233
+              item.SchoolFullName=schoolList[j].SchoolFullName;
234
+              item.District=schoolList[j].District;
235
+              item.SchoolType2Short=schoolList[j].SchoolType2Short;
236
+              item.PublicOrPrivate=schoolList[j].PublicOrPrivate;
237
+              schoolList[j].IsExist=true;
238
+            }
239
+          }
240
+        }
241
+
242
+        var arr=[];
243
+        for(var i=0;i<schoolList.length;i++){
244
+          if (!schoolList[i].IsExist)
245
+            arr.push(schoolList[i]);
246
+        }
247
+        
248
+        obj.setData({
249
+          ListNullData:arr,
250
+        });
251
+      }
252
+      return data;
253
+    }
254
+  },
255
+  onPage: function (e) {
256
+    var that=this;
257
+    var count=that.data.PageCount;
258
+    if (canPage && count<that.data.List.length){
259
+      canPage=false
260
+      count+=app.globalData.PageCount;
261
+      that.setData({
262
+        PageCount:count,
263
+      });
264
+      setTimeout(function(){
265
+        canPage=true;
266
+      },2000);
267
+    }
268
+  },
269
+  onSelect:function(event){
270
+    var that=this;
271
+    main.onSelect(that,event,function(obj,e,result){
272
+      //显示大图列表还是全部列表
273
+      if (e.currentTarget.dataset.object=="TailScore"){
274
+        wx.showLoading({
275
+          title:"加载中",
276
+          mask:true,
277
+        });
278
+        that.setData({
279
+          IsListAll: result,
280
+        });
281
+        setTimeout(function(){
282
+          wx.hideLoading();
283
+        },2000);
284
+        wx.setStorageSync('TailScore', result);
285
+      }
286
+      //选择年份
287
+      else if (e.currentTarget.dataset.object=="Years"){
288
+        if (that.data.PageType=="collect")
289
+          that.data.DistrictID=-1;
290
+        wx.redirectTo({
291
+          url: 'scoreline?PageType='+that.data.PageType+'&SchoolType1='+that.data.SchoolType1+'&ScoreTypeID='+that.data.ScoreTypeID+'&DistrictID='+that.data.DistrictID+"&YearIndex="+e.currentTarget.dataset.index,
292
+        });
293
+      }
294
+      //选择公办和民办
295
+      else if (e.currentTarget.dataset.object=="PublicOrPrivate"){
296
+        var selectIndex=e.currentTarget.dataset.index;
297
+        var selectText=that.data.PublicOrPrivate[selectIndex].Name;
298
+        var isSelect=that.data.PublicOrPrivate[selectIndex].CSS=="Selected";
299
+        
300
+        
301
+        var isNull=true;
302
+        for(var i=0;i<that.data.List.length;i++){
303
+          var item=that.data.List[i];
304
+          if (selectText==item.PublicOrPrivate)
305
+            item.IsPublicOrPrivate=isSelect;
306
+          if (item.IsPublicOrPrivate)
307
+            isNull=false;     
308
+        }
309
+        that.setData({
310
+          List:that.data.List,
311
+          SearchNull:isNull,
312
+        });
313
+      }
314
+      //选择本地和非本地
315
+      else if (e.currentTarget.dataset.object=="LocalOrNolocal"){
316
+        var selectIndex=e.currentTarget.dataset.index;
317
+        var isNull=true;
318
+        for(var i=0;i<that.data.List.length;i++){
319
+          var item=that.data.List[i];
320
+          item.IsLocalOrNolocal=false; 
321
+          if (selectIndex==0)
322
+            item.IsLocalOrNolocal=true;
323
+          else if (selectIndex==1 && item.DistrictNameArea==constant.arrDistrict[that.data.DistrictID-1].Name)
324
+            item.IsLocalOrNolocal=true;   
325
+          else if (selectIndex==2 && item.DistrictNameArea!=constant.arrDistrict[that.data.DistrictID-1].Name)
326
+            item.IsLocalOrNolocal=true;   
327
+        }
328
+        that.setData({
329
+          List:that.data.List,
330
+        });
331
+      }
332
+      //选择寄宿
333
+      else if (e.currentTarget.dataset.object=="Accommodation"){
334
+        var selectIndex=e.currentTarget.dataset.index;
335
+        var selectText=that.data.Accommodation[selectIndex].Name;
336
+        var isSelect=that.data.Accommodation[selectIndex].CSS=="Selected";
337
+        var isNull=true;
338
+        for(var i=0;i<that.data.List.length;i++){
339
+          var item=that.data.List[i];
340
+          if (selectText==item.Accommodation)
341
+            item.IsAccommodation=isSelect;  
342
+          
343
+          if (item.IsAccommodation)
344
+            isNull=false;
345
+        }
346
+        
347
+        that.setData({
348
+          List:that.data.List,
349
+          SearchNull:isNull,
350
+        });
351
+      }
352
+      //选择区
353
+      else if (e.currentTarget.dataset.object=="District"){
354
+
355
+        that.setData({
356
+          DistrictID:e.currentTarget.dataset.index+1,
357
+          DistrictName:constant.arrDistrict[e.currentTarget.dataset.index].Name,
358
+        });
359
+        that.init();
360
+      }
361
+    });   
362
+  },
363
+  showSearch:function(){
364
+    var that=this;
365
+    that.setData({
366
+      IsSearch:true,
367
+      IsFocus:true,
368
+    });
369
+  },
370
+  clearInput:function(){
371
+    var that=this;
372
+    that.bindKeyInput({detail:{value:""}});
373
+    that.setData({
374
+      IsSearch:false,
375
+      IsFocus:false,
376
+      SearchNull:false,
377
+      ContrastNull:false,
378
+    });
379
+  },
380
+  clearInput2:function(){
381
+    var that=this;
382
+    that.bindKeyInput({detail:{value:""}});
383
+    that.setData({
384
+      IsSearch:true,
385
+      IsFocus:true,
386
+    });
387
+  },
388
+  bindKeyInput:function(e){
389
+    var inputValue=e.detail.value;
390
+    var that=this;
391
+    var isNull=true;
392
+    var count=0;
393
+    for(var i=0;i<that.data.List.length;i++){
394
+      var item=that.data.List[i];
395
+      if (inputValue){
396
+        if (item.SchoolFullNameJunior.indexOf(e.detail.value)>=0){
397
+          item.IsSearchResult=true;
398
+          count++;
399
+          isNull=false;
400
+        }
401
+        else
402
+          item.IsSearchResult=false;
403
+      }
404
+      else{
405
+        item.IsSearchResult=true;
406
+        count++;
407
+      }
408
+    }
409
+    
410
+    that.setData({
411
+      List:that.data.List,
412
+      SearchNull:isNull,
413
+      InputValue:inputValue,
414
+      PageFilterCount:count,
415
+    });
416
+  },
417
+  goto: function (e) {
418
+    main.goto(e);
419
+  },
420
+  returnTop:function(){
421
+    main.returnTop();
422
+  },
423
+  onShareTimeline: function () {
424
+    return this.onShareAppMessage();
425
+  },
426
+  onShareAppMessage: function () {
427
+    var that=this;
428
+    var title="上海中招"+that.data.Title;
429
+    var path=app.globalData.SharePath+'?UserID=' + app.globalData.userInfo.UserID+'&type=scoreline&ScoreTypeID='+that.data.ScoreTypeID+'&ID=' + that.data.DistrictID+"&YearIndex="+that.data.YearIndex;
430
+    if (that.data.PageType=="collect"){
431
+      title=app.globalData.ShareTitle;
432
+      path=app.globalData.SharePath+'?UserID=' + app.globalData.userInfo.UserID;
433
+    }
434
+    return {
435
+      title: title,
436
+      path: path,
437
+    }
438
+  }
439
+})

+ 3 - 0
pages/main/scoreline.json

@@ -0,0 +1,3 @@
1
+{
2
+  "enablePullDownRefresh": true
3
+}

+ 145 - 0
pages/main/scoreline.wxml

@@ -0,0 +1,145 @@
1
+<import src="../template/componentList.wxml" />
2
+
3
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
4
+  <view class="panelTop FlexRow" wx:if="{{SchoolCount!='0'}}">
5
+    <view style="width: 40rpx;"></view>
6
+    <view class="panelTop1 FlexColumn" wx:for="{{Years}}" wx:key="index" 
7
+    bindtap="onSelect" data-object="Years" data-index="{{index}}" data-clicktype="radio">
8
+      <view class="panelTop1Text01 panelTop1Text01{{item.CSS}}">{{item.Name}}年</view>
9
+      <view class="panelTop1Line01 panelTop1Line01{{item.CSS}}"></view>
10
+    </view>
11
+  </view>
12
+  <view style="height: 100rpx;"></view>
13
+  
14
+  <block wx:if="{{PageType=='collect' && SchoolCount!='0'}}">
15
+    <text class="panelTitle FlexRow" wx:if="{{SchoolType1=='高中'}}">
16
+      选一个区
17
+    </text>
18
+    <text class="panelTitle FlexRow" style="margin-top: 50rpx;" wx:if="{{SchoolType1=='初中'}}">对比名额分配到校</text>
19
+    
20
+    <view class="panelBasicCss panelTop0" wx:if="{{SchoolType1=='高中'}}" >
21
+      <view class="panelTop00 FlexRow">
22
+        <view class="panelTop01 panelTop01{{item.CSS}}" wx:for="{{District}}" wx:key="index" 
23
+        bindtap="onSelect" data-object="District" data-index="{{index}}" data-clicktype="radio">
24
+          <view class="panelTop01Text panelTop01Text{{item.CSS}}">{{item.Name}}</view>
25
+        </view>
26
+      </view>
27
+    </view>
28
+
29
+    <text class="panelTitle FlexRow" wx:if="{{(ContrastNull || List.length>0) && SchoolType1=='高中'}}">
30
+      对比结果
31
+    </text>
32
+  </block>
33
+
34
+  <block wx:if="{{List.length>0 || ContrastNull}}">
35
+    <view class="panelBasicCss panelTop2 FlexRow">
36
+      <image class="panelCheckbox_icon_filter_01 icon_filter_01" src="../images/icon_filter_01.png"></image>
37
+      <view class="panelTop21 FlexRow">
38
+        <view class="panelCheckbox panelCheckbox{{item.CSS}} checkMarginTop FlexRow" wx:for="{{TailScore}}" wx:key="index" 
39
+        bindtap="onSelect" data-object="TailScore" data-index="0" data-clicktype="checkbox">
40
+          <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
41
+            <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
42
+          </view>
43
+          <view>{{item.Name}}</view>
44
+        </view>
45
+        <view style="width:100rpx;"></view>
46
+        <!-- 住宿 -->
47
+        <view wx:if="{{ScoreTypeID==2}}" class="panelCheckbox checkbox2 panelCheckbox{{item.CSS}} FlexRow" wx:for="{{Accommodation}}" wx:key="index" 
48
+        bindtap="onSelect" data-object="Accommodation" data-index="{{index}}" data-clicktype="checkbox">
49
+          <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
50
+            <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
51
+          </view>
52
+          <view>{{item.Name}}</view>
53
+        </view>
54
+
55
+        <!-- 公办民办 -->
56
+        <view wx:if="{{ScoreTypeID==4}}" class="panelCheckbox checkbox2 panelCheckbox{{item.CSS}} FlexRow" wx:for="{{PublicOrPrivate}}" wx:key="index" 
57
+        bindtap="onSelect" data-object="PublicOrPrivate" data-index="{{index}}" data-clicktype="checkbox">
58
+          <view class="panelCheckboxCircle panelCheckboxCircle{{item.CSS}} FlexRow">
59
+            <image wx:if="{{item.CSS}}" class="panelCheckbox_icon_check_01" src="../images/icon_check_01.png"></image>
60
+          </view>
61
+          <view>{{item.Name}}</view>
62
+        </view>
63
+      </view>
64
+    </view>
65
+
66
+    <view class="panelBasicCss panelScore FlexColumn" >
67
+      <view style="height:20rpx"></view>
68
+      <!-- 名额到校 -->
69
+      <view class="panelScoreSearch FlexColumn" wx:if="{{ScoreTypeID==3}}">
70
+        <view class="panelScoreSearch1 FlexRow" wx:if="{{!IsSearch}}" bindtap="showSearch">
71
+          <image class="panelScoreSearch_icon_magnifier_01" src="../images/icon_filter_02.png"></image>
72
+          <view class="panelScoreSearch11">筛选初中</view>
73
+        </view>
74
+        <view class="panelScoreSearch1 FlexRow" wx:if="{{IsSearch}}">
75
+          <input class="Input" value="{{InputValue}}" focus="{{IsFocus}}" placeholder="输入校名,限本区初中" confirm-type="search" bindinput="bindKeyInput" />
76
+          <view class="btnCancel" wx:if="{{!InputValue}}"></view>
77
+          <view class="btnCancel FlexColumn" wx:if="{{InputValue}}" bindtap="clearInput2">
78
+            <view class="circle FlexColumn">
79
+              <image class="icon_del_02" src="../images/icon_del_02.png"></image>
80
+            </view>
81
+          </view>
82
+          <view class="panelLine3"></view>
83
+          <view class="btnCancel" bindtap="clearInput">取消</view>
84
+        </view>
85
+        <view class="panelWhite" wx:if="{{IsSearch && !InputValue}}"></view>
86
+        
87
+        <view class="panelScoreText031" wx:if="{{IsSearch && InputValue}}">筛选结果</view>
88
+        <view class="panelScoreText03" wx:if="{{IsSearch && InputValue}}">技巧:点击校名可收藏学校,收藏的学校在下次排列位置会置顶。</view>
89
+        <view style="height:50rpx;" wx:if="{{!IsSearch}}"></view>
90
+        <view class="panelLine"></view>
91
+      </view>
92
+      
93
+      <!-- 1-15志愿 -->
94
+      <view class="panelRadio radio1 FlexRow" wx:if="{{ScoreTypeID==4}}">
95
+        <view class="panelRadio1 radio2 panelRadio1{{item.CSS}}" wx:for="{{LocalOrNolocal}}" wx:key="index"
96
+        bindtap="onSelect" data-object="LocalOrNolocal" data-index="{{index}}" data-clicktype="radio">{{item.Name}}</view>
97
+      </view>
98
+      
99
+      <template is="componentList" wx:if="{{!(IsSearch && !InputValue)}}" data="{{IsListAll:IsListAll,ScoreTypeID:ScoreTypeID,List:List,PageType:PageType,SchoolType1:SchoolType1,IsSearch:IsSearch,SearchNull:SearchNull,PageCount:PageCount,PageFilterCount:PageFilterCount,ContrastNull:ContrastNull}}" />
100
+      
101
+      <view style="height: 50rpx;"></view>
102
+    </view>
103
+
104
+    <block wx:if="{{ListNullData && ListNullData.length>0 && !ContrastNull}}">
105
+      <view class="panelBasicCss FlexColumn">
106
+        <view class="text04">以下学校不招收本区学生</view>
107
+        <view class="panelLine"></view>
108
+        <view style="height:15rpx;"></view>
109
+        <view class="panelListNull FlexRow" wx:for="{{ListNullData}}" wx:key="index" bindtap="goto" data-url="school?PageType=collect&ID={{item.ID}}" >
110
+          <view class="text05">{{item.SchoolFullName}}</view>
111
+          <view class="panelScoreJunior2 FlexRow">
112
+            {{item.District}} {{item.SchoolType2Short}} <view class="panelLine2"></view> {{item.PublicOrPrivate}}
113
+          </view>
114
+        </view>
115
+        <view style="height:30rpx;"></view>
116
+      </view>
117
+    </block>
118
+
119
+    <view style="height: 210rpx;"></view>
120
+
121
+  </block>
122
+
123
+  <block wx:if="{{List.length==0 && SchoolCount=='0'}}">
124
+    <image class="icon_sys_12" src="../images/icon_sys_12.png"></image>
125
+    <view class="text02">没有可对比的学校</view>
126
+    <view class="text03">请先收藏几所学校</view>
127
+  </block>
128
+
129
+  <view class="panelFooter FlexRow">
130
+    <view class="panelFooter1 FlexRow" wx:if="{{PageType=='scoreline'}}">
131
+      <button open-type='share' class="share FlexRow">
132
+        <image class="panelFooter_icon_save_01 panelFooterBottom" src="../images/icon_share_01.png"></image>
133
+        <view class="panelFooterBottom">转发</view>
134
+      </button>
135
+    </view>
136
+    <view class="panelFooter2 FlexRow"  catchtap="goto" data-url="feedback">
137
+      <view class="panelFooterLine panelFooterBottom" wx:if="{{PageType=='scoreline'}}"></view>
138
+      <view class="panelFooterBottom panelFooter21">纠错</view>
139
+    </view>
140
+    <view class="panelFooter3 FlexRow" catchtap="returnTop">
141
+      <view class="panelFooterLine panelFooterBottom"></view>
142
+      <image class="panelFooterBottom panelFooter_icon_b2t_01" src="../images/icon_b2t_01.png"></image>
143
+    </view>
144
+  </view>
145
+</view>

+ 225 - 0
pages/main/scoreline.wxss

@@ -0,0 +1,225 @@
1
+.panelTitle{
2
+  margin: 0 0 10rpx 40rpx;
3
+  align-self: start;
4
+  font-size: 36rpx;
5
+}
6
+
7
+.panelTop2{
8
+  justify-content: flex-start;
9
+  align-items: flex-start;
10
+}
11
+
12
+.panelTop21{
13
+  width:530rpx;
14
+  flex-wrap: wrap;
15
+  justify-content: flex-start;
16
+}
17
+
18
+.icon_filter_01{ 
19
+  margin: 32rpx 26rpx 0 30rpx;
20
+}
21
+
22
+.checkMarginTop{
23
+  margin: 20rpx 0 15rpx 0;
24
+}
25
+
26
+.checkbox2{
27
+  margin-bottom: 20rpx;
28
+}
29
+
30
+.radio1{
31
+  margin: 40rpx 0 30rpx 0;
32
+}
33
+
34
+.radio2{
35
+  width:210rpx;
36
+  text-align: center;
37
+}
38
+
39
+
40
+.Input{
41
+  margin: 0 0 0 30rpx;
42
+  width:444rpx;
43
+  font-size:28rpx;
44
+  font-weight: 400;
45
+}
46
+
47
+.circle{
48
+  width:40rpx;
49
+  height:40rpx;
50
+  border-radius: 50%;
51
+  background-color: #fff;
52
+}
53
+.icon_del_02{
54
+  width:16rpx;
55
+  height:16rpx;
56
+}
57
+
58
+.panelLine3{
59
+  width:2rpx;
60
+  height:50rpx;
61
+  background-color: #d2d2d2;
62
+}
63
+
64
+.btnCancel{
65
+  width:116rpx;
66
+  height:80rpx;
67
+  color:#EB5C28;
68
+  line-height: 80rpx;
69
+  text-align: center;
70
+  font-size:28rpx;
71
+  border-top-right-radius: 20rpx;
72
+  border-bottom-right-radius: 20rpx;
73
+}
74
+
75
+.btnSearch{
76
+  width:116rpx;
77
+  height:80rpx;
78
+  background-color: #f0f0f0;
79
+  color:#EB5C28;
80
+  line-height: 80rpx;
81
+  text-align: center;
82
+  font-size:28rpx;
83
+  border-top-right-radius: 20rpx;
84
+  border-bottom-right-radius: 20rpx;
85
+}
86
+
87
+.panelWhite{
88
+  width:100%;
89
+  height:1000rpx;
90
+  background-color: #fff;
91
+}
92
+
93
+/* ************** */
94
+.panelScore{
95
+  min-height: 100rpx;
96
+}
97
+
98
+.panelScoreSearch{
99
+  width:100%;
100
+  justify-content: flex-start;
101
+}
102
+
103
+.panelScoreSearch1{
104
+  width:650rpx;
105
+  height:80rpx;
106
+  background-color: #f0f0f0;
107
+  border-radius: 20rpx;
108
+  font-size: 24rpx;
109
+  justify-content: flex-start;
110
+  margin-top: 30rpx;
111
+}
112
+
113
+
114
+.panelScoreSearch11{
115
+  font-weight: 400;
116
+}
117
+
118
+.panelScoreSearch_icon_magnifier_01{
119
+  width:18rpx;
120
+  height:20rpx;
121
+  margin: 0 10rpx 0 30rpx;
122
+}
123
+
124
+.panelScoreText031{
125
+  font-size: 36rpx;
126
+  margin: 50rpx 0 0 40rpx;
127
+  align-self: start;
128
+}
129
+.panelScoreText03{
130
+  font-size: 20rpx;
131
+  margin: 30rpx 0 40rpx 40rpx;
132
+  align-self: start;
133
+  color:#787878;
134
+}
135
+
136
+/* **************** */
137
+
138
+.icon_sys_12{
139
+  width:50rpx;
140
+  height:60rpx;
141
+  margin-top: 350rpx;
142
+}
143
+.icon_sys_121{
144
+  width:50rpx;
145
+  height:60rpx;
146
+  margin-top: 100rpx;
147
+}
148
+
149
+.text02{
150
+  font-size: 36rpx;
151
+  margin-top: 30rpx;
152
+}
153
+
154
+.text03{
155
+  font-size: 24rpx;
156
+  font-weight: 400;
157
+  margin: 10rpx 0 180rpx 0;
158
+}
159
+
160
+.text04{
161
+  align-self: start;
162
+  margin: 50rpx 0 30rpx 30rpx;
163
+  font-size: 28rpx;
164
+}
165
+.panelListNull{
166
+  width: 100%;
167
+  justify-content: space-between;
168
+}
169
+.text05{
170
+  align-self: start;
171
+  margin: 15rpx 0 15rpx 30rpx;
172
+  font-size: 28rpx;
173
+  font-weight: 400;
174
+}
175
+
176
+.panelPage{
177
+  margin-left: 30rpx;
178
+  width:680rpx;
179
+  height:195rpx;
180
+  justify-content: flex-start;
181
+  border-bottom: 1rpx solid #e3e3e3;
182
+}
183
+.panelPage1{
184
+  font-size:24rpx;
185
+  color:#EB5C28;
186
+  margin-right: 20rpx;
187
+}
188
+
189
+.panelFold1{
190
+  width:34rpx;
191
+  height:34rpx;
192
+  background-color: #EB5C28;
193
+  border-radius: 50%;
194
+}
195
+
196
+.icon_fold_04{
197
+  width:18rpx;
198
+  height:10rpx;
199
+}
200
+
201
+.panelRecruitment{
202
+  width:650rpx;
203
+  height:96rpx;
204
+  border-radius: 10rpx;
205
+  background-color: #f8f8f8;
206
+  justify-content: space-between;
207
+}
208
+
209
+.panelRecruitmentTest01{
210
+  font-size:20rpx; 
211
+  margin-left: 20rpx;
212
+}
213
+.panelRecruitmentTest02{
214
+  font-weight: 400;  
215
+}
216
+.panelRecruitment1{
217
+  margin-right: 20rpx;
218
+  font-size:20rpx; 
219
+  font-weight: 400;
220
+}
221
+
222
+.panelRecruitmentTest03{
223
+  font-size:32rpx; 
224
+  font-family: 'Roboto-Black';
225
+}

+ 147 - 0
pages/main/search.js

@@ -0,0 +1,147 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+    ImagePath: app.globalData.uploadImageUrl,
10
+    SchoolSearch:constant.arrSchoolSearch,
11
+    SearchList:[],
12
+    IsFocus:true,
13
+  },
14
+  onLoad: function (options) {
15
+    var that = this;
16
+    that.setData({
17
+      Containnerheight: main.getWindowHeight(),
18
+      IsSearchFinish:false,
19
+      IsSample:true,
20
+    });
21
+    that.getKey();
22
+  },
23
+  bindKeyInput:function(e){
24
+    var that=this;
25
+    var isExist=true;
26
+    if (!e.detail.value)
27
+      isExist=false;
28
+    
29
+    that.setData({
30
+      InputValue:e.detail.value,
31
+      IsSearchFinish:isExist,
32
+    });
33
+    if (e.detail.value)
34
+      that.searchData();
35
+    
36
+  },
37
+  searchKey:function(e){
38
+    var that=this;
39
+    that.setData({
40
+      InputValue:e.currentTarget.dataset.key,
41
+    });
42
+    that.searchData({currentTarget:{dataset:{rowcount:-1}}});
43
+  },
44
+  clearInput:function(){
45
+    var that=this;
46
+    that.setData({
47
+      InputValue:"",
48
+      IsSearchFinish:false,
49
+      IsFocus:true,
50
+      List:[],
51
+    });
52
+  },
53
+  bindConfirm:function(){
54
+    this.searchData({currentTarget:{dataset:{rowcount:-1}}});
55
+  },
56
+  onBlur:function(){
57
+    var that=this;
58
+    that.setData({
59
+      IsFocus:false,
60
+    });
61
+  },
62
+  removeSearchData:function(){
63
+    wx.removeStorageSync('SearchKey');
64
+    this.getKey();
65
+  },
66
+  searchData:function(e){
67
+    var that=this;
68
+    var rowcount=4;
69
+    if (e && e.currentTarget.dataset.rowcount){
70
+      that.getKey();
71
+      rowcount=e.currentTarget.dataset.rowcount;
72
+    }
73
+    var key=that.data.InputValue;
74
+    wx.showLoading({title:"加载中"});
75
+    main.getData("GetMPSSchool?Key="+key+"&RowCount="+rowcount, function (data) {
76
+      if (data) {
77
+        var isSample=true;
78
+        if (rowcount==-1)
79
+          isSample=false;
80
+        that.setData({
81
+          List:data,
82
+          IsSearchFinish:true,
83
+          IsSample:isSample,
84
+        });
85
+      }
86
+      switch(key){
87
+        case "上":
88
+        case "学":
89
+        case "中":
90
+        case "初":
91
+        case "上海":
92
+        case "上海市":
93
+        case "学校":
94
+        case "中学":
95
+        case "初级":
96
+          setTimeout(function(){
97
+            wx.hideLoading();
98
+          },3000);
99
+          break;
100
+        default:
101
+          wx.hideLoading();
102
+          break;
103
+      }
104
+        
105
+    });
106
+  },
107
+  goto: function (e) {
108
+    this.getKey();
109
+    main.goto(e);
110
+  },
111
+  close: function (e) {
112
+    wx.navigateBack({
113
+      delta: 1,
114
+    });
115
+  },
116
+  getKey:function(e){
117
+    var that=this;
118
+    var arr=wx.getStorageSync('SearchKey');
119
+    if (!arr)
120
+      arr=[];
121
+    //去重
122
+    for(var i=0;i<arr.length;i++){
123
+      if (arr[i]==that.data.InputValue){
124
+        arr.splice(i,1);
125
+        break;
126
+      }
127
+    }
128
+    if (that.data.InputValue)
129
+      arr.unshift(that.data.InputValue);
130
+    if (arr.length>10)
131
+      arr.pop();
132
+    that.setData({
133
+      SearchList:arr,
134
+    });
135
+    wx.setStorageSync('SearchKey', arr);
136
+  },
137
+  onShareTimeline: function () {
138
+    return this.onShareAppMessage();
139
+  },
140
+  onShareAppMessage: function () {
141
+    return {
142
+      title: app.globalData.ShareTitle,
143
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
144
+      imageUrl: app.globalData.ShareImage,
145
+    }
146
+  },
147
+})

+ 3 - 0
pages/main/search.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "搜学校"
3
+}

+ 100 - 0
pages/main/search.wxml

@@ -0,0 +1,100 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <view class="panel1 FlexColumn">
3
+    <view class="panelSearch1 FlexRow" >
4
+      <input class="Input" focus="{{IsFocus}}" bindblur="onBlur" confirm-type="search" value="{{InputValue}}"
5
+       placeholder="可输入校名、简称、高中招生代码" placeholder-style="color:#9b9b9b;" bindinput="bindKeyInput" bindconfirm="bindConfirm" />
6
+      <view class="btnCancel" wx:if="{{!InputValue}}"></view>
7
+      <view class="btnCancel FlexColumn" wx:if="{{InputValue}}">
8
+        <view class="circle FlexColumn" bindtap="clearInput">
9
+          <image class="icon_del_02" src="../images/icon_del_02.png"></image>
10
+        </view>
11
+      </view>
12
+      <view class="panelLine3"></view>
13
+      <view class="btnCancel" bindtap="close">取消</view>
14
+    </view>
15
+  </view>
16
+  <view style="height: 150rpx;"></view>
17
+  <block wx:if="{{!IsSearchFinish}}">
18
+    <view class="panel2 FlexColumn">
19
+      <view class="panel21 FlexRow">
20
+        <view>搜索记录</view>
21
+        <image bindtap="removeSearchData" class="universalpic_dustbin_black_24x30" src="../images/universalpic_dustbin_black_24x30.png" ></image>
22
+      </view>
23
+      <view class="panel22 FlexRow">
24
+        <view class="panelSearchItem FlexRow" wx:if="{{SearchList.length>0}}" wx:for="{{SearchList}}" wx:key="index" bindtap="searchKey" data-key="{{item}}">
25
+          <image class="icon_sys_12" src="../images/icon_sys_12.png" ></image>
26
+          <view class="text02">{{item}}</view>
27
+        </view>
28
+        <view class="panelSearchItem FlexRow" wx:if="{{SearchList.length==0}}">
29
+          <view class="text02 text05">无记录</view>
30
+        </view>
31
+        <view style="width: 100%;height:30rpx;"></view>
32
+      </view>
33
+    </view>
34
+  </block>
35
+  <block wx:if="{{IsSearchFinish}}">
36
+    <view class="panelSchoolSample FlexColumn" wx:if="{{List.length>0 && IsSample}}">
37
+      <view style="height:30rpx;"></view>
38
+      <view class="panelSchool FlexColumn" wx:if="{{index<3}}" wx:for="{{List}}" wx:key="index" bindtap="goto" data-url="school?ID={{item.ID}}">
39
+        <view class="panelSchool1 FlexRow">
40
+          <view class="schoolName">{{item.SchoolFullName}}</view>
41
+          <view class="FlexRow">
42
+            <view class="text03">{{item.SchoolType1}}</view>
43
+            <view class="text04" wx:if="{{item.SchoolNumber}}">{{item.SchoolNumber}}</view>
44
+            <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
45
+          </view>
46
+        </view>
47
+        <view class="panelLine"></view>
48
+      </view>
49
+      <view class="panelSchool FlexColumn" wx:if="{{List.length>3}}" bindtap="searchData" data-rowcount="-1">
50
+        <view class="panelSchool1 panelSchool11 FlexRow">
51
+          <view class="schoolName schoolName2">查看更多学校</view>
52
+          <view class="panelFold1 FlexColumn">
53
+            <image class="icon_fold_04" src="../images/icon_fold_03.png"></image>
54
+          </view>
55
+        </view>
56
+        <view class="panelLine"></view>
57
+      </view>
58
+      <view style="height:30rpx;"></view>
59
+    </view>
60
+
61
+    <block wx:if="{{List.length>0 && !IsSample}}">
62
+    <view class="text01">搜索结果</view>
63
+    <view class="panelBasicCss panelSearch2 FlexColumn" >
64
+      <view style="height:30rpx;"></view>
65
+      <view class="panelSchool FlexColumn" wx:for="{{List}}" wx:key="index" bindtap="goto" data-url="school?ID={{item.ID}}">
66
+        <view class="panelSchool1 FlexRow">
67
+          <view class="schoolName">{{item.SchoolFullName}}</view>
68
+          <view class="FlexRow">
69
+            <view class="text03">{{item.SchoolType1}}</view>
70
+            <view class="text04" wx:if="{{item.SchoolNumber}}">{{item.SchoolNumber}}</view>
71
+            <image class="arrowRight" src="../images/icon_nextpage_1.png"></image>
72
+          </view>
73
+        </view>
74
+        <view class="panelLine"></view>
75
+      </view>
76
+      <view style="height:50rpx;"></view>
77
+    </view>
78
+    </block>
79
+
80
+    <block wx:if="{{List.length==0 && !IsSample}}">
81
+      <image class="icon_sys_121" src="../images/icon_sys_12.png"></image>
82
+      <view class="text06">没有内容</view>
83
+      <view class="panelLine4"></view>
84
+      <view class="panel3 FlexColumn" wx:if="{{List.length==0}}">
85
+        <view class="panel21 FlexRow">
86
+          <view>热搜</view>
87
+        </view>
88
+        <view class="panel32 FlexRow">
89
+          <view class="panel321 FlexColumn" wx:for="{{SchoolSearch}}" wx:key="index" bindtap="goto" data-url="school?ID={{item.ID}}">
90
+            <image class="imageSchool" src="{{ImagePath}}/web/_School/{{item.ImageUrl}}" ></image>
91
+            <image class="imageSchool imageSchoolMask" src="../images/mask_01.png" ></image>
92
+            <view class="panel3211">{{item.Name}}</view>
93
+          </view>
94
+        </view>
95
+      </view>
96
+    </block>
97
+  </block>
98
+  
99
+  <view style="height: 100rpx;"></view>
100
+</view>

+ 215 - 0
pages/main/search.wxss

@@ -0,0 +1,215 @@
1
+.panel1{
2
+  width:100%;
3
+  height:150rpx;
4
+  background-color: #f0f0f0;
5
+  position: fixed;
6
+  top:0;
7
+  z-index: 10;
8
+}
9
+
10
+.panelSearch1{
11
+  width:710rpx;
12
+  height:90rpx;
13
+  background-color: #fff;
14
+  border-radius: 20rpx;
15
+  margin-top: 30rpx;
16
+}
17
+
18
+.Input{
19
+  margin: 0 0 0 30rpx;
20
+  width:444rpx;
21
+  font-size:28rpx;
22
+  font-weight: 400;
23
+}
24
+
25
+.circle{
26
+  width:40rpx;
27
+  height:40rpx;
28
+  border-radius: 50%;
29
+  background-color: #e3e3e3;
30
+}
31
+.icon_del_02{
32
+  width:16rpx;
33
+  height:16rpx;
34
+}
35
+
36
+.panelLine3{
37
+  width:2rpx;
38
+  height:50rpx;
39
+  background-color: #d2d2d2;
40
+}
41
+
42
+.btnCancel{
43
+  width:116rpx;
44
+  height:80rpx;
45
+  background-color: #fff;
46
+  color:#EB5C28;
47
+  line-height: 80rpx;
48
+  text-align: center;
49
+  font-size:28rpx;
50
+  border-top-right-radius: 20rpx;
51
+  border-bottom-right-radius: 20rpx;
52
+}
53
+
54
+.panel2{
55
+  width:650rpx;
56
+  margin-top: 30rpx;
57
+  height: 380rpx;
58
+  justify-content: flex-start;
59
+}
60
+
61
+.panel21{
62
+  justify-content: space-between;
63
+  width:100%;
64
+}
65
+
66
+.universalpic_dustbin_black_24x30{
67
+  width:24rpx;
68
+  height:30rpx;
69
+}
70
+
71
+.panel22{
72
+  width:100%;
73
+  border-top:1rpx solid #d2d2d2;
74
+  margin-top: 30rpx;
75
+  flex-wrap: wrap;
76
+  justify-content: flex-start;
77
+  align-items: flex-start;
78
+}
79
+
80
+.panelSearchItem{
81
+  width: 280rpx;
82
+  margin: 30rpx 30rpx 0 0;
83
+  justify-content: flex-start;
84
+}
85
+
86
+.icon_sys_12{
87
+  width:20rpx;
88
+  height:24rpx;
89
+  margin-right: 20rpx;
90
+}
91
+.text02{
92
+  font-size: 28rpx;
93
+  font-weight: 400;
94
+}
95
+.text05{
96
+  min-height:100rpx;
97
+}
98
+
99
+.panel3{
100
+  width:650rpx;
101
+  margin-top: 50rpx;
102
+}
103
+
104
+.panel32{
105
+  width:690rpx;
106
+  margin-top: 40rpx;
107
+  flex-wrap: wrap;
108
+  justify-content: flex-start;
109
+  align-items: flex-start;
110
+}
111
+
112
+.imageSchool{
113
+  width:325rpx;
114
+  height:210rpx;
115
+  border-radius: 10rpx;
116
+  margin: 0 10rpx 20rpx 10rpx;
117
+}
118
+
119
+.imageSchoolMask{
120
+  margin: 0;
121
+  position: absolute;
122
+  top:0;
123
+}
124
+.panel321{
125
+  position: relative;
126
+}
127
+.panel3211{
128
+  position: absolute;
129
+  font-size: 20rpx;
130
+  color:#fff;
131
+  left:30rpx;
132
+  top:162rpx;
133
+  z-index: 10;
134
+}
135
+
136
+.panelSchool{
137
+  width:100%;
138
+}
139
+
140
+.panelSchoolSample{
141
+  width:710rpx;
142
+}
143
+
144
+.panelSchool1{
145
+  width:100%;
146
+  justify-content: space-between;
147
+}
148
+.schoolName{
149
+  margin:30rpx 0 30rpx 30rpx;
150
+  font-size: 28rpx;
151
+  font-weight: 400;
152
+  width: 400rpx;
153
+}
154
+
155
+.schoolName2{
156
+  font-size: 24rpx;
157
+  color:#EB5C28;
158
+  font-weight: 700;
159
+  width:144rpx;
160
+  margin-right: 20rpx;
161
+}
162
+.text03{
163
+  font-size:24rpx;
164
+  color:#787878;
165
+  margin-right: 30rpx;
166
+}
167
+.text04{
168
+  font-size:24rpx;
169
+  color:#989898;
170
+  font-family: 'Roboto-Black';
171
+  margin: 0 30rpx 0 -10rpx;
172
+}
173
+
174
+
175
+.icon_sys_121{
176
+  width:50rpx;
177
+  height:60rpx;
178
+  margin-top: 210rpx;
179
+}
180
+
181
+.text06{
182
+  font-size: 36rpx;
183
+  margin: 30rpx 0 150rpx 0;
184
+}
185
+
186
+.text01{
187
+  font-size:36rpx;
188
+  align-self: start;
189
+  margin: 50rpx 0 0 40rpx;
190
+}
191
+
192
+.panelLine4{
193
+  width:650rpx;
194
+  height:1rpx;
195
+  background-color: #d2d2d2;
196
+}
197
+
198
+.panelSearch2{
199
+  margin-top: 40rpx;
200
+}
201
+.panelSchool11{
202
+  justify-content: flex-start;
203
+}
204
+
205
+.panelFold1{
206
+  width:34rpx;
207
+  height:34rpx;
208
+  background-color: #EB5C28;
209
+  border-radius: 50%;
210
+}
211
+
212
+.icon_fold_04{
213
+  width:18rpx;
214
+  height:10rpx;
215
+}

+ 36 - 0
pages/main/subscribe.js

@@ -0,0 +1,36 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+import constant from '../../utils/constant';
4
+
5
+const app = getApp();
6
+
7
+Page({
8
+  data: {
9
+  },
10
+  onLoad: function (options) {
11
+    var that = this;
12
+    that.setData({
13
+      Containnerheight: main.getWindowHeight(),
14
+    });
15
+  },
16
+  goto: function (e) {
17
+    main.goto(e);
18
+  },
19
+  setSubscribe:function(){
20
+    main.getData("SubscribeMessage?UserID="+app.globalData.userInfo.UserID, function (data) {
21
+      wx.showToast({
22
+        title: '订阅成功',
23
+      });
24
+    });
25
+  },
26
+  onShareTimeline: function () {
27
+    return this.onShareAppMessage();
28
+  },
29
+  onShareAppMessage: function () {
30
+    return {
31
+      title: app.globalData.ShareTitle,
32
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
33
+      imageUrl: app.globalData.ShareImage,
34
+    }
35
+  },
36
+})

+ 3 - 0
pages/main/subscribe.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "自招·中职校"
3
+}

+ 8 - 0
pages/main/subscribe.wxml

@@ -0,0 +1,8 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <image class="icon_sys_11" src="../images/icon_sys_11.png"></image>
3
+  <view class="text01">资料维护中</view>
4
+  <view class="panel1 FlexColumn">
5
+    <view class="text02">完工后可发送小程序通知给您</view>
6
+    <view class="btn" bindtap="setSubscribe">订阅通知</view>
7
+  </view>
8
+</view>

+ 38 - 0
pages/main/subscribe.wxss

@@ -0,0 +1,38 @@
1
+.icon_sys_11{
2
+  width:120rpx;
3
+  height:120rpx;
4
+  margin-top: 200rpx;
5
+}
6
+
7
+.text01{
8
+  font-size: 36rpx;
9
+  margin-top: 30rpx;
10
+}
11
+
12
+.panel1{
13
+  width:600rpx;
14
+  height:350rpx;
15
+  background-color: #fff;
16
+  margin-top: 100rpx;
17
+  border-radius: 20rpx;
18
+  justify-content: flex-start;
19
+}
20
+
21
+.text02{
22
+  font-size: 28rpx;
23
+  font-weight: 400;
24
+  margin-top: 80rpx;
25
+}
26
+
27
+.btn{
28
+  width:360rpx;
29
+  height:110rpx;
30
+  line-height: 110rpx;
31
+  text-align: center;
32
+  border: 3rpx solid #EB5C28;
33
+  margin-top: 40rpx;
34
+  border-radius: 20rpx;
35
+  background-color: #FCE9E3;
36
+  color:#EB5C28;
37
+  font-size: 36rpx;
38
+}

+ 28 - 0
pages/main/webview.js

@@ -0,0 +1,28 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+
9
+  },
10
+  onLoad: function (options) {
11
+    var that = this;
12
+    if (options.url){
13
+      that.setData({
14
+        Url:options.url,
15
+      });
16
+    }
17
+  },
18
+  onShareTimeline: function () {
19
+    return this.onShareAppMessage();
20
+  },
21
+  onShareAppMessage: function () {
22
+    return {
23
+      title: "上海中考招生信息查询工具",
24
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
25
+      imageUrl: app.globalData.ShareImage,
26
+    }
27
+  },
28
+})

+ 3 - 0
pages/main/webview.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 1 - 0
pages/main/webview.wxml

@@ -0,0 +1 @@
1
+<web-view src="{{Url}}"></web-view>

+ 1 - 0
pages/main/webview.wxss

@@ -0,0 +1 @@
1
+/* pages/main/webview.wxss */

+ 191 - 0
pages/template/componentList.wxml

@@ -0,0 +1,191 @@
1
+<template name="componentList">
2
+    <!-- 显示全部表头 -->
3
+    <view class="panelScoreHeader FlexRow" wx:if="{{IsListAll}}">
4
+      <view class="panelScoreHeaderTd1"></view>
5
+      <view class="panelScoreHeaderTd2"><view class="MarginLeft20">计划</view></view>
6
+      <view class="panelScoreHeaderTd3"><view class="MarginLeft20">最低分</view></view>
7
+      <view class="panelScoreHeaderTd4"><view class="MarginLeft30">语数外</view></view>
8
+      <view class="panelScoreHeaderTd5">数学</view>
9
+      <view class="panelScoreHeaderTd5">语文</view>
10
+      <view class="panelScoreHeaderTd5">综合</view>
11
+    </view>
12
+    
13
+    <!-- 显示大字表头 -->
14
+    <view class="panelScoreHeader FlexRow" wx:if="{{!IsListAll}}">
15
+      <view class="panelScoreHeaderTd6"></view>
16
+      <view class="panelScoreHeaderTd7">计划</view>
17
+      <view class="panelScoreHeaderTd8">最低分</view>
18
+    </view>
19
+
20
+    
21
+    <block wx:if="{{!ContrastNull}}">
22
+
23
+      <block wx:for="{{List}}" wx:key="index">
24
+      
25
+        <!-- 名额到校校名,收藏学校 -->
26
+        <block wx:if="{{PageType=='scoreline' && ScoreTypeID==3  && item.IsCollect && item.SchoolOfGraduationTemp!=item.SchoolOfGraduation && ((IsSearch && item.IsSearchResult) || !IsSearch)}}" >
27
+          
28
+          <view class="panelLine"></view>
29
+          
30
+          <view class="panelScoreJuniorCollect FlexRow" bindtap="goto" data-url="school?PageType={{PageType}}&ID={{item.SchoolOfGraduation}}">
31
+            <view class="panelScoreJuniorCollectText">{{item.SchoolFullNameJunior}}</view>
32
+          </view>
33
+        </block>
34
+        <!-- 名额到校校名,普通学校 -->
35
+        <block wx:if="{{PageType=='scoreline' && ScoreTypeID==3 && !item.IsCollect && item.SchoolOfGraduationTemp!=item.SchoolOfGraduation && ((IsSearch && item.IsSearchResult) || !IsSearch)}}" >
36
+          
37
+          <view hidden="{{index>PageCount}}" wx:if="{{index==0}}" class="panelLine"></view>
38
+          
39
+          <view hidden="{{index>PageCount}}" class="panelScoreJunior FlexRow" bindtap="goto" data-url="school?PageType={{PageType}}&ID={{item.SchoolOfGraduation}}">
40
+            <view class="panelScoreJunior1"></view>
41
+            <view class="panelScoreJuniorText">{{item.SchoolFullNameJunior}}</view>
42
+          </view>
43
+        </block>
44
+
45
+        <!-- 名额到校校名,学校主页 -->
46
+        <block wx:if="{{PageType=='school' && ScoreTypeID==3 && SchoolType1=='高中' && item.DistrictNameTemp!=item.DistrictName}}">
47
+          <view class="panelLine" wx:if="{{index==0}}"></view>
48
+          <view class="panelScoreJuniorCollect panelScoreSchoolType FlexRow">
49
+            <view class="panelScoreJuniorCollectText">{{item.DistrictName}}</view>
50
+          </view>
51
+        </block>
52
+        
53
+        <!-- 1-15志愿,学校性质 -->
54
+        <block wx:if="{{PageType=='scoreline' && ScoreTypeID==4 && item.SchoolType2ShortIDTemp!=item.SchoolType2ShortID && !SearchNull}}">
55
+          <view class="panelLine" wx:if="{{index==0}}"></view>
56
+          <view class="panelScoreJuniorCollect panelScoreSchoolType FlexRow" >
57
+            <view class="panelScoreJuniorCollectText" wx:if="{{item.SchoolType2ShortID==1}}">市实验性示范性高中</view>
58
+            <view class="panelScoreJuniorCollectText" wx:if="{{item.SchoolType2ShortID==2}}">市特色普通高中</view>
59
+            <view class="panelScoreJuniorCollectText" wx:if="{{item.SchoolType2ShortID==3}}">区实验性示范性高中</view>
60
+            <view class="panelScoreJuniorCollectText" wx:if="{{item.SchoolType2ShortID==4}}">一般高中</view>
61
+          </view>
62
+        </block>
63
+        
64
+        <!-- 收藏高中 -->
65
+        <block wx:if="{{PageType=='collect' && item.TempID!=item.ID}}" >
66
+          <view class="panelLine" wx:if="{{index==0}}"></view>
67
+        
68
+          <view class="panelScoreJunior panelScoreJunior00 FlexRow" bindtap="goto" data-url="school?PageType={{PageType}}&ID={{item.ID}}">
69
+            <view class="panelScoreJunior0 FlexRow">
70
+              <view class="panelScoreJunior1"></view>
71
+              <view class="panelScoreJuniorText panelScoreJuniorText0">{{item.SchoolFullName}}</view>
72
+            </view>
73
+            <view class="panelScoreJunior2 FlexRow">
74
+              {{item.District}} <block wx:if="{{SchoolType1=='高中'}}">{{item.SchoolType2Short}} <view class="panelLine2" wx:if="{{item.PublicOrPrivate}}"></view> {{item.PublicOrPrivate}}</block>
75
+            </view>
76
+          </view>
77
+        </block>
78
+
79
+        <!-- 自主招生 -->
80
+        <block wx:if="{{item.Name=='自主招生'}}" >
81
+          <view style="height:30rpx;" wx:if="{{item.ID==item.TempID}}"></view>
82
+          <view class="panelRecruitment FlexRow">
83
+            <text class="panelRecruitmentTest01">本校有自主招生计划\n<text class="panelRecruitmentTest02">面向全市招收,本区学生可报</text></text>
84
+            <view class="panelRecruitment1 FlexRow">
85
+              <view class="panelRecruitmentTest03">{{item.PlanNum}}</view>
86
+              <view>(全市总数,不含艺体)</view>
87
+            </view>
88
+          </view>
89
+          <view style="height: 30rpx;"></view>
90
+          <view class="panelLine"></view>
91
+        </block>
92
+
93
+        <!-- 显示全部列表 -->
94
+        <view class="panelScoreItem FlexColumn" hidden="{{index>PageCount}}" 
95
+        wx:if="{{IsListAll && item.IsAccommodation && item.IsPublicOrPrivate && item.IsLocalOrNolocal && item.IsSearchResult && item.Name!='自主招生'}}" 
96
+        bindtap="goto" data-url="school?PageType={{PageType}}&ID={{item.ID}}">
97
+          
98
+          <view class="panelLine" wx:if="{{ScoreTypeID==2 && index==0}}"></view>
99
+          <view class="panelLine" wx:if="{{PageType=='school' && (ScoreTypeID==2 || ScoreTypeID==4) && index==0}}"></view>
100
+
101
+          <view class="panelScoreItem1 FlexRow">
102
+            <view class="panelScoreItem11 FlexColumn">
103
+              <text class="panelScoreText01">{{item.Name}}</text>
104
+              <view class="panelScoreText02" wx:if="{{(ScoreTypeID==2 || ScoreTypeID==4) && item.DistrictName}}">{{item.DistrictName}}</view>
105
+            </view>
106
+            <view class="panelScoreItem12 FlexRow" style="height:{{item.Height}}rpx;">
107
+              <view class="panelScoreItem120 FlexRow">
108
+                <view class="panelScoreNumber01" wx:if="{{item.PlanNum>=0}}">{{item.PlanNum}}</view>
109
+                <view class="panelScoreNumber01Null" wx:if="{{item.PlanNum==-999}}">未知</view>
110
+              </view>
111
+              <view class="panelScoreItem1200 FlexRow">
112
+                <view class="panelScoreNumber01" wx:if="{{item.ScoreTotal}}">{{item.ScoreTotal}}</view>
113
+              </view>
114
+            </view>
115
+            <view class="panelScoreNumber04" wx:if="{{item.Score1}}"><view class="MarginLeft30">{{item.Score1}}</view></view>
116
+            <view class="panelScoreNumber04 panelScoreNumber04Null" wx:if="{{!item.Score1 && item.ScoreTotal}}"><view class="MarginLeft30">未知</view></view>
117
+            <view class="panelScoreNumber05" wx:if="{{item.Score2 && item.ScoreTotal}}">{{item.Score2}}</view>
118
+            <view class="panelScoreNumber05 panelScoreNumber04Null" wx:if="{{!item.Score2 && item.ScoreTotal}}">未知</view>
119
+            <view class="panelScoreNumber05" wx:if="{{item.Score3 && item.ScoreTotal}}">{{item.Score3}}</view>
120
+            <view class="panelScoreNumber05 panelScoreNumber04Null" wx:if="{{!item.Score3 && item.ScoreTotal}}">未知</view>
121
+            <view class="panelScoreNumber05" wx:if="{{item.Score4 && item.ScoreTotal}}">{{item.Score4}}</view>
122
+            <view class="panelScoreNumber05 panelScoreNumber04Null" wx:if="{{!item.Score4 && item.ScoreTotal}}">未知</view>
123
+            
124
+          </view>
125
+        </view>
126
+
127
+        <!-- 显示大字列表 -->
128
+        <view class="panelScoreItem FlexColumn" hidden="{{index>PageCount}}"  wx:if="{{!IsListAll && item.IsAccommodation && item.IsPublicOrPrivate && item.IsLocalOrNolocal && item.IsSearchResult && item.Name!='自主招生'}}"
129
+        bindtap="goto" data-url="school?PageType={{PageType}}&ID={{item.ID}}">
130
+          
131
+          <view class="panelLine" wx:if="{{PageType=='scoreline' && ScoreTypeID==2 && index==0}}"></view>
132
+          <view class="panelLine" wx:if="{{PageType=='school' && (ScoreTypeID==2 || ScoreTypeID==4) && index==0}}"></view>
133
+          
134
+          <view class="panelScoreItem1 FlexRow">
135
+            <view class="panelScoreItem13 FlexColumn">
136
+              <text class="panelScoreText01">{{item.Name}}</text>
137
+              <view class="panelScoreText02" wx:if="{{(ScoreTypeID==2 || ScoreTypeID==4) && item.DistrictName}}">{{item.DistrictName}}</view>
138
+            </view>
139
+            <view class="panelScoreItem14 FlexRow" style="height:{{item.Height}}rpx;">
140
+              <view class="panelScoreNumber06" wx:if="{{item.PlanNum>=0}}">{{item.PlanNum}}</view>
141
+              <view class="panelScoreNumber06Null" wx:if="{{item.PlanNum==-999}}">未知</view>
142
+            
143
+              <view class="panelScoreItem121 FlexRow" wx:if="{{item.PlanNumDifferenceValue!==null}}">
144
+                <image class="icon_up_01" src="../images/icon_up_01.png" wx:if="{{item.PlanNumDifferenceValue>0}}"></image>
145
+                <view class="panelScoreNumber02" wx:if="{{item.PlanNumDifferenceValue>0}}">{{item.PlanNumDifferenceValue}}</view>
146
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item.PlanNumDifferenceValue<0}}"></image>
147
+                <view class="panelScoreNumber03" wx:if="{{item.PlanNumDifferenceValue<0}}">{{-item.PlanNumDifferenceValue}}</view>
148
+                <view class="panelScoreText04" wx:if="{{item.PlanNumDifferenceValue==0}}">平</view>
149
+              </view>
150
+            </view>
151
+            <view class="panelScoreItem15 FlexRow">
152
+              <view class="panelScoreNumber06">{{item.ScoreTotal}}</view>
153
+              <view class="panelScoreItem121 FlexRow" wx:if="{{item.ScoreTotalDifferenceValue!==null}}">
154
+                <image class="icon_up_01" src="../images/icon_up_01.png"  wx:if="{{item.ScoreTotalDifferenceValue>0}}"></image>
155
+                <view class="panelScoreNumber02" wx:if="{{item.ScoreTotalDifferenceValue>0}}">{{item.ScoreTotalDifferenceValue}}</view>
156
+                <image class="icon_up_01" src="../images/icon_down_01.png" wx:if="{{item.ScoreTotalDifferenceValue<0}}"></image>
157
+                <view class="panelScoreNumber03" wx:if="{{item.ScoreTotalDifferenceValue<0}}">{{-item.ScoreTotalDifferenceValue}}</view>
158
+                <view class="panelScoreText04" wx:if="{{item.ScoreTotalDifferenceValue==0}}">平</view>
159
+            </view>
160
+            </view>
161
+          </view>
162
+        </view>
163
+      </block>
164
+
165
+      <view bindtap="onPage" class="panelPage FlexRow" wx:if="{{(List.length>PageCount && PageFilterCount>PageCount) && !SearchNull}}">
166
+        <view class="panelPage1">查看更多</view>
167
+        <view class="panelFold1 FlexColumn">
168
+          <image class="icon_fold_04" src="../images/icon_fold_03.png"></image>
169
+        </view>
170
+      </view>
171
+      
172
+      <view class="panelDataRemark FlexColumn" wx:if="{{List.length>0 && !SearchNull}}">
173
+        <view class="panelDataRemark1">数据表中的特殊情况的说明:</view>
174
+        <text class="panelDataRemark2">未知,表示官网未公布或没能采集到。\n没有最低分(含分科分数),表示该学校在最低投档控制线上无考生录取,故没有分数。</text>
175
+      </view>
176
+
177
+      <block wx:if="{{SearchNull}}">
178
+        <view class="panelLine"></view>
179
+        <image class="icon_sys_121" src="../images/icon_sys_12.png"></image>
180
+        <view class="text02">没有内容</view>
181
+        <view class="text03"></view>
182
+      </block>
183
+    </block>
184
+
185
+    <block wx:if="{{ContrastNull}}">
186
+      <view class="panelLine"></view>
187
+      <image class="icon_sys_121" src="../images/icon_sys_12.png"></image>
188
+      <view class="text02">在本区无计划</view>
189
+      <view class="text03"></view>
190
+    </block>
191
+</template>

+ 4 - 2
project.private.config.json

@@ -2,6 +2,8 @@
2 2
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
3 3
   "projectname": "%E7%A7%92%E8%BF%87%E5%88%86%E6%95%B0%E7%BA%BF",
4 4
   "setting": {
5
-    "compileHotReLoad": true
6
-  }
5
+    "compileHotReLoad": true,
6
+    "urlCheck": true
7
+  },
8
+  "libVersion": "2.30.4"
7 9
 }

+ 577 - 17
utils/constant.js

@@ -1,20 +1,580 @@
1 1
 module.exports = {
2
-  arrDistrict:[
3
-    {ID:"01",Name:"黄浦区",Count:"17"},
4
-    {ID:"02",Name:"徐汇区",Count:"18"},
5
-    {ID:"03",Name:"长宁区",Count:"9"},
6
-    {ID:"04",Name:"静安区",Count:"21"},
7
-    {ID:"05",Name:"普陀区",Count:"13"},
8
-    {ID:"06",Name:"虹口区",Count:"11"},
9
-    {ID:"07",Name:"杨浦区",Count:"14"},
10
-    {ID:"08",Name:"闵行区",Count:"29"},
11
-    {ID:"09",Name:"宝山区",Count:"19"},
12
-    {ID:"10",Name:"嘉定区",Count:"12"},
13
-    {ID:"11",Name:"浦东新区",Count:"55"},
14
-    {ID:"12",Name:"金山区",Count:"10"},
15
-    {ID:"13",Name:"松江区",Count:"13"},
16
-    {ID:"14",Name:"青浦区",Count:"8"},
17
-    {ID:"15",Name:"奉贤区",Count:"9"},
18
-    {ID:"16",Name:"崇明区",Count:"8"},
2
+  arrYear: [{
3
+      Name: "2023",
4
+      CSS: "Selected"
5
+    },
6
+    {
7
+      Name: "2022",
8
+      CSS: ""
9
+    },
10
+  ],
11
+  arrPublicOrPrivate: [{
12
+      Name: "公办",
13
+      CSS: "Selected"
14
+    },
15
+    {
16
+      Name: "民办",
17
+      CSS: "Selected"
18
+    },
19
+  ],
20
+  arrPublicOrPrivate2: [{
21
+      Name: "公办",
22
+      CSS: "Selected"
23
+    },
24
+    {
25
+      Name: "民办",
26
+      CSS: "Selected"
27
+    },
28
+    {
29
+      Name: "中外合作",
30
+      CSS: "Selected"
31
+    },
32
+  ],
33
+  arrLocalOrNolocal: [{
34
+      Name: "全部",
35
+      CSS: "Selected"
36
+    },
37
+    {
38
+      Name: "本区高中",
39
+      CSS: ""
40
+    },
41
+    {
42
+      Name: "外区高中",
43
+      CSS: ""
44
+    },
45
+  ],
46
+  arrSchoolType1: [{
47
+      Name: "高中",
48
+      CSS: "Selected",
49
+      Remark: "对比招生计划"
50
+    },
51
+    {
52
+      Name: "初中",
53
+      CSS: "",
54
+      Remark: "对比名额分配到校"
55
+    },
56
+  ],
57
+  arrScoreType: [{
58
+      Name: "自主招生",
59
+      ID: "1",
60
+      Icon: "icon_sys_04",
61
+      CSS: "Selected"
62
+    },
63
+    {
64
+      Name: "名额到区",
65
+      ID: "2",
66
+      Icon: "icon_sys_06"
67
+    },
68
+    {
69
+      Name: "名额到校",
70
+      ID: "3",
71
+      Icon: "icon_sys_08"
72
+    },
73
+    {
74
+      Name: "1-15志愿",
75
+      ID: "4",
76
+      Icon: "icon_sys_10"
77
+    },
78
+  ],
79
+  arrTailScore: [{
80
+    Name: "显示末位录取考生成绩(分科分数)",
81
+    CSS: ""
82
+  }, ],
83
+  arrAccommodation: [{
84
+      Name: "全部寄宿",
85
+      CSS: "Selected"
86
+    },
87
+    {
88
+      Name: "部分寄宿",
89
+      CSS: "Selected"
90
+    },
91
+    {
92
+      Name: "无寄宿",
93
+      CSS: "Selected"
94
+    },
95
+  ],
96
+  arrSchoolType: [{
97
+      Name: "市重点",
98
+      CSS: "Selected",
99
+      SchoolType1: "高中"
100
+    },
101
+    {
102
+      Name: "区重点",
103
+      CSS: "",
104
+      SchoolType1: "高中"
105
+    },
106
+    {
107
+      Name: "一般高中",
108
+      CSS: "",
109
+      SchoolType1: "高中"
110
+    },
111
+    {
112
+      Name: "初中",
113
+      CSS: "",
114
+      SchoolType1: "初中"
115
+    },
116
+  ],
117
+  arrFeedback: [{
118
+      Name: "纠错",
119
+      CSS: "Selected"
120
+    },
121
+    {
122
+      Name: "提供内容",
123
+      CSS: ""
124
+    },
125
+    {
126
+      Name: "产品建议",
127
+      CSS: ""
128
+    },
129
+  ],
130
+  arrDistrict: [{
131
+      ID: "01",
132
+      Name: "黄浦区",
133
+      Count: "17"
134
+    },
135
+    {
136
+      ID: "02",
137
+      Name: "徐汇区",
138
+      Count: "19"
139
+    },
140
+    {
141
+      ID: "03",
142
+      Name: "长宁区",
143
+      Count: "9"
144
+    },
145
+    {
146
+      ID: "04",
147
+      Name: "静安区",
148
+      Count: "21"
149
+    },
150
+    {
151
+      ID: "05",
152
+      Name: "普陀区",
153
+      Count: "13"
154
+    },
155
+    {
156
+      ID: "06",
157
+      Name: "虹口区",
158
+      Count: "12"
159
+    },
160
+    {
161
+      ID: "07",
162
+      Name: "杨浦区",
163
+      Count: "16"
164
+    },
165
+    {
166
+      ID: "08",
167
+      Name: "闵行区",
168
+      Count: "29"
169
+    },
170
+    {
171
+      ID: "09",
172
+      Name: "宝山区",
173
+      Count: "19"
174
+    },
175
+    {
176
+      ID: "10",
177
+      Name: "嘉定区",
178
+      Count: "12"
179
+    },
180
+    {
181
+      ID: "11",
182
+      Name: "浦东新区",
183
+      Count: "60"
184
+    },
185
+    {
186
+      ID: "12",
187
+      Name: "金山区",
188
+      Count: "10"
189
+    },
190
+    {
191
+      ID: "13",
192
+      Name: "松江区",
193
+      Count: "13"
194
+    },
195
+    {
196
+      ID: "14",
197
+      Name: "青浦区",
198
+      Count: "8"
199
+    },
200
+    {
201
+      ID: "15",
202
+      Name: "奉贤区",
203
+      Count: "9"
204
+    },
205
+    {
206
+      ID: "16",
207
+      Name: "崇明区",
208
+      Count: "8"
209
+    },
210
+  ],
211
+  arrArticleList: [{
212
+      ID: 1,
213
+      Category: "信息整理",
214
+      Logo: "icon_sys_01.png",
215
+      Title: "填报志愿6组常见名词解释",
216
+      TitleShort:"上海中招常见名词解释",
217
+      Content: [{
218
+          Name: "doc_0101.png"
219
+        },
220
+        {
221
+          Name: "doc_0102.png"
222
+        },
223
+        {
224
+          Name: "doc_0103.png",
225
+        },
226
+        {
227
+          Name: "doc_0104.png",
228
+          Fun:"reLaunch",
229
+          Url:"default"
230
+        },
231
+        {
232
+          Name: "doc_0105.png"
233
+        },
234
+        {
235
+          Name: "doc_0106.png",
236
+          Fun:"reLaunch",
237
+          Url:"default"
238
+        },
239
+        {
240
+          Name: "doc_0107.png"
241
+        },
242
+        {
243
+          Name: "doc_0108.png"
244
+        },
245
+        {
246
+          Name: "doc_0109.png"
247
+        },
248
+        {
249
+          Name: "doc_0110.png"
250
+        },
251
+        {
252
+          Name: "doc_0111.png"
253
+        },
254
+        {
255
+          Name: "doc_0112.png"
256
+        },
257
+        {
258
+          Name: "doc_0113.png"
259
+        },
260
+        {
261
+          Name: "doc_0114.png"
262
+        },
263
+        {
264
+          Name: "doc_0115.png"
265
+        }
266
+      ]
267
+    },
268
+    {
269
+      ID: 2,
270
+      Category: "数据图表",
271
+      Logo: "icon_sys_02.png",
272
+      Title: "19所市特色普通高中自主招生情况",
273
+      TitleShort:"上海特色高中自主招生信息",
274
+      TitleImage: "doc_0200.png",
275
+      Content: [{
276
+          Name: "doc_0201.png"
277
+        },
278
+        {
279
+          Name: "doc_0202.png",
280
+          Fun:"showImage",
281
+          Url:"post_0201.png"
282
+        },
283
+        {
284
+          Name: "doc_0203.png",
285
+          Fun:"goto",
286
+          Url:"school?ID=82"
287
+        },
288
+        {
289
+          Name: "doc_0204.png",
290
+          Fun:"goto",
291
+          Url:"school?ID=94"
292
+        },
293
+        {
294
+          Name: "doc_0205.png",
295
+          Fun:"goto",
296
+          Url:"school?ID=100"
297
+        },
298
+        {
299
+          Name: "doc_0206.png",
300
+          Fun:"goto",
301
+          Url:"school?ID=114"
302
+        },
303
+        {
304
+          Name: "doc_0207.png",
305
+          Fun:"goto",
306
+          Url:"school?ID=115"
307
+        },
308
+        {
309
+          Name: "doc_0208.png",
310
+          Fun:"goto",
311
+          Url:"school?ID=116"
312
+        },
313
+        {
314
+          Name: "doc_0209.png",
315
+          Fun:"goto",
316
+          Url:"school?ID=117"
317
+        },
318
+        {
319
+          Name: "doc_0210.png",
320
+          Fun:"goto",
321
+          Url:"school?ID=132"
322
+        },
323
+        {
324
+          Name: "doc_0211.png",
325
+          Fun:"goto",
326
+          Url:"school?ID=143"
327
+        },
328
+        {
329
+          Name: "doc_0212.png",
330
+          Fun:"goto",
331
+          Url:"school?ID=167"
332
+        },
333
+        {
334
+          Name: "doc_0213.png",
335
+          Fun:"goto",
336
+          Url:"school?ID=181"
337
+        },
338
+        {
339
+          Name: "doc_0214.png",
340
+          Fun:"goto",
341
+          Url:"school?ID=192"
342
+        },
343
+        {
344
+          Name: "doc_0215.png",
345
+          Fun:"goto",
346
+          Url:"school?ID=193"
347
+        },
348
+        {
349
+          Name: "doc_0216.png",
350
+          Fun:"goto",
351
+          Url:"school?ID=194"
352
+        },
353
+        {
354
+          Name: "doc_0217.png",
355
+          Fun:"goto",
356
+          Url:"school?ID=239"
357
+        },
358
+        {
359
+          Name: "doc_0218.png",
360
+          Fun:"goto",
361
+          Url:"school?ID=241"
362
+        },
363
+        {
364
+          Name: "doc_0219.png",
365
+          Fun:"goto",
366
+          Url:"school?ID=268"
367
+        },
368
+        {
369
+          Name: "doc_0220.png",
370
+          Fun:"goto",
371
+          Url:"school?ID=91"
372
+        },
373
+        {
374
+          Name: "doc_0221.png",
375
+          Fun:"goto",
376
+          Url:"school?ID=256"
377
+        },
378
+        {
379
+          Name: "doc_0222.png",
380
+          Fun:"goto",
381
+          Url:"search"
382
+        },
383
+        {
384
+          Name: "doc_0223.png"
385
+        },
386
+        {
387
+          Name: "doc_0224.png"
388
+        },
389
+      ]
390
+    },
391
+    {
392
+      ID: 3,
393
+      Category: "数据图表",
394
+      Logo: "icon_sys_02.png",
395
+      Title: "体育“一条龙”市级优秀体育学生招收学校和项目",
396
+      TitleShort:"上海优秀体育生中招信息",
397
+      TitleImage: "doc_0300.png",
398
+      Content: [{
399
+          Name: "doc_0301.png"
400
+        },
401
+        {
402
+          Name: "doc_0302.png"
403
+        },
404
+        {
405
+          Name: "doc_0303.png",
406
+          Fun:"showImage",
407
+          Url:"post_0301.png"
408
+        },
409
+        {
410
+          Name: "doc_0304.png"
411
+        },
412
+        {
413
+          Name: "doc_0305.png"
414
+        }
415
+      ]
416
+    },
417
+    {
418
+      ID: 4,
419
+      Category: "数据图表",
420
+      Logo: "icon_sys_02.png",
421
+      Title: "艺术“一条龙”市级艺术骨干学生招收学校、项目和艺术团汇总",
422
+      TitleShort:"上海艺术骨干生中招信息",
423
+      TitleImage: "doc_0400.png",
424
+      Content: [{
425
+          Name: "doc_0401.png"
426
+        },
427
+        {
428
+          Name: "doc_0402.png"
429
+        },
430
+        {
431
+          Name: "doc_0403.png",
432
+          Fun:"showImage",
433
+          Url:"post_0401.png"
434
+        },
435
+        {
436
+          Name: "doc_0404.png"
437
+        },
438
+        {
439
+          Name: "doc_0405.png",
440
+          Fun:"showImage",
441
+          Url:"post_0402.png"
442
+        }
443
+      ]
444
+    },
445
+    {
446
+      ID: 5,
447
+      Category: "数据图表",
448
+      Logo: "icon_sys_02.png",
449
+      Title: "国际课程班和中外合作办学自主招生计划情况",
450
+      TitleShort:"上海国际班中考招生信息",
451
+      TitleImage: "doc_0500.png",
452
+      Content: [{
453
+          Name: "doc_0501.png"
454
+        },
455
+        {
456
+          Name: "doc_0502.png"
457
+        },
458
+        {
459
+          Name: "doc_0503.png",
460
+          Fun:"showImage",
461
+          Url:"post_0501.png"
462
+        },
463
+        {
464
+          Name: "doc_0504.png"
465
+        },
466
+        {
467
+          Name: "doc_0505.png"
468
+        },
469
+        {
470
+          Name: "doc_0506.png"
471
+        }
472
+      ]
473
+    },
474
+    {
475
+      ID: 6,
476
+      Category: "数据图表",
477
+      Logo: "icon_sys_02.png",
478
+      Title: "中考考试科目和分值设置",
479
+      TitleShort:"上海中考科目和分值设置",
480
+      TitleImage: "doc_0600.png",
481
+      Content: [{
482
+          Name: "doc_0601.png"
483
+        },
484
+        {
485
+          Name: "doc_0602.png",
486
+          Fun:"showImage",
487
+          Url:"post_0601.png"
488
+        },
489
+        {
490
+          Name: "doc_0603.png"
491
+        },
492
+        {
493
+          Name: "doc_0604.png"
494
+        }
495
+      ]
496
+    },
497
+    {
498
+      ID: 7,
499
+      Category: "数据图表",
500
+      Logo: "icon_sys_02.png",
501
+      Title: "政策性照顾加分和同分优待情况",
502
+      TitleShort:"上海中考加分有待信息",
503
+      TitleImage: "doc_0700.png",
504
+      Content: [{
505
+          Name: "doc_0701.png"
506
+        },
507
+        {
508
+          Name: "doc_0702.png"
509
+        },
510
+        {
511
+          Name: "doc_0703.png",
512
+          Fun:"showImage",
513
+          Url:"post_0701.png"
514
+        },
515
+        {
516
+          Name: "doc_0704.png"
517
+        }
518
+      ]
519
+    },
520
+    {
521
+      ID: 8,
522
+      Category: "数据图表",
523
+      Logo: "icon_sys_02.png",
524
+      Title: "查询录取去向官方网站公众号汇总",
525
+      TitleShort:"上海中招信息官方渠道汇总",
526
+      TitleImage: "doc_0800.png",
527
+      Content: [{
528
+          Name: "doc_0801.png"
529
+        },
530
+        {
531
+          Name: "doc_0802.png",
532
+          Fun:"showImage",
533
+          Url:"post_0801.png"
534
+        },
535
+        {
536
+          Name: "doc_0803.png",
537
+          Fun:"showImage",
538
+          Url:"post_0801.png"
539
+        }
540
+      ]
541
+    },
542
+    {
543
+      ID: 9,
544
+      Category: "信息整理",
545
+      Logo: "icon_sys_01.png",
546
+      Title: "招生志愿信息样表",
547
+      TitleShort:"上海中招录取志愿样表",
548
+      Content: [{
549
+          Name: "doc_0901.png"
550
+        },
551
+        {
552
+          Name: "doc_0902.png",
553
+          Fun:"showImage",
554
+          Url:"post_0901.png"
555
+        },
556
+      ]
557
+    },
558
+  ],
559
+  arrSchoolSearch: [{
560
+      Name: "上海市上海中学",
561
+      ImageUrl: "0001_01.jpeg",
562
+      ID: 1
563
+    },
564
+    {
565
+      Name: "上海交通大学附属中学",
566
+      ImageUrl: "0002_01.jpeg",
567
+      ID: 2
568
+    },
569
+    {
570
+      Name: "复旦大学附属中学",
571
+      ImageUrl: "0003_01.jpeg",
572
+      ID: 3
573
+    },
574
+    {
575
+      Name: "华东师范大学第二附属中学",
576
+      ImageUrl: "0004_01.jpeg",
577
+      ID: 4
578
+    },
19 579
   ],
20 580
 }

+ 92 - 0
utils/main.js

@@ -103,9 +103,101 @@ function getWindowHeight() {
103 103
   return height;
104 104
 }
105 105
 
106
+function onSelect(obj,event,callback){
107
+  var result=false;
108
+  var str=event.currentTarget.dataset.object;
109
+  var index=event.currentTarget.dataset.index;
110
+  var clickType=event.currentTarget.dataset.clicktype;
111
+
112
+  if (clickType=="checkbox"){
113
+    if (obj.data[str][index].CSS)
114
+      obj.data[str][index].CSS="";
115
+    else{
116
+      obj.data[str][index].CSS="Selected";
117
+      result=true;
118
+    }
119
+  }
120
+  else{
121
+    for(var i=0;i<obj.data[str].length;i++){
122
+      if (i==index){
123
+        obj.data[str][i].CSS="Selected";
124
+      }
125
+      else{
126
+        obj.data[str][i].CSS="";
127
+      }
128
+    }
129
+  }
130
+  obj.setData(obj.data);
131
+  callback(obj,event,result);
132
+}
133
+
134
+function returnTop() {
135
+  if (wx.canIUse('pageScrollTo')) {
136
+    wx.pageScrollTo({
137
+      scrollTop: 0
138
+    });
139
+  }
140
+}
141
+
142
+function getBaiduToken() {
143
+  var that = this
144
+  //调用登录接口
145
+  wx.login({
146
+    success: function (res0) {
147
+      getData('GetBaiduToken20220922?ProgramID='+app.globalData.ProgramID+'&Code='+res0.code, function (data) {
148
+        if (data) {
149
+          app.globalData.BaiduToken = data;
150
+          //console.log(app.globalData.BaiduToken);
151
+        }
152
+      });
153
+    }
154
+  });
155
+}
156
+
157
+function getCollect(callback) {
158
+  var that = this;
159
+  var list=wx.getStorageSync("CollectList");
160
+  if (list){
161
+    if (callback)
162
+      callback(list);
163
+  }
164
+  else{
165
+    var id=app.globalData.userInfo.UserID;
166
+    getData("GetMPSSchoolCollect?UserID="+id, function (data) {
167
+      if (data) {
168
+        wx.setStorageSync('CollectList', data);
169
+        if (callback)
170
+          callback(data);
171
+      }
172
+      else
173
+        if (callback)
174
+          callback(null);
175
+    });
176
+  }
177
+}
178
+
179
+function goto(e) {
180
+  if (app.globalData.IsGoto){
181
+    app.globalData.IsGoto=false;
182
+    setTimeout(function(){
183
+      app.globalData.IsGoto=true;
184
+    },1000);
185
+    var url = e.currentTarget.dataset.url;
186
+    
187
+    wx.navigateTo({
188
+      url: './' + url,
189
+    });
190
+  }
191
+}
192
+
106 193
 module.exports = {
107 194
   getData: getData,
108 195
   postData: postData,
109 196
   getLocalHost: getLocalHost,
110 197
   getWindowHeight: getWindowHeight,
198
+  onSelect: onSelect,
199
+  returnTop:returnTop,
200
+  getBaiduToken: getBaiduToken,
201
+  getCollect: getCollect,
202
+  goto:goto,
111 203
 }