Skip to content

Commit

Permalink
v1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tower1229 committed Jan 24, 2018
1 parent c624519 commit c93dfd2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hybridstart",
"version": "1.0.1",
"version": "1.1.5",
"description": "A hybrid application development framework",
"main": "lib/index.js",
"directories": {
Expand Down
4 changes: 1 addition & 3 deletions sdk/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ define(function(require, exports, module) {
if (!userData) {
return app.toast('初始化用户信息失败');
}
userData.photo = _source($.trim(userData.photo));
userData.realName = $.trim(userData.realName);
app.storage.val('user', userData);
//app初始化
app.storage.val('appInit', 1);
Expand Down Expand Up @@ -137,7 +135,7 @@ define(function(require, exports, module) {
bgclose: false
});
});
return {};
return null;
}
return _user;
};
Expand Down
10 changes: 6 additions & 4 deletions view/member/index/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ define(function(require) {
if (reload) {
userData = comm.getUser();
}
if(userData.headImg){
$('#avat')[0].src = userData.headImg;
if(userData){
if(userData.headImg){
$('#avat')[0].src = userData.headImg;
}
$('#usern')[0].innerText = (userData.nickName);
$('#score')[0].innerText = (userData.nowScore);
}

$('#usern')[0].innerText = (userData.nickName);
$('#score')[0].innerText = (userData.nowScore);
};
$('#avat')[0].addEventListener('touchend',function(){
app.openView(null,'member','setPersonal');
Expand Down
7 changes: 7 additions & 0 deletions view/member/login/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ define(function(require) {
app.loading.hide();
if (res.status === 'Y') {
//初始化用户数据
comm.initUser({
tag:'tag1',
id: 123,
nowScore: 100,
nickName: '斑斑',
headImg: "../index/head.jpg"
});
setTimeout(function() {
app.openView({
closeself: true
Expand Down

0 comments on commit c93dfd2

Please sign in to comment.