file main get image

This commit is contained in:
life
2015-12-18 16:50:34 +08:00
parent d18f1d1310
commit a2980904cf
9 changed files with 70 additions and 30 deletions

20
node_modules/evt_main.js generated vendored
View File

@@ -9,6 +9,14 @@ var Evt = {
defaultUrl: 'https://leanote.com',
leanoteUrl: 'https://leanote.com',
// leanoteUrl: 'http://localhost:9000',
//
dataBasePath: '',
init: function (curUser, dbPath, dataBasePath) {
this.curUser = curUser;
this.setHost(curUser.Host);
this.dataBasePath = dataBasePath;
},
setHost: function(host) {
if(!host) {
@@ -26,18 +34,18 @@ var Evt = {
return this.leanoteUrl;
},
init: function (curUser, dbPath) {
this.curUser = curUser;
this.setHost(curUser.Host);
},
getCurUserId: function () {
return this.curUser.UserId;
},
getToken: function () {
return this.curUser.Token;
}
},
// 用户的图片路径
getCurUserImagesPath: function() {
return this.dataBasePath + '/data/' + this.getCurUserId() + '/images';;
},
};
module.exports = Evt;