瀏覽代碼

pisah domain

master
jefry 4 年之前
父節點
當前提交
af8430d562
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. +0
    -0
      pages/_(index).js
  2. +5
    -2
      server.js

pages/index.js → pages/_(index).js 查看文件


+ 5
- 2
server.js 查看文件

@@ -14,9 +14,12 @@ app.prepare().then(() => {
const parsedUrl = parse(req.url, true);
const { pathname, query } = parsedUrl;
if (pathname === "/") {
app.render(req, res, "/home", query);
app.render(req, res, "/yamaha/home", query);
} else if (pathname === "/yamaha") {
app.render(req, res, "/yamaha/home", query);
} else if (pathname === "/suzuki") {
app.render(req, res, "/suzuki/home", query);
}
// else if (pathname === "/bookingservice/") {
// app.render(req, res, "/BookingService", query);
// } else if (pathname === "/statuspengajuan/") {
// app.render(req, res, "/StatusPengajuan", query);


Loading…
取消
儲存