mack-mac
mackt 6 months ago
commit 3753d2cbf9

@ -0,0 +1,53 @@
{
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"eslint-config-prettier"
],
"plugins": ["prettier"],
"rules": {
"@typescript-eslint/no-explicit-any": ["off"], // 使any
"@typescript-eslint/ban-ts-comment": "off", // 使@ts-ignore
"@typescript-eslint/no-non-null-assertion": "off", // 使
"@typescript-eslint/no-var-requires": "off", // 使CommonJS
"no-console": ["warn", { "allow": ["warn", "error"] }], // console.log
"no-debugger": "warn",
"import/order": [
"error",
{
"groups": ["builtin", "external", "parent", "sibling", "index", "internal", "object", "type"], //
//
"pathGroups": [
{
"pattern": "react*",
"group": "builtin",
"position": "before"
},
{
"pattern": "@/components/**",
"group": "parent",
"position": "before"
},
{
"pattern": "@/utils/**",
"group": "parent",
"position": "after"
},
{
"pattern": "@/apis/**",
"group": "parent",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always", //
//
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}

36
.gitignore vendored

@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

@ -0,0 +1,3 @@
/.next/
/node_modules
.env*.local

@ -0,0 +1,9 @@
{
"endOfLine": "auto",
"printWidth": 120,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"bracketSpacing": true
}

@ -0,0 +1,32 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm i
npm run dev
```
Open [http://localhost:3001](http://localhost:3001) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};

@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
};
export default nextConfig;

8852
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,49 @@
{
"name": "queyue-h5",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 3001",
"build": "next build",
"start": "next start -p 3001",
"lint": "eslint src --fix --ext .ts,.tsx,.js,.jsx,.mdx,.md,.json,.mjs --max-warnings 0"
},
"dependencies": {
"next": "14.1.3",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@commitlint/cli": "^19.1.0",
"@commitlint/config-conventional": "^19.1.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@unocss/postcss": "^0.58.6",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"postcss": "^8",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^9.5.1",
"prettier": "^3.2.5",
"typescript": "^5.2.2",
"unocss": "^0.58.6"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"npm run lint",
"prettier --write"
]
},
"browserslist": [
"iOS >= 7",
"Android >= 4"
]
}

@ -0,0 +1,18 @@
module.exports = {
plugins: {
'@unocss/postcss': {
content: ['**/*.{html,js,ts,jsx,tsx}'],
},
autoprefixer: {},
'postcss-flexbugs-fixes': {},
'postcss-preset-env': {
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
features: {
'custom-properties': false,
},
},
},
};

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 KiB

@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3783 11.4838C12.2415 10.9906 13.341 11.2905 13.8342 12.1536L17.2842 18.1911C17.3132 18.2418 17.3394 18.2932 17.3629 18.3453C19.5163 17.4531 21.8744 16.9611 24.3462 16.9611C26.5481 16.9611 28.6596 17.3514 30.6166 18.0674L33.9959 12.1536C34.4891 11.2905 35.5887 10.9906 36.4518 11.4838C37.3149 11.977 37.6148 13.0766 37.1216 13.9397L33.8661 19.6368C38.6953 22.5894 42.0716 27.7206 42.6577 33.6803H6.03467C6.59498 27.9834 9.70482 23.0435 14.1961 20.04C14.1832 20.0194 14.1707 19.9985 14.1585 19.9772L10.7085 13.9397C10.2153 13.0766 10.5152 11.977 11.3783 11.4838ZM18.3089 26.8467C18.3089 27.7994 17.5366 28.5717 16.5839 28.5717C15.6312 28.5717 14.8589 27.7994 14.8589 26.8467C14.8589 25.894 15.6312 25.1217 16.5839 25.1217C17.5366 25.1217 18.3089 25.894 18.3089 26.8467ZM32.1089 28.5717C33.0616 28.5717 33.8339 27.7994 33.8339 26.8467C33.8339 25.894 33.0616 25.1217 32.1089 25.1217C31.1562 25.1217 30.3839 25.894 30.3839 26.8467C30.3839 27.7994 31.1562 28.5717 32.1089 28.5717Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.8619 8.01761C30.9258 8.80338 31.0991 10.9339 28.9995 13.2727C27.4807 14.9363 25.6364 15.911 23.6168 15.7662C23.4457 13.7581 24.2427 11.977 25.5988 10.5365C26.8297 9.1939 28.9912 8.10177 30.8605 8L30.8619 8.01761ZM37.2612 19.0384C34.6575 20.5219 33.3681 22.5339 33.3848 25.2035C33.3848 25.2073 33.3846 25.2142 33.3843 25.224C33.374 25.5747 33.2518 29.7114 38.1667 31.8854C37.2237 34.5629 33.9857 40.5089 30.2178 40.5598C29.1625 40.5598 28.3188 40.2547 27.449 39.9402C26.5234 39.6056 25.5681 39.2602 24.2969 39.2602C22.9225 39.2602 21.8875 39.6277 20.9178 39.9721C20.0946 40.2644 19.3184 40.54 18.4218 40.5598C14.6873 40.6655 11.1072 34.1245 10.1141 31.4549C9.37136 29.4272 9 27.4582 9 25.5519C9 19.101 13.5941 15.9303 17.9169 15.8677C19.1169 15.8677 20.5032 16.3379 21.6874 16.7396C22.5702 17.039 23.3407 17.3004 23.8379 17.3004C24.2398 17.3004 24.8957 17.0731 25.7002 16.7944C27.1005 16.3092 28.9513 15.6679 30.6977 15.7972C33.6018 16.0047 35.805 17.0811 37.2612 19.0384Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,5 @@
<svg width="104" height="40" viewBox="0 0 104 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="40" height="40" rx="7.2" fill="black" fill-opacity="0.95"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.6792 12.5298C19.6792 10.6813 20.7521 9.12785 22.4377 8.68156C22.7548 8.59755 23.0866 8.55292 23.4294 8.55292C24.8419 8.55292 26.0733 9.31434 26.7699 10.4459C26.7907 10.4796 27.7467 11.9059 27.7467 14.0336C27.7467 14.6336 27.6719 15.2164 27.5323 15.772C27.5268 15.7987 27.5241 15.8261 27.5241 15.8548C27.5241 16.0826 27.7063 16.2673 27.9309 16.2673C28.0557 16.2673 28.167 16.2106 28.2413 16.1202C28.2513 16.1093 28.2601 16.0977 28.2683 16.0853C29.0117 15.0988 29.4528 13.8667 29.4528 12.5298C29.4528 9.29175 26.8644 6.66675 23.6715 6.66675C23.6438 6.66675 23.6162 6.66675 23.5886 6.66806C22.8661 6.67772 22.1752 6.82239 21.5398 7.07789C19.4015 7.93804 17.8902 10.0537 17.8902 12.5298C17.8902 15.2433 19.9984 18.0591 21.4811 19.5484C21.558 19.6251 21.635 19.7011 21.7138 19.777C22.07 20.1205 22.437 20.4406 22.8121 20.7375C22.9288 20.8299 23.0469 20.9201 23.1649 21.0085C23.3275 21.1316 23.432 21.3279 23.432 21.5489C23.432 21.9701 23.0621 22.2595 22.6603 22.2152C21.133 21.9984 19.7022 21.4757 18.43 20.7095C18.2168 20.5808 18.0076 20.4461 17.8039 20.3031H17.8032C16.4986 19.3966 15.3875 18.2233 14.5489 16.8604C13.4845 15.1309 12.8564 13.097 12.8213 10.916C12.8207 10.8523 12.82 10.788 12.82 10.7237C12.82 9.9821 12.8888 9.25621 13.0197 8.55292C11.9032 9.93353 11.0937 11.5796 10.6991 13.3836C10.5209 14.1964 10.4272 15.042 10.4272 15.9089C10.4272 17.9839 10.9641 19.9316 11.9045 21.6167C10.6586 20.7265 9.59539 19.5903 8.78459 18.2767C8.48634 17.7944 8.22193 17.2887 7.99598 16.762C7.95613 17.1533 7.93589 17.5508 7.93589 17.953C7.93589 19.4685 8.22258 20.9161 8.74336 22.2433C9.23113 23.485 9.92396 24.6208 10.7793 25.6086C10.4184 25.5648 10.0527 25.5382 9.68248 25.5293C9.59003 25.5272 9.49758 25.5258 9.40522 25.5258C8.46138 25.5258 7.54399 25.6414 6.66699 25.8604C8.75824 26.4221 10.614 27.5701 12.055 29.1196C14.1152 31.311 17.136 33.0667 21.1782 33.0667C24.9515 33.0667 31.467 30.7568 31.467 25.6408C31.467 23.719 30.5137 21.6353 27.7553 20.3781C23.1725 18.2894 19.6792 15.3621 19.6792 12.5298Z" fill="white"/>
<path d="M74.334 27.024H67.808V28.246H75.738V30.508H59.02V31.522H56.238V19.51L53.846 20.082L53.17 17.56C57.824 16.598 61.776 15.402 65.078 13.972H63.31V8.044L66.144 8.148V13.478C67.262 12.958 68.328 12.36 69.342 11.71L68.146 11.06L69.212 8.824C70.226 9.318 71.37 9.916 72.618 10.618C73.866 11.294 74.906 11.918 75.764 12.464L74.698 15.038C73.45 14.154 71.838 13.14 69.862 12.022L70.902 13.868C68.458 15.376 65.39 16.728 61.724 17.924H67.106L66.534 16.13L69.108 15.688C69.394 16.39 69.628 17.118 69.862 17.924H75.036V20.212L67.808 20.186V21.46H74.334V23.618H67.808V24.788H74.334V27.024ZM60.398 8.98L61.802 11.294C59.566 13.036 57.486 14.414 55.536 15.48L54.002 13.114C56.004 12.074 58.448 10.514 60.398 8.98ZM59.02 20.16V21.46H65V20.186L59.02 20.16ZM59.02 23.618V24.788H65V23.618H59.02ZM65 28.246V27.024H59.02V28.246H65ZM100.5 17.898V20.706H92.3878V28.246C92.3878 30.69 91.4778 31.262 88.7998 31.522L87.2398 31.704L86.3558 28.792L87.8898 28.636C89.1118 28.506 89.3458 28.272 89.3458 27.362V20.706H80.6098L81.6758 9.734C84.5098 9.656 87.4738 9.5 90.5938 9.214C93.7398 8.928 96.4438 8.616 98.7058 8.252L99.3038 11.138C97.2498 11.45 94.8578 11.736 92.1538 11.996C89.4498 12.23 86.8758 12.438 84.4318 12.568L83.8598 17.898H89.3458V13.036L92.3878 13.14V17.898H100.5ZM84.2238 21.538L86.6678 23.124C86.0178 24.216 85.1598 25.464 84.0418 26.842C82.9498 28.22 81.8318 29.52 80.7138 30.716L78.5038 28.818C79.6218 27.648 80.6878 26.426 81.7278 25.126C82.7938 23.8 83.6258 22.604 84.2238 21.538ZM93.8178 23.384L96.0278 21.538C98.6018 24.424 100.396 26.478 101.852 28.376L99.6418 30.716C98.8358 29.598 97.8738 28.35 96.7298 26.92C95.6118 25.49 94.6238 24.32 93.8178 23.384Z" fill="black" fill-opacity="0.95"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

8
shims.d.ts vendored

@ -0,0 +1,8 @@
// This File is only needed if you use Attributify
// Learn more: https://unocss.dev/presets/attributify
import type { AttributifyAttributes } from 'unocss/preset-attributify';
declare module 'react' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface HTMLAttributes<T> extends AttributifyAttributes {}
}

@ -0,0 +1,44 @@
'use client';
import Image from 'next/image';
export default function Download() {
return (
<main className="w-full flex flex-col items-center pb-[104px] font-normal">
{/* 首屏 */}
<div className="relative w-full h-min-[1000px] h-screen flex flex-col items-center pt-[30vh] bg-[url(/img/download/background_1.png)] bg-center bg-cover bg-no-repeat text-[#fff]">
{/* slogan */}
<h2 className="h-[70px] text-center text-[50px] font-bold leading-[70px]"></h2>
<h2 className="h-[44px] text-center text-[24px] font-thin leading-[28px] my-[10px 34px] mt-[10px]">/</h2>
<h2 className="h-[44px] text-center text-[24px] leading-[28px]"> </h2>
</div>
{/* 第二屏 */}
<div className="relative w-full h-[1000px] h-screen flex flex-col items-center pt-[166px] bg-[url(/img/download/background_2.png)] bg-center bg-cover bg-no-repeat">
{/* 花体字-“我们回来了” */}
<Image className="mb-[50px]" width={306} height={86} src="/img/download/back.svg" alt="wx-share" />
{/* 诗歌 */}
<p className="text-center text-[#000] text-[15px] text-left leading-[28px]">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
便
<br />
</p>
</div>
</main>
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -0,0 +1,24 @@
@import '@unocss/reset/tailwind.css';
@unocss all;
:root {
--body-bg-color: #fff;
}
@media (prefers-color-scheme: dark) {
:root {
}
}
body {
background: var(--body-bg-color);
font-family: 'PingFang SC-Regular', Helvetica;
/* padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); */
}
@layer utilities {
.text-balance {
text-wrap: balance;
}
}

@ -0,0 +1,30 @@
import Footer from '@/components/Footer';
import Header from '@/components/Header';
import type { Metadata, Viewport } from 'next';
import './globals.css';
export const metadata: Metadata = {
title: '雀乐',
description: '独立 不独于世',
};
export const viewport: Viewport = {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
minimumScale: 1,
userScalable: false,
viewportFit: 'cover',
};
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="zn-ch" className="relative">
<Header />
<body>{children}</body>
<Footer />
</html>
);
}

@ -0,0 +1,3 @@
export default function Home() {
return <main />;
}

@ -0,0 +1,15 @@
export default function Footer() {
return (
<footer className="absolute bottom-0 flex flex-col items-center w-full justify-center text-center text-[12px] leading-[12.6px]">
<p className="absolute bottom-[69px] text-[rgba(0,0,0,0.4)]">
ICP2024190175-1 Shenzhen QueYue Culture Technology Co., Ltd.
</p>
<p className="absolute bottom-[40px] text-[rgba(0,0,0,0.7)]">
<a href=""></a>
<a href=""></a>
<a href=""></a>
</p>
</footer>
);
}

@ -0,0 +1,39 @@
import Logo from '@/components/Logo';
export default function Header() {
const menuList = [
{
name: '首页',
path: '/',
},
{
name: 'APP下载',
path: '/download',
},
{
name: '关于我们',
path: '/about',
},
];
return (
<header className="absolute top-0 w-full h-[80px] flex items-center">
<Logo />
<ul className="absolute right-[377px] flex flex-row items-center">
{menuList.map(({ name, path }) => (
<li
key={path}
className={`px-[25px] text-[18px] leading-[25.2px] text-[rgba(0,0,0,0.4)] hover:text-[rgba(0,0,0,0.95)]`}
>
<a href={path}>{name}</a>
</li>
))}
</ul>
<button className="absolute right-[263px] w-[74px] h-[36px] border-[#000] border-[1.5px] rounded-[60px] text-[17px]">
</button>
</header>
);
}

@ -0,0 +1,5 @@
export default function AppLogo() {
return (
<h1 className="absolute top-[20px] left-[264px] w-[104px] h-[40px] pl-[52px] bg-[url(/img/logo.svg)] bg-left bg-no-repeat cursor-pointer" />
);
}

@ -0,0 +1,13 @@
import { useState, useEffect } from 'react';
import { Hosting } from '@/utils/ua';
export default function useUA() {
const [inWX, setInWX] = useState(true);
useEffect(() => {
setInWX(Hosting.isWX(window?.navigator?.userAgent?.toLowerCase()));
}, []);
return { inWX };
}

@ -0,0 +1 @@
declare module 'lib-flexible';

@ -0,0 +1,9 @@
import { Hosting } from '@/utils/ua';
// 下载
export const download = () => {
const ua = window?.navigator?.userAgent?.toLowerCase();
if (!Hosting.isWX(ua)) {
window.open('//cdn.indie.cn/release/queyue.apk', '__blank');
}
};

@ -0,0 +1,31 @@
import localFont from 'next/font/local';
export const RegularFont = localFont({
src: '../../public/fonts/ping-fang-hei-ti-zhun-jian.ttf',
display: 'swap',
});
export const MediumFont = localFont({
src: '../../public/fonts/pingfang-sc-medium.otf',
display: 'swap',
});
export const SemiboldFont = localFont({
src: '../../public/fonts/pingfangsc-semibold.otf',
display: 'swap',
});
export const AbhayaFont = localFont({
src: '../../public/fonts/AlibabaPuHuiTi-3-65-Medium.woff2',
display: 'swap',
});
export const AbhayaSemiboldFont = localFont({
src: '../../public/fonts/abhayalibre-semibold.ttf',
display: 'swap',
});
export const XinYiJiXiangSongFont = localFont({
src: '../../public/fonts/Fontquan-XinYiJiXiangSong.ttf',
display: 'swap',
});

@ -0,0 +1,8 @@
// 判断 H5 宿主环境
export const Hosting = {
isAndroid: (ua: any) => ua.indexOf('android') > -1 || ua.indexOf('linux') > -1,
isIPhone: (ua: any) => ua.indexOf('iphone') > -1,
isIPad: (ua: any) => ua.indexOf('ipad') > -1,
isIPod: (ua: any) => ua.indexOf('ipod') > -1,
isWX: (ua: any) => ua.indexOf('micromessenger') > -1,
};

@ -0,0 +1,26 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}

@ -0,0 +1,14 @@
import { defineConfig, presetUno, presetAttributify, presetIcons } from 'unocss';
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons({
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle',
},
}),
],
});

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save