GithubHelp home page GithubHelp logo

node_acldemo's People

Contributors

wuwanyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node_acldemo's Issues

登陆状态

你好,请问登陆成功后,在其他页面(不包含公共头和尾的页面),如何获取登陆状态

waterline initialize failed, err: { userError: Could not find a primary key attribute on the model `acl_user`. All models must contain an attribute that acts as the primary key and is guaranteed to be unique.

我准备把你这个拆成前后端分离的项目(在用express脚手架构建的基础上),在修改了app和config以及bin/www文件后,报了个这个错你能够解决一下?
方便留个联系方式?我打算用这个做管理系统的基础,想和你深度交流下。

waterline initialize failed, err: { userError: Could not find a primary key attribute on the model acl_user. All models must contain an attribute that acts as the primary key and is guaranteed to be unique.
at normalizeCollection (E:\obj\monitor\node_modules\waterline-schema\lib\waterline-schema\schema.js:85:44)
at arrayEach (E:\obj\monitor\node_modules@sailshq\lodash\lib\index.js:1463:13)
at Function. (E:\obj\monitor\node_modules@sailshq\lodash\lib\index.js:3525:13)
at schemaBuilder (E:\obj\monitor\node_modules\waterline-schema\lib\waterline-schema\schema.js:34:5)
at new WaterlineSchema (E:\obj\monitor\node_modules\waterline-schema\lib\waterline-schema.js:36:12)
at Object.initialize (E:\obj\monitor\node_modules\waterline\lib\waterline.js:581:26)
at Object. (E:\obj\monitor\bin\www:14:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3 name: 'userError' }

$inc

你好,我在controller下的js文件中添加一个包含$inc的更新数据的方法,但是不能执行,好像是mongoose有限制

在用户登陆查询里waterline.models.acl_user()方法是写在哪里的?

在目录文件‪node_aclDemo\app\controllers\acl_user.js里面getOne()模块下调用的waterline.models.acl_user这个方法是写在哪里的?,看了一下没找到这个方法写在哪里,还望不吝赐教。
补充:
在目录文件下‪node_aclDemo\app\controllers\acl_user.js里面引入的
var waterline = require('../../config/waterline');
waterline文件里面导出的models是null。
所以我感觉acl_user.js下面的getOne()模块查不到数据,但是想了解下你这里是怎么查询数据库的。

获取角色权限列表app/router/acl_role.js里面的两个方法各代表什么意思?

在app/router/acl_role.js里面,有info和whatResources两个方法各起的什么作用?他们互不影响?还是有继承关系?我只看懂了第二个方法是acl的根绝角色id查询角色有哪些权限的。有很多地方都是这种写法,或者说这种关系,求教哇。

//根据id查询一条
router.post('/getOne', function(req, res) {
var param = req.body;
try {
async.auto({
info: function(cb) {
let list = roleController.getOne(param, cb);
console.log('13' + list)
},
whatResources: function(cb) {
global.acl.whatResources(param.id, cb)
},
}, function(err, data) {
res.send({
code: "200",
msg: "获取详情成功",
result: {
info: data.info,
resources: data.whatResources
}
});
});
} catch (err) {
res.end(err.stack);
}
});

hbs的view中直接引入css 会被渲染到head中么?

您好,由于电脑上没安装mongodb,所以没有把您的程序运行起来,但是我有注意到您在 resource.hbs 这个view中直接使用 zTree的css文件
我想问下 这样直接引入会被渲染到页面的head 中 还是 渲染到 {{{body}}} 中 ,还是您在某个地方配置有helper 。 我测试了下我的会被直接渲染到{{{body}}} 中 。
期待您的回答

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.