Repository: Neveryu/official-website Branch: master Commit: 4307b62f0401 Files: 28 Total size: 58.6 KB Directory structure: gitextract_t8uq2tzh/ ├── .editorconfig ├── .github/ │ └── workflows/ │ └── deploy.yml ├── .gitignore ├── .prettierrc ├── .vscode/ │ └── extensions.json ├── README.md ├── index.html ├── package.json ├── src/ │ ├── App.vue │ ├── common/ │ │ └── load-bmap.js │ ├── components/ │ │ ├── Footer.vue │ │ ├── GoTop.vue │ │ └── Header.vue │ ├── main.js │ ├── router/ │ │ └── index.js │ ├── style.css │ └── view/ │ ├── CompanyIntroduction.vue │ ├── ContactUs.vue │ ├── HomePage.vue │ ├── JobChance.vue │ ├── NewsInformation.vue │ ├── PageView.vue │ ├── Service.vue │ ├── ServiceDetail.vue │ ├── Software.vue │ ├── Software_bigData.vue │ └── Software_smartTown.vue └── vite.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # https://editorconfig.org root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true quote_type = single [*.md] insert_final_newline = false trim_trailing_whitespace = false ================================================ FILE: .github/workflows/deploy.yml ================================================ # This is a basic workflow to help you get started with Actions name: deploy # Controls when the workflow will run on: # Triggers the workflow on push events but only for the master branch push: branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout master uses: actions/checkout@v3 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. with: ref: master persist-credentials: false - name: Setup node uses: actions/setup-node@v3 with: node-version: '16.x' - name: Install and Build run: yarn && yarn build - name: Deploy uses: JamesIves/github-pages-deploy-action@4.1.7 with: token: ${{ secrets.ACCESS_TOKEN }} single-commit: true branch: gh-pages clean: true folder: dist ================================================ FILE: .gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* node_modules dist dist-ssr *.local # Editor directories and files .vscode/* !.vscode/extensions.json .idea .DS_Store *.suo *.ntvs* *.njsproj *.sln *.sw? package-lock.json ================================================ FILE: .prettierrc ================================================ { "semi": false, "singleQuote": true, "trailingComma": "none", "printWidth": 80, "endOfLine": "crlf", "overrides": [ { "files": ".prettierrc", "options": { "parser": "json" } } ] } ================================================ FILE: .vscode/extensions.json ================================================ { "recommendations": ["Vue.volar"] } ================================================ FILE: README.md ================================================ # Official-website > 响应式的企业官方网站模板,使用 [Vite](https://cn.vitejs.dev/) 脚手架搭建,使用 [Vue3](https://cn.vuejs.org/) 开发。 ## 运行/启动 ```bash npm i npm run dev ``` ## 构建&预览 ```bash # 构建生产环境 npm run build # 预览构建的产品 npm run preview ``` ## Vue 3 + Vite This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `
================================================ FILE: package.json ================================================ { "name": "official-website", "private": true, "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { "animate.css": "^4.1.1", "jquery": "^3.6.1", "swiper": "^8.4.5", "vue": "^3.2.41", "vue-router": "^4.1.6", "wow.js": "^1.2.2" }, "devDependencies": { "@rollup/plugin-inject": "^5.0.2", "@vitejs/plugin-vue": "^3.2.0", "vite": "^3.2.3", "vite-plugin-html": "^3.2.0" } } ================================================ FILE: src/App.vue ================================================ ================================================ FILE: src/common/load-bmap.js ================================================ export function Bmap() { return new Promise(function (resolve, reject) { window.initBMapGL = function () { console.log('initBMapGL') resolve() } let script = document.createElement('script') script.type = 'text/javascript' script.src = `//api.map.baidu.com/api?v=3.0&ak=jcI3Q88g6V99OPBjLryoOqPTtsRdedHA&callback=initBMapGL` script.onerror = reject document.head.appendChild(script) }) } ================================================ FILE: src/components/Footer.vue ================================================ ================================================ FILE: src/components/GoTop.vue ================================================ ================================================ FILE: src/components/Header.vue ================================================ ================================================ FILE: src/main.js ================================================ import { createApp } from 'vue' import { createRouter } from '@/router' /* swiper */ // import 'swiper/swiper.min.css' /* 重置样式 */ import './assets/css/reset.min.css' // import 'jquery' import './assets/css/bootstrap.min.css' import './assets/js/bootstrap.min.js' /* animate.css */ import 'wow.js/css/libs/animate.css' import App from './App.vue' const router = createRouter() const app = createApp(App) app.use(router).mount('#app') ================================================ FILE: src/router/index.js ================================================ import { createRouter as _createRouter, createWebHashHistory } from 'vue-router' // const pages = import.meta.glob('../src/pages/**/*.vue') // const routes = Object.keys(pages).map((path)=>{ // let name = path.match(/\/pages(.*)\.vue$/)[1].toLowerCase(); // if(name.substring(name.length - 5) == 'index'){ // name = name.slice(0, -5);//去掉最后的index // } // return { // path: name === '/home' ? '/': name, // component: pages[path] // } // }) const routes = [ { path: '/', name: 'PageView', redirect: '/home', component: () => import('@/view/PageView.vue'), children: [ { path: '/home', name: 'Home', component: () => import('@/view/HomePage.vue'), meta: { title: '首页' } }, { path: '/software', name: 'software', component: () => import('@/view/Software.vue'), redirect: '/software/smartTown', meta: { title: '软件产品' }, children: [ { path: '/software/smartTown', name: 'smartTown', component: () => import('@/view/Software_smartTown.vue'), meta: { title: '软件产品丨智能小镇管理系统' } }, { path: '/software/bigData', name: 'bigData', component: () => import('@/view/Software_bigData.vue'), meta: { title: '软件产品丨大数据管理系统' } } ] }, { path: '/service', name: 'service', component: () => import('@/view/Service.vue'), props: true, meta: { title: '相关服务' } }, { path: '/servicedetail', name: 'serviceDetail', component: () => import('@/view/ServiceDetail.vue'), props: true, meta: { title: '相关服务-详情' } }, { path: '/newsinformation', name: 'newsInformation', component: () => import('@/view/NewsInformation.vue'), meta: { title: '新闻动态' } }, { path: '/companyintroduction', name: 'companyIntroduction', component: () => import('@/view/CompanyIntroduction.vue'), meta: { title: '公司介绍' } }, { path: '/jobchance', name: 'jobChance', component: () => import('@/view/JobChance.vue'), meta: { title: '工作机会' } }, { path: '/contactus', name: 'contactUs', component: () => import('@/view/ContactUs.vue'), meta: { title: '联系我们' } } ] } ] export function createRouter() { return _createRouter({ history: createWebHashHistory(), routes }) } ================================================ FILE: src/style.css ================================================ :root { font-family: Inter, Avenir, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; font-weight: 400; color-scheme: light dark; color: rgba(255, 255, 255, 0.87); background-color: #242424; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; } a { font-weight: 500; color: #646cff; text-decoration: inherit; } a:hover { color: #535bf2; } a { font-weight: 500; color: #646cff; text-decoration: inherit; } a:hover { color: #535bf2; } body { margin: 0; display: flex; place-items: center; min-width: 320px; min-height: 100vh; } h1 { font-size: 3.2em; line-height: 1.1; } button { border-radius: 8px; border: 1px solid transparent; padding: 0.6em 1.2em; font-size: 1em; font-weight: 500; font-family: inherit; background-color: #1a1a1a; cursor: pointer; transition: border-color 0.25s; } button:hover { border-color: #646cff; } button:focus, button:focus-visible { outline: 4px auto -webkit-focus-ring-color; } .card { padding: 2em; } #app { max-width: 1280px; margin: 0 auto; padding: 2rem; text-align: center; } @media (prefers-color-scheme: light) { :root { color: #213547; background-color: #ffffff; } a:hover { color: #747bff; } button { background-color: #f9f9f9; } } ================================================ FILE: src/view/CompanyIntroduction.vue ================================================ ================================================ FILE: src/view/ContactUs.vue ================================================ ================================================ FILE: src/view/HomePage.vue ================================================ ================================================ FILE: src/view/JobChance.vue ================================================ ================================================ FILE: src/view/NewsInformation.vue ================================================ ================================================ FILE: src/view/PageView.vue ================================================ ================================================ FILE: src/view/Service.vue ================================================ ================================================ FILE: src/view/ServiceDetail.vue ================================================ ================================================ FILE: src/view/Software.vue ================================================ ================================================ FILE: src/view/Software_bigData.vue ================================================ ================================================ FILE: src/view/Software_smartTown.vue ================================================ ================================================ FILE: vite.config.js ================================================ import { resolve } from 'path' import { defineConfig, loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' import inject from '@rollup/plugin-inject' import { createHtmlPlugin } from 'vite-plugin-html' // https://vitejs.dev/config/ export default defineConfig({ base: '/official-website/', plugins: [ vue(), inject({ $: 'jquery', // 这里会自动载入 node_modules 中的 jquery jQuery: 'jquery', 'windows.jQuery': 'jquery', BMap: 'BMap' }), createHtmlPlugin({ /** * 需要注入 index.html ejs 模版的数据 * https://blog.csdn.net/SilenceJude/article/details/128297371 */ inject: { data: { VITE_APP_VERSION: new Date().toLocaleString() } } }) ], resolve: { alias: { '@': resolve(__dirname, './src') } } })