Authored by 李靖

接口地址

... ... @@ -4,6 +4,7 @@ const _ = require('lodash');
const moment = require('moment');
const camelCase = global.yoho.camelCase;
const api = global.yoho.API;
const family = global.yoho.FamilyAPI;
const service = global.yoho.ServiceAPI;
const resourcesProcess = require(`${global.utils}/resources-process`);
const helpers = global.yoho.helpers;
... ... @@ -19,8 +20,7 @@ class familyModel extends global.yoho.BaseModel {
*/
_userData(uid) {
if (uid) {
return api.get('', {
method: 'app.passport.profile',
return family.get('user/getUserInfo.json', {
uid: uid
}, {
code: 200
... ... @@ -685,22 +685,16 @@ class familyModel extends global.yoho.BaseModel {
}
modify(params) {
let options = {
data: {
method: 'app.passport.modifyBase',
uid: params.uid,
nick_name: params.nickName,
gender: params.gender,
birthday: params.birthday,
height: params.height,
weight: params.weight
},
param: {
code: 200
}
};
return this.get(options).then(result => {
return family.get('user/updateUserInfo.json', {
uid: params.uid,
nick_name: params.nickName,
gender: params.gender,
birthday: params.birthday,
height: params.height,
weight: params.weight
}, {
code: 200
}).then(result => {
return result;
});
}
... ...
<div class="coin-mall-c">
<div class="tab">
<div class="tab-item" id="yohonow">Yoho!Now</div>
<div class="tab-item" id="mars">mars</div>
</div>
<div class="coin">
<span class="coin-pic"></span>
<span>567890</span>
... ... @@ -11,6 +7,12 @@
<a>如何获取有货币</a>
<a>有货币明细</a>
</div>
<div class="tab-fixed">
<div class="tab">
<div class="tab-item" id="yohonow">Yoho!Now</div>
<div class="tab-item" id="mars">mars</div>
</div>
</div>
<div class="tab-c">
<div class="tab-item-c" id="yohonow-tab">
<div class="act-list">
... ...
... ... @@ -12,7 +12,7 @@
<div class="list-item">
<div class="title">昵称</div>
<div class="main">
<input class="inp nick-name modify" type="text" value="{{nickname}}" />
<input class="inp nick-name modify" type="text" value="{{nickName}}" />
</div>
<div class="arr">
<span class="iconfont">&#xe604;</span>
... ...
... ... @@ -13,18 +13,16 @@ const isTest = process.env.NODE_ENV === 'test';
const domains = {
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
api: 'http://192.168.102.202:8026/yoho-family',
service: 'http://192.168.102.202:8026/yoho-family',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
global: 'http://api-global.yohobuy.com',
store: 'http://192.168.102.47:8080/portal-gateway/'
store: 'http://192.168.102.47:8080/portal-gateway/',
family: 'http://192.168.102.202:8026/yoho-family/'
};
module.exports = {
... ...
... ... @@ -6975,7 +6975,6 @@
"version": "4.1.1",
"resolved": "http://npm.yoho.cn/lru-cache/-/lru-cache-4.1.1.tgz",
"integrity": "sha1-Yi4y6CSItJJ5EUpPns9F581rulU=",
"dev": true,
"requires": {
"pseudomap": "1.0.2",
"yallist": "2.1.2"
... ... @@ -11118,8 +11117,7 @@
"pseudomap": {
"version": "1.0.2",
"resolved": "http://npm.yoho.cn/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"public-encrypt": {
"version": "4.0.0",
... ... @@ -14440,8 +14438,7 @@
"yallist": {
"version": "2.1.2",
"resolved": "http://npm.yoho.cn/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargs": {
"version": "3.10.0",
... ... @@ -15082,40 +15079,22 @@
"dev": true
},
"yoho-node-lib": {
"version": "0.2.29",
"resolved": "http://npm.yoho.cn/yoho-node-lib/-/yoho-node-lib-0.2.29.tgz",
"integrity": "sha1-ZqmSG+ztteM28aVz+6nTi9ioITU=",
"version": "0.3.1",
"resolved": "http://npm.yoho.cn/yoho-node-lib/-/yoho-node-lib-0.3.1.tgz",
"integrity": "sha512-yGqyQvGrQXhVdhVWw5nD3UJqEjHjpht+198ettvEXCejtEzG7MUHw94l9VE+hPG1mteqXrw+r4b3KrCPSpPQYA==",
"requires": {
"bluebird": "3.5.0",
"handlebars": "4.0.10",
"lodash": "4.17.4",
"lru-cache": "4.1.1",
"md5": "2.2.1",
"memcached": "2.2.2",
"memory-cache": "0.1.6",
"moment": "2.18.1",
"request-promise": "3.0.0",
"request": "2.81.0",
"uuid": "3.1.0",
"walk": "2.3.9",
"winston": "2.3.1",
"winston-daily-rotate-file": "1.4.6",
"xss-filters": "1.2.7"
},
"dependencies": {
"memory-cache": {
"version": "0.1.6",
"resolved": "http://npm.yoho.cn/memory-cache/-/memory-cache-0.1.6.tgz",
"integrity": "sha1-LtmTPteoxxgkm+c2b3yodJrPiiQ="
},
"request-promise": {
"version": "3.0.0",
"resolved": "http://npm.yoho.cn/request-promise/-/request-promise-3.0.0.tgz",
"integrity": "sha1-vh7bJvQcSc0dVlbGdT1oQqEkn0Y=",
"requires": {
"bluebird": "3.5.0",
"lodash": "4.17.4",
"request": "2.81.0"
}
}
}
},
"yoho-qs": {
... ...
... ... @@ -73,7 +73,7 @@
"xml2js": "^0.4.17",
"yoho-express-session": "^2.0.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "=0.2.29",
"yoho-node-lib": "=0.3.1",
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
... ...
... ... @@ -9,7 +9,8 @@ class IconMall extends Page {
this.selector = {
$tabItem: $('.tab .tab-item'),
$defaultTabItem: $('.tab .tab-item:first'),
$coinMallC: $('.coin-mall-c')
$coinMallC: $('.coin-mall-c'),
$tabFixed: $('.tab-fixed')
};
this.init();
... ... @@ -18,6 +19,15 @@ class IconMall extends Page {
init() {
this.bindEvents();
this.defaultChosen();
this.scroll();
}
scroll() {
$(window).scroll(() => {
let $fixTop = this.selector.$tabFixed.offset().top;
console.log($fixTop);
});
}
bindEvents() {
... ...
... ... @@ -22,6 +22,13 @@ html {
background-size: 100% 100%;
}
.tab-fixed {
width: 750px;
height: 100px;
position: relative;
clear: both;
}
.tab {
background-color: #fff;
float: left;
... ...