mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 23:55:50 +00:00
file main get image
This commit is contained in:
20
node_modules/evt_main.js
generated
vendored
20
node_modules/evt_main.js
generated
vendored
@@ -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;
|
||||
|
Reference in New Issue
Block a user