Merge branch 'feature/family' into 'gray'
family See merge request !1034
Showing
28 changed files
with
541 additions
and
141 deletions
@@ -7,11 +7,12 @@ exports.familyIndex = (req, res, next) => { | @@ -7,11 +7,12 @@ exports.familyIndex = (req, res, next) => { | ||
7 | let uid = req.user.uid; | 7 | let uid = req.user.uid; |
8 | let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8'; | 8 | let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8'; |
9 | let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222'; | 9 | let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222'; |
10 | + let isMarsApp = req.yoho.isMarsApp; | ||
10 | 11 | ||
11 | - req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo).then(result => { | 12 | + req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp).then(result => { |
12 | res.render('family/index', { | 13 | res.render('family/index', { |
13 | page: 'family', | 14 | page: 'family', |
14 | - title: 'family', | 15 | + title: 'YOHO!Family', |
15 | width750: true, | 16 | width750: true, |
16 | localCss: true, | 17 | localCss: true, |
17 | familyIndexData: result | 18 | familyIndexData: result |
@@ -30,7 +31,7 @@ exports.integralCharts = (req, res, next) => { | @@ -30,7 +31,7 @@ exports.integralCharts = (req, res, next) => { | ||
30 | exports.familyVip = (req, res, next) => { | 31 | exports.familyVip = (req, res, next) => { |
31 | let udid = req.sessionID || 'yoho'; | 32 | let udid = req.sessionID || 'yoho'; |
32 | let uid = req.user.uid; | 33 | let uid = req.user.uid; |
33 | - let yohoApp = req.yoho.isApp && !req.yoho.isMarsApp; | 34 | + let yohoApp = req.yoho.isYohoApp; |
34 | let marsApp = req.yoho.isMarsApp; | 35 | let marsApp = req.yoho.isMarsApp; |
35 | 36 | ||
36 | req.ctx(family).familyVip(udid, uid, yohoApp, marsApp).then(result => { | 37 | req.ctx(family).familyVip(udid, uid, yohoApp, marsApp).then(result => { |
@@ -40,13 +41,13 @@ exports.familyVip = (req, res, next) => { | @@ -40,13 +41,13 @@ exports.familyVip = (req, res, next) => { | ||
40 | 41 | ||
41 | exports.downLoadData = (req, res, next) => { | 42 | exports.downLoadData = (req, res, next) => { |
42 | let codeArr = req.query.codeArr; | 43 | let codeArr = req.query.codeArr; |
43 | - let yohoApp = req.yoho.isApp && !req.yoho.isMarsApp; | 44 | + let isApp = req.yoho.isApp; |
44 | 45 | ||
45 | if (!codeArr) { | 46 | if (!codeArr) { |
46 | return; | 47 | return; |
47 | } | 48 | } |
48 | 49 | ||
49 | - req.ctx(family).downLoadData(codeArr, yohoApp).then(result => { | 50 | + req.ctx(family).downLoadData(codeArr, isApp).then(result => { |
50 | res.json(result); | 51 | res.json(result); |
51 | }).catch(next); | 52 | }).catch(next); |
52 | }; | 53 | }; |
@@ -68,7 +69,7 @@ exports.coinDetail = (req, res) => { | @@ -68,7 +69,7 @@ exports.coinDetail = (req, res) => { | ||
68 | pageHeader: headerModel.setNav({ | 69 | pageHeader: headerModel.setNav({ |
69 | navTitle: '积分明细' | 70 | navTitle: '积分明细' |
70 | }), | 71 | }), |
71 | - title: 'YOHO!积分明细', | 72 | + title: '积分明细', |
72 | width750: true, | 73 | width750: true, |
73 | localCss: true | 74 | localCss: true |
74 | }; | 75 | }; |
@@ -99,14 +100,16 @@ exports.userInfo = (req, res, next) => { | @@ -99,14 +100,16 @@ exports.userInfo = (req, res, next) => { | ||
99 | pageHeader: headerModel.setNav({ | 100 | pageHeader: headerModel.setNav({ |
100 | navTitle: '个人信息' | 101 | navTitle: '个人信息' |
101 | }), | 102 | }), |
102 | - title: 'YOHO!个人信息', | 103 | + title: '个人信息', |
103 | width750: true, | 104 | width750: true, |
104 | localCss: true | 105 | localCss: true |
105 | }; | 106 | }; |
106 | 107 | ||
107 | let params = { | 108 | let params = { |
108 | uid: req.user.uid, | 109 | uid: req.user.uid, |
109 | - isApp: req.yoho.isApp | 110 | + isYohoApp: req.yoho.isYohoApp, |
111 | + isMarsApp: req.yoho.isMarsApp, | ||
112 | + isNowApp: req.yoho.isNowApp | ||
110 | }; | 113 | }; |
111 | 114 | ||
112 | req.ctx(family).userInfo(params).then(result => { | 115 | req.ctx(family).userInfo(params).then(result => { |
@@ -149,7 +152,7 @@ exports.coinMall = (req, res, next) => { | @@ -149,7 +152,7 @@ exports.coinMall = (req, res, next) => { | ||
149 | pageHeader: headerModel.setNav({ | 152 | pageHeader: headerModel.setNav({ |
150 | navTitle: '积分商城' | 153 | navTitle: '积分商城' |
151 | }), | 154 | }), |
152 | - title: 'YOHO!积分商城', | 155 | + title: '积分商城', |
153 | width750: true, | 156 | width750: true, |
154 | localCss: true | 157 | localCss: true |
155 | }; | 158 | }; |
@@ -170,7 +173,10 @@ exports.getList = (req, res, next) => { | @@ -170,7 +173,10 @@ exports.getList = (req, res, next) => { | ||
170 | uid: req.user.uid, | 173 | uid: req.user.uid, |
171 | type: req.query.type, | 174 | type: req.query.type, |
172 | page: req.query.page, | 175 | page: req.query.page, |
173 | - limit: req.query.limit | 176 | + limit: req.query.limit, |
177 | + isMarsApp: req.yoho.isMarsApp, | ||
178 | + isNowApp: req.yoho.isNowApp, | ||
179 | + cityId: req.cookies.app_city_id || 0 | ||
174 | }; | 180 | }; |
175 | 181 | ||
176 | req.ctx(family).getList(params).then((result) => { | 182 | req.ctx(family).getList(params).then((result) => { |
@@ -116,6 +116,11 @@ class familyModel extends global.yoho.BaseModel { | @@ -116,6 +116,11 @@ class familyModel extends global.yoho.BaseModel { | ||
116 | if (val) { | 116 | if (val) { |
117 | val.nickname = key; | 117 | val.nickname = key; |
118 | 118 | ||
119 | + if (key === 'now') { | ||
120 | + val.isNoOpen = true; | ||
121 | + val.name = '敬请期待'; | ||
122 | + } | ||
123 | + | ||
119 | if (val.login === true) { | 124 | if (val.login === true) { |
120 | loginList.push(val); | 125 | loginList.push(val); |
121 | } else { | 126 | } else { |
@@ -345,6 +350,20 @@ class familyModel extends global.yoho.BaseModel { | @@ -345,6 +350,20 @@ class familyModel extends global.yoho.BaseModel { | ||
345 | }); | 350 | }); |
346 | } | 351 | } |
347 | } | 352 | } |
353 | + | ||
354 | + if (val.appName === 'yohobuy') { | ||
355 | + singleData = _.assign(singleData, { | ||
356 | + loadSrc: 'http://union.yoho.cn/union/app-downloads.html?union_type=100000000000349&openby:yohobuy={"action":"go.h5","params":{"url":"http://union.yoho.cn/union/app-downloads.html?union_type=100000000000349"}}' | ||
357 | + }); | ||
358 | + } else if (val.appName === 'mars') { | ||
359 | + singleData = _.assign(singleData, { | ||
360 | + loadSrc: 'http://www.yohomars.com/download/index?action=go.index¶ms:yohomars://yohomars.com/goapp&openby:yohobuy={"action":"go.h5","params":{"url": "http://www.yohomars.com/download/index?action=go.index¶ms:yohomars://yohomars.com/goapp"}}' | ||
361 | + }); | ||
362 | + } else if (val.appName === 'now') { | ||
363 | + singleData = _.assign(singleData, { | ||
364 | + loadSrc: 'http://www.yohogirls.com/download/default/index?act=go.news¶ms=yohoefashion4In1://&openby:yohobuy={"action":"go.h5","params": {"url":"http://www.yohogirls.com/download/default/index?act=go.news¶ms=yohoefashion4In1://"}}' | ||
365 | + }); | ||
366 | + } | ||
348 | }); | 367 | }); |
349 | 368 | ||
350 | return singleData; | 369 | return singleData; |
@@ -388,13 +407,15 @@ class familyModel extends global.yoho.BaseModel { | @@ -388,13 +407,15 @@ class familyModel extends global.yoho.BaseModel { | ||
388 | return b.proportion - a.proportion; | 407 | return b.proportion - a.proportion; |
389 | }); | 408 | }); |
390 | 409 | ||
391 | - chartsData.total = _.get(result.data, 'total', ''); | 410 | + if (_.get(result.data, 'total', 0)) { |
411 | + chartsData.total = parseInt(result.data.total, 10) < 99999 ? result.data.total : '99999+'; | ||
412 | + } | ||
392 | 413 | ||
393 | _.forEach(result.data.data, function(data) { | 414 | _.forEach(result.data.data, function(data) { |
394 | list.push({ | 415 | list.push({ |
395 | value: data.num, | 416 | value: data.num, |
396 | name: data.source, | 417 | name: data.source, |
397 | - percent: parseInt(data.proportion, 10) * 100 + '%', | 418 | + percent: parseFloat(data.proportion).toFixed(2) * 100 + '%', |
398 | color: data.colour, | 419 | color: data.colour, |
399 | plateType: data.type | 420 | plateType: data.type |
400 | }); | 421 | }); |
@@ -412,7 +433,7 @@ class familyModel extends global.yoho.BaseModel { | @@ -412,7 +433,7 @@ class familyModel extends global.yoho.BaseModel { | ||
412 | /** | 433 | /** |
413 | * family主页 | 434 | * family主页 |
414 | */ | 435 | */ |
415 | - familyIndex(uid, contentCodeOne, contentCodeTwo) { | 436 | + familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp) { |
416 | return Promise.all([ | 437 | return Promise.all([ |
417 | this._userData(uid), | 438 | this._userData(uid), |
418 | this._getCode(uid), | 439 | this._getCode(uid), |
@@ -450,6 +471,12 @@ class familyModel extends global.yoho.BaseModel { | @@ -450,6 +471,12 @@ class familyModel extends global.yoho.BaseModel { | ||
450 | familyIndexData.townContent = result[4]; | 471 | familyIndexData.townContent = result[4]; |
451 | } | 472 | } |
452 | 473 | ||
474 | + if (isMarsApp) { | ||
475 | + familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; | ||
476 | + } else { | ||
477 | + familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; | ||
478 | + } | ||
479 | + | ||
453 | return familyIndexData; | 480 | return familyIndexData; |
454 | }); | 481 | }); |
455 | } | 482 | } |
@@ -475,14 +502,14 @@ class familyModel extends global.yoho.BaseModel { | @@ -475,14 +502,14 @@ class familyModel extends global.yoho.BaseModel { | ||
475 | }; | 502 | }; |
476 | let _this = this; | 503 | let _this = this; |
477 | 504 | ||
478 | - if (_.get(result, 'data.coinlist')) { | ||
479 | - _.forEach(result.data.coinlist, function(val) { | 505 | + if (_.get(result, 'data.data')) { |
506 | + _.forEach(result.data.data, function(val) { | ||
480 | Object.assign(val, { | 507 | Object.assign(val, { |
481 | typeName: _this.checkType(val.iconType), | 508 | typeName: _this.checkType(val.iconType), |
482 | minus: parseInt(val.num, 10) < 0 | 509 | minus: parseInt(val.num, 10) < 0 |
483 | }); | 510 | }); |
484 | }); | 511 | }); |
485 | - resu.coinList = result.data.coinlist; | 512 | + resu.coinList = result.data.data; |
486 | } | 513 | } |
487 | 514 | ||
488 | return resu; | 515 | return resu; |
@@ -519,16 +546,16 @@ class familyModel extends global.yoho.BaseModel { | @@ -519,16 +546,16 @@ class familyModel extends global.yoho.BaseModel { | ||
519 | let hideTips = true; | 546 | let hideTips = true; |
520 | 547 | ||
521 | 548 | ||
522 | - result[0].data.gender = (thisGender === '1' ? '男' : '女'); | ||
523 | - result[0].data.otherGender = (thisGender === '1' ? '女' : '男'); | ||
524 | - if (result[0].data.gender === '男') { | 549 | + result[0].data.gender = (thisGender === '1' ? 'BOY' : 'GIRL'); |
550 | + result[0].data.otherGender = (thisGender === '1' ? 'GIRL' : 'BOY'); | ||
551 | + if (result[0].data.gender === 'BOY') { | ||
525 | result[0].data.genderId = 1; | 552 | result[0].data.genderId = 1; |
526 | result[0].data.otherGenderId = 2; | 553 | result[0].data.otherGenderId = 2; |
527 | } else { | 554 | } else { |
528 | result[0].data.genderId = 2; | 555 | result[0].data.genderId = 2; |
529 | result[0].data.otherGenderId = 1; | 556 | result[0].data.otherGenderId = 1; |
530 | } | 557 | } |
531 | - if (params.isApp) { | 558 | + if (params.isYohoApp || params.isNowApp) { |
532 | result[0].data.qrcodeLink = `http://m.yohobuy.com?openby:yohobuy={"action":"go.h5","params":{ | 559 | result[0].data.qrcodeLink = `http://m.yohobuy.com?openby:yohobuy={"action":"go.h5","params":{ |
533 | "url":"http://m.yohobuy.com/home/user/qrcode", | 560 | "url":"http://m.yohobuy.com/home/user/qrcode", |
534 | "param": { | 561 | "param": { |
@@ -544,6 +571,22 @@ class familyModel extends global.yoho.BaseModel { | @@ -544,6 +571,22 @@ class familyModel extends global.yoho.BaseModel { | ||
544 | "hideTips":"${hideTips}" | 571 | "hideTips":"${hideTips}" |
545 | } | 572 | } |
546 | }}`; | 573 | }}`; |
574 | + } else if (params.isMarsApp) { | ||
575 | + result[0].data.qrcodeLink = `http://m.yohobuy.com?openby:mars={"action":"go.h5","params":{ | ||
576 | + "url":"http://m.yohobuy.com/home/user/qrcode", | ||
577 | + "param": { | ||
578 | + "token":"${token}", | ||
579 | + "icon":"${icon}", | ||
580 | + "uname":"${name}", | ||
581 | + "vip":"${vip}" | ||
582 | + } | ||
583 | + }}`; | ||
584 | + result[0].data.trendLink = `http://m.yohobuy.com?openby:mars={"action":"go.h5","params":{ | ||
585 | + "url":"http://m.yohobuy.com/home/tide-command?hideTips=true", | ||
586 | + "param": { | ||
587 | + "hideTips":"${hideTips}" | ||
588 | + } | ||
589 | + }}`; | ||
547 | } else { | 590 | } else { |
548 | result[0].data.qrcodeLink = helpers.urlFormat('/home/user/qrcode', { | 591 | result[0].data.qrcodeLink = helpers.urlFormat('/home/user/qrcode', { |
549 | token: token, | 592 | token: token, |
@@ -613,7 +656,8 @@ class familyModel extends global.yoho.BaseModel { | @@ -613,7 +656,8 @@ class familyModel extends global.yoho.BaseModel { | ||
613 | uid: params.uid, | 656 | uid: params.uid, |
614 | type: params.type, | 657 | type: params.type, |
615 | page: params.page || 1, | 658 | page: params.page || 1, |
616 | - limit: params.limit || 10, | 659 | + limit: params.limit || 20, |
660 | + city_id: params.cityId | ||
617 | }, { | 661 | }, { |
618 | code: 200 | 662 | code: 200 |
619 | }).then(result => { | 663 | }).then(result => { |
@@ -624,33 +668,56 @@ class familyModel extends global.yoho.BaseModel { | @@ -624,33 +668,56 @@ class familyModel extends global.yoho.BaseModel { | ||
624 | if (_.get(result, 'data.list')) { | 668 | if (_.get(result, 'data.list')) { |
625 | resu.list = result.data.list; | 669 | resu.list = result.data.list; |
626 | } | 670 | } |
671 | + | ||
672 | + _.forEach(resu.list, function(val) { | ||
673 | + if (params.isMarsApp && params.type === 'mars') { | ||
674 | + val.usable = true; | ||
675 | + } | ||
676 | + | ||
677 | + if (params.isNowApp && params.type === 'now') { | ||
678 | + val.usable = true; | ||
679 | + } | ||
680 | + | ||
681 | + if (params.type === 'now') { | ||
682 | + val.point = val.point.toString(); | ||
683 | + | ||
684 | + if (parseInt(val.stock, 10) === 0) { | ||
685 | + val.noStore = true; | ||
686 | + } | ||
687 | + val.stock = val.stock.toString(); | ||
688 | + } | ||
689 | + | ||
690 | + if (params.type === 'mars') { | ||
691 | + val.points = val.points.toString(); | ||
692 | + | ||
693 | + if (parseInt(val.num, 10) === 0) { | ||
694 | + val.noStore = true; | ||
695 | + } | ||
696 | + | ||
697 | + if (parseInt(val.exchangeEndTime, 10) !== 0 && parseInt(val.exchangeStartTime, 10) !== 0) { | ||
698 | + if (parseInt(Date.now(), 10) > parseInt(val.exchangeEndTime, 10) || parseInt(Date.now(), 10) < parseInt(val.exchangeStartTime, 10)) { // eslint-disable-line | ||
699 | + val.noStore = true; | ||
700 | + } | ||
701 | + } | ||
702 | + val.num = val.num.toString(); | ||
703 | + } | ||
704 | + }); | ||
705 | + | ||
627 | return resu; | 706 | return resu; |
628 | }); | 707 | }); |
629 | } | 708 | } |
630 | 709 | ||
631 | coinMall(params) { | 710 | coinMall(params) { |
632 | - return family.get('user/getUserCoin', { | 711 | + return family.get('user/getTotalCoin', { |
633 | uid: params.uid | 712 | uid: params.uid |
634 | }, { | 713 | }, { |
635 | code: 200 | 714 | code: 200 |
636 | }).then(result => { | 715 | }).then(result => { |
637 | - let resu = { | ||
638 | - coinNum: {}, | ||
639 | - isMarsApp: params.isMarsApp, | ||
640 | - isNowApp: params.isNowApp | ||
641 | - }; | ||
642 | - | ||
643 | - if (_.get(result, 'data.data')) { | ||
644 | - _.forEach(result.data.data, (val) => { | ||
645 | - let name = this.checkType(parseInt(val.type, 10)); | ||
646 | - | ||
647 | - resu.coinNum[name] = { | ||
648 | - num: val.num, | ||
649 | - source: val.source | ||
650 | - }; | ||
651 | - }); | 716 | + if (result && result.code === 200) { |
717 | + return result.data; | ||
718 | + } else { | ||
719 | + return {}; | ||
652 | } | 720 | } |
653 | - return resu; | ||
654 | }); | 721 | }); |
655 | } | 722 | } |
656 | 723 |
1 | <div class="coin-mall-c"> | 1 | <div class="coin-mall-c"> |
2 | <div class="coin{{#if isNowApp}} now{{/if}}"> | 2 | <div class="coin{{#if isNowApp}} now{{/if}}"> |
3 | - {{#if isNowApp}} | ||
4 | - <span class="coin-pic yohonow"></span> | ||
5 | - {{else if isMarsApp}} | ||
6 | - <span class="coin-pic mars"></span> | ||
7 | - {{else}} | ||
8 | - <span class="coin-pic yohobuy"></span> | ||
9 | - {{/if}} | ||
10 | - <span> | ||
11 | - {{#if isNowApp}} | ||
12 | - {{coinNum/yohonow/num}} | ||
13 | - {{else if isMarsApp}} | ||
14 | - {{coinNum/mars/num}} | ||
15 | - {{else}} | ||
16 | - {{coinNum/yohobuy/num}} | ||
17 | - {{/if}} | ||
18 | - </span> | 3 | + <span>{{coinNum}}</span> |
19 | </div> | 4 | </div> |
20 | <div class="btn-c"> | 5 | <div class="btn-c"> |
21 | {{#if isNowApp}} | 6 | {{#if isNowApp}} |
22 | - <a href='//m.yohobuy.com/service/qaDetail?keyword=有货币&sonId=227&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/service/qaDetail","param":{"keyword":"有货币","sonId":"227"}}}'>如何获取Yoho!Coins</a> | ||
23 | - <a href='//m.yohobuy.com/home/family/coinDetail?plateType=3&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/coinDetail","param":{"plateType":"3"}}}'>Yoho!Coins明细</a> | 7 | + <a class="acquiring-help">如何获取Yoho!Coins</a> |
8 | + <a class="detail">Yoho!Coins明细</a> | ||
24 | {{else if isMarsApp}} | 9 | {{else if isMarsApp}} |
25 | - <a href='//m.yohobuy.com/service/qaDetail?keyword=有货币&sonId=227&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/service/qaDetail","param":{"keyword":"有货币","sonId":"227"}}}'>如何获取mars points</a> | ||
26 | - <a href='//m.yohobuy.com/home/family/coinDetail?plateType=2&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/coinDetail","param":{"plateType":"2"}}}'>mars points明细</a> | 10 | + <a class="acquiring-help">如何获取mars points</a> |
11 | + <a class="detail">mars points明细</a> | ||
27 | {{else}} | 12 | {{else}} |
28 | <a href='//m.yohobuy.com/service/qaDetail?keyword=有货币&sonId=227&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/service/qaDetail","param":{"keyword":"有货币","sonId":"227"}}}'>如何获取有货币</a> | 13 | <a href='//m.yohobuy.com/service/qaDetail?keyword=有货币&sonId=227&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/service/qaDetail","param":{"keyword":"有货币","sonId":"227"}}}'>如何获取有货币</a> |
29 | <a href='//m.yohobuy.com/home/family/coinDetail?plateType=1&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/coinDetail","param":{"plateType":"1"}}}'>有货币明细</a> | 14 | <a href='//m.yohobuy.com/home/family/coinDetail?plateType=1&openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/coinDetail","param":{"plateType":"1"}}}'>有货币明细</a> |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <span class="headings"></span> | 6 | <span class="headings"></span> |
7 | </div> | 7 | </div> |
8 | <div class="person-detail"> | 8 | <div class="person-detail"> |
9 | - <a href='http://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}' class="user-avatar" data-avatar="{{image head_ico 80 80}}"></a> | 9 | + <a href='{{userInfoLink}}' class="user-avatar" data-avatar="{{image head_ico 80 80}}"></a> |
10 | <div class="basic-info"> | 10 | <div class="basic-info"> |
11 | <span class="user-name">{{nickname}}</span> | 11 | <span class="user-name">{{nickname}}</span> |
12 | <span class="gender {{#isEqualOr gender 1}}boy{{/isEqualOr}}{{#isEqualOr gender 2}}girl{{/isEqualOr}}"></span> | 12 | <span class="gender {{#isEqualOr gender 1}}boy{{/isEqualOr}}{{#isEqualOr gender 2}}girl{{/isEqualOr}}"></span> |
@@ -23,14 +23,14 @@ | @@ -23,14 +23,14 @@ | ||
23 | <span class="trend-word">{{trendWord}}</span> | 23 | <span class="trend-word">{{trendWord}}</span> |
24 | </span> | 24 | </span> |
25 | # | 25 | # |
26 | - {{else}} | 26 | + {{else if inviteCode}} |
27 | {{inviteCode}} | 27 | {{inviteCode}} |
28 | + {{else}} | ||
29 | + 玩转潮流口令 | ||
28 | {{/if}} | 30 | {{/if}} |
29 | </span> | 31 | </span> |
30 | <span class="code-set"></span> | 32 | <span class="code-set"></span> |
31 | - {{#unless trendWord}} | ||
32 | <span class="code-tip"></span> | 33 | <span class="code-tip"></span> |
33 | - {{/unless}} | ||
34 | </div> | 34 | </div> |
35 | <div class="inviton-set hide"> | 35 | <div class="inviton-set hide"> |
36 | <textarea maxlength="15" placeholder="请输入你的潮流口令"></textarea> | 36 | <textarea maxlength="15" placeholder="请输入你的潮流口令"></textarea> |
@@ -41,8 +41,8 @@ | @@ -41,8 +41,8 @@ | ||
41 | <div class="title">会员等级及权益</div> | 41 | <div class="title">会员等级及权益</div> |
42 | <div class="grade-content"> | 42 | <div class="grade-content"> |
43 | {{# appList}} | 43 | {{# appList}} |
44 | - <div class="content-item" data-login="{{login}}" data-name="{{nickname}}" data-code="{{code}}"> | ||
45 | - <img class="item-tag" src="{{image iconUrl 140 140}}"> | 44 | + <div class="content-item" data-login="{{login}}" data-name="{{nickname}}" data-code="{{code}}" {{#if isNoOpen}}data-noopen="{{isNoOpen}}"{{/if}}> |
45 | + <img class="item-tag {{#unless login}}gray{{/unless}}" src="{{image iconUrl 140 140}}"> | ||
46 | <span class="name">{{sourceName}}</span> | 46 | <span class="name">{{sourceName}}</span> |
47 | <span class="level">{{name}}</span> | 47 | <span class="level">{{name}}</span> |
48 | </div> | 48 | </div> |
@@ -2,12 +2,14 @@ | @@ -2,12 +2,14 @@ | ||
2 | <div class="info-list"> | 2 | <div class="info-list"> |
3 | <div class="list-item user-pic"> | 3 | <div class="list-item user-pic"> |
4 | <div class="title">头像</div> | 4 | <div class="title">头像</div> |
5 | - <div class="main"> | 5 | + <div class="main" {{#unlessor isYohoApp isMarsApp}}style="padding-right: 0rem"{{/unlessor}}> |
6 | <div class="pic user-avatar" data-avatar="{{image headIco 100 100}}"></div> | 6 | <div class="pic user-avatar" data-avatar="{{image headIco 100 100}}"></div> |
7 | </div> | 7 | </div> |
8 | + {{#ifor isYohoApp isMarsApp}} | ||
8 | <div class="arr"> | 9 | <div class="arr"> |
9 | <span class="iconfont"></span> | 10 | <span class="iconfont"></span> |
10 | </div> | 11 | </div> |
12 | + {{/ifor}} | ||
11 | </div> | 13 | </div> |
12 | <div class="list-item"> | 14 | <div class="list-item"> |
13 | <div class="title">昵称</div> | 15 | <div class="title">昵称</div> |
@@ -76,7 +78,7 @@ | @@ -76,7 +78,7 @@ | ||
76 | <div class="title">身高</div> | 78 | <div class="title">身高</div> |
77 | <div class="main"> | 79 | <div class="main"> |
78 | <label>cm</label> | 80 | <label>cm</label> |
79 | - <input class="inp inp-2 height modify" type="number" value="{{height}}" /> | 81 | + <input class="inp inp-2 height modify bottom-out" type="number" value="{{height}}" /> |
80 | </div> | 82 | </div> |
81 | <div class="arr"> | 83 | <div class="arr"> |
82 | <span class="iconfont"></span> | 84 | <span class="iconfont"></span> |
@@ -86,7 +88,7 @@ | @@ -86,7 +88,7 @@ | ||
86 | <div class="title">体重</div> | 88 | <div class="title">体重</div> |
87 | <div class="main"> | 89 | <div class="main"> |
88 | <label>kg</label> | 90 | <label>kg</label> |
89 | - <input class="inp inp-2 weight modify" type="number" value="{{weight}}" /> | 91 | + <input class="inp inp-2 weight modify bottom-out" type="number" value="{{weight}}" /> |
90 | </div> | 92 | </div> |
91 | <div class="arr"> | 93 | <div class="arr"> |
92 | <span class="iconfont"></span> | 94 | <span class="iconfont"></span> |
@@ -9,13 +9,13 @@ | @@ -9,13 +9,13 @@ | ||
9 | {{else}} | 9 | {{else}} |
10 | <div class="banner-center banner-center-swiper"> | 10 | <div class="banner-center banner-center-swiper"> |
11 | <ul class="banner-list swiper-wrapper clearfix"> | 11 | <ul class="banner-list swiper-wrapper clearfix"> |
12 | - {{#data.list}} | 12 | + {{#data}} |
13 | <li class="swiper-slide"> | 13 | <li class="swiper-slide"> |
14 | <a href="{{url}}" id="{{../template_id}}' name="{{../template_intro}}"> | 14 | <a href="{{url}}" id="{{../template_id}}' name="{{../template_intro}}"> |
15 | <img src="{{image2 src w=750 h=290 q=60 mode=3}}" alt=""> | 15 | <img src="{{image2 src w=750 h=290 q=60 mode=3}}" alt=""> |
16 | </a> | 16 | </a> |
17 | </li> | 17 | </li> |
18 | - {{/data.list}} | 18 | + {{/data}} |
19 | </ul> | 19 | </ul> |
20 | <div class="swiper-pagination" {{#unless singleOne}}style="display:block"{{/unless}}> | 20 | <div class="swiper-pagination" {{#unless singleOne}}style="display:block"{{/unless}}> |
21 | <div class="pagination-inner"> | 21 | <div class="pagination-inner"> |
@@ -11,8 +11,8 @@ const isProduction = process.env.NODE_ENV === 'production'; | @@ -11,8 +11,8 @@ const isProduction = process.env.NODE_ENV === 'production'; | ||
11 | const isTest = process.env.NODE_ENV === 'test'; | 11 | const isTest = process.env.NODE_ENV === 'test'; |
12 | 12 | ||
13 | const domains = { | 13 | const domains = { |
14 | - api: 'http://api.yoho.yohoops.org/', | ||
15 | - service: 'http://service.yoho.yohoops.org/', | 14 | + api: 'http://api-test3.yohops.com:9999/', |
15 | + service: 'http://service-test3.yohops.com:9999/', | ||
16 | liveApi: 'http://testapi.live.yohops.com:9999/', | 16 | liveApi: 'http://testapi.live.yohops.com:9999/', |
17 | singleApi: 'http://api-test3.yohops.com:9999/', | 17 | singleApi: 'http://api-test3.yohops.com:9999/', |
18 | imSocket: 'ws://socket.yohobuy.com:10240', | 18 | imSocket: 'ws://socket.yohobuy.com:10240', |
@@ -57,8 +57,10 @@ module.exports = () => { | @@ -57,8 +57,10 @@ module.exports = () => { | ||
57 | // 判断请求是否来自app | 57 | // 判断请求是否来自app |
58 | yoho.isNowApp = /yohonow/i.test(req.get('User-Agent') || ''); | 58 | yoho.isNowApp = /yohonow/i.test(req.get('User-Agent') || ''); |
59 | yoho.isMarsApp = /yohomars/i.test(req.get('User-Agent') || ''); | 59 | yoho.isMarsApp = /yohomars/i.test(req.get('User-Agent') || ''); |
60 | + yoho.isYohoApp = /YohoBuy/i.test(req.get('User-Agent') || ''); | ||
60 | yoho.isApp = yoho.isMarsApp || | 61 | yoho.isApp = yoho.isMarsApp || |
61 | req.cookies.app_version || | 62 | req.cookies.app_version || |
63 | + yoho.isNowApp || | ||
62 | /YohoBuy/i.test(req.get('User-Agent') || '') || | 64 | /YohoBuy/i.test(req.get('User-Agent') || '') || |
63 | (req.query.app_version && req.query.app_version !== 'false') || | 65 | (req.query.app_version && req.query.app_version !== 'false') || |
64 | (req.query.appVersion && req.query.appVersion !== 'false'); | 66 | (req.query.appVersion && req.query.appVersion !== 'false'); |
@@ -50,7 +50,7 @@ module.exports = () => { | @@ -50,7 +50,7 @@ module.exports = () => { | ||
50 | return _.parseInt(req.cookies.app_uid); | 50 | return _.parseInt(req.cookies.app_uid); |
51 | }, | 51 | }, |
52 | sessionKey: req.cookies.app_session_key, | 52 | sessionKey: req.cookies.app_session_key, |
53 | - appVersion: req.query.app_version || req.cookies.app_version || config.appVersion, | 53 | + appVersion: req.cookies.app_version || req.query.app_version || config.appVersion, |
54 | appSessionType: req.cookies.app_client_type | 54 | appSessionType: req.cookies.app_client_type |
55 | }; | 55 | }; |
56 | } | 56 | } |
@@ -67,7 +67,7 @@ module.exports = () => { | @@ -67,7 +67,7 @@ module.exports = () => { | ||
67 | ) | 67 | ) |
68 | ) { | 68 | ) { |
69 | let appUid = req.query.uid || req.cookies.app_uid; | 69 | let appUid = req.query.uid || req.cookies.app_uid; |
70 | - let appVersion = req.query.app_version || req.cookies.app_version || config.appVersion; | 70 | + let appVersion = req.cookies.app_version || req.query.app_version || config.appVersion; |
71 | let appSessionType = req.query.client_type || req.cookies.app_client_type; | 71 | let appSessionType = req.query.client_type || req.cookies.app_client_type; |
72 | 72 | ||
73 | if (req.query.app_version && req.query.client_type) { | 73 | if (req.query.app_version && req.query.client_type) { |
@@ -7,8 +7,6 @@ | @@ -7,8 +7,6 @@ | ||
7 | {{else}} | 7 | {{else}} |
8 | <img class="lazy" data-original="{{image2 headPic mode=2 w=750 h=320 q=60}}" /> | 8 | <img class="lazy" data-original="{{image2 headPic mode=2 w=750 h=320 q=60}}" /> |
9 | {{/if}} | 9 | {{/if}} |
10 | - <div class="bg"></div> | ||
11 | - <div class="title">有效期:10.11~10.21</div> | ||
12 | {{#if level}} | 10 | {{#if level}} |
13 | <div class="level">Lv.{{level}}可兑换</div> | 11 | <div class="level">Lv.{{level}}可兑换</div> |
14 | {{/if}} | 12 | {{/if}} |
@@ -25,8 +23,7 @@ | @@ -25,8 +23,7 @@ | ||
25 | <div class="remain">仅剩{{#if stock}}{{stock}}{{/if}}{{#if num}}{{num}}{{/if}}份</div> | 23 | <div class="remain">仅剩{{#if stock}}{{stock}}{{/if}}{{#if num}}{{num}}{{/if}}份</div> |
26 | </div> | 24 | </div> |
27 | <div class="right"> | 25 | <div class="right"> |
28 | - <a class="go-btn yohonow" href="yohoefashion4In1://yoho.cn/">兑换</a> | ||
29 | - <a class="go-btn mars" href="yohomars://yohomars.com/goapp?openby:mars=">兑换</a> | 26 | + <span class="go-btn{{#if usable}} usable{{/if}}{{#if noStore}} no-store{{/if}}" data-id="{{id}}" data-level="{{level}}" data-point="{{#if points}}{{points}}{{/if}}{{#if point}}{{point}}{{/if}}" data-type="{{type}}">兑换</span> |
30 | </div> | 27 | </div> |
31 | </div> | 28 | </div> |
32 | </div> | 29 | </div> |
@@ -9,7 +9,11 @@ | @@ -9,7 +9,11 @@ | ||
9 | {{/imgList}} | 9 | {{/imgList}} |
10 | 10 | ||
11 | {{#if winXinCode}} | 11 | {{#if winXinCode}} |
12 | - <a class="code-copy" href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{winXinCode}}","message":"复制成功"}}'>复制</a> | 12 | + <span class="code-copy" data-text="{{winXinCode}}">复制</span> |
13 | + {{/if}} | ||
14 | + | ||
15 | + {{#if loadSrc}} | ||
16 | + <a class="load-src" href="{{loadSrc}}"></a> | ||
13 | {{/if}} | 17 | {{/if}} |
14 | </div> | 18 | </div> |
15 | {{/ downLoadData}} | 19 | {{/ downLoadData}} |
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | <span class="item-name">{{name}}</span> | 8 | <span class="item-name">{{name}}</span> |
9 | <span class="item-color" style="background-color: {{color}}"></span> | 9 | <span class="item-color" style="background-color: {{color}}"></span> |
10 | <span class="item-val">{{value}}</span> | 10 | <span class="item-val">{{value}}</span> |
11 | - <span class="item-percent">{{percent}}</span> | ||
12 | </div> | 11 | </div> |
13 | {{/list}} | 12 | {{/list}} |
14 | <div class="instruction"> | 13 | <div class="instruction"> |
public/img/home/family/family-03.png
0 → 100644

156 KB
public/img/home/family/family-04.png
0 → 100644

187 KB
@@ -3,6 +3,7 @@ import $ from 'yoho-jquery'; | @@ -3,6 +3,7 @@ import $ from 'yoho-jquery'; | ||
3 | import Page from 'yoho-page'; | 3 | import Page from 'yoho-page'; |
4 | import tip from 'plugin/tip'; | 4 | import tip from 'plugin/tip'; |
5 | import resultRender from 'home/coin-list.hbs'; | 5 | import resultRender from 'home/coin-list.hbs'; |
6 | +import yoho from 'yoho-app'; | ||
6 | 7 | ||
7 | class ScoreDetail extends Page { | 8 | class ScoreDetail extends Page { |
8 | constructor() { | 9 | constructor() { |
@@ -42,6 +43,12 @@ class ScoreDetail extends Page { | @@ -42,6 +43,12 @@ class ScoreDetail extends Page { | ||
42 | this.chosenData(); | 43 | this.chosenData(); |
43 | this.scroll(); | 44 | this.scroll(); |
44 | this.defaultTab(); | 45 | this.defaultTab(); |
46 | + | ||
47 | + if (yoho && yoho.isMarsApp) { | ||
48 | + yoho.ready(() => { | ||
49 | + yoho.invokeMethod('set.removeTopRightButton'); | ||
50 | + }); | ||
51 | + } | ||
45 | } | 52 | } |
46 | 53 | ||
47 | defaultTab() { | 54 | defaultTab() { |
@@ -4,6 +4,7 @@ import Page from 'yoho-page'; | @@ -4,6 +4,7 @@ import Page from 'yoho-page'; | ||
4 | import tip from 'plugin/tip'; | 4 | import tip from 'plugin/tip'; |
5 | import tabRender from 'home/coin-get-list.hbs'; | 5 | import tabRender from 'home/coin-get-list.hbs'; |
6 | import lazyLoad from 'yoho-jquery-lazyload'; | 6 | import lazyLoad from 'yoho-jquery-lazyload'; |
7 | +import yoho from 'yoho-app'; | ||
7 | 8 | ||
8 | class IconMall extends Page { | 9 | class IconMall extends Page { |
9 | constructor() { | 10 | constructor() { |
@@ -15,7 +16,9 @@ class IconMall extends Page { | @@ -15,7 +16,9 @@ class IconMall extends Page { | ||
15 | $coinMallC: $('.coin-mall-c'), | 16 | $coinMallC: $('.coin-mall-c'), |
16 | $tabFixed: $('.tab-fixed'), | 17 | $tabFixed: $('.tab-fixed'), |
17 | $yohonowTab: $('#yohonow-tab'), | 18 | $yohonowTab: $('#yohonow-tab'), |
18 | - $marsTab: $('#mars-tab') | 19 | + $marsTab: $('#mars-tab'), |
20 | + $acquiringHelp: $('.acquiring-help'), | ||
21 | + $detail: $('.detail') | ||
19 | }; | 22 | }; |
20 | 23 | ||
21 | this.view = { | 24 | this.view = { |
@@ -28,6 +31,7 @@ class IconMall extends Page { | @@ -28,6 +31,7 @@ class IconMall extends Page { | ||
28 | this.loading = false; | 31 | this.loading = false; |
29 | this.end = false; | 32 | this.end = false; |
30 | this.fixTop = this.selector.$tabFixed.offset().top; | 33 | this.fixTop = this.selector.$tabFixed.offset().top; |
34 | + this.beforeScroll = $(window).scrollTop(); | ||
31 | 35 | ||
32 | this.init(); | 36 | this.init(); |
33 | } | 37 | } |
@@ -37,10 +41,27 @@ class IconMall extends Page { | @@ -37,10 +41,27 @@ class IconMall extends Page { | ||
37 | this.defaultChosen(); | 41 | this.defaultChosen(); |
38 | this.scroll(); | 42 | this.scroll(); |
39 | this.getList(); | 43 | this.getList(); |
44 | + this.refreshUserInfo(); | ||
45 | + | ||
46 | + if (yoho && yoho.isMarsApp) { | ||
47 | + yoho.ready(() => { | ||
48 | + yoho.invokeMethod('set.removeTopRightButton'); | ||
49 | + }); | ||
50 | + } | ||
51 | + } | ||
52 | + | ||
53 | + refreshUserInfo() { | ||
54 | + | ||
55 | + // 提供给app更改完个人信息之后刷新 | ||
56 | + yoho.ready(function() { | ||
57 | + yoho.addNativeMethod('refreshUserInfomation', function() { | ||
58 | + location.href = location.href; | ||
59 | + }); | ||
60 | + }); | ||
40 | } | 61 | } |
41 | 62 | ||
42 | scrollHandler() { | 63 | scrollHandler() { |
43 | - if (($(window).scrollTop() + $(window).height() >= $(document).height() * 0.8)) { | 64 | + if (($(window).scrollTop() + $(window).height() >= $(document).height() * 0.3)) { |
44 | this.doMore(); | 65 | this.doMore(); |
45 | } | 66 | } |
46 | } | 67 | } |
@@ -54,11 +75,20 @@ class IconMall extends Page { | @@ -54,11 +75,20 @@ class IconMall extends Page { | ||
54 | 75 | ||
55 | getList() { | 76 | getList() { |
56 | this.loading = true; | 77 | this.loading = true; |
78 | + if (this.type === 'now') { | ||
79 | + this.selector.$yohonowTab.append('<p class="show-more">加载中...</p>'); | ||
80 | + } | ||
81 | + if (this.type === 'mars') { | ||
82 | + this.selector.$marsTab.append('<p class="show-more">加载中...</p>'); | ||
83 | + } | ||
57 | this.ajax({ | 84 | this.ajax({ |
58 | url: '/home/family/coinMall/getList', | 85 | url: '/home/family/coinMall/getList', |
59 | data: { | 86 | data: { |
60 | type: this.type, | 87 | type: this.type, |
61 | page: this.page | 88 | page: this.page |
89 | + }, | ||
90 | + complete: function() { | ||
91 | + $('.show-more').remove(); | ||
62 | } | 92 | } |
63 | }).then(result => { | 93 | }).then(result => { |
64 | if (result && result.list.length > 0) { | 94 | if (result && result.list.length > 0) { |
@@ -70,11 +100,18 @@ class IconMall extends Page { | @@ -70,11 +100,18 @@ class IconMall extends Page { | ||
70 | if (this.type === 'mars') { | 100 | if (this.type === 'mars') { |
71 | this.selector.$marsTab.append($result); | 101 | this.selector.$marsTab.append($result); |
72 | } | 102 | } |
103 | + | ||
73 | this.loading = false; | 104 | this.loading = false; |
105 | + | ||
74 | lazyLoad($result.find('img.lazy')); | 106 | lazyLoad($result.find('img.lazy')); |
75 | } else { | 107 | } else { |
108 | + if (this.type === 'now') { | ||
109 | + this.selector.$yohonowTab.append('<p class="no-more">没有更多了...</p>'); | ||
110 | + } | ||
111 | + if (this.type === 'mars') { | ||
112 | + this.selector.$marsTab.append('<p class="no-more">没有更多了...</p>'); | ||
113 | + } | ||
76 | this.end = true; | 114 | this.end = true; |
77 | - tip.show('没有更多数据了~~~'); | ||
78 | } | 115 | } |
79 | }).catch(error => { | 116 | }).catch(error => { |
80 | console.error(error); | 117 | console.error(error); |
@@ -83,22 +120,35 @@ class IconMall extends Page { | @@ -83,22 +120,35 @@ class IconMall extends Page { | ||
83 | 120 | ||
84 | scroll() { | 121 | scroll() { |
85 | $(window).scroll(() => { | 122 | $(window).scroll(() => { |
86 | - let $scrollTop = $(window).scrollTop(); | ||
87 | - | ||
88 | - if ($scrollTop >= this.fixTop) { | ||
89 | - this.selector.$tabFixed.find('.tab').addClass('fixed'); | ||
90 | - } else { | ||
91 | - this.selector.$tabFixed.find('.tab').removeClass('fixed'); | ||
92 | - } | ||
93 | - | ||
94 | - $(window).scroll(() => { | ||
95 | - window.requestAnimationFrame(this.scrollHandler.bind(this)); | ||
96 | - }); | 123 | + setTimeout(() => { |
124 | + let afterScroll = $(window).scrollTop(); | ||
125 | + | ||
126 | + if (afterScroll - this.beforeScroll > 0) { | ||
127 | + window.requestAnimationFrame(this.scrollHandler.bind(this)); | ||
128 | + this.beforeScroll = afterScroll; | ||
129 | + } else { | ||
130 | + return false; | ||
131 | + } | ||
132 | + }, 5); | ||
97 | }); | 133 | }); |
98 | } | 134 | } |
99 | 135 | ||
100 | bindEvents() { | 136 | bindEvents() { |
101 | this.selector.$tabItem.on('click', this.tabItem.bind(this)); | 137 | this.selector.$tabItem.on('click', this.tabItem.bind(this)); |
138 | + this.selector.$acquiringHelp.on('click', this.openHelp.bind(this)); | ||
139 | + this.selector.$detail.on('click', this.openDetail.bind(this)); | ||
140 | + $(window).on('scroll touchmove touchstart touchend', this.move.bind(this)); | ||
141 | + $(document).on('click', '.go-btn', this.goConversion.bind(this)); | ||
142 | + } | ||
143 | + | ||
144 | + move() { | ||
145 | + let $scrollTop = $(window).scrollTop(); | ||
146 | + | ||
147 | + if ($scrollTop >= this.fixTop) { | ||
148 | + this.selector.$tabFixed.find('.tab').addClass('fixed'); | ||
149 | + } else { | ||
150 | + this.selector.$tabFixed.find('.tab').removeClass('fixed'); | ||
151 | + } | ||
102 | } | 152 | } |
103 | 153 | ||
104 | defaultChosen() { | 154 | defaultChosen() { |
@@ -125,8 +175,55 @@ class IconMall extends Page { | @@ -125,8 +175,55 @@ class IconMall extends Page { | ||
125 | this.type = 'mars'; | 175 | this.type = 'mars'; |
126 | } | 176 | } |
127 | this.page = 1; | 177 | this.page = 1; |
178 | + this.beforeScroll = 0; | ||
128 | this.getList(); | 179 | this.getList(); |
129 | } | 180 | } |
181 | + | ||
182 | + openHelp() { | ||
183 | + if (yoho && yoho.isNowApp) { | ||
184 | + yoho.invokeMethod('go.coins_help'); | ||
185 | + } else if (yoho && yoho.isMarsApp) { | ||
186 | + yoho.invokeMethod('go.point_help'); | ||
187 | + } | ||
188 | + } | ||
189 | + | ||
190 | + openDetail() { | ||
191 | + yoho.ready(() => { | ||
192 | + if (yoho && yoho.isNowApp) { | ||
193 | + yoho.invokeMethod('go.coins_detail'); | ||
194 | + } else if (yoho && yoho.isMarsApp) { | ||
195 | + yoho.invokeMethod('go.point_detail'); | ||
196 | + } | ||
197 | + }); | ||
198 | + } | ||
199 | + | ||
200 | + goConversion(e) { | ||
201 | + let $this = $(e.currentTarget); | ||
202 | + let type = $this.closest('.tab-item-c').attr('id'); | ||
203 | + let goodId = $this.data('id'); | ||
204 | + let goodsLevel = $this.data('level'); | ||
205 | + let point = $this.data('point'); | ||
206 | + let goodtype = $this.data('type'); | ||
207 | + | ||
208 | + if ($this.hasClass('usable')) { | ||
209 | + if (!$this.hasClass('no-store')) { | ||
210 | + yoho.ready(() => { | ||
211 | + if (yoho && yoho.isMarsApp) { | ||
212 | + yoho.invokeMethod('go.mars_point', | ||
213 | + {goodId: goodId, goodsLevel: goodsLevel, point: point, goodType: goodtype}); | ||
214 | + } else if (yoho && yoho.isNowApp) { | ||
215 | + yoho.invokeMethod('go.yohoCoins', {goodId: goodId, point: point, goodType: goodtype}); | ||
216 | + } | ||
217 | + }); | ||
218 | + } | ||
219 | + } else { | ||
220 | + if (type === 'yohonow-tab') { | ||
221 | + tip.show('请到yohonowapp打开'); | ||
222 | + } else if (type === 'mars-tab') { | ||
223 | + tip.show('请到mars打开'); | ||
224 | + } | ||
225 | + } | ||
226 | + } | ||
130 | } | 227 | } |
131 | 228 | ||
132 | $(() => { | 229 | $(() => { |
@@ -29,6 +29,7 @@ class UserInfo extends Page { | @@ -29,6 +29,7 @@ class UserInfo extends Page { | ||
29 | $cityText: $('.city-text'), | 29 | $cityText: $('.city-text'), |
30 | $userPic: $('.user-pic'), | 30 | $userPic: $('.user-pic'), |
31 | $noDate: $('.inp.modify[type!=date]'), | 31 | $noDate: $('.inp.modify[type!=date]'), |
32 | + $bottomOut: $('.bottom-out') | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | this.view = { | 35 | this.view = { |
@@ -56,6 +57,23 @@ class UserInfo extends Page { | @@ -56,6 +57,23 @@ class UserInfo extends Page { | ||
56 | }); | 57 | }); |
57 | this.defaultPic(); | 58 | this.defaultPic(); |
58 | this.getCity(); | 59 | this.getCity(); |
60 | + this.refreshUserInfo(); | ||
61 | + | ||
62 | + if (yoho && yoho.isMarsApp) { | ||
63 | + yoho.ready(() => { | ||
64 | + yoho.invokeMethod('set.removeTopRightButton'); | ||
65 | + }); | ||
66 | + } | ||
67 | + } | ||
68 | + | ||
69 | + refreshUserInfo() { | ||
70 | + | ||
71 | + // 提供给app更改完个人信息之后刷新 | ||
72 | + yoho.ready(function() { | ||
73 | + yoho.addNativeMethod('refreshUserInfomation', function() { | ||
74 | + location.href = location.href; | ||
75 | + }); | ||
76 | + }); | ||
59 | } | 77 | } |
60 | 78 | ||
61 | bindEvents() { | 79 | bindEvents() { |
@@ -65,6 +83,9 @@ class UserInfo extends Page { | @@ -65,6 +83,9 @@ class UserInfo extends Page { | ||
65 | this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this)); | 83 | this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this)); |
66 | this.selector.$userPic.on('click', this.userPic.bind(this)); | 84 | this.selector.$userPic.on('click', this.userPic.bind(this)); |
67 | this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this)); | 85 | this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this)); |
86 | + this.selector.$bottomOut.on('focus', this.keepOut.bind(this)); | ||
87 | + this.selector.$bottomOut.on('blur', this.restore.bind(this)); | ||
88 | + | ||
68 | if (yoho.isApp) { | 89 | if (yoho.isApp) { |
69 | this.selector.$modifyInp.on('change', this.modifyInp.bind(this)); | 90 | this.selector.$modifyInp.on('change', this.modifyInp.bind(this)); |
70 | } else { | 91 | } else { |
@@ -81,17 +102,44 @@ class UserInfo extends Page { | @@ -81,17 +102,44 @@ class UserInfo extends Page { | ||
81 | } | 102 | } |
82 | } | 103 | } |
83 | 104 | ||
105 | + keepOut(e) { | ||
106 | + let $this = $(e.currentTarget); | ||
107 | + | ||
108 | + $('body').css({ | ||
109 | + height: $(window).height() + $this.offset().top * 2 / 3 | ||
110 | + }); | ||
111 | + | ||
112 | + $(document).scrollTop($this.offset().top * 2 / 3); | ||
113 | + } | ||
114 | + | ||
115 | + restore() { | ||
116 | + | ||
117 | + $('body').css({ | ||
118 | + height: $(window).height() | ||
119 | + }); | ||
120 | + | ||
121 | + $(document).scrollTop(0); | ||
122 | + } | ||
123 | + | ||
84 | userPic() { | 124 | userPic() { |
85 | if (yoho.isApp) { | 125 | if (yoho.isApp) { |
86 | yoho.ready(() => { | 126 | yoho.ready(() => { |
87 | - yoho.invokeMethod('go.setAvatar', {}, (data) => { | ||
88 | - if (data) { | ||
89 | - let reg = /(\w*){mode}(.*){width}(.*){height}(.*)/g; | ||
90 | - | ||
91 | - data = data.replace(reg, '$12$2100$3100$4'); | ||
92 | - this.selector.$userAvatar.css('background-image', `url(${data})`); | ||
93 | - } | ||
94 | - }); | 127 | + if (yoho.isYohoApp) { |
128 | + yoho.invokeMethod('go.setAvatar', {}, (data) => { | ||
129 | + if (data) { | ||
130 | + let reg = /(\w*){mode}(.*){width}(.*){height}(.*)/g; | ||
131 | + | ||
132 | + data = data.replace(reg, '$12$2100$3100$4'); | ||
133 | + this.selector.$userAvatar.css('background-image', `url(${data})`); | ||
134 | + } | ||
135 | + }); | ||
136 | + } else if (yoho.isMarsApp) { | ||
137 | + yoho.invokeMethod('go.modify_user', {}, (data) => { | ||
138 | + if (data) { | ||
139 | + this.selector.$userAvatar.css('background-image', `url(${data})`); | ||
140 | + } | ||
141 | + }); | ||
142 | + } | ||
95 | }); | 143 | }); |
96 | } | 144 | } |
97 | } | 145 | } |
@@ -138,12 +186,16 @@ class UserInfo extends Page { | @@ -138,12 +186,16 @@ class UserInfo extends Page { | ||
138 | }, | 186 | }, |
139 | }).then(result => { | 187 | }).then(result => { |
140 | if (result && result.code === 200) { | 188 | if (result && result.code === 200) { |
189 | + if (yoho && yoho.isApp) { | ||
190 | + yoho.ready(() => { | ||
191 | + yoho.invokeMethod('go.refreshUserInfomation'); | ||
192 | + }); | ||
193 | + } | ||
194 | + | ||
141 | location.href = location.href; | 195 | location.href = location.href; |
142 | } else { | 196 | } else { |
143 | tip.show(result.message); | 197 | tip.show(result.message); |
144 | } | 198 | } |
145 | - }).catch(error => { | ||
146 | - tip.show(error); | ||
147 | }); | 199 | }); |
148 | } | 200 | } |
149 | 201 |
@@ -58,6 +58,7 @@ class FamilyIndex extends Page { | @@ -58,6 +58,7 @@ class FamilyIndex extends Page { | ||
58 | this.trendWordMarquee(); | 58 | this.trendWordMarquee(); |
59 | this.resources(); | 59 | this.resources(); |
60 | this.downLoadInfo(); | 60 | this.downLoadInfo(); |
61 | + this.refreshUserInfo(); | ||
61 | } | 62 | } |
62 | 63 | ||
63 | bindEvents() { | 64 | bindEvents() { |
@@ -70,6 +71,16 @@ class FamilyIndex extends Page { | @@ -70,6 +71,16 @@ class FamilyIndex extends Page { | ||
70 | this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this)); | 71 | this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this)); |
71 | } | 72 | } |
72 | 73 | ||
74 | + refreshUserInfo() { | ||
75 | + | ||
76 | + // 提供给app更改完个人信息之后刷新 | ||
77 | + yoho.ready(function() { | ||
78 | + yoho.addNativeMethod('refreshUserInfomation', function() { | ||
79 | + location.href = location.href; | ||
80 | + }); | ||
81 | + }); | ||
82 | + } | ||
83 | + | ||
73 | // 头像 | 84 | // 头像 |
74 | headIco() { | 85 | headIco() { |
75 | let myImage = new Image(), | 86 | let myImage = new Image(), |
@@ -125,7 +136,7 @@ class FamilyIndex extends Page { | @@ -125,7 +136,7 @@ class FamilyIndex extends Page { | ||
125 | type: 'GET', | 136 | type: 'GET', |
126 | url: location.protocol + '//m.yohobuy.com/home/family/integralCharts' | 137 | url: location.protocol + '//m.yohobuy.com/home/family/integralCharts' |
127 | }).then(result => { | 138 | }).then(result => { |
128 | - if (result) { | 139 | + if (result && !$.isEmptyObject(result)) { |
129 | result.totalHref = location.protocol + '//m.yohobuy.com/home/family/coinDetail?openby:yohobuy={"action":"go.h5","params":{"url":"' + location.protocol + '//m.yohobuy.com/home/family/coinDetail"}}', // eslint-disable-line | 140 | result.totalHref = location.protocol + '//m.yohobuy.com/home/family/coinDetail?openby:yohobuy={"action":"go.h5","params":{"url":"' + location.protocol + '//m.yohobuy.com/home/family/coinDetail"}}', // eslint-disable-line |
130 | 141 | ||
131 | this.selector.$integralContent.append(this.view.integral(result)); | 142 | this.selector.$integralContent.append(this.view.integral(result)); |
@@ -136,7 +147,7 @@ class FamilyIndex extends Page { | @@ -136,7 +147,7 @@ class FamilyIndex extends Page { | ||
136 | series: [ | 147 | series: [ |
137 | { | 148 | { |
138 | type: 'pie', | 149 | type: 'pie', |
139 | - radius: [this.selector.chartWidth * 3 / 10, this.selector.chartWidth * 11 / 25], | 150 | + radius: [this.selector.chartWidth * 3 / 10, this.selector.chartWidth * 43 / 100], |
140 | roseType: 'radius', | 151 | roseType: 'radius', |
141 | center: ['50%', '50%'], | 152 | center: ['50%', '50%'], |
142 | label: { | 153 | label: { |
@@ -146,9 +157,9 @@ class FamilyIndex extends Page { | @@ -146,9 +157,9 @@ class FamilyIndex extends Page { | ||
146 | } | 157 | } |
147 | ] | 158 | ] |
148 | }); | 159 | }); |
160 | + } else { | ||
161 | + $('.integral').hide(); | ||
149 | } | 162 | } |
150 | - }).catch(() => { | ||
151 | - tip.show('服务异常,请稍后重试'); | ||
152 | }); | 163 | }); |
153 | } | 164 | } |
154 | 165 | ||
@@ -202,6 +213,8 @@ class FamilyIndex extends Page { | @@ -202,6 +213,8 @@ class FamilyIndex extends Page { | ||
202 | this.selector.$downClose.on('click', this.downClose.bind(this)); | 213 | this.selector.$downClose.on('click', this.downClose.bind(this)); |
203 | this.selector.$popover = $('.popover'); | 214 | this.selector.$popover = $('.popover'); |
204 | this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this)); | 215 | this.selector.$popover.on('mousewheel touchmove', this.banSliding.bind(this)); |
216 | + this.selector.$copyBtn = $('.code-copy'); | ||
217 | + this.selector.$copyBtn.on('click', this.goCopy.bind(this)); | ||
205 | }); | 218 | }); |
206 | } | 219 | } |
207 | 220 | ||
@@ -257,7 +270,40 @@ class FamilyIndex extends Page { | @@ -257,7 +270,40 @@ class FamilyIndex extends Page { | ||
257 | 270 | ||
258 | // 积分图表点击跳转 | 271 | // 积分图表点击跳转 |
259 | jump(params) { | 272 | jump(params) { |
260 | - yoho.goH5(`${location.protocol}//m.yohobuy.com/home/family/coinDetail?plateType=${params.data.plateType}`); | 273 | + let href = `${location.protocol}//m.yohobuy.com/home/family/coinDetail?plateType=${params.data.plateType}`; |
274 | + | ||
275 | + let $linkJump = $('#link-jump'); | ||
276 | + | ||
277 | + if (yoho.isMarsApp || yoho.isNowApp) { | ||
278 | + if (!$linkJump.length) { | ||
279 | + $('body').append('<a id="link-jump" href="javascript:;" style="display:none !important;"></a>'); | ||
280 | + $linkJump = $('#link-jump'); | ||
281 | + } | ||
282 | + | ||
283 | + if (yoho.isMarsApp) { | ||
284 | + | ||
285 | + href = href + '&openby:mars=' + (JSON.stringify({ | ||
286 | + action: 'go.h5', | ||
287 | + params: { | ||
288 | + url: href | ||
289 | + } | ||
290 | + })); | ||
291 | + } else { | ||
292 | + href = href + '&openby:yohobuy=' + (JSON.stringify({ | ||
293 | + action: 'go.h5', | ||
294 | + params: { | ||
295 | + url: href | ||
296 | + } | ||
297 | + })); | ||
298 | + } | ||
299 | + | ||
300 | + $linkJump.attr('href', href); | ||
301 | + $linkJump[0].click(); | ||
302 | + | ||
303 | + return false; | ||
304 | + } else { | ||
305 | + yoho.goH5(href); | ||
306 | + } | ||
261 | } | 307 | } |
262 | 308 | ||
263 | // 点击APP图标显示信息 | 309 | // 点击APP图标显示信息 |
@@ -265,8 +311,9 @@ class FamilyIndex extends Page { | @@ -265,8 +311,9 @@ class FamilyIndex extends Page { | ||
265 | let $this = $(e.currentTarget); | 311 | let $this = $(e.currentTarget); |
266 | let appType = $this.data('name').toLowerCase(); | 312 | let appType = $this.data('name').toLowerCase(); |
267 | let isLogin = $this.data('login'); | 313 | let isLogin = $this.data('login'); |
314 | + let isNoOpen = $this.data('noopen'); | ||
268 | 315 | ||
269 | - if (isLogin) { | 316 | + if (isLogin && !isNoOpen) { |
270 | if (this.vipInfo[appType]) { | 317 | if (this.vipInfo[appType]) { |
271 | this.selector.$diaC.append(this.view.vipDetailInfo(this.vipInfo[appType])); | 318 | this.selector.$diaC.append(this.view.vipDetailInfo(this.vipInfo[appType])); |
272 | } else { | 319 | } else { |
@@ -296,7 +343,12 @@ class FamilyIndex extends Page { | @@ -296,7 +343,12 @@ class FamilyIndex extends Page { | ||
296 | hideVipInfo() { | 343 | hideVipInfo() { |
297 | $('.vip-detail').remove(); | 344 | $('.vip-detail').remove(); |
298 | $('body,.main').css({ | 345 | $('body,.main').css({ |
299 | - 'overflow-y': 'auto' | 346 | + 'overflow-y': 'auto', |
347 | + position: 'static' | ||
348 | + }); | ||
349 | + | ||
350 | + $('body').css({ | ||
351 | + position: 'static' | ||
300 | }); | 352 | }); |
301 | } | 353 | } |
302 | 354 | ||
@@ -311,7 +363,8 @@ class FamilyIndex extends Page { | @@ -311,7 +363,8 @@ class FamilyIndex extends Page { | ||
311 | downClose() { | 363 | downClose() { |
312 | this.selector.$downLoadDetail.addClass('hide'); | 364 | this.selector.$downLoadDetail.addClass('hide'); |
313 | $('body,.main').css({ | 365 | $('body,.main').css({ |
314 | - 'overflow-y': 'auto' | 366 | + 'overflow-y': 'auto', |
367 | + position: 'static' | ||
315 | }); | 368 | }); |
316 | } | 369 | } |
317 | 370 | ||
@@ -320,9 +373,41 @@ class FamilyIndex extends Page { | @@ -320,9 +373,41 @@ class FamilyIndex extends Page { | ||
320 | $('body,.main').css({ | 373 | $('body,.main').css({ |
321 | 'overflow-y': 'hidden' | 374 | 'overflow-y': 'hidden' |
322 | }); | 375 | }); |
376 | + | ||
377 | + $('body').css({ | ||
378 | + position: 'fixed' | ||
379 | + }); | ||
380 | + } | ||
381 | + | ||
382 | + // 复制公众号 | ||
383 | + goCopy(e) { | ||
384 | + let $this = $(e.currentTarget); | ||
385 | + | ||
386 | + if (yoho && yoho.isApp) { | ||
387 | + if (yoho.isYohoApp) { | ||
388 | + let href = location.protocol + '//m.yohobuy.com/'; | ||
389 | + | ||
390 | + yoho.goH5(href, JSON.stringify({ | ||
391 | + action: 'go.copy', | ||
392 | + params: { | ||
393 | + text: $this.data('text'), | ||
394 | + message: '复制成功' | ||
395 | + } | ||
396 | + })); | ||
397 | + } else { | ||
398 | + yoho.invokeMethod('go.copy', {text: $this.data('text'), message: '复制成功'}); | ||
399 | + } | ||
400 | + } | ||
323 | } | 401 | } |
324 | } | 402 | } |
325 | 403 | ||
326 | $(() => { | 404 | $(() => { |
327 | new FamilyIndex(); | 405 | new FamilyIndex(); |
406 | + | ||
407 | + // 加载完 调用APP的方法 隐藏头部 | ||
408 | + if (yoho && yoho.isApp) { | ||
409 | + yoho.ready(function() { | ||
410 | + yoho.invokeMethod('yohofamily.page_success'); | ||
411 | + }); | ||
412 | + } | ||
328 | }); | 413 | }); |
@@ -2,6 +2,7 @@ import 'home/new-qrcode.page.css'; | @@ -2,6 +2,7 @@ import 'home/new-qrcode.page.css'; | ||
2 | import $ from 'yoho-jquery'; | 2 | import $ from 'yoho-jquery'; |
3 | import Page from 'yoho-page'; | 3 | import Page from 'yoho-page'; |
4 | import 'yoho-jquery-qrcode'; | 4 | import 'yoho-jquery-qrcode'; |
5 | +import yoho from 'yoho-app'; | ||
5 | 6 | ||
6 | class NewQrcode extends Page { | 7 | class NewQrcode extends Page { |
7 | constructor() { | 8 | constructor() { |
@@ -24,6 +25,12 @@ class NewQrcode extends Page { | @@ -24,6 +25,12 @@ class NewQrcode extends Page { | ||
24 | this.autoScroll(); | 25 | this.autoScroll(); |
25 | this.bindEvents(); | 26 | this.bindEvents(); |
26 | this.autoReload(); | 27 | this.autoReload(); |
28 | + | ||
29 | + if (yoho && yoho.isMarsApp) { | ||
30 | + yoho.ready(() => { | ||
31 | + yoho.invokeMethod('set.removeTopRightButton'); | ||
32 | + }); | ||
33 | + } | ||
27 | } | 34 | } |
28 | 35 | ||
29 | bindEvents() { | 36 | bindEvents() { |
1 | require('home/tide-command.page.css'); | 1 | require('home/tide-command.page.css'); |
2 | 2 | ||
3 | +let yoho = require('yoho-app'); | ||
4 | + | ||
3 | let tip = require('plugin/tip'); | 5 | let tip = require('plugin/tip'); |
4 | let trendWord; | 6 | let trendWord; |
5 | 7 | ||
@@ -31,13 +33,23 @@ $('.save').click(function() { | @@ -31,13 +33,23 @@ $('.save').click(function() { | ||
31 | success: function(result) { | 33 | success: function(result) { |
32 | tip.show(result.message); | 34 | tip.show(result.message); |
33 | 35 | ||
34 | - if (window._yas && window._yas.sendCustomInfo) { | ||
35 | - window._yas.sendCustomInfo({ | ||
36 | - op: 'YB_MYTREND_TREND_SET_C', | ||
37 | - param: JSON.stringify({ | ||
38 | - TREND: trendWord | ||
39 | - }) | ||
40 | - }, true); | 36 | + if (result.code && result.code === 200) { |
37 | + if (window._yas && window._yas.sendCustomInfo) { | ||
38 | + window._yas.sendCustomInfo({ | ||
39 | + op: 'YB_MYTREND_TREND_SET_C', | ||
40 | + param: JSON.stringify({ | ||
41 | + TREND: trendWord | ||
42 | + }) | ||
43 | + }, true); | ||
44 | + } | ||
45 | + | ||
46 | + if (yoho && yoho.isApp) { | ||
47 | + yoho.invokeMethod('go.refreshUserInfomation'); | ||
48 | + | ||
49 | + setTimeout(function() { | ||
50 | + yoho.invokeMethod('go.back'); | ||
51 | + }, 1000); | ||
52 | + } | ||
41 | } | 53 | } |
42 | } | 54 | } |
43 | }); | 55 | }); |
@@ -45,4 +57,13 @@ $('.save').click(function() { | @@ -45,4 +57,13 @@ $('.save').click(function() { | ||
45 | 57 | ||
46 | (function() { | 58 | (function() { |
47 | $('.world-number').html(15 - $('.command-textarea').val().length); | 59 | $('.world-number').html(15 - $('.command-textarea').val().length); |
60 | + | ||
61 | + if (yoho && yoho.isApp) { | ||
62 | + | ||
63 | + if (yoho.isMarsApp) { | ||
64 | + yoho.ready(() => { | ||
65 | + yoho.invokeMethod('set.removeTopRightButton'); | ||
66 | + }); | ||
67 | + } | ||
68 | + } | ||
48 | }()); | 69 | }()); |
@@ -39,8 +39,10 @@ yoho = { | @@ -39,8 +39,10 @@ yoho = { | ||
39 | */ | 39 | */ |
40 | isNowApp: /yohonow/i.test(navigator.userAgent || ''), | 40 | isNowApp: /yohonow/i.test(navigator.userAgent || ''), |
41 | isMarsApp: /YohoMars/i.test(navigator.userAgent || ''), | 41 | isMarsApp: /YohoMars/i.test(navigator.userAgent || ''), |
42 | + isYohoApp: /YohoBuy/i.test(navigator.userAgent || ''), | ||
42 | isApp: /YohoMars/i.test(navigator.userAgent || '') || | 43 | isApp: /YohoMars/i.test(navigator.userAgent || '') || |
43 | /YohoBuy/i.test(navigator.userAgent || '') || | 44 | /YohoBuy/i.test(navigator.userAgent || '') || |
45 | + /yohonow/i.test(navigator.userAgent || '') || | ||
44 | qs && qs.app_version || cookie.get('app_version'), | 46 | qs && qs.app_version || cookie.get('app_version'), |
45 | isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), | 47 | isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''), |
46 | isAndroid: /Android/i.test(navigator.userAgent || ''), | 48 | isAndroid: /Android/i.test(navigator.userAgent || ''), |
@@ -120,6 +120,13 @@ html { | @@ -120,6 +120,13 @@ html { | ||
120 | 120 | ||
121 | .pic { | 121 | .pic { |
122 | position: relative; | 122 | position: relative; |
123 | + width: 100%; | ||
124 | + height: 300px; | ||
125 | + | ||
126 | + img { | ||
127 | + width: 100%; | ||
128 | + height: 100%; | ||
129 | + } | ||
123 | 130 | ||
124 | .bg { | 131 | .bg { |
125 | width: 270px; | 132 | width: 270px; |
@@ -220,13 +227,42 @@ html { | @@ -220,13 +227,42 @@ html { | ||
220 | text-align: center; | 227 | text-align: center; |
221 | color: #fff; | 228 | color: #fff; |
222 | font-size: 28px; | 229 | font-size: 28px; |
223 | - background-color: #000; | 230 | + background-color: #b0b0b0; |
224 | display: block; | 231 | display: block; |
225 | margin-top: 25px; | 232 | margin-top: 25px; |
226 | } | 233 | } |
234 | + | ||
235 | + .usable { | ||
236 | + background-color: #000; | ||
237 | + } | ||
238 | + | ||
239 | + .no-store { | ||
240 | + background-color: #b0b0b0; | ||
241 | + } | ||
227 | } | 242 | } |
228 | } | 243 | } |
229 | } | 244 | } |
245 | + | ||
246 | + .convert-tip { | ||
247 | + position: absolute; | ||
248 | + top: 0; | ||
249 | + height: 100%; | ||
250 | + width: 100%; | ||
251 | + } | ||
252 | + | ||
253 | + .no-more { | ||
254 | + text-align: center; | ||
255 | + margin-bottom: 20px; | ||
256 | + line-height: 50px; | ||
257 | + height: 50px; | ||
258 | + } | ||
259 | + | ||
260 | + .show-more { | ||
261 | + text-align: center; | ||
262 | + margin-bottom: 20px; | ||
263 | + line-height: 50px; | ||
264 | + height: 50px; | ||
265 | + } | ||
230 | } | 266 | } |
231 | 267 | ||
232 | #mars { | 268 | #mars { |
@@ -34,17 +34,17 @@ input::-webkit-calendar-picker-indicator { | @@ -34,17 +34,17 @@ input::-webkit-calendar-picker-indicator { | ||
34 | border-bottom: solid 1px #e0e0e0; | 34 | border-bottom: solid 1px #e0e0e0; |
35 | 35 | ||
36 | .title { | 36 | .title { |
37 | - width: 220px; | 37 | + width: 200px; |
38 | float: left; | 38 | float: left; |
39 | font-size: 30px; | 39 | font-size: 30px; |
40 | } | 40 | } |
41 | 41 | ||
42 | .main { | 42 | .main { |
43 | - width: 450px; | 43 | + width: 470px; |
44 | float: left; | 44 | float: left; |
45 | min-height: 90px; | 45 | min-height: 90px; |
46 | padding: 10px 0; | 46 | padding: 10px 0; |
47 | - padding-right: 20px; | 47 | + padding-right: 30px; |
48 | position: relative; | 48 | position: relative; |
49 | 49 | ||
50 | .ewm { | 50 | .ewm { |
@@ -96,7 +96,7 @@ input::-webkit-calendar-picker-indicator { | @@ -96,7 +96,7 @@ input::-webkit-calendar-picker-indicator { | ||
96 | .date-c { | 96 | .date-c { |
97 | position: absolute; | 97 | position: absolute; |
98 | top: 10px; | 98 | top: 10px; |
99 | - right: -20px; | 99 | + right: -5px; |
100 | width: 300px; | 100 | width: 300px; |
101 | white-space: nowrap; | 101 | white-space: nowrap; |
102 | overflow: hidden; | 102 | overflow: hidden; |
@@ -16,10 +16,10 @@ | @@ -16,10 +16,10 @@ | ||
16 | padding: 34px 30px 0; | 16 | padding: 34px 30px 0; |
17 | 17 | ||
18 | .back { | 18 | .back { |
19 | - width: 40px; | ||
20 | - height: 40px; | 19 | + width: 60px; |
20 | + height: 60px; | ||
21 | background-image: resolve("home/family/back.png"); | 21 | background-image: resolve("home/family/back.png"); |
22 | - background-size: 50% 100%; | 22 | + background-size: 40% 70%; |
23 | background-repeat: no-repeat; | 23 | background-repeat: no-repeat; |
24 | display: block; | 24 | display: block; |
25 | float: left; | 25 | float: left; |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | background-image: resolve("home/family/yoho-family.png"); | 33 | background-image: resolve("home/family/yoho-family.png"); |
34 | background-size: 100% 100%; | 34 | background-size: 100% 100%; |
35 | background-repeat: no-repeat; | 35 | background-repeat: no-repeat; |
36 | - margin-left: 280px; | 36 | + margin-left: 250px; |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
@@ -65,6 +65,11 @@ | @@ -65,6 +65,11 @@ | ||
65 | height: 55px; | 65 | height: 55px; |
66 | font-weight: bold; | 66 | font-weight: bold; |
67 | line-height: 55px; | 67 | line-height: 55px; |
68 | + white-space: nowrap; | ||
69 | + overflow: hidden; | ||
70 | + text-overflow: ellipsis; | ||
71 | + display: inline-block; | ||
72 | + max-width: 360px; | ||
68 | } | 73 | } |
69 | 74 | ||
70 | .gender { | 75 | .gender { |
@@ -86,6 +91,7 @@ | @@ -86,6 +91,7 @@ | ||
86 | font-size: 24px; | 91 | font-size: 24px; |
87 | margin-left: 160px; | 92 | margin-left: 160px; |
88 | text-align: left; | 93 | text-align: left; |
94 | + margin-top: 5px; | ||
89 | } | 95 | } |
90 | 96 | ||
91 | .birthday { | 97 | .birthday { |
@@ -93,7 +99,7 @@ | @@ -93,7 +99,7 @@ | ||
93 | } | 99 | } |
94 | 100 | ||
95 | .invition { | 101 | .invition { |
96 | - margin-top: 15px; | 102 | + margin-top: 10px; |
97 | font-size: 30px; | 103 | font-size: 30px; |
98 | } | 104 | } |
99 | 105 | ||
@@ -105,15 +111,16 @@ | @@ -105,15 +111,16 @@ | ||
105 | background-size: 100%; | 111 | background-size: 100%; |
106 | background-repeat: no-repeat; | 112 | background-repeat: no-repeat; |
107 | margin-left: 190px; | 113 | margin-left: 190px; |
114 | + overflow: hidden; | ||
108 | } | 115 | } |
109 | 116 | ||
110 | textarea { | 117 | textarea { |
111 | width: 460px; | 118 | width: 460px; |
112 | - height: 40px; | 119 | + height: 43px; |
113 | border: none; | 120 | border: none; |
114 | resize: none; | 121 | resize: none; |
115 | margin-left: 30px; | 122 | margin-left: 30px; |
116 | - line-height: 40px; | 123 | + line-height: 41px; |
117 | color: #807e7e; | 124 | color: #807e7e; |
118 | font-size: 18px; | 125 | font-size: 18px; |
119 | } | 126 | } |
@@ -164,6 +171,8 @@ | @@ -164,6 +171,8 @@ | ||
164 | height: 36px; | 171 | height: 36px; |
165 | display: inline-block; | 172 | display: inline-block; |
166 | margin-left: 13px; | 173 | margin-left: 13px; |
174 | + vertical-align: top; | ||
175 | + margin-top: 2px; | ||
167 | } | 176 | } |
168 | } | 177 | } |
169 | } | 178 | } |
@@ -202,6 +211,10 @@ | @@ -202,6 +211,10 @@ | ||
202 | overflow: hidden; | 211 | overflow: hidden; |
203 | } | 212 | } |
204 | 213 | ||
214 | + .gray { | ||
215 | + filter: grayscale(100%); | ||
216 | + } | ||
217 | + | ||
205 | .name { | 218 | .name { |
206 | font-size: 28px; | 219 | font-size: 28px; |
207 | color: #43b938; | 220 | color: #43b938; |
@@ -257,7 +270,7 @@ | @@ -257,7 +270,7 @@ | ||
257 | .mark { | 270 | .mark { |
258 | width: 350px; | 271 | width: 350px; |
259 | position: absolute; | 272 | position: absolute; |
260 | - right: 30px; | 273 | + right: 20px; |
261 | font-size: 24px; | 274 | font-size: 24px; |
262 | top: 20px; | 275 | top: 20px; |
263 | } | 276 | } |
@@ -267,9 +280,10 @@ | @@ -267,9 +280,10 @@ | ||
267 | display: inline-block; | 280 | display: inline-block; |
268 | line-height: 40px; | 281 | line-height: 40px; |
269 | width: 100%; | 282 | width: 100%; |
283 | + margin-left: 40px; | ||
270 | 284 | ||
271 | .item-name { | 285 | .item-name { |
272 | - margin-right: 14px; | 286 | + margin-right: 22px; |
273 | text-align: right; | 287 | text-align: right; |
274 | width: 120px; | 288 | width: 120px; |
275 | display: inline-block; | 289 | display: inline-block; |
@@ -280,7 +294,7 @@ | @@ -280,7 +294,7 @@ | ||
280 | width: 20px; | 294 | width: 20px; |
281 | height: 20px; | 295 | height: 20px; |
282 | border-radius: 10px; | 296 | border-radius: 10px; |
283 | - margin-right: 14px; | 297 | + margin-right: 22px; |
284 | } | 298 | } |
285 | 299 | ||
286 | .item-percent { | 300 | .item-percent { |
@@ -298,7 +312,7 @@ | @@ -298,7 +312,7 @@ | ||
298 | margin-top: 10px; | 312 | margin-top: 10px; |
299 | 313 | ||
300 | span { | 314 | span { |
301 | - width: 84%; | 315 | + width: 83%; |
302 | float: right; | 316 | float: right; |
303 | } | 317 | } |
304 | } | 318 | } |
@@ -373,12 +387,6 @@ | @@ -373,12 +387,6 @@ | ||
373 | width: 400px; | 387 | width: 400px; |
374 | } | 388 | } |
375 | 389 | ||
376 | - .name { | ||
377 | - color: #000; | ||
378 | - font-size: 30px; | ||
379 | - line-height: 60px; | ||
380 | - } | ||
381 | - | ||
382 | .level { | 390 | .level { |
383 | font-size: 24px; | 391 | font-size: 24px; |
384 | line-height: 32px; | 392 | line-height: 32px; |
@@ -394,6 +402,21 @@ | @@ -394,6 +402,21 @@ | ||
394 | } | 402 | } |
395 | } | 403 | } |
396 | 404 | ||
405 | + .name { | ||
406 | + color: #000; | ||
407 | + font-size: 30px; | ||
408 | + margin-bottom: 10px; | ||
409 | + | ||
410 | + span { | ||
411 | + white-space: nowrap; | ||
412 | + overflow: hidden; | ||
413 | + text-overflow: ellipsis; | ||
414 | + display: inline-block; | ||
415 | + max-width: 300px; | ||
416 | + vertical-align: text-bottom; | ||
417 | + } | ||
418 | + } | ||
419 | + | ||
397 | .pic { | 420 | .pic { |
398 | width: 120px; | 421 | width: 120px; |
399 | height: 120px; | 422 | height: 120px; |
@@ -38,6 +38,14 @@ | @@ -38,6 +38,14 @@ | ||
38 | border-radius: 10px; | 38 | border-radius: 10px; |
39 | } | 39 | } |
40 | 40 | ||
41 | + .load-src { | ||
42 | + display: inline-block; | ||
43 | + width: 100%; | ||
44 | + height: 300px; | ||
45 | + position: relative; | ||
46 | + bottom: 300px; | ||
47 | + } | ||
48 | + | ||
41 | .yohobuy, | 49 | .yohobuy, |
42 | .now, | 50 | .now, |
43 | .mars { | 51 | .mars { |
-
Please register or login to post a comment