pujiaming 2 anos atrás
pai
commit
6658e4e92b

+ 2 - 2
.env.development

@@ -1,5 +1,5 @@
 ENV = development,
 VITE_PROJECT_NAME = 朱雀游戏中心
 VITE_API_HOST = http://gm.rose.nei.nkfzs.com/api/web
-VITE_LOGO_VISIBLE: 'QingQue'
-# VITE_LOGO_VISIBLE: 'KuPai'
+# VITE_LOGO_VISIBLE: 'QingQue'
+VITE_LOGO_VISIBLE: 'KuPai'

+ 266 - 0
.eslintrc.cjs

@@ -0,0 +1,266 @@
+module.exports = {
+  'env': {
+    'browser': true,
+    'es2021': true
+  },
+  'extends': [
+    'eslint:recommended',
+    'plugin:vue/vue3-essential',
+    'plugin:@typescript-eslint/recommended'
+  ],
+  'overrides': [],
+  'parser': '@typescript-eslint/parser',
+  'parserOptions': {
+    'ecmaVersion': 'latest',
+    'sourceType': 'module'
+  },
+  'plugins': [
+    'vue',
+    '@typescript-eslint'
+  ],
+  'ignorePatterns': ['.eslintrc.cjs'],
+  'rules': {
+    'for-direction': 'error', // for 循环迭代条件是否正确
+    'vue/component-name-in-template-casing': ['error', 'kebab-case', {
+      'registeredComponentsOnly': false,
+      'ignores': []
+    }],
+    'vue/no-use-v-if-with-v-for': ['error', {
+      'allowUsingIterationVar': false
+    }],
+    'vue/require-v-for-key': 'error',
+    'vue/prop-name-casing': ['error', 'camelCase'],
+    'getter-return': 'error', // getter 函数中出现 return 语句
+    'no-async-promise-executor': 'error', // getter 函数中出现 return 语句
+    'no-compare-neg-zero': 'error', // getter 函数中出现 return 语句
+    'vue/max-attributes-per-line': [2, {
+      singleline: 10,
+      multiline: {
+        max: 1
+      }
+    }],
+    'vue/v-bind-style': ['error', 'shorthand'],
+    'vue/v-on-style': ['error', 'shorthand'],
+    'vue/no-v-model-argument': 'off',
+    'vue/no-multiple-template-root': 'off',
+    'vue/singleline-html-element-content-newline': 'off',
+    'vue/multiline-html-element-content-newline': 'off',
+    'vue/component-definition-name-casing': ['error', 'PascalCase'],
+    'vue/no-v-html': 'off',
+    'accessor-pairs': 2, // 强制 getter 和 setter 在对象中成对出现
+    'arrow-spacing': [2, {
+      before: true,
+      after: true
+    }], // 强制箭头函数的箭头前后使用一致的空格
+    'block-spacing': [2, 'always'], // 禁止或强制在代码块中开括号前和闭括号后有空格
+    'brace-style': [2, '1tbs', {
+      allowSingleLine: true
+    }], // 强制在代码块中使用一致的大括号风格
+    camelcase: [0, {
+      properties: 'always'
+    }], // 强制使用骆驼拼写法命名约定
+    'comma-dangle': [2, 'never'], // 要求或禁止末尾逗号
+    'comma-spacing': [2, {
+      before: false,
+      after: true
+    }], // 强制在逗号前后使用一致的空格
+    'comma-style': [2, 'last'], // 强制使用一致的逗号风格
+    'constructor-super': 2, // 要求在构造函数中有 super() 的调用
+    curly: [2, 'multi-line'], // 强制所有控制语句使用一致的括号风格
+    'dot-location': [2, 'property'], // 强制在点号之前和之后一致的换行
+    'eol-last': 2, // 要求或禁止文件末尾存在空行
+    eqeqeq: ['error', 'always', { null: 'ignore' }], // 要求使用 === 和 !==
+    'generator-star-spacing': [2, {
+      before: true,
+      after: true
+    }], // 强制 generator 函数中 * 号周围使用一致的空格
+    'handle-callback-err': [2, '^(err|error)$'], // 要求回调函数中有容错处理
+    indent: [2, 2, {
+      SwitchCase: 1
+    }], // 强制使用一致的缩进
+    'jsx-quotes': [2, 'prefer-single'], // 强制在 JSX 属性中一致地使用双引号或单引号
+    'key-spacing': [2, {
+      beforeColon: false,
+      afterColon: true
+    }], // 强制在对象字面量的属性中键和值之间使用一致的间距
+    'keyword-spacing': [2, {
+      before: true,
+      after: true
+    }], // 强制在关键字前后使用一致的空格
+    'new-cap': [2, {
+      newIsCap: true,
+      capIsNew: false
+    }], // 要求构造函数首字母大写
+    'new-parens': 2, // 强制或禁止调用无参构造函数时有圆括号
+    'no-array-constructor': 2, // 禁用 Array 构造函数
+    'no-caller': 2, // 禁用 arguments.caller 或 arguments.callee
+    'no-console': 'off',
+    'no-class-assign': 2, // 禁止修改类声明的变量
+    'no-cond-assign': 2, // 禁止条件表达式中出现赋值操作符
+    'no-const-assign': 2,
+    'no-control-regex': 0, // 禁止在正则表达式中使用控制字符
+    'no-delete-var': 2, // 禁止删除变量
+    'no-dupe-args': 2, // 禁止 function 定义中出现重名参数
+    'no-dupe-class-members': 2, // 禁止类成员中出现重复的名称
+    'no-dupe-keys': 2, // 禁止对象字面量中出现重复的 key
+    'no-duplicate-case': 2, // 禁止出现重复的 case 标签
+    'no-empty-character-class': 2, // 禁止在正则表达式中使用空字符集
+    'no-empty-pattern': 2, // 禁止使用空解构模式
+    'no-eval': 2, // 禁用 eval()
+    'no-ex-assign': 2, // 禁止对 catch 子句的参数重新赋值
+    'no-extend-native': 2, // 禁止扩展原生类型
+    'no-extra-bind': 2, // 禁止不必要的 .bind() 调用
+    'no-extra-boolean-cast': 2, // 禁止不必要的布尔转换
+    'no-extra-parens': [2, 'functions'], // 禁止不必要的括号
+    'no-fallthrough': 2, // 禁止 case 语句落空
+    'no-floating-decimal': 2, // 禁止数字字面量中使用前导和末尾小数点
+    'no-func-assign': 2, // 禁止对 function 声明重新赋值
+    'no-implied-eval': 2, // 禁止使用类似 eval() 的方法
+    'no-inner-declarations': [2, 'functions'],
+    'no-invalid-regexp': 2, // 禁止在嵌套的块中出现变量声明或 function 声明
+    'no-irregular-whitespace': 2, // 禁止不规则的空白
+    'no-iterator': 2, // 禁用 __iterator__ 属性
+    'no-label-var': 2, // 不允许标签与变量同名
+    'no-labels': [2, {
+      allowLoop: false,
+      allowSwitch: false
+    }], // 禁用标签语句
+    'no-lone-blocks': 2, // 禁用不必要的嵌套块
+    'no-mixed-spaces-and-tabs': 2, // 禁止空格和 tab 的混合缩进
+    'no-multi-spaces': 2, // 禁止使用多个空格
+    'no-multi-str': 2, // 禁止使用多行字符串
+    'no-multiple-empty-lines': [2, {
+      max: 1
+    }], // 禁止出现多行空行
+    'no-global-assign': 2, // no-global-assign
+    'no-unsafe-negation': 2, // 禁止对关系运算符的左操作数使用否定操作符
+    'no-new-object': 2, // 禁用 Object 的构造函数
+    'no-new-require': 2, // 禁止调用 require 时使用 new 操作符
+    'no-new-symbol': 2, // 禁止 Symbolnew 操作符和 new 一起使用
+    'no-new-wrappers': 2, // 禁止对 String,Number 和 Boolean 使用 new 操作符
+    'no-obj-calls': 2, // 禁止把全局对象作为函数调用
+    'no-octal': 2, // 禁用八进制字面量
+    'no-octal-escape': 2, // 禁止在字符串中使用八进制转义序列
+    'no-path-concat': 2, // 禁止对 __dirname 和 __filename 进行字符串连接
+    'no-proto': 2, // 禁用 __proto__ 属性
+    'no-redeclare': 2, // 禁止多次声明同一变量
+    'no-regex-spaces': 2, // 禁止正则表达式字面量中出现多个空格
+    'no-return-assign': [2, 'except-parens'], // 禁止在 return 语句中使用赋值语句
+    'no-self-assign': 2, // 禁止自我赋值
+    'no-self-compare': 2, // 禁止自身比较
+    'no-sequences': 2, // 禁用逗号操作符
+    'no-shadow-restricted-names': 2, // 禁止将标识符定义为受限的名字
+    'func-call-spacing': 2, // 要求或禁止在函数名和开括号之间有空格。
+    'no-sparse-arrays': 2, // 禁用稀疏数组
+    'no-this-before-super': 2, // 禁止在构造函数中,在调用 super() 之前使用 this 或 super
+    'no-throw-literal': 2, // 禁止抛出异常字面量
+    'no-trailing-spaces': 2, // 禁用行尾空格
+    'no-undef': 2, // 禁用未声明的变量,除非它们在 /*global */ 注释中被提到
+    'no-undef-init': 2, // 禁止将变量初始化为 undefined
+    'no-unexpected-multiline': 2, // 禁止出现令人困惑的多行表达式
+    'no-unmodified-loop-condition': 2, // 禁用一成不变的循环条件
+    'no-unneeded-ternary': [2, {
+      defaultAssignment: false
+    }], // 禁止可以在有更简单的可替代的表达式时使用三元操作符
+    'no-unreachable': 2, // 禁止在 return、throw、continue 和 break 语句之后出现不可达代码
+    'no-unsafe-finally': 2, // 禁止在 finally 语句块中出现控制流语句
+    'no-unused-vars': [2, {
+      vars: 'all',
+      args: 'none'
+    }], // 禁止出现未使用过的变量
+    'no-useless-call': 2, // 禁止不必要的 .call() 和 .apply()
+    'no-useless-computed-key': 2, // 禁止在对象中使用不必要的计算属性
+    'no-useless-constructor': 2, // 禁用不必要的构造函数
+    'no-useless-escape': 0, // 禁用不必要的转义字符
+    'no-whitespace-before-property': 2, // 禁止属性前有空白
+    'no-with': 2, // 禁用 with 语句
+    'one-var': [2, {
+      initialized: 'never'
+    }], // 强制函数中的变量要么一起声明要么分开声明
+    'operator-linebreak': [2, 'after', {
+      overrides: {
+        '?': 'before',
+        ':': 'before'
+      }
+    }], // 强制操作符使用一致的换行符
+    'padded-blocks': [2, 'never'], // 要求或禁止块内填充
+    quotes: [2, 'single', {
+      avoidEscape: true,
+      allowTemplateLiterals: true
+    }], // 强制使用一致的反勾号、双引号或单引号
+    semi: [2, 'never'],
+    'semi-spacing': [2, {
+      before: false,
+      after: true
+    }], // 强制分号之前和之后使用一致的空格
+    'space-before-blocks': [2, 'always'],
+    'space-before-function-paren': [2, 'never'],
+    'space-in-parens': [2, 'never'],
+    'space-infix-ops': 2,
+    'space-unary-ops': [2, {
+      words: true,
+      nonwords: false
+    }], // 强制在一元操作符前后使用一致的空格
+    'spaced-comment': [2, 'always', {
+      markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+    }], // 强制在注释中 // 或 /* 使用一致的空格
+    'template-curly-spacing': [2, 'never'], // 要求或禁止模板字符串中的嵌入表达式周围空格的使用
+    'use-isnan': 2, // 要求使用 isNaN() 检查 NaN
+    'valid-typeof': 2,
+    'wrap-iife': [2, 'any'],
+    'yield-star-spacing': [2, 'both'],
+    yoda: [2, 'never'], // 要求或禁止 “Yoda” 条件
+    'prefer-const': [
+      'error',
+      {
+        destructuring: 'all',
+        ignoreReadBeforeAssign: false
+      }
+    ], // 要求使用 const 声明那些声明后不再被修改的变量
+    'no-debugger': 2,
+    'object-curly-spacing': [2, 'always', {
+      objectsInObjects: false
+    }], // 强制在大括号中使用一致的空格
+    'array-bracket-spacing': [2, 'never'],
+    'default-case': 'off', // 要求 switch 语句中有 default 分支
+    'no-plusplus': 'off', // 禁用一元操作符 ++ 和 --
+    'guard-for-in': 'off',
+    'max-len': 'off', // 强制一行的最大长度
+    'no-param-reassign': 'off', // 禁止对 function 的参数进行重新赋值
+    'import/no-unresolved': 'off', // 确保导入指向一个可以解析的文件/模块
+    'import/extensions': 'off', // 确保在导入路径中统一使用文件扩展名
+    'no-bitwise': 'off', // 禁用按位运算符
+    '@typescript-eslint/no-explicit-any': 'off',
+    'consistent-return': 'off',
+    'array-callback-return': 'off',
+    'import/no-extraneous-dependencies': 'off',
+    'no-restricted-syntax': 'off',
+    radix: 'off', // 强制在 parseInt() 使用基数参数
+    'linebreak-style': ['error', 'unix'], // 强制使用一致的换行风格
+    'import/prefer-default-export': 'off', // 如果模块只输入一个名字,则倾向于默认输出
+    'prefer-destructuring': 'off', // 优先使用数组和对象解构
+    'import/no-cycle': 'off', // 禁止一个模块导入一个有依赖路径的模块回到自己身上
+    'arrow-parens': 'off', // 要求箭头函数的参数使用圆括号
+    'no-continue': 'off', // 禁用 continue 语句
+    'no-prototype-builtins': 'off', // 禁止直接调用 Object.prototypes 的内置属性
+    'import/named': 'off', // 确保命名导入与远程文件中的命名导出相对应
+    'object-curly-newline': 'off', // 强制大括号内换行符的一致性
+    'func-names': 'off', // 要求或禁止使用命名的 function 表达式
+    'no-unused-expressions': 'off', // 禁止出现未使用过的表达式
+    'no-underscore-dangle': 'off', // 禁止标识符中有悬空下划线
+    'no-nested-ternary': 'off', // 禁用嵌套的三元表达式
+    'no-await-in-loop': 'off', // 禁止在循环中出现 await
+    '@typescript-eslint/no-empty-function': 'off', // 不允许空函数
+    'vue/html-indent': ['error', 2], // 在<template>中强制一致缩进
+    'vue/multi-word-component-names': 'off', // 组件命名必须为多词
+    'vue/html-self-closing': ['error', {
+      'html': {
+        'void': 'always',
+        'normal': 'always',
+        'component': 'always'
+      },
+      'svg': 'always',
+      'math': 'always'
+    }]
+  }
+}

+ 0 - 78
.eslintrc.js

@@ -1,78 +0,0 @@
-// @ts-check
-const { defineConfig } = require("eslint-define-config");
-module.exports = defineConfig({
-  root: true,
-  env: {
-    browser: true,
-    node: true,
-    es6: true,
-    'vue/setup-compiler-macros': true
-  },
-  parser: "vue-eslint-parser",
-  parserOptions: {
-    parser: "@typescript-eslint/parser",
-    ecmaVersion: 2020,
-    sourceType: "module",
-    jsxPragma: "React",
-    ecmaFeatures: {
-      jsx: true,
-    },
-  },
-  extends: [
-    "plugin:vue/vue3-recommended",
-    "plugin:@typescript-eslint/recommended",
-    "prettier",
-    "plugin:prettier/recommended",
-  ],
-  rules: {
-    "@typescript-eslint/ban-ts-ignore": "off",
-    "@typescript-eslint/explicit-function-return-type": "off",
-    "@typescript-eslint/no-explicit-any": "off",
-    "@typescript-eslint/no-var-requires": "off",
-    "@typescript-eslint/no-empty-function": "off",
-    "vue/custom-event-name-casing": "off",
-    "no-use-before-define": "off",
-    "@typescript-eslint/no-use-before-define": "off",
-    "@typescript-eslint/ban-ts-comment": "off",
-    "@typescript-eslint/ban-types": "off",
-    "@typescript-eslint/no-non-null-assertion": "off",
-    "@typescript-eslint/explicit-module-boundary-types": "off",
-    "@typescript-eslint/no-unused-vars": [
-      "error",
-      {
-        argsIgnorePattern: "^_",
-        varsIgnorePattern: "^_",
-      },
-    ],
-    "no-unused-vars": [
-      "error",
-      {
-        argsIgnorePattern: "^_",
-        varsIgnorePattern: "^_",
-      },
-    ],
-    "space-before-function-paren": "off",
-
-    "vue/attributes-order": "off",
-    "vue/one-component-per-file": "off",
-    "vue/html-closing-bracket-newline": "off",
-    "vue/max-attributes-per-line": "off",
-    "vue/multiline-html-element-content-newline": "off",
-    "vue/singleline-html-element-content-newline": "off",
-    "vue/attribute-hyphenation": "off",
-    "vue/require-default-prop": "off",
-    "vue/html-self-closing": [
-      "error",
-      {
-        html: {
-          void: "always",
-          normal: "never",
-          component: "always",
-        },
-        svg: "always",
-        math: "always",
-      },
-    ],
-  },
-});
-

+ 4 - 0
index.html

@@ -43,6 +43,10 @@
 <body>
   <div id="app" style="height:100%"></div>
   <script type="module" src="/src/main.ts"></script>
+  <script>
+    const VITEPLA = import.meta.env.VITE_LOGO_VISIBLE
+    document.title = VITEPLA === 'QingQue' ? '朱雀游戏中心' : '游戏中心'
+  </script>
 </body>
 
 </html>

Diferenças do arquivo suprimidas por serem muito extensas
+ 3414 - 170
package-lock.json


+ 3 - 3
package.json

@@ -24,15 +24,15 @@
   },
   "devDependencies": {
     "@types/node": "^18.11.15",
-    "@typescript-eslint/eslint-plugin": "^5.46.1",
-    "@typescript-eslint/parser": "^5.46.1",
+    "@typescript-eslint/eslint-plugin": "^6.3.0",
+    "@typescript-eslint/parser": "^6.3.0",
     "@vitejs/plugin-legacy": "^3.0.1",
     "@vitejs/plugin-vue": "^4.0.0",
     "eslint": "^8.29.0",
     "eslint-config-prettier": "^8.5.0",
     "eslint-define-config": "^1.12.0",
     "eslint-plugin-prettier": "^4.2.1",
-    "eslint-plugin-vue": "^9.8.0",
+    "eslint-plugin-vue": "^9.17.0",
     "prettier": "^2.8.1",
     "sass": "^1.56.2",
     "sass-loader": "^13.2.0",

+ 9 - 0
src/App.vue

@@ -56,4 +56,13 @@ onUnmounted(() => {
   width: auto;
   height: auto;
 }
+/*谷歌*/
+input::-webkit-outer-spin-button,
+   input::-webkit-inner-spin-button {
+    -webkit-appearance: none;
+   }
+   /*火狐*/
+   input[type="number"] {
+    -moz-appearance: textfield;
+   }
 </style>

+ 1 - 1
src/components/MobileCom.vue

@@ -11,7 +11,7 @@
                     : 'm_search'
             })" /></p>
 
-            <div class="psa" style="bottom: 0;left: 0; z-index: 999;color: #ed8c0f;">客服qq:386501046</div>
+            <div class="psa" style="bottom: 0;left: 0; z-index: 999;color: #ed8c0f;">客服qq:2885393309</div>
         </div>
         <div class="right_menu df aic jcc psr">
             <van-icon name="bars" size="26" />

+ 1 - 1
src/layout/header.vue

@@ -36,7 +36,7 @@
         </el-dropdown>
       </router-link>
     </nav>
-    <div class="w1000 df aic jcc" style="padding-top: 8px;padding: 10px 0;height: 40px;font-size: 16px;color: #ed8c0f;">客服qq:386501046</div>
+    <div class="w1000 df aic jcc" style="padding-top: 8px;padding: 10px 0;height: 40px;font-size: 16px;color: #ed8c0f;">客服qq:2885393309</div>
   </div>
 </template>
 

+ 39 - 42
src/router/index.ts

@@ -1,10 +1,11 @@
-import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
+import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
 
-const redirectPath = /Android|webOS|iPhone|iPod|BlackBerry|iPad/i.test( navigator.userAgent) ? "/m_index" : "/p_index"
+const redirectPath = /Android|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent) ? '/m_index' : '/p_index'
+const VITEPLA:'QingQue'|'KuPai' = import.meta.env.VITE_LOGO_VISIBLE
 
 // 引入页面级别组件
 // 静态加载  初始化可见的页面----首屏加速
-import Layout from '@/layout/Layout.vue'   
+import Layout from '@/layout/Layout.vue'
 
 const routes:Array<RouteRecordRaw> = [
   {
@@ -16,7 +17,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_index',
     name: 'p_index',
     component: Layout,
-    meta: { type: 'pc', title:'朱雀游戏中心' },
+    meta: { type: 'pc', title: VITEPLA === 'QingQue' ? '朱雀游戏中心' : '游戏中心' },
     children: [
       {
         path: '/p_index',
@@ -29,7 +30,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_rank',
     name: 'p_rank',
     component: Layout,
-    meta: { type: 'pc', title:'游戏排行' },
+    meta: { type: 'pc', title: '游戏排行' },
     children: [
       {
         path: '/p_rank',
@@ -41,7 +42,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_reset',
     name: 'p_reset',
     component: Layout,
-    meta: { type: 'pc', title:'密码设置' },
+    meta: { type: 'pc', title: '密码设置' },
     children: [
       {
         path: '/p_reset',
@@ -54,7 +55,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_categroy',
     name: 'p_categroy',
     component: Layout,
-    meta: { type: 'pc', title:'游戏分类' },
+    meta: { type: 'pc', title: '游戏分类' },
     children: [
       {
         path: '/p_categroy',
@@ -67,7 +68,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_login',
     name: 'p_login',
     component: Layout,
-    meta: { type: 'pc', title:'游戏中心登录页' },
+    meta: { type: 'pc', title: '游戏中心登录页' },
     children: [
       {
         path: '/p_login',
@@ -75,12 +76,12 @@ const routes:Array<RouteRecordRaw> = [
       }
     ]
   },
-   // 我的
-   {
+  // 我的
+  {
     path: '/p_mine',
     name: 'p_mine',
     component: Layout,
-    meta: { type: 'pc', title:'我的游戏' },
+    meta: { type: 'pc', title: '我的游戏' },
     children: [
       {
         path: '/p_mine',
@@ -92,7 +93,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_order',
     name: 'order',
     component: Layout,
-    meta: { type: 'pc', title:'订单' },
+    meta: { type: 'pc', title: '订单' },
     children: [
       {
         path: '/p_order',
@@ -104,7 +105,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_ecoin',
     name: 'ecoin',
     component: Layout,
-    meta: { type: 'pc', title:'订单' },
+    meta: { type: 'pc', title: '订单' },
     children: [
       {
         path: '/p_ecoin',
@@ -116,7 +117,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_ncoin',
     name: 'ncoin',
     component: Layout,
-    meta: { type: 'pc', title:'订单' },
+    meta: { type: 'pc', title: '订单' },
     children: [
       {
         path: '/p_ncoin',
@@ -129,7 +130,7 @@ const routes:Array<RouteRecordRaw> = [
     path: '/p_search',
     name: 'p_search',
     component: Layout,
-    meta: { type: 'pc', title:'游戏搜索' },
+    meta: { type: 'pc', title: '游戏搜索' },
     children: [
       {
         path: '/p_search',
@@ -142,93 +143,89 @@ const routes:Array<RouteRecordRaw> = [
   {
     path: '/m_index',
     name: 'm_index',
-    meta: { type: 'mobile', title:'朱雀游戏中心' },
+    meta: { type: 'mobile', title: '朱雀游戏中心' },
     component: () => import('@/view/m_views/index/index.vue')
   },
   {
     path: '/m_rank',
     name: 'm_rank',
-    meta: { type: 'mobile', title:'排行' },
+    meta: { type: 'mobile', title: '排行' },
     component: () => import('@/view/m_views/rank/index.vue')
   },
   {
     path: '/m_categroy',
     name: 'm_categroy',
-    meta: { type: 'mobile', title:'游戏分类' },
+    meta: { type: 'mobile', title: '游戏分类' },
     component: () => import('@/view/m_views/categroy/index.vue')
   },
   {
     path: '/m_mine',
     name: 'm_mine',
-    meta: { type: 'mobile', title:'我的游戏' },
+    meta: { type: 'mobile', title: '我的游戏' },
     component: () => import('@/view/m_views/mine/index.vue')
   },
   {
     path: '/m_login',
     name: 'm_login',
-    meta: { type: 'mobile', title:'游戏中心登录页' },
+    meta: { type: 'mobile', title: '游戏中心登录页' },
     component: () => import('@/view/m_views/login/index.vue')
   },
   {
     path: '/m_search',
     name: 'm_search',
-    meta: { type: 'mobile', title:'游戏搜索' },
+    meta: { type: 'mobile', title: '游戏搜索' },
     component: () => import('@/view/m_views/search/index.vue')
   },
   {
     path: '/m_reset',
     name: 'm_reset',
-    meta: { type: 'mobile', title:'密码设置' },
+    meta: { type: 'mobile', title: '密码设置' },
     component: () => import('@/view/m_views/resetPwd/resetPwd.vue')
   },
   {
     path: '/m_order',
     name: 'm_order',
-    meta: { type: 'mobile', title:'订单' },
+    meta: { type: 'mobile', title: '订单' },
     component: () => import('@/view/m_views/order/index.vue')
   },
   {
     path: '/m_ecoin',
     name: 'm_ecoin',
-    meta: { type: 'mobile', title:'青雀币' },
+    meta: { type: 'mobile', title: '青雀币' },
     component: () => import('@/view/m_views/ecoin/index.vue')
   },
   {
     path: '/m_ncoin',
     name: 'm_ncoin',
-    meta: { type: 'mobile', title:'新币' },
+    meta: { type: 'mobile', title: '新币' },
     component: () => import('@/view/m_views/ncoin/index.vue')
   }
 ]
 
-
-
 const router = createRouter({
-  history: createWebHistory(),    //process.meta.VITE_HOST_API
-  routes,
+  history: createWebHistory(), // process.meta.VITE_HOST_API
+  routes
 })
-
 // 修改浏览器标题
 router.beforeEach((to, form, next) => {
-  
   const title:any = to.meta.title
 
   if (to.meta.title) {
-      document.title = title
+    document.title = title
   } else {
-      document.title = '朱雀游戏中心' //此处写默认的title
+    document.title = VITEPLA === 'QingQue' ? '朱雀游戏中心' : '游戏中心' // 此处写默认的title
   }
   // && needLoginPath.includes(to.path)
-  let token = localStorage.getItem('token')
-  let isMobile = !!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)
-  let whiteList = ['/m_login', '/p_login', '/p_index', '/m_index', '/p_rank', '/m_rank', '/p_categroy', '/m_categroy']
-  console.log(!token, !whiteList.includes(to.path));
-  
-  if(!token && !whiteList.includes(to.path) ){
-    isMobile? next('/m_login') : next('/p_login')
-  }else{
+  const token = localStorage.getItem('token')
+  const isMobile = !!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)
+  const whiteList = ['/m_login', '/p_login', '/p_index', '/m_index', '/p_rank', '/m_rank', '/p_categroy', '/m_categroy']
+  console.log(!token, !whiteList.includes(to.path))
+
+  if (!token && !whiteList.includes(to.path)) {
+    isMobile ? next('/m_login') : next('/p_login')
+  } else {
     next()
   }
 })
 
-export default router
+export default router

+ 1 - 1
src/view/m_views/index/index.vue

@@ -10,7 +10,7 @@
             <van-search shape='round' @click="router.push({ path: 'm_search' })" />
         </div>
 
-        <div class="df aic jcc" style="color: #ed8c0f;margin: 10px auto; font-size: 14px;">客服qq:386501046</div>
+        <div class="df aic jcc" style="color: #ed8c0f;margin: 10px auto; font-size: 14px;">客服qq:2885393309</div>
 
         <!-- 轮播图 -->
         <van-swipe class="my-swipe" indicator-color="white" :autoplay="3000">

+ 3 - 1
src/view/p_views/login/index.vue

@@ -29,7 +29,9 @@
                 <el-form-item label="验证码" prop="smsCaptcha">
                     <el-input v-model="loginForm.smsCaptcha" type="number" placeholder="请输入验证码" :prefix-icon="Lock">
                         <template #append>
-                            <el-button @click="getCaptcha" style="width: 100px;" :disabled ="!can_send">{{smsMessage}}</el-button>
+                            <div>
+                                <el-button @click="getCaptcha" color="#ed8c0f" style="width: 100px;" :disabled ="!can_send">{{smsMessage}}</el-button>
+                            </div>
                         </template>
                     </el-input>
                 </el-form-item>

Diferenças do arquivo suprimidas por serem muito extensas
+ 1832 - 1944
yarn.lock