mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 16:45:21 +00:00
登录后判断是否有数据文件夹, 如果没有, 则新建之
This commit is contained in:
13
node_modules/evt.js
generated
vendored
13
node_modules/evt.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
var fs = require('fs');
|
||||
var User = require('user');
|
||||
// var User = require('user');
|
||||
|
||||
function log(o) {
|
||||
console.log(o);
|
||||
@@ -19,6 +19,7 @@ var Evt = {
|
||||
leanoteUrl: 'http://localhost:9000',
|
||||
port: 8008,
|
||||
localUrl: 'http://127.0.0.1:8008',
|
||||
dataBasePath: '',
|
||||
getImageLocalUrl: function(fileId) {
|
||||
return this.localUrl + '/api/file/getImage?fileId=' + fileId;
|
||||
},
|
||||
@@ -27,12 +28,20 @@ var Evt = {
|
||||
},
|
||||
// 项目绝对地址
|
||||
getBasePath: function() {
|
||||
var me = this;
|
||||
// return dataBasePath; // process.cwd();
|
||||
return process.cwd();
|
||||
// return process.cwd();
|
||||
return me.dataBasePath;
|
||||
},
|
||||
getAbsolutePath: function(relative) {
|
||||
var me = this;
|
||||
return me.getBasePath() + '/' + relative;
|
||||
},
|
||||
setDataBasePath: function(dataBasePath) {
|
||||
var me = this;
|
||||
console.log('...........')
|
||||
console.log(dataBasePath);
|
||||
me.dataBasePath = dataBasePath;
|
||||
}
|
||||
};
|
||||
module.exports = Evt;
|
||||
|
Reference in New Issue
Block a user