87,987
社区成员
发帖
与我相关
我的任务
分享
module.exports = function (app) {
app.use("/api/query", function (req, res) {
if (req.query.reqP) {
var where = " Where " + req.query.reqP;
}
else {
where = "";
}
app.use(function (req, res) {
if (req.path.indexOf('/api/') >= 0) {
Query(app);
} else { //angular启动页
res.sendFile(path.join(__dirname, './views', 'index1.html'));
}
});
$http.get('/api/query', { params: pms })
.success(function (data, status, headers, config) {
console.log("query project success---------");
for (var p in data) {
var pi = {
name: p,
fList: [],
tList: []
};
$scope.pList.push({ name: p });
}
})
.error(function (data, status, headers, config) {
console.log("query project fail---------");
});