Showing
4 changed files
with
33 additions
and
21 deletions
@@ -25,9 +25,8 @@ exports.index = (req, res, next) => { | @@ -25,9 +25,8 @@ exports.index = (req, res, next) => { | ||
25 | }; | 25 | }; |
26 | 26 | ||
27 | let params = { | 27 | let params = { |
28 | - uid: req.user.uid, | ||
29 | - shareUid: req.query.uid, | ||
30 | - shareId: 982 // TODO | 28 | + uid: req.user.uid, // 10851797 8050800 req.user.uid |
29 | + shareUid: req.query.uid | ||
31 | } | 30 | } |
32 | 31 | ||
33 | indexModel.index(params).then(result => { | 32 | indexModel.index(params).then(result => { |
@@ -16,15 +16,15 @@ const _studentInfo = (params) => { | @@ -16,15 +16,15 @@ const _studentInfo = (params) => { | ||
16 | return api.get('', { | 16 | return api.get('', { |
17 | method: 'app.passport.profile', | 17 | method: 'app.passport.profile', |
18 | uid: params.shareUid | 18 | uid: params.shareUid |
19 | - },{code: 200}); | 19 | + }, {code: 200}); |
20 | }; | 20 | }; |
21 | 21 | ||
22 | // 判断哪个学校认证的 | 22 | // 判断哪个学校认证的 |
23 | const _getCollege = (params) => { | 23 | const _getCollege = (params) => { |
24 | return api.get('', { | 24 | return api.get('', { |
25 | method: 'app.student.getCollegeByUid', | 25 | method: 'app.student.getCollegeByUid', |
26 | - uid: 8050800 | ||
27 | - },{code: 200}); | 26 | + uid: params.uid |
27 | + }, {code: 200}); | ||
28 | }; | 28 | }; |
29 | 29 | ||
30 | // 获取学生状态 | 30 | // 获取学生状态 |
@@ -33,6 +33,7 @@ const _studentState = (params) => { | @@ -33,6 +33,7 @@ const _studentState = (params) => { | ||
33 | let resu = { | 33 | let resu = { |
34 | studentState: {} | 34 | studentState: {} |
35 | }; | 35 | }; |
36 | + | ||
36 | // 未登录状态 | 37 | // 未登录状态 |
37 | if (!params.uid) { | 38 | if (!params.uid) { |
38 | resu.studentState = { | 39 | resu.studentState = { |
@@ -53,7 +54,7 @@ const _studentState = (params) => { | @@ -53,7 +54,7 @@ const _studentState = (params) => { | ||
53 | return resu; | 54 | return resu; |
54 | }); | 55 | }); |
55 | } else { | 56 | } else { |
56 | - //已登录,为原链接,验证是否已认证 | 57 | + // 已登录,为原链接,验证是否已认证 |
57 | return service.all([ | 58 | return service.all([ |
58 | _getCollege(params) | 59 | _getCollege(params) |
59 | ]).then(result => { | 60 | ]).then(result => { |
@@ -91,11 +92,10 @@ const _schoolTotal = () => { | @@ -91,11 +92,10 @@ const _schoolTotal = () => { | ||
91 | // 获取分享记录 | 92 | // 获取分享记录 |
92 | const _shareLog = (params) => { | 93 | const _shareLog = (params) => { |
93 | 94 | ||
94 | - if (1544) { //TODO | 95 | + if (params.uid) { |
95 | return api.get('', { | 96 | return api.get('', { |
96 | method: 'app.student.getShareLog', | 97 | method: 'app.student.getShareLog', |
97 | - shareUid: 1544, //TODO | ||
98 | - shareId: 982 //TODO | 98 | + shareUid: params.uid |
99 | }); | 99 | }); |
100 | } else { | 100 | } else { |
101 | let resu = '' | 101 | let resu = '' |
@@ -251,8 +251,8 @@ $(document).on('click', '.invite-now', function() { | @@ -251,8 +251,8 @@ $(document).on('click', '.invite-now', function() { | ||
251 | location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; | 251 | location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; |
252 | } else { | 252 | } else { |
253 | if ($('#s-school-tb').val()) { | 253 | if ($('#s-school-tb').val()) { |
254 | - $(".share-bg").show(); | ||
255 | - setTimeout(function () {$('.share-bg').hide();}, 3000); | 254 | + $('.share-bg').show(); |
255 | + setTimeout(function() { $('.share-bg').hide(); }, 3000); | ||
256 | } else { | 256 | } else { |
257 | dialog.showDialog({ | 257 | dialog.showDialog({ |
258 | dialogText: '要先验证学生身份才可以邀请哦', | 258 | dialogText: '要先验证学生身份才可以邀请哦', |
@@ -265,15 +265,16 @@ $(document).on('click', '.invite-now', function() { | @@ -265,15 +265,16 @@ $(document).on('click', '.invite-now', function() { | ||
265 | location.href = './student/register?shareId=' + window.queryString.uid + '&refer=' + location.href; | 265 | location.href = './student/register?shareId=' + window.queryString.uid + '&refer=' + location.href; |
266 | }); | 266 | }); |
267 | } | 267 | } |
268 | + $('.dialog-right-btn').css('color', '#3084bb'); | ||
268 | } | 269 | } |
269 | }); | 270 | }); |
270 | 271 | ||
271 | $( | 272 | $( |
272 | - function () { | ||
273 | - $(".reg-now").on("click", function () { | 273 | + function() { |
274 | + $('.reg-now').on('click', function() { | ||
274 | location.href = './student/register?shareId=' + window.queryString.uid + '&refer=' + location.href; | 275 | location.href = './student/register?shareId=' + window.queryString.uid + '&refer=' + location.href; |
275 | }); | 276 | }); |
276 | - $(".login-btn").on("click", function () { | 277 | + $('.login-btn').on('click', function() { |
277 | location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; | 278 | location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; |
278 | }); | 279 | }); |
279 | 280 | ||
@@ -283,19 +284,28 @@ $( | @@ -283,19 +284,28 @@ $( | ||
283 | case '200': | 284 | case '200': |
284 | tip.show('邀请成功'); | 285 | tip.show('邀请成功'); |
285 | setCookie('promotion', '', { path: '/' }); | 286 | setCookie('promotion', '', { path: '/' }); |
287 | + $('.foot-fixed').hide(); | ||
286 | break; | 288 | break; |
287 | case '500': | 289 | case '500': |
288 | tip.show('邀请失败'); | 290 | tip.show('邀请失败'); |
291 | + setCookie('promotion', '', { path: '/' }); | ||
289 | break; | 292 | break; |
290 | default: ; | 293 | default: ; |
291 | } | 294 | } |
292 | 295 | ||
293 | - $(".checkMySchool").on("click", function () { | ||
294 | - var sTop = $("#university").offset().top; | 296 | + $('.checkMySchool').on('click', function() { |
297 | + var sTop = $('#university').offset().top; | ||
295 | $(window).scrollTop(sTop); | 298 | $(window).scrollTop(sTop); |
296 | }); | 299 | }); |
297 | - $(".share-bg").on("click", function () { | 300 | + |
301 | + $('.share-bg').on('click', function() { | ||
298 | $(this).hide(); | 302 | $(this).hide(); |
299 | - }) | 303 | + }); |
304 | + | ||
305 | + var regSchool = $('#s-school-tb').val(); | ||
306 | + | ||
307 | + if (regSchool) { | ||
308 | + schoolNum(regSchool); | ||
309 | + } | ||
300 | } | 310 | } |
301 | ); | 311 | ); |
@@ -120,9 +120,12 @@ | @@ -120,9 +120,12 @@ | ||
120 | 120 | ||
121 | .student { | 121 | .student { |
122 | padding: 0 30px; | 122 | padding: 0 30px; |
123 | + max-height: 500px; | ||
124 | + overflow-y: scroll; | ||
123 | 125 | ||
124 | .student-item { | 126 | .student-item { |
125 | height: 88px; | 127 | height: 88px; |
128 | + width: 690px; | ||
126 | border-bottom: solid 1px #cfcfcf; | 129 | border-bottom: solid 1px #cfcfcf; |
127 | 130 | ||
128 | &:last-child { | 131 | &:last-child { |
@@ -224,7 +227,7 @@ | @@ -224,7 +227,7 @@ | ||
224 | margin-right: 50px; | 227 | margin-right: 50px; |
225 | overflow: hidden; | 228 | overflow: hidden; |
226 | display: block; | 229 | display: block; |
227 | - text-overflow:ellipsis; | 230 | + text-overflow: ellipsis; |
228 | white-space: nowrap; | 231 | white-space: nowrap; |
229 | } | 232 | } |
230 | 233 | ||
@@ -314,7 +317,7 @@ | @@ -314,7 +317,7 @@ | ||
314 | margin-left: 0; | 317 | margin-left: 0; |
315 | padding: 0 30px; | 318 | padding: 0 30px; |
316 | } | 319 | } |
317 | - | 320 | + |
318 | .s-title { | 321 | .s-title { |
319 | margin-top: -1px; | 322 | margin-top: -1px; |
320 | } | 323 | } |
-
Please register or login to post a comment