diff --git a/postcss.config.cjs b/postcss.config.cjs index fac6756..6802c47 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,24 +1,6 @@ const autoprefixer = require('autoprefixer'); -const px2viewport = require('postcss-px-to-viewport-8-plugin'); - -const basePx2viewport = { - unitToConvert: 'px', // 需要转换的单位,默认为 px - unitPrecision: 3, // 单位转换后保留的精度(很多时候无法整除) - propList: ['*'], // 能转化为vw的属性列表,!font-size表示font-size后面的单位不会被转换 - viewportUnit: 'vw', // 指定需要转换成的视口单位,建议使用 vw - fontViewportUnit: 'vw', // 字体使用的视口单位 - selectorBlackList: ['.ignore', 'keep-px'], - minPixelValue: 1, // 设置最小的转换数值,这里小于或等于 1px 不转换为视口单位 - mediaQuery: false, // 媒体查询里的单位是否需要转换单位 - exclude: [/\/src\/views\/pc/], // 忽略某些文件夹下的文件或特定文件 - // include: [/src/], // 如果设置了include,那将只有匹配到的文件才会被转换 -}; +// 不再把 px 转成 vw:PC 和手机共用一套页面,页面限制最大宽度居中显示(见 App.vue), +// 如果按视口宽度缩放,PC 大屏上会被整体放大 module.exports = { - plugins: [ - autoprefixer(), - px2viewport({ - ...basePx2viewport, - viewportWidth: 375, - }), - ], + plugins: [autoprefixer()], }; diff --git a/src/App.vue b/src/App.vue index c29b369..a478e86 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,4 +4,15 @@ - + diff --git a/src/assets/images/pc/business.png b/src/assets/images/pc/business.png deleted file mode 100644 index ccdfbde..0000000 Binary files a/src/assets/images/pc/business.png and /dev/null differ diff --git a/src/assets/images/png/splash.webp b/src/assets/images/png/splash.webp deleted file mode 100644 index 034d9de..0000000 Binary files a/src/assets/images/png/splash.webp and /dev/null differ diff --git a/src/components/DecryptImg/index.vue b/src/components/DecryptImg/index.vue deleted file mode 100644 index 507f737..0000000 --- a/src/components/DecryptImg/index.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/src/components/pcFooter/index.vue b/src/components/pcFooter/index.vue deleted file mode 100644 index 47d7efc..0000000 --- a/src/components/pcFooter/index.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - diff --git a/src/router/index.ts b/src/router/index.ts index 0a921d7..352f102 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,19 +1,19 @@ import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; import Home from '@/views/home/index.vue'; -import pcRouter from './pcRouter'; -import mobileRouter from './mobileRouter'; import MobilePrivacyPolicy from '@/views/mobile/privacyPolicy/index.vue'; const routes: RouteRecordRaw[] = [ { path: '/', + redirect: '/home', + }, + { + path: '/home', name: 'home', component: Home, - redirect: '/home', meta: { title: '首页', }, - children: [...pcRouter, ...mobileRouter], }, { path: '/mobilePrivacyPolicy', diff --git a/src/router/mobileRouter.ts b/src/router/mobileRouter.ts deleted file mode 100644 index 2be53d4..0000000 --- a/src/router/mobileRouter.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { RouteRecordRaw } from 'vue-router'; -// import MobilePrivacyPolicy from '@/views/mobile/privacyPolicy/index.vue'; -// 手机端路由 -const mobileRouter: RouteRecordRaw[] = [ - // { - // path: '/mobilePrivacyPolicy', - // name: 'mobilePrivacyPolicy', - // component: MobilePrivacyPolicy, - // meta: { - // title: '隐私政策', - // }, - // }, -]; - -export default mobileRouter; diff --git a/src/router/pcRouter.ts b/src/router/pcRouter.ts deleted file mode 100644 index b595fa3..0000000 --- a/src/router/pcRouter.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { RouteRecordRaw } from 'vue-router'; -import Home from '@/views/pc/home/index.vue' -import Privacy from '@/views/pc/privacy/index.vue' - -// pc端路由 -const pcRouter: RouteRecordRaw[] = [ - { - path: '/home', - name: 'home', - component: Home, - meta: { - title: "首页" - }, - }, - { - path: '/privacy', - name: 'privacy', - component: Privacy, - meta: { - title: "隐私" - }, - }, -]; - -export default pcRouter; \ No newline at end of file diff --git a/src/utils/insertAdv.ts b/src/utils/insertAdv.ts deleted file mode 100644 index 8ec9a44..0000000 --- a/src/utils/insertAdv.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { getAdItem } from '@/utils/getConfig'; -interface Advparams { - originArray: Array; // 原数据数组 - insertNum: number; // 每隔insertNum个元素插入一次 - pageSize: number; // 当前页码 - pageNumber: number; // 当前页 - advNum: number; // 当前广告下标 -} -export default function insertAdv(obj: Advparams) { - const { originArray, insertNum, pageSize, pageNumber, advNum } = obj; - if (!originArray || originArray.length === 0) { - return []; - } - let newArr = originArray; - const updateArray = []; - let advIndex = 0; - - for (let i = 0; i < originArray.length; i++) { - let index = pageSize * (pageNumber - 1) + i; - // 默认数据 - updateArray.push(originArray[i]); - // // 每隔insertNum个元素插入一次 - if (getAdItem(advNum) && getAdItem(advNum).length> 0 && (index + 1) % insertNum === 0) { - // 如果当前位置没有广告,重置0 - if (!getAdItem(advNum)[advIndex]) { - advIndex = 0; - } - const advList = getAdItem(advNum) || []; - // 当前页广告条数 - const currentPageAdvCout = Math.floor((index + 1) / insertNum); - const advIdx = (currentPageAdvCout - 1) % advList.length; - // 插入广告 - // isAdv 字段表示是广告 - updateArray.push(Object.assign({}, getAdItem(advNum)[advIdx], { isAdv: true })); - advIndex++; - } - } - return updateArray; -} diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 40c392b..f94fef7 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -3,14 +3,11 @@
加载中...
-
- - -
+ - \ No newline at end of file diff --git a/src/views/pc/home/index.vue b/src/views/pc/home/index.vue deleted file mode 100644 index 986b36d..0000000 --- a/src/views/pc/home/index.vue +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/src/views/pc/index.vue b/src/views/pc/index.vue deleted file mode 100644 index 5d1d377..0000000 --- a/src/views/pc/index.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/pc/privacy/index.vue b/src/views/pc/privacy/index.vue deleted file mode 100644 index b7644bc..0000000 --- a/src/views/pc/privacy/index.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - \ No newline at end of file