Skip to content

Commit

Permalink
打包问题
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Jul 16, 2024
1 parent ccf0c18 commit 70f4c35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pages/[prefix]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Slug = props => {

/**
* 验证文章密码
* @param {*} result
* @param {*} passInput
*/
const validPassword = passInput => {
if (!post) {
Expand Down Expand Up @@ -129,7 +129,7 @@ export async function getStaticProps({ params: { prefix }, locale }) {
fullSlug += '.html'
}
}

// 在列表内查找文章
props.post = props?.allPages?.find(p => {
return (
Expand Down
4 changes: 1 addition & 3 deletions pages/auth/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import Slug from '../[prefix]'

/**
/**
* 服务端接收参数处理
* @param {*} ctx
* @returns
*/
export const getServerSideProps = async ctx => {
export const getStaticProps = async () => {
const from = `auth`
const props = await getGlobalData({ from })

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
"jsx": "react-jsx"
},
"include": [
"next-env.d.ts",
Expand Down

0 comments on commit 70f4c35

Please sign in to comment.