Showing
3 changed files
with
54 additions
and
5 deletions
1 | const api = global.yoho.API; | 1 | const api = global.yoho.API; |
2 | +const service = global.yoho.ServiceAPI; | ||
2 | 3 | ||
3 | module.exports = class extends global.yoho.BaseModel { | 4 | module.exports = class extends global.yoho.BaseModel { |
4 | constructor(ctx) { | 5 | constructor(ctx) { |
5 | super(ctx); | 6 | super(ctx); |
6 | } | 7 | } |
7 | 8 | ||
8 | - invitionData(uid) { | 9 | + invitionText(uid) { |
9 | return api.get('', { | 10 | return api.get('', { |
10 | method: 'app.invitecode.my', | 11 | method: 'app.invitecode.my', |
11 | uid: uid | 12 | uid: uid |
@@ -21,4 +22,27 @@ module.exports = class extends global.yoho.BaseModel { | @@ -21,4 +22,27 @@ module.exports = class extends global.yoho.BaseModel { | ||
21 | } | 22 | } |
22 | }); | 23 | }); |
23 | } | 24 | } |
25 | + | ||
26 | + resources() { | ||
27 | + return service.get('operations/api/v5/resource/get', { | ||
28 | + content_code: ' 29958987ef0c0f830fad03d7e5' | ||
29 | + }, { | ||
30 | + code: 200 | ||
31 | + }).then((result) => { | ||
32 | + if (result && result.data) { | ||
33 | + console.log(result); | ||
34 | + return result; | ||
35 | + } | ||
36 | + }); | ||
37 | + } | ||
38 | + | ||
39 | + invitionData(uid) { | ||
40 | + return api.all([this.invitionText(uid), this.resources()]).then((result) => { | ||
41 | + let finaData = {}; | ||
42 | + | ||
43 | + finaData = Object.assign(finaData, result[0]); | ||
44 | + | ||
45 | + return finaData; | ||
46 | + }); | ||
47 | + } | ||
24 | }; | 48 | }; |
@@ -5,7 +5,17 @@ | @@ -5,7 +5,17 @@ | ||
5 | <span class="close{{#unless trendWorld}} hide{{/unless}}">×</span> | 5 | <span class="close{{#unless trendWorld}} hide{{/unless}}">×</span> |
6 | 6 | ||
7 | <div class="rules"> | 7 | <div class="rules"> |
8 | - <span>您的潮流口令需要是15位以内的字符,使用潮流口令标榜自己的个性与独一无二。</span> | 8 | + {{#if trendWordSetReason}} |
9 | + <span class="title">设置潮流口令的好处是?</span> | ||
10 | + <span>{{{trendWordSetReason}}}</span> | ||
11 | + {{/if}} | ||
12 | + | ||
13 | + {{#if invitedFriendWelfare}} | ||
14 | + <span class="title">被邀请的好友可获得?</span> | ||
15 | + <span>{{{invitedFriendWelfare}}}</span> | ||
16 | + {{/if}} | ||
9 | </div> | 17 | </div> |
18 | + | ||
19 | + <img src="" class="resources"> | ||
10 | {{/ invitionDta}} | 20 | {{/ invitionDta}} |
11 | </div> | 21 | </div> |
@@ -32,13 +32,28 @@ | @@ -32,13 +32,28 @@ | ||
32 | 32 | ||
33 | .rules { | 33 | .rules { |
34 | padding: 30px; | 34 | padding: 30px; |
35 | - | ||
36 | - span { | 35 | + color: #a6a6a6; |
37 | line-height: 40px; | 36 | line-height: 40px; |
38 | - font-size: 28px; | 37 | + font-size: 24px; |
38 | + | ||
39 | + .title { | ||
40 | + line-height: 60px; | ||
41 | + font-size: 26px; | ||
42 | + font-weight: 700; | ||
43 | + width: 100%; | ||
44 | + color: #000; | ||
45 | + display: inline-block; | ||
39 | } | 46 | } |
40 | } | 47 | } |
41 | 48 | ||
49 | + .resources { | ||
50 | + width: 690px; | ||
51 | + height: 285px; | ||
52 | + margin-left: 30px; | ||
53 | + position: fixed; | ||
54 | + bottom: 0; | ||
55 | + } | ||
56 | + | ||
42 | .hide { | 57 | .hide { |
43 | display: none; | 58 | display: none; |
44 | } | 59 | } |
-
Please register or login to post a comment