diff --git a/ushio/www/api/getVisitNum.php b/ushio/www/api/getVisitNum.php index dd8f0e85..ba0e9bbe 100644 --- a/ushio/www/api/getVisitNum.php +++ b/ushio/www/api/getVisitNum.php @@ -1,6 +1,13 @@ + + + + Yimian HomePage + + + + + + + + + + + + + + + + + +
+

Yimian HomePage

+
+ + +
+
+ + + + + \ No newline at end of file diff --git a/yimian/www/smartfarm/app.js b/yimian/www/smartfarm/app.js index 8b5bb21e..22e4b96d 100755 --- a/yimian/www/smartfarm/app.js +++ b/yimian/www/smartfarm/app.js @@ -29,7 +29,8 @@ app.use(express.urlencoded({ extended: false })); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); -app.use('/', indexRouter); +//app.use('/', indexRouter); +app.use('/', express.static('html')); app.use('/users', usersRouter); app.use('/api', apiRouter); diff --git a/yimian/www/smartfarm/html/index.html b/yimian/www/smartfarm/html/index.html new file mode 100644 index 00000000..04db9424 --- /dev/null +++ b/yimian/www/smartfarm/html/index.html @@ -0,0 +1 @@ +hello diff --git a/yimian/www/smartfarm/routes/api.js b/yimian/www/smartfarm/routes/api.js index c623e8e0..51492d36 100755 --- a/yimian/www/smartfarm/routes/api.js +++ b/yimian/www/smartfarm/routes/api.js @@ -37,7 +37,7 @@ var o = { /* GET home page. */ router.get('/get', function(req, res, next) { //res.render('index', { title: 'Express' }); - + res.header("Access-Control-Allow-Origin", "*"); if(req.query.type != undefined) req.query.type = req.query.type.toLowerCase(); if(req.query.type == 'station' || req.query.type == 'node'|| req.query.type == 'watersys'){ @@ -70,6 +70,7 @@ router.get('/get', function(req, res, next) { /* GET home page. */ router.get('/set', function(req, res, next) { //res.render('index', { title: 'Express' }); + res.header("Access-Control-Allow-Origin", "*"); delete o.data; if(req.query.type == undefined && req.query.status == 1 || req.query.status == 0){ if(req.query.sid == 0 || req.query.sid == 1){ @@ -138,6 +139,7 @@ router.get('/set', function(req, res, next) { /* GET home page. */ router.get('/refresh', function(req, res, next) { //res.render('index', { title: 'Express' }); + res.header("Access-Control-Allow-Origin", "*"); refresh(); if(req.query.type != undefined) req.query.type = req.query.type.toLowerCase(); diff --git a/yimian/www/smartfarm/routes/index.js b/yimian/www/smartfarm/routes/index.js index 03ce132c..78f77e5b 100755 --- a/yimian/www/smartfarm/routes/index.js +++ b/yimian/www/smartfarm/routes/index.js @@ -3,8 +3,9 @@ var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { - res.redirect(302, "https://doc.smartfarm.yimian.xyz"); - //res.render('index', { title: 'Express' }); + //res.redirect(302, "https://doc.smartfarm.yimian.xyz"); + //res.render('index', { title: 'temp page' }); + res.send(); }); module.exports = router;