Authored by zhangxiaoru

我的潮流口令页获取文本

const api = global.yoho.API;
const service = global.yoho.ServiceAPI;
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
invitionData(uid) {
invitionText(uid) {
return api.get('', {
method: 'app.invitecode.my',
uid: uid
... ... @@ -21,4 +22,27 @@ module.exports = class extends global.yoho.BaseModel {
}
});
}
resources() {
return service.get('operations/api/v5/resource/get', {
content_code: ' 29958987ef0c0f830fad03d7e5'
}, {
code: 200
}).then((result) => {
if (result && result.data) {
console.log(result);
return result;
}
});
}
invitionData(uid) {
return api.all([this.invitionText(uid), this.resources()]).then((result) => {
let finaData = {};
finaData = Object.assign(finaData, result[0]);
return finaData;
});
}
};
... ...
... ... @@ -5,7 +5,17 @@
<span class="close{{#unless trendWorld}} hide{{/unless}}">×</span>
<div class="rules">
<span>您的潮流口令需要是15位以内的字符,使用潮流口令标榜自己的个性与独一无二。</span>
{{#if trendWordSetReason}}
<span class="title">设置潮流口令的好处是?</span>
<span>{{{trendWordSetReason}}}</span>
{{/if}}
{{#if invitedFriendWelfare}}
<span class="title">被邀请的好友可获得?</span>
<span>{{{invitedFriendWelfare}}}</span>
{{/if}}
</div>
<img src="" class="resources">
{{/ invitionDta}}
</div>
\ No newline at end of file
... ...
... ... @@ -32,13 +32,28 @@
.rules {
padding: 30px;
color: #a6a6a6;
line-height: 40px;
font-size: 24px;
span {
line-height: 40px;
font-size: 28px;
.title {
line-height: 60px;
font-size: 26px;
font-weight: 700;
width: 100%;
color: #000;
display: inline-block;
}
}
.resources {
width: 690px;
height: 285px;
margin-left: 30px;
position: fixed;
bottom: 0;
}
.hide {
display: none;
}
... ...