浏览代码

1. 显示的游戏内容改成配置文件 2. 显示的游戏内容改成仙侠类, 所有仙侠跳转wcfml官网

gongyan 4 年之前
父节点
当前提交
9ddd94afcd

+ 12 - 1
README.md

@@ -1,6 +1,17 @@
-## 启动
+# 启动
+
 npm start
 
 ## 打包
+
 npm run build
 
+# 版本
+
+## v1.0.0
+
+所有地址跳转 rxzr
+
+## v1.1.0
+
+所有地址跳转 wcfml 官网->https://game.jhfly.cn/wcfml/

+ 5 - 9
config/index.js

@@ -9,19 +9,15 @@ module.exports = {
 
         // Paths
         assetsSubDirectory: 'static',
-        assetsPublicPath: './',
-        proxyTable: {
-
-        },
-
+        assetsPublicPath: '/',
         // Various Dev Server settings
-        host: '0.0.0.0', // can be overwritten by process.env.HOST
+        host: '10.10.100.159', // can be overwritten by process.env.HOST
         port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
         autoOpenBrowser: false,
         errorOverlay: true,
         notifyOnErrors: true,
         poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
-
+        proxyTable: {},
 
         /**
          * Source Maps
@@ -45,13 +41,13 @@ module.exports = {
         // Paths
         assetsRoot: path.resolve(__dirname, '../dist'),
         assetsSubDirectory: 'static',
-        assetsPublicPath: '/',
+        assetsPublicPath: './',
 
         /**
          * Source Maps
          */
 
-        productionSourceMap: true,
+        productionSourceMap: false, // true 打包会生成map文件
         // https://webpack.js.org/configuration/devtool/#production
         devtool: '#source-map',
 

+ 0 - 53
directoryList.md

@@ -1,53 +0,0 @@
-|-- vue-demo
-    |-- .babelrc
-    |-- .editorconfig
-    |-- .gitignore
-    |-- .postcssrc.js
-    |-- index.html
-    |-- package-lock.json
-    |-- package.json
-    |-- README.md
-    |-- build                       => 项目打包配置文件
-    |   |-- build.js
-    |   |-- check-versions.js
-    |   |-- logo.png
-    |   |-- utils.js
-    |   |-- vue-loader.conf.js
-    |   |-- webpack.base.conf.js
-    |   |-- webpack.dev.conf.js
-    |   |-- webpack.prod.conf.js
-    |-- config                      => 项目启动配置文件
-    |   |-- dev.env.js
-    |   |-- index.js                    => 此处修改启动地址
-    |   |-- prod.env.js
-    |-- src                         => 项目编码位置
-    |   |-- App.vue                     
-    |   |-- main.js         
-    |   |-- api                     => 网络请求api
-    |   |   |-- base.js                 => 所有接口地址
-    |   |   |-- index.js                => 所有网络请求
-    |   |-- assets                  => 一些静态资源
-    |   |   |-- common.css              => 公共样式
-    |   |   |-- logo.png
-    |   |-- components              => 公用组件
-    |   |   |-- Login                   
-    |   |   |   |-- Login.vue
-    |   |   |-- TopNav
-    |   |       |-- TopNav.vue
-    |   |-- router                  => 路由
-    |   |   |-- index.js
-    |   |-- store                   => vuex-store
-    |   |   |-- index.js
-    |   |-- utils                   => axios请求拦截器
-    |   |   |-- http.js
-    |   |-- views                   => 页面
-    |       |-- Home
-    |       |   |-- Home.vue
-    |       |-- Mine
-    |       |   |-- Mine.vue
-    |       |-- NotFound
-    |       |   |-- NotFound.vue
-    |       |-- Top
-    |           |-- Top.vue
-    |-- static
-        |-- .gitkeep

二进制
game.jhfly 忘川伏魔录 v1.1.0.zip


+ 82 - 82
package.json

@@ -1,83 +1,83 @@
 {
-  "name": "vue-demo",
-  "version": "1.0.0",
-  "private": true,
-  "description": "vue项目模板",
-  "author": "苏天天",
-  "scripts": {
-    "build": "node build/build.js",
-    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
-    "start": "npm run dev"
-  },
-  "dependencies": {
-    "axios": "^0.21.0",
-    "element-ui": "^2.14.0",
-    "es6-promise": "^4.2.8",
-    "vue": "^2.5.2",
-    "vue-router": "^3.0.1",
-    "vuex": "^3.5.1"
-  },
-  "devDependencies": {
-    "autoprefixer": "^7.1.2",
-    "babel-core": "^6.22.1",
-    "babel-helper-vue-jsx-merge-props": "^2.0.3",
-    "babel-loader": "^7.1.1",
-    "babel-plugin-component": "^1.1.1",
-    "babel-plugin-syntax-jsx": "^6.18.0",
-    "babel-plugin-transform-runtime": "^6.22.0",
-    "babel-plugin-transform-vue-jsx": "^3.5.0",
-    "babel-preset-env": "^1.3.2",
-    "babel-preset-stage-2": "^6.22.0",
-    "chalk": "^2.0.1",
-    "copy-webpack-plugin": "^4.0.1",
-    "css-loader": "^0.28.0",
-    "extract-text-webpack-plugin": "^3.0.0",
-    "file-loader": "^1.1.4",
-    "friendly-errors-webpack-plugin": "^1.6.1",
-    "html-webpack-plugin": "^2.30.1",
-    "less": "^3.12.2",
-    "less-loader": "^4.1.0",
-    "node-notifier": "^5.1.2",
-    "optimize-css-assets-webpack-plugin": "^3.2.0",
-    "ora": "^1.2.0",
-    "portfinder": "^1.0.13",
-    "postcss-import": "^11.0.0",
-    "postcss-loader": "^2.0.8",
-    "postcss-url": "^7.2.1",
-    "querystring": "^0.2.0",
-    "rimraf": "^2.6.0",
-    "sass-resources-loader": "^2.1.1",
-    "semver": "^5.3.0",
-    "shelljs": "^0.7.6",
-    "uglifyjs-webpack-plugin": "^1.1.1",
-    "url-loader": "^0.5.8",
-    "vue-cli-plugin-element": "~1.0.1",
-    "vue-loader": "^13.3.0",
-    "vue-style-loader": "^3.0.1",
-    "vue-template-compiler": "^2.5.2",
-    "webpack": "^3.6.0",
-    "webpack-bundle-analyzer": "^2.9.0",
-    "webpack-dev-server": "^2.9.1",
-    "webpack-merge": "^4.1.0"
-  },
-  "babel": {
-    "plugins": [
-      [
-        "component",
-        {
-          "libraryName": "element-ui",
-          "styleLibraryName": "theme-chalk"
-        }
-      ]
-    ]
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions",
-    "not ie <= 8"
-  ],
-  "engines": {
-    "node": ">= 6.0.0",
-    "npm": ">= 3.0.0"
-  }
-}
+    "name": "vue-demo",
+    "version": "1.1.0",
+    "private": true,
+    "description": "vue项目模板",
+    "author": "苏天天",
+    "scripts": {
+        "build": "node build/build.js",
+        "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+        "start": "npm run dev"
+    },
+    "dependencies": {
+        "axios": "^0.21.0",
+        "element-ui": "^2.14.0",
+        "es6-promise": "^4.2.8",
+        "vue": "^2.5.2",
+        "vue-router": "^3.0.1",
+        "vuex": "^3.5.1"
+    },
+    "devDependencies": {
+        "autoprefixer": "^7.1.2",
+        "babel-core": "^6.22.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.3",
+        "babel-loader": "^7.1.1",
+        "babel-plugin-component": "^1.1.1",
+        "babel-plugin-syntax-jsx": "^6.18.0",
+        "babel-plugin-transform-runtime": "^6.22.0",
+        "babel-plugin-transform-vue-jsx": "^3.5.0",
+        "babel-preset-env": "^1.3.2",
+        "babel-preset-stage-2": "^6.22.0",
+        "chalk": "^2.0.1",
+        "copy-webpack-plugin": "^4.0.1",
+        "css-loader": "^0.28.0",
+        "extract-text-webpack-plugin": "^3.0.0",
+        "file-loader": "^1.1.4",
+        "friendly-errors-webpack-plugin": "^1.6.1",
+        "html-webpack-plugin": "^2.30.1",
+        "less": "^3.12.2",
+        "less-loader": "^4.1.0",
+        "node-notifier": "^5.1.2",
+        "optimize-css-assets-webpack-plugin": "^3.2.0",
+        "ora": "^1.2.0",
+        "portfinder": "^1.0.13",
+        "postcss-import": "^11.0.0",
+        "postcss-loader": "^2.0.8",
+        "postcss-url": "^7.2.1",
+        "querystring": "^0.2.0",
+        "rimraf": "^2.6.0",
+        "sass-resources-loader": "^2.1.1",
+        "semver": "^5.3.0",
+        "shelljs": "^0.7.6",
+        "uglifyjs-webpack-plugin": "^1.1.1",
+        "url-loader": "^0.5.8",
+        "vue-cli-plugin-element": "~1.0.1",
+        "vue-loader": "^13.3.0",
+        "vue-style-loader": "^3.0.1",
+        "vue-template-compiler": "^2.5.2",
+        "webpack": "^3.6.0",
+        "webpack-bundle-analyzer": "^2.9.0",
+        "webpack-dev-server": "^2.9.1",
+        "webpack-merge": "^4.1.0"
+    },
+    "babel": {
+        "plugins": [
+            [
+                "component",
+                {
+                    "libraryName": "element-ui",
+                    "styleLibraryName": "theme-chalk"
+                }
+            ]
+        ]
+    },
+    "browserslist": [
+        "> 1%",
+        "last 2 versions",
+        "not ie <= 8"
+    ],
+    "engines": {
+        "node": ">= 6.0.0",
+        "npm": ">= 3.0.0"
+    }
+}

二进制
src/assets/image/game1_48.png


二进制
src/assets/image/game2_48.png


二进制
src/assets/image/game3_48.png


二进制
src/assets/image/game4_48.png


二进制
src/assets/image/game5_48.png


二进制
src/assets/image/game6_48.png


二进制
src/assets/image/game7_48.png


二进制
src/assets/image/game8_48.png


+ 49 - 0
src/config.js

@@ -0,0 +1,49 @@
+import game1_48 from "@/assets/image/game1_48.png";
+import game2_48 from "@/assets/image/game2_48.png";
+import game3_48 from "@/assets/image/game3_48.png";
+import game4_48 from "@/assets/image/game4_48.png";
+import game5_48 from "@/assets/image/game5_48.png";
+import game6_48 from "@/assets/image/game6_48.png";
+import game7_48 from "@/assets/image/game7_48.png";
+import game8_48 from "@/assets/image/game8_48.png";
+const CONFIG = {
+    // 所有游戏跳转地址
+    jumpUrl: "https://game.jhfly.cn/wcfml/",
+    // 精品游戏榜
+    gameInfoJP: [{
+            gameName: "忘川伏魔录",
+            image: game4_48,
+        }, {
+            gameName: "山海传说",
+            image: game1_48,
+        },
+        {
+            gameName: "武动风云",
+            image: game2_48,
+        },
+        {
+            gameName: "苍云决",
+            image: game3_48,
+        }
+    ],
+    // h5 游戏榜
+    gameInfoH5: [{
+            gameName: "一梦江湖",
+            image: game5_48,
+        },
+        {
+            gameName: "神仙劫",
+            image: game6_48,
+        },
+        {
+            gameName: "泽天神域",
+            image: game7_48,
+        },
+        {
+            gameName: "大话西游2",
+            image: game8_48,
+        },
+    ],
+}
+
+export default CONFIG

+ 4 - 2
src/main.js

@@ -4,12 +4,14 @@ import Vue from 'vue'
 import App from './App'
 import router from './router'
 import store from './store/index'
-import './plugins/element.js'
+// import './plugins/element.js'
 import './assets/css/common.css'
 import api from './api/index'
 import './plugins/flexible'
+import CONFIG from "./config"
 
 Vue.prototype.$api = api
+Vue.prototype.$CONFIG = CONFIG
 Vue.config.productionTip = false
 
 /* eslint-disable no-new */
@@ -21,4 +23,4 @@ new Vue({
         App
     },
     template: '<App/>'
-})
+})

+ 1 - 1
src/views/Home/HomeGames/HomeGames.vue

@@ -51,7 +51,7 @@ export default {
   mounted() {},
   methods: {
     toH5Game() {
-      window.location.href = "https://h5.jhfly.cn/rxzr/";
+      window.location.href = this.$CONFIG.jumpUrl;
     },
   },
 };

+ 3 - 50
src/views/Home/HomeTop/HomeTop.vue

@@ -3,9 +3,9 @@
     <!-- 顶部导航 -->
     <TopNav />
     <!-- 精品游戏榜 -->
-    <HomeGames title="精品游戏榜" :gameList="h5GameList1" />
+    <HomeGames title="精品游戏榜" :gameList="$CONFIG.gameInfoJP" />
     <!-- H5游戏榜 -->
-    <HomeGames title="H5游戏榜" :gameList="h5GameList2" />
+    <HomeGames title="H5游戏榜" :gameList="$CONFIG.gameInfoH5" />
   </div>
 </template>
 
@@ -14,14 +14,6 @@
 import TopNav from "@/components/TopNav/TopNav";
 // 游戏列表
 import HomeGames from "@/views/Home/HomeGames/HomeGames";
-import game1_48 from "@/assets/image/game1_48.png";
-import game2_48 from "@/assets/image/game2_48.png";
-import game3_48 from "@/assets/image/game3_48.png";
-import game4_48 from "@/assets/image/game4_48.png";
-import game5_48 from "@/assets/image/game5_48.png";
-import game6_48 from "@/assets/image/game6_48.png";
-import game7_48 from "@/assets/image/game7_48.png";
-import game8_48 from "@/assets/image/game8_48.png";
 export default {
   name: "HomeTop",
   components: {
@@ -29,46 +21,7 @@ export default {
     HomeGames,
   },
   data() {
-    return {
-      // 精品游戏榜
-      h5GameList1: [
-        {
-          gameName: "修仙传奇",
-          image: game1_48,
-        },
-        {
-          gameName: "神魔降世",
-          image: game2_48,
-        },
-        {
-          gameName: "蓝月传奇",
-          image: game3_48,
-        },
-        {
-          gameName: "雷霆霸业",
-          image: game4_48,
-        },
-      ],
-      // h5 游戏榜
-      h5GameList2: [
-        {
-          gameName: "一刀传世",
-          image: game7_48,
-        },
-        {
-          gameName: "传奇盛世",
-          image: game8_48,
-        },
-        {
-          gameName: "复古传奇",
-          image: game5_48,
-        },
-        {
-          gameName: "热血传说",
-          image: game6_48,
-        },
-      ],
-    };
+    return {};
   },
   computed: {},
   watch: {},