Commit d6aaff5f by 张权

添加public

1 parent 55510144
'use strict';
"use strict";
const Controller = require('egg').Controller;
const Controller = require("egg").Controller;
const path = require("path");
const fs = require("fs");
class HomeController extends Controller {
async index() {
const { ctx } = this;
ctx.body = 'hi, egg';
// ctx.body = 'hi, egg';
ctx.response.type = "html";
ctx.body = fs.readFileSync(path.resolve(__dirname, "../public/index.html"));
}
}
......
......@@ -70,7 +70,7 @@ class TrackController extends Controller {
// page_url: 'string?',
};
try {
ctx.validate(createRule, ctx.request.body);
// ctx.validate(createRule, ctx.request.body);
const result = await ctx.service.trackService.create(ctx.request.body);
ctx.body = result;
} catch (error) {
......
......@@ -28,7 +28,7 @@ module.exports = (app) => {
isMerchantStaffAdmin: BOOLEAN,
token: STRING(100),
event: STRING(20),
pageUrl: STRING(100),
pageUrl: STRING(300),
pageName: STRING(100),
intoTime: STRING(100),
leaveTime: STRING(100),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!