lrf402788946 5 년 전
부모
커밋
c6461b1619
60개의 변경된 파일2305개의 추가작업 그리고 78개의 파일을 삭제
  1. 2 0
      .env
  2. 33 0
      .eslintrc.js
  3. 205 10
      package-lock.json
  4. 6 0
      package.json
  5. 33 23
      src/App.vue
  6. BIN
      src/assets/home/bg.jpg
  7. BIN
      src/assets/home/gk1.png
  8. BIN
      src/assets/home/gk2.png
  9. BIN
      src/assets/home/gk3.png
  10. BIN
      src/assets/home/gk4.png
  11. BIN
      src/assets/home/gk5.png
  12. BIN
      src/assets/home/gk6.png
  13. BIN
      src/assets/home/logo.png
  14. BIN
      src/assets/home/zw1.jpg
  15. BIN
      src/assets/home/zw1.png
  16. BIN
      src/assets/home/zw2.png
  17. BIN
      src/assets/home/zw3.png
  18. BIN
      src/assets/home/zw4.png
  19. BIN
      src/assets/home/zw5.png
  20. BIN
      src/assets/home/zw6.png
  21. BIN
      src/assets/home/zw7.png
  22. BIN
      src/assets/home/zw8.png
  23. BIN
      src/assets/home/更多.png
  24. BIN
      src/assets/logo.png
  25. 49 0
      src/layout/home/foot.vue
  26. 165 0
      src/layout/home/government.vue
  27. 83 0
      src/layout/home/layout.vue
  28. 40 0
      src/layout/home/logo.vue
  29. 84 0
      src/layout/home/menuInfo.vue
  30. 77 0
      src/layout/home/top.vue
  31. 15 7
      src/main.js
  32. 19 0
      src/plugins/axios.js
  33. 39 0
      src/plugins/check-res.js
  34. 5 0
      src/plugins/element.js
  35. 6 0
      src/plugins/filters.js
  36. 27 0
      src/plugins/loading.js
  37. 4 0
      src/plugins/meta.js
  38. 20 0
      src/plugins/setting.js
  39. 65 0
      src/plugins/stomp.js
  40. 19 0
      src/router/before.js
  41. 19 16
      src/router/index.js
  42. 7 6
      src/store/index.js
  43. 33 0
      src/store/user/mutations.js
  44. 2 0
      src/store/user/state.js
  45. 117 0
      src/util/axios-wrapper.js
  46. 10 0
      src/util/filters.js
  47. 50 0
      src/util/methods-util.js
  48. 47 0
      src/util/optionTitles.js
  49. 69 0
      src/util/user-util.js
  50. 0 5
      src/views/About.vue
  51. 23 10
      src/views/Home.vue
  52. 199 0
      src/views/home/index.vue
  53. 70 0
      src/views/home/parts/gongzhong.vue
  54. 57 0
      src/views/home/parts/linkInfo.vue
  55. 176 0
      src/views/home/parts/news.vue
  56. 105 0
      src/views/home/parts/notice.vue
  57. 55 0
      src/views/home/parts/photoNews.vue
  58. 90 0
      src/views/home/parts/policyrightcont.vue
  59. 102 0
      src/views/home/parts/zhengwu.vue
  60. 78 1
      vue.config.js

+ 2 - 0
.env

@@ -0,0 +1,2 @@
+VUE_APP_AXIOS_BASE_URL = ''
+VUE_APP_ROUTER="/platweb"

+ 33 - 0
.eslintrc.js

@@ -0,0 +1,33 @@
+// https://eslint.org/docs/user-guide/configuring
+
+module.exports = {
+  root: true,
+  env: {
+    node: true,
+  },
+  extends: ['plugin:vue/essential', '@vue/prettier'],
+  plugins: ['vue'],
+  rules: {
+    'max-len': [
+      'warn',
+      {
+        code: 250,
+      },
+    ],
+    'no-unused-vars': 'off',
+    'no-console': 'off',
+    'prettier/prettier': [
+      'warn',
+      {
+        singleQuote: true,
+        trailingComma: 'es5',
+        bracketSpacing: true,
+        jsxBracketSameLine: true,
+        printWidth: 160,
+      },
+    ],
+  },
+  parserOptions: {
+    parser: 'babel-eslint',
+  },
+};

+ 205 - 10
package-lock.json

@@ -2126,6 +2126,14 @@
       "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=",
       "dev": true
     },
+    "async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1583827392542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz",
+      "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
+      "requires": {
+        "babel-runtime": "6.x"
+      }
+    },
     "asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
@@ -2165,6 +2173,37 @@
       "integrity": "sha1-fjPY99RJs/ZzzXLeuavcVS2+Uo4=",
       "dev": true
     },
+    "axios": {
+      "version": "0.19.2",
+      "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.2.tgz",
+      "integrity": "sha1-PqNsXYgY0NX4qKl6bTa4bNwAyyc=",
+      "requires": {
+        "follow-redirects": "1.5.10"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
+          "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "follow-redirects": {
+          "version": "1.5.10",
+          "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz?cache=0&sync_timestamp=1585479417937&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.5.10.tgz",
+          "integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
+          "requires": {
+            "debug": "=3.1.0"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+        }
+      }
+    },
     "babel-eslint": {
       "version": "10.1.0",
       "resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz?cache=0&sync_timestamp=1582676152339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-eslint%2Fdownload%2Fbabel-eslint-10.1.0.tgz",
@@ -2179,6 +2218,11 @@
         "resolve": "^1.12.0"
       }
     },
+    "babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
+    },
     "babel-loader": {
       "version": "8.1.0",
       "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz?cache=0&sync_timestamp=1584715910722&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.1.0.tgz",
@@ -2201,6 +2245,27 @@
         "object.assign": "^4.1.0"
       }
     },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz",
+      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      },
+      "dependencies": {
+        "core-js": {
+          "version": "2.6.11",
+          "resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz",
+          "integrity": "sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw="
+        },
+        "regenerator-runtime": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&sync_timestamp=1584052392667&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz",
+          "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk="
+        }
+      }
+    },
     "balanced-match": {
       "version": "1.0.0",
       "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
@@ -2537,6 +2602,11 @@
         "isarray": "^1.0.0"
       }
     },
+    "buffer-equal-constant-time": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npm.taobao.org/buffer-equal-constant-time/download/buffer-equal-constant-time-1.0.1.tgz",
+      "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
+    },
     "buffer-from": {
       "version": "1.1.1",
       "resolved": "https://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz",
@@ -3739,8 +3809,7 @@
     "deepmerge": {
       "version": "1.5.2",
       "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
-      "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=",
-      "dev": true
+      "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
     },
     "default-gateway": {
       "version": "5.0.5",
@@ -4161,6 +4230,14 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "ecdsa-sig-formatter": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npm.taobao.org/ecdsa-sig-formatter/download/ecdsa-sig-formatter-1.0.11.tgz",
+      "integrity": "sha1-rg8PothQRe8UqBfao86azQSJ5b8=",
+      "requires": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@@ -4179,6 +4256,19 @@
       "integrity": "sha1-yaQ4D/CtPibNG0tM74ANF8Rq7H4=",
       "dev": true
     },
+    "element-ui": {
+      "version": "2.13.1",
+      "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.13.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.13.1.tgz",
+      "integrity": "sha1-DLGkXPJ6phxgHe++GSdArFy533w=",
+      "requires": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      }
+    },
     "elliptic": {
       "version": "6.5.2",
       "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.2.tgz",
@@ -6960,6 +7050,23 @@
         "graceful-fs": "^4.1.6"
       }
     },
+    "jsonwebtoken": {
+      "version": "8.5.1",
+      "resolved": "https://registry.npm.taobao.org/jsonwebtoken/download/jsonwebtoken-8.5.1.tgz",
+      "integrity": "sha1-AOceC431TCEhofJhN98igGc7zA0=",
+      "requires": {
+        "jws": "^3.2.2",
+        "lodash.includes": "^4.3.0",
+        "lodash.isboolean": "^3.0.3",
+        "lodash.isinteger": "^4.0.4",
+        "lodash.isnumber": "^3.0.3",
+        "lodash.isplainobject": "^4.0.6",
+        "lodash.isstring": "^4.0.1",
+        "lodash.once": "^4.0.0",
+        "ms": "^2.1.1",
+        "semver": "^5.6.0"
+      }
+    },
     "jsprim": {
       "version": "1.4.1",
       "resolved": "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz",
@@ -6972,6 +7079,25 @@
         "verror": "1.10.0"
       }
     },
+    "jwa": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npm.taobao.org/jwa/download/jwa-1.4.1.tgz?cache=0&sync_timestamp=1576560341481&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjwa%2Fdownload%2Fjwa-1.4.1.tgz",
+      "integrity": "sha1-dDwymFy56YZVUw1TZBtmyGRbA5o=",
+      "requires": {
+        "buffer-equal-constant-time": "1.0.1",
+        "ecdsa-sig-formatter": "1.0.11",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "jws": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npm.taobao.org/jws/download/jws-3.2.2.tgz",
+      "integrity": "sha1-ABCZ82OUaMlBQADpmZX6UvtHgwQ=",
+      "requires": {
+        "jwa": "^1.4.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
     "killable": {
       "version": "1.0.1",
       "resolved": "https://registry.npm.taobao.org/killable/download/killable-1.0.1.tgz",
@@ -7194,8 +7320,7 @@
     "lodash": {
       "version": "4.17.15",
       "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz",
-      "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=",
-      "dev": true
+      "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg="
     },
     "lodash.defaultsdeep": {
       "version": "4.6.1",
@@ -7203,6 +7328,36 @@
       "integrity": "sha1-US6b1yHSctlOPTpjZT+hdRZ0HKY=",
       "dev": true
     },
+    "lodash.includes": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npm.taobao.org/lodash.includes/download/lodash.includes-4.3.0.tgz",
+      "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
+    },
+    "lodash.isboolean": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npm.taobao.org/lodash.isboolean/download/lodash.isboolean-3.0.3.tgz",
+      "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
+    },
+    "lodash.isinteger": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npm.taobao.org/lodash.isinteger/download/lodash.isinteger-4.0.4.tgz",
+      "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
+    },
+    "lodash.isnumber": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npm.taobao.org/lodash.isnumber/download/lodash.isnumber-3.0.3.tgz",
+      "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
+    },
+    "lodash.isplainobject": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npm.taobao.org/lodash.isplainobject/download/lodash.isplainobject-4.0.6.tgz",
+      "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
+    },
+    "lodash.isstring": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npm.taobao.org/lodash.isstring/download/lodash.isstring-4.0.1.tgz",
+      "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
+    },
     "lodash.kebabcase": {
       "version": "4.1.1",
       "resolved": "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz",
@@ -7221,6 +7376,11 @@
       "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
       "dev": true
     },
+    "lodash.once": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npm.taobao.org/lodash.once/download/lodash.once-4.1.1.tgz",
+      "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
+    },
     "lodash.transform": {
       "version": "4.6.0",
       "resolved": "https://registry.npm.taobao.org/lodash.transform/download/lodash.transform-4.6.0.tgz",
@@ -7630,8 +7790,7 @@
     "ms": {
       "version": "2.1.2",
       "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz",
-      "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=",
-      "dev": true
+      "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk="
     },
     "multicast-dns": {
       "version": "6.2.3",
@@ -7666,6 +7825,14 @@
         "thenify-all": "^1.0.0"
       }
     },
+    "naf-core": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npm.taobao.org/naf-core/download/naf-core-0.1.2.tgz",
+      "integrity": "sha1-0UetT3+BTsnSvYGPWCOVHgWAsJU=",
+      "requires": {
+        "lodash": "^4.17.11"
+      }
+    },
     "nan": {
       "version": "2.14.0",
       "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.0.tgz",
@@ -7817,6 +7984,11 @@
       "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=",
       "dev": true
     },
+    "normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
+    },
     "npm-run-path": {
       "version": "2.0.2",
       "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
@@ -9564,6 +9736,11 @@
       "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
       "dev": true
     },
+    "resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
+    },
     "resolve": {
       "version": "1.16.0",
       "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.16.0.tgz?cache=0&sync_timestamp=1586994454579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.16.0.tgz",
@@ -9677,8 +9854,7 @@
     "safe-buffer": {
       "version": "5.1.2",
       "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz",
-      "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=",
-      "dev": true
+      "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
     },
     "safe-regex": {
       "version": "1.1.0",
@@ -9729,8 +9905,7 @@
     "semver": {
       "version": "5.7.1",
       "resolved": "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1586886301819&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz",
-      "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=",
-      "dev": true
+      "integrity": "sha1-qVT5Ma66UI0we78Gnv8MAclhFvc="
     },
     "send": {
       "version": "0.17.1",
@@ -10710,6 +10885,11 @@
         "neo-async": "^2.6.0"
       }
     },
+    "throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
+    },
     "through": {
       "version": "2.3.8",
       "resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz",
@@ -11282,6 +11462,21 @@
         }
       }
     },
+    "vue-meta": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npm.taobao.org/vue-meta/download/vue-meta-2.3.3.tgz",
+      "integrity": "sha1-Kgl/YoFyBLDaeL5NYq7gy1ZuruA=",
+      "requires": {
+        "deepmerge": "^4.2.2"
+      },
+      "dependencies": {
+        "deepmerge": {
+          "version": "4.2.2",
+          "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-4.2.2.tgz",
+          "integrity": "sha1-RNLqNnm49NT/ujPwPYZfwee/SVU="
+        }
+      }
+    },
     "vue-router": {
       "version": "3.1.6",
       "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.1.6.tgz",

+ 6 - 0
package.json

@@ -8,8 +8,14 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
+    "axios": "^0.19.2",
     "core-js": "^3.6.4",
+    "element-ui": "^2.13.1",
+    "jsonwebtoken": "^8.5.1",
+    "lodash": "^4.17.15",
+    "naf-core": "^0.1.2",
     "vue": "^2.6.11",
+    "vue-meta": "^2.3.3",
     "vue-router": "^3.1.6",
     "vuex": "^3.1.3"
   },

+ 33 - 23
src/App.vue

@@ -1,32 +1,42 @@
 <template>
-  <div id="app">
-    <div id="nav">
-      <router-link to="/">Home</router-link> |
-      <router-link to="/about">About</router-link>
-    </div>
+  <div id="App" :style="`background:url(${bg}) no-repeat fixed;background-size: 100% 100%;`">
     <router-view />
   </div>
 </template>
 
+<script>
+import _ from 'lodash';
+export default {
+  name: 'App',
+  props: {},
+  components: {},
+  data: () => ({
+    bg: require('@/assets/home/bg.jpg'),
+  }),
+  created() {},
+  computed: {
+    isSubSite() {
+      let route = this.$route;
+      let res = _.get(route, 'meta.subSite', false);
+      return res;
+    },
+  },
+  methods: {},
+};
+</script>
+
 <style lang="less">
-#app {
-  font-family: Avenir, Helvetica, Arial, sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  text-align: center;
-  color: #2c3e50;
+html {
+  overflow-x: hidden;
+  overflow-y: auto;
 }
-
-#nav {
-  padding: 30px;
-
-  a {
-    font-weight: bold;
-    color: #2c3e50;
-
-    &.router-link-exact-active {
-      color: #42b983;
-    }
-  }
+body {
+  margin: 0;
+  overflow-x: hidden;
+}
+.textOver {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 </style>

BIN
src/assets/home/bg.jpg


BIN
src/assets/home/gk1.png


BIN
src/assets/home/gk2.png


BIN
src/assets/home/gk3.png


BIN
src/assets/home/gk4.png


BIN
src/assets/home/gk5.png


BIN
src/assets/home/gk6.png


BIN
src/assets/home/logo.png


BIN
src/assets/home/zw1.jpg


BIN
src/assets/home/zw1.png


BIN
src/assets/home/zw2.png


BIN
src/assets/home/zw3.png


BIN
src/assets/home/zw4.png


BIN
src/assets/home/zw5.png


BIN
src/assets/home/zw6.png


BIN
src/assets/home/zw7.png


BIN
src/assets/home/zw8.png


BIN
src/assets/home/更多.png


BIN
src/assets/logo.png


+ 49 - 0
src/layout/home/foot.vue

@@ -0,0 +1,49 @@
+<template>
+  <div id="foot">
+    <el-row>
+      <el-col :span="24" class="foot">
+        <div class="div">
+          <p v-if="info" v-html="info.content"></p>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'foot',
+  props: {
+    info: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.foot p p {
+  padding: 0;
+  margin: 0;
+}
+.foot {
+  width: 100%;
+  min-height: 120px;
+  background-color: rgba(0, 0, 0, 0.4);
+  overflow: hidden;
+}
+.foot .div {
+  width: 650px;
+  margin: 0 auto;
+}
+.foot p {
+  float: left;
+  color: #858f9b;
+  font-size: 14px;
+  margin-right: 24px;
+  line-height: 30px;
+}
+</style>

+ 165 - 0
src/layout/home/government.vue

@@ -0,0 +1,165 @@
+<template>
+  <div id="government">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <!-- <div class="w_1200">
+          <el-col :span="12" class="phontoNews">
+            <photoNews :photoNews="photoNews"> </photoNews>
+          </el-col>
+          <el-col :span="12" class="news">
+            <news :chuangxinList="chuangxinList" :guoneiList="guoneiList" :zhengwuList="zhengwuList" :meitiList="meitiList"></news>
+          </el-col>
+          <el-col :span="8" class="notice">
+            <notice :tongzhiList="tongzhiList"></notice>
+          </el-col>
+          <el-col :span="16" class="zhengwu">
+            <zhengwu :zhengwu="zhengwu"></zhengwu>
+          </el-col>
+          <el-col :span="24" class="gongzhong">
+            <gongzhong :gongzhongList="gongzhongList"></gongzhong>
+          </el-col>
+          <el-col :span="24" class="link">
+            <linkInfo :linkList="linkList"></linkInfo>
+          </el-col>
+        </div> -->
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/index/top.vue';
+import logo from '@/layout/index/logo.vue';
+import menuInfo from '@/layout/index/menuInfo.vue';
+import foot from '@/layout/index/foot.vue';
+import photoNews from '@/layout/government/photoNews.vue';
+import news from '@/layout/government/news.vue';
+import notice from '@/layout/government/notice.vue';
+import zhengwu from '@/layout/government/zhengwu.vue';
+import gongzhong from '@/layout/government/gongzhong.vue';
+import linkInfo from '@/layout/index/linkInfo.vue';
+export default {
+  name: 'government',
+  props: {
+    info: null, //站点信息
+    photoNews: null, //图片新闻
+    chuangxinList: null, //科技政务图片旁边新闻
+    guoneiList: null, //科技政务图片旁边国内动态
+    zhengwuList: null, //科技政务图片旁边政务活动
+    meitiList: null, //科技政务图片旁边媒体焦距
+    tongzhiList: null, //通知公告
+    zhengwu: null, //政务公开
+    gongzhongList: null, //公众参与
+    linkList: null, //友情链接
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+    // photoNews, //科技政务下的图片新闻照片
+    // news, //科技政务图片旁边新闻
+    // notice, //通知公告
+    // zhengwu, //政务公告
+    // gongzhong, //公众参与
+    // linkInfo, //相关链接
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+.main {
+  height: 1080px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.main .phontoNews {
+  float: left;
+  width: 590px;
+  height: 400px;
+  overflow: hidden;
+  margin: 0 10px 10px 0;
+  background-color: #fff;
+}
+.main .news {
+  float: left;
+  width: 600px;
+  height: 400px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .notice {
+  float: left;
+  width: 390px;
+  height: 320px;
+  margin: 0 10px 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .zhengwu {
+  float: left;
+  width: 800px;
+  height: 320px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .gongzhong {
+  height: 240px;
+  margin: 0 0 10px 0;
+  background-color: #fff;
+}
+.main .link {
+  float: left;
+  width: 100%;
+  height: 100px;
+  overflow: hidden;
+  background-color: #fff;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 83 - 0
src/layout/home/layout.vue

@@ -0,0 +1,83 @@
+<template>
+  <div id="government">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <router-view />
+        </div>
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from './top.vue';
+import logo from './logo.vue';
+import menuInfo from './menuInfo.vue';
+import foot from './foot.vue';
+export default {
+  name: 'government',
+  props: {
+    info: null, //站点信息
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+.main {
+  height: 1080px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 40 - 0
src/layout/home/logo.vue

@@ -0,0 +1,40 @@
+<template>
+  <div id="logo">
+    <el-row>
+      <el-col :span="24" class="logo">
+        <span v-if="info && info.logourl">
+          <el-image style="width:690px;height:66px;" :src="info.logourl">
+            <div slot="error" class="image-slot">
+              <el-image style="width:690px;height:66px;" :src="logourl"></el-image>
+            </div>
+          </el-image>
+        </span>
+        <span v-else>
+          <el-image style="width:690px;height:66px;" :src="logourl"></el-image>
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'logo',
+  props: {
+    info: null,
+  },
+  components: {},
+  data: () => ({
+    logourl: require('@/assets/home/logo.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.logo {
+  padding: 65px 0;
+}
+</style>

+ 84 - 0
src/layout/home/menuInfo.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="menuInfo">
+    <el-row>
+      <el-col :span="24" class="menu">
+        <el-menu
+          :default-active="thisRouter()"
+          class="el-menu-demo"
+          mode="horizontal"
+          :router="false"
+          :default-openeds="defalutMenu"
+          @select="to"
+          text-color="#fff"
+        >
+          <el-menu-item index="/">网站首页</el-menu-item>
+          <el-menu-item index="/government/government">科技政务</el-menu-item>
+          <el-menu-item index="/policy/policy">科技政策</el-menu-item>
+          <el-menu-item index="/supermaket/supermarket">科技超市</el-menu-item>
+          <el-menu-item index="/shuju/shuju">科技数据</el-menu-item>
+          <el-menu-item index="/service/service">科技服务</el-menu-item>
+          <el-menu-item index="/">
+            <el-link
+              style="padding: 0px 0px;font-size: 22px;"
+              :underline="false"
+              href="http://139.210.167.203/free-technological-management/mapApply/getMap"
+              target="_blank"
+              >科技资源</el-link
+            >
+          </el-menu-item>
+          <el-menu-item index="/personnel/personnel">科技人才</el-menu-item>
+        </el-menu>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'menuInfo',
+  props: {},
+  components: {},
+  data: () => ({
+    defalutMenu: [],
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    thisRouter() {
+      console.log(this.$route.path);
+    },
+    to(index) {
+      this.$router.push({ path: index });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.menu {
+  height: 70px;
+  overflow: hidden;
+  background-color: rgba(0, 0, 0, 0.4);
+}
+/deep/.el-menu {
+  background-color: rgba(0, 0, 0, 0.4);
+}
+/deep/.el-menu--horizontal > .el-menu-item {
+  height: 70px;
+  line-height: 70px;
+  border-right: 1px solid #ccc;
+  padding: 0 30px;
+  font-size: 22px;
+}
+/deep/.el-menu--horizontal > .el-menu-item:last-child {
+  padding: 0 34px;
+}
+/deep/.el-menu--horizontal > .el-menu-item.is-active {
+  border-bottom: none;
+  color: #fff;
+  background-color: #215299;
+}
+/deep/.el-menu--horizontal > .el-menu-item:hover {
+  background-color: #215299;
+}
+</style>

+ 77 - 0
src/layout/home/top.vue

@@ -0,0 +1,77 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col :span="24" class="top">
+        <div class="w_1200">
+          <el-col :span="22" class="date">
+            {{ gettime }}
+          </el-col>
+          <el-col :span="2" class="btn" v-if="user && user.id"> {{ user.name }} | <el-link :underline="false" @click="toLogOut">注销</el-link> </el-col>
+          <el-col :span="2" class="btn">
+            <el-link :underline="false" @click="loginBtn()" target="_blank">注册</el-link>|<el-link :underline="false" @click="loginBtn()" target="_blank"
+              >登录</el-link
+            >
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'top',
+  props: {},
+  components: {},
+  data: () => ({
+    gettime: '',
+  }),
+  created() {
+    this.currentTime();
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  methods: {
+    currentTime() {
+      setInterval(this.getTime, 500);
+    },
+    getTime: function() {
+      var _this = this;
+      let yy = new Date().getFullYear();
+      let mm = new Date().getMonth() + 1;
+      let dd = new Date().getDate();
+      let day = new Date().getDay();
+      var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+      _this.gettime = yy + '-' + mm + '-' + dd + ' ' + weekday[day];
+    },
+    loginBtn() {
+      this.$router.push({ path: '/login' });
+    },
+    toLogOut() {},
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.date {
+  height: 40px;
+  line-height: 40px;
+  color: #fff;
+  font-size: 16px;
+}
+.btn {
+  height: 40px;
+  line-height: 40px;
+  color: #fff;
+}
+.btn .el-link {
+  color: #fff;
+  margin: 0 5px;
+}
+</style>

+ 15 - 7
src/main.js

@@ -1,12 +1,20 @@
-import Vue from "vue";
-import App from "./App.vue";
-import router from "./router";
-import store from "./store";
-
+import Vue from 'vue';
+import App from './App.vue';
+import router from './router';
+import store from './store';
+import '@/plugins/element.js';
+import '@/plugins/axios';
+import '@/plugins/check-res';
+import '@/plugins/meta';
+import '@/plugins/filters';
+import '@/plugins/loading';
+import '@/plugins/setting';
+// import InitStomp from '@/plugins/stomp';
 Vue.config.productionTip = false;
 
 new Vue({
   router,
   store,
-  render: h => h(App)
-}).$mount("#app");
+  render: h => h(App),
+}).$mount('#app');
+// InitStomp();

+ 19 - 0
src/plugins/axios.js

@@ -0,0 +1,19 @@
+import Vue from 'vue';
+import AxiosWrapper from '@/util/axios-wrapper';
+
+const Plugin = {
+  install(vue, options) {
+    // 3. 注入组件
+    vue.mixin({
+      created() {
+        if (this.$store && !this.$store.$axios) {
+          this.$store.$axios = this.$axios;
+        }
+      },
+    });
+    // 4. 添加实例方法
+    vue.prototype.$axios = new AxiosWrapper(options);
+  },
+};
+
+Vue.use(Plugin, { baseUrl: process.env.VUE_APP_AXIOS_BASE_URL });

+ 39 - 0
src/plugins/check-res.js

@@ -0,0 +1,39 @@
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-param-reassign */
+/* eslint-disable no-unused-vars */
+/* eslint-disable no-shadow */
+import Vue from 'vue';
+import _ from 'lodash';
+import { Message } from 'element-ui';
+
+const vm = new Vue({});
+const Plugin = {
+  install(Vue, options) {
+    // 4. 添加实例方法
+    Vue.prototype.$checkRes = (res, okText, errText) => {
+      let _okText = okText;
+      let _errText = errText;
+      if (!_.isFunction(okText) && _.isObject(okText) && okText != null) {
+        ({ okText: _okText, errText: _errText } = okText);
+      }
+      const { errcode = 0, errmsg } = res || {};
+      if (errcode === 0) {
+        if (_.isFunction(_okText)) {
+          return _okText();
+        }
+        if (_okText) {
+          Message.success(_okText);
+        }
+        return true;
+      }
+      if (_.isFunction(_errText)) {
+        return _errText();
+      }
+      Message.error(_errText || errmsg);
+      // Message({ message: _errText || errmsg, duration: 60000 });
+      return false;
+    };
+  },
+};
+
+Vue.use(Plugin);

+ 5 - 0
src/plugins/element.js

@@ -0,0 +1,5 @@
+import Vue from 'vue';
+import Element from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+
+Vue.use(Element);

+ 6 - 0
src/plugins/filters.js

@@ -0,0 +1,6 @@
+import Vue from 'vue';
+import filters from '@/util/filters';
+
+for (const method in filters) {
+  Vue.filter(method, filters[method]);
+}

+ 27 - 0
src/plugins/loading.js

@@ -0,0 +1,27 @@
+/* eslint-disable no-console */
+/* eslint-disable no-param-reassign */
+
+import Vue from 'vue';
+
+const Plugin = {
+  // eslint-disable-next-line no-unused-vars
+  install(vue, options) {
+    // 3. 注入组件
+    vue.mixin({
+      created() {
+        // eslint-disable-next-line no-underscore-dangle
+        const isRoot = this.constructor === Vue;
+        // console.log(`rootId:${rootVue_uid}; thisId:${this._uid}`);
+        // if (rootVue_uid !== 3) {
+        //   console.log(this);
+        // }
+        if (isRoot) {
+          const el = document.getElementById('loading');
+          if (el) el.style.display = 'none';
+        }
+      },
+    });
+  },
+};
+
+Vue.use(Plugin, { baseUrl: process.env.VUE_APP_AXIOS_BASE_URL });

+ 4 - 0
src/plugins/meta.js

@@ -0,0 +1,4 @@
+import Vue from 'vue';
+import Meta from 'vue-meta';
+
+Vue.use(Meta);

+ 20 - 0
src/plugins/setting.js

@@ -0,0 +1,20 @@
+import Vue from 'vue';
+
+Vue.config.weixin = {
+  // baseUrl: process.env.BASE_URL + 'weixin',
+  baseUrl: 'http://10.16.8.209:9005',
+};
+
+Vue.config.stomp = {
+  // brokerURL: 'ws://http://free.liaoningdoupo.com/ws',
+  brokerURL: '/ws', // ws://${location.host}/ws
+  connectHeaders: {
+    host: 'visit',
+    login: 'visit', //visit
+    passcode: 'visit', //visit123
+  },
+  // debug: true,
+  reconnectDelay: 5000,
+  heartbeatIncoming: 4000,
+  heartbeatOutgoing: 4000,
+};

+ 65 - 0
src/plugins/stomp.js

@@ -0,0 +1,65 @@
+/**
+ * 基于WebStomp的消息处理插件
+ */
+
+import Vue from 'vue';
+import _ from 'lodash';
+import assert from 'assert';
+import { Client } from '@stomp/stompjs/esm5/client';
+
+const Plugin = {
+  install(Vue, options) {
+    assert(_.isObject(options));
+    if (options.debug && !_.isFunction(options.debug)) {
+      options.debug = str => {
+        console.log(str);
+      };
+    }
+    assert(_.isString(options.brokerURL));
+    if (!options.brokerURL.startsWith('ws://')) {
+      options.brokerURL = `ws://${location.host}${options.brokerURL}`;
+    }
+
+    // 3. 注入组件
+    Vue.mixin({
+      beforeDestroy: function() {
+        if (this.$stompClient) {
+          this.$stompClient.deactivate();
+          delete this.$stompClient;
+        }
+      },
+    });
+
+    // 4. 添加实例方法
+    Vue.prototype.$stomp = function(subscribes = {}) {
+      // connect to mq
+      const client = new Client(options);
+      client.onConnect = frame => {
+        // Do something, all subscribes must be done is this callback
+        // This is needed because this will be executed after a (re)connect
+        console.log('[stomp] connected');
+        Object.keys(subscribes)
+          .filter(p => _.isFunction(subscribes[p]))
+          .forEach(key => {
+            client.subscribe(key, subscribes[key]);
+          });
+      };
+
+      client.onStompError = frame => {
+        // Will be invoked in case of error encountered at Broker
+        // Bad login/passcode typically will cause an error
+        // Complaint brokers will set `message` header with a brief message. Body may contain details.
+        // Compliant brokers will terminate the connection after any error
+        console.log('Broker reported error: ' + frame.headers['message']);
+        console.log('Additional details: ' + frame.body);
+      };
+
+      client.activate();
+
+      this.$stompClient = client;
+    };
+  },
+};
+export default () => {
+  Vue.use(Plugin, Vue.config.stomp);
+};

+ 19 - 0
src/router/before.js

@@ -0,0 +1,19 @@
+import store from '@/store/index';
+
+const checkLogin = router => {
+  router.beforeEach((to, form, next) => {
+    store.commit('setUser');
+    // if (to.name === 'login') {
+    //   next();
+    //   return;
+    // }
+    // let user = store.state.user;
+    // if (user) {
+    //   next();
+    // }
+    // //下面是没登录的情况,需要跳转页面到用户未登录页
+    // else next({ name: 'login' });
+    next();
+  });
+};
+export default checkLogin;

+ 19 - 16
src/router/index.js

@@ -1,28 +1,31 @@
-import Vue from "vue";
-import VueRouter from "vue-router";
-import Home from "../views/Home.vue";
+import Vue from 'vue';
+import VueRouter from 'vue-router';
+import checkLogin from './before';
 
 Vue.use(VueRouter);
 
 const routes = [
   {
-    path: "/",
-    name: "Home",
-    component: Home
+    path: '/',
+    meta: { title: '科技政务', subSite: true },
+    name: 'home',
+    component: () => import('../views/home.vue'),
+    children: [
+      {
+        path: '',
+        meta: { title: '科技政务' },
+        name: 'index',
+        component: () => import('../views/home/index.vue'),
+      },
+    ],
   },
-  {
-    path: "/about",
-    name: "About",
-    // route level code-splitting
-    // this generates a separate chunk (about.[hash].js) for this route
-    // which is lazy-loaded when the route is visited.
-    component: () =>
-      import(/* webpackChunkName: "about" */ "../views/About.vue")
-  }
 ];
 
 const router = new VueRouter({
-  routes
+  mode: 'history',
+  base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
+  routes,
 });
+checkLogin(router);
 
 export default router;

+ 7 - 6
src/store/index.js

@@ -1,11 +1,12 @@
-import Vue from "vue";
-import Vuex from "vuex";
-
+import Vue from 'vue';
+import Vuex from 'vuex';
+import * as ustate from './user/state';
+import * as umutations from './user/mutations';
 Vue.use(Vuex);
 
 export default new Vuex.Store({
-  state: {},
-  mutations: {},
+  state: { ...ustate },
+  mutations: { ...umutations },
   actions: {},
-  modules: {}
+  modules: {},
 });

+ 33 - 0
src/store/user/mutations.js

@@ -0,0 +1,33 @@
+const jwt = require('jsonwebtoken');
+export const setUser = (state, payload) => {
+  let res = true;
+  //登陆时
+  if (payload) {
+    state.token = payload;
+  } else {
+    //已经登陆,切换路由时取出用户信息放在总store中
+    let token = localStorage.getItem('token');
+    if (token && token !== 'guest') {
+      state.user = jwt.decode(token);
+    } else if (token && token == 'guest') {
+      let user = localStorage.getItem('user');
+      state.user = JSON.parse(user);
+    } else {
+      let timestamp = new Date().getTime();
+      let user = {
+        // id: `guest${timestamp}`,
+        name: `游客${timestamp}`,
+      };
+      state.user = user;
+      localStorage.setItem('token', 'guest');
+      localStorage.setItem('user', JSON.stringify(user));
+      console.warn('游客身份');
+    }
+  }
+  return res;
+};
+
+export const deleteUser = (state, payload) => {
+  state.user = {};
+  localStorage.removeItem('user');
+};

+ 2 - 0
src/store/user/state.js

@@ -0,0 +1,2 @@
+export const user = {};
+export const menuList = [];

+ 117 - 0
src/util/axios-wrapper.js

@@ -0,0 +1,117 @@
+/* eslint-disable no-console */
+/* eslint-disable no-param-reassign */
+
+import _ from 'lodash';
+import Axios from 'axios';
+import { Util, Error } from 'naf-core';
+// import { Indicator } from 'mint-ui';
+import util from './user-util';
+
+const { trimData, isNullOrUndefined } = Util;
+const { ErrorCode } = Error;
+
+let currentRequests = 0;
+
+export default class AxiosWrapper {
+  constructor({ baseUrl = '', unwrap = true } = {}) {
+    this.baseUrl = baseUrl;
+    this.unwrap = unwrap;
+  }
+
+  // 替换uri中的参数变量
+  static merge(uri, query = {}) {
+    if (!uri.includes(':')) {
+      return uri;
+    }
+    const keys = [];
+    const regexp = /\/:([a-z0-9_]+)/gi;
+    let res;
+    // eslint-disable-next-line no-cond-assign
+    while ((res = regexp.exec(uri)) != null) {
+      keys.push(res[1]);
+    }
+    keys.forEach(key => {
+      if (!isNullOrUndefined(query[key])) {
+        uri = uri.replace(`:${key}`, query[key]);
+      }
+    });
+    return uri;
+  }
+
+  $get(uri, query, options) {
+    return this.$request(uri, null, query, options);
+  }
+
+  $post(uri, data = {}, query, options) {
+    return this.$request(uri, data, query, options);
+  }
+  $delete(uri, data = {}, router, query, options = {}) {
+    options = { ...options, method: 'delete' };
+    return this.$request(uri, data, query, options, router);
+  }
+  async $request(uri, data, query, options) {
+    // TODO: 合并query和options
+    if (_.isObject(query) && _.isObject(options)) {
+      options = { ...options, params: query, method: 'get' };
+    } else if (_.isObject(query) && !query.params) {
+      options = { params: query };
+    } else if (_.isObject(query) && query.params) {
+      options = query;
+    }
+    if (!options) options = {};
+    if (options.params) options.params = trimData(options.params);
+    const url = AxiosWrapper.merge(uri, options.params);
+    currentRequests += 1;
+    // Indicator.open({
+    //   spinnerType: 'fading-circle',
+    // });
+
+    try {
+      const axios = Axios.create({
+        baseURL: this.baseUrl,
+      });
+      axios.defaults.headers.common.Authorization = util.token;
+      let res = await axios.request({
+        method: isNullOrUndefined(data) ? 'get' : 'post',
+        url,
+        data,
+        responseType: 'json',
+        ...options,
+      });
+      res = res.data;
+      const { errcode, errmsg, details } = res;
+      if (errcode) {
+        console.warn(`[${uri}] fail: ${errcode}-${errmsg} ${details}`);
+        return res;
+      }
+      // unwrap data
+      if (this.unwrap) {
+        res = _.omit(res, ['errmsg', 'details']);
+        const keys = Object.keys(res);
+        if (keys.length === 1 && keys.includes('data')) {
+          res = res.data;
+        }
+      }
+      return res;
+    } catch (err) {
+      let errmsg = '接口请求失败,请稍后重试';
+      if (err.response) {
+        const { status } = err.response;
+        if (status === 401) errmsg = '用户认证失败,请重新登录';
+        if (status === 403) errmsg = '当前用户不允许执行该操作';
+      }
+      console.error(
+        `[AxiosWrapper] 接口请求失败: ${err.config && err.config.url} - 
+        ${err.message}`
+      );
+      return { errcode: ErrorCode.SERVICE_FAULT, errmsg, details: err.message };
+    } finally {
+    /* eslint-disable */
+      currentRequests -= 1;
+      if (currentRequests <= 0) {
+        currentRequests = 0;
+        // Indicator.close();
+      }
+    }
+  }
+}

+ 10 - 0
src/util/filters.js

@@ -0,0 +1,10 @@
+import _ from 'lodash';
+
+const filters = {
+  getName(object) {
+    const { data, searchItem } = object;
+    return _.get(data, searchItem) === undefined ? '' : _.get(data, searchItem);
+  },
+};
+
+export default filters;

+ 50 - 0
src/util/methods-util.js

@@ -0,0 +1,50 @@
+import { Util } from 'naf-core';
+
+const { isNullOrUndefined } = Util;
+
+export default {
+  //判断信息是否过期
+  isDateOff(dataDate) {
+    const now = new Date(new Date().getTime() - 24 * 60 * 60 * 1000);
+    dataDate = new Date(dataDate);
+    return now.getTime() <= dataDate.getTime();
+  },
+  //判断企业是否可以执行此动作/显示
+  checkCorp(data) {
+    const { role, unit, selfUnit, status, displayType, userid } = data;
+    if (!isNullOrUndefined(selfUnit) && !isNullOrUndefined(status)) {
+      return role === 'corp' && selfUnit === unit && status === '0';
+    } else if (!isNullOrUndefined(displayType)) {
+      if (role === 'corp') {
+        return role === displayType;
+      } else {
+        return role === displayType && !isNullOrUndefined(userid);
+      }
+    }
+  },
+  //获取url的参数params
+  getParams() {
+    let str = location.href;
+    let num = str.indexOf('?');
+    const param = {};
+    str = str.substr(num + 1);
+    let num2 = str.indexOf('#');
+    let str2 = '';
+    if (num2 > 0) {
+      str2 = str.substr(0, num2);
+    } else {
+      num2 = str.indexOf('/');
+      str2 = str.substr(0, num2);
+    }
+    const arr = str2.split('&');
+    for (let i = 0; i < arr.length; i++) {
+      num = arr[i].indexOf('=');
+      if (num > 0) {
+        const name = arr[i].substring(0, num);
+        const value = arr[i].substr(num + 1);
+        param[name] = decodeURI(value);
+      }
+    }
+    return param;
+  },
+};

+ 47 - 0
src/util/optionTitles.js

@@ -0,0 +1,47 @@
+export const JOBFAIR_TITLE = [
+  { prop: 'subject', label: '' },
+  { prop: 'address', label: '举办地址' },
+  { prop: 'date', label: '举办日期' },
+  { prop: 'unit', label: '分站信息' },
+];
+
+export const CAMPUS_TITLE = [
+  { prop: 'subject', label: '' },
+  { prop: 'address', label: '举办地址' },
+  { prop: 'status', label: '审核状态' },
+  { prop: 'date', label: '举办日期' },
+  { prop: 'unit', label: '分站信息' },
+];
+
+export const JOBINFO_TITLE = [
+  { prop: 'title', label: '' },
+  { prop: 'count', label: '需求人数' },
+  { prop: 'nature.name', label: '工作性质' },
+  { prop: 'salary.name', label: '薪资待遇' },
+  { prop: 'xlreqs.name', label: '最低学历' },
+  { prop: 'city.name', label: '所在城市' },
+  // { prop: 'expired', label: '状态' },
+];
+
+export const RESUME_TITLE = [{ prop: 'title', label: '' }];
+
+export const LETTER_TITLE = [
+  { prop: 'title', label: '' },
+  { prop: 'corpname', label: '企业名称' },
+  { prop: 'type', label: '类型' },
+  { prop: 'status', label: '状态' },
+];
+
+export const TICKET_TITLE = [
+  { prop: 'subject', label: '' },
+  { prop: 'type', label: '门票类型' },
+  { prop: 'origin', label: '' },
+  { prop: 'date', label: '举办日期' },
+];
+
+export const CORP_JOBFAIR = [
+  { prop: 'subject', label: '' },
+  { prop: 'time', label: '举办时间' },
+  { prop: 'date', label: '举办日期' },
+  { prop: 'unit', label: '分站信息' },
+];

+ 69 - 0
src/util/user-util.js

@@ -0,0 +1,69 @@
+/* eslint-disable no-console */
+export default {
+  get user() {
+    const val = sessionStorage.getItem('user');
+    try {
+      if (val) return JSON.parse(val);
+    } catch (err) {
+      console.error(err);
+    }
+    return null;
+  },
+  set user(userinfo) {
+    sessionStorage.setItem('user', JSON.stringify(userinfo));
+  },
+  get token() {
+    return sessionStorage.getItem('token');
+  },
+  set token(token) {
+    sessionStorage.setItem('token', token);
+  },
+  get openid() {
+    return sessionStorage.getItem('openid');
+  },
+  set openid(openid) {
+    sessionStorage.setItem('openid', openid);
+  },
+  get isGuest() {
+    return !this.user || this.user.role === 'guest';
+  },
+  save({ userinfo, token }) {
+    sessionStorage.setItem('user', JSON.stringify(userinfo));
+    sessionStorage.setItem('token', token);
+  },
+
+  get corpInfo() {
+    const val = sessionStorage.getItem('corpInfo');
+    if (val) return JSON.parse(val);
+    return null;
+  },
+  set corpInfo(corpInfo) {
+    sessionStorage.setItem('corpInfo', JSON.stringify(corpInfo));
+  },
+  saveCorpInfo(corpInfo) {
+    sessionStorage.setItem('corpInfo', JSON.stringify(corpInfo));
+  },
+
+  get unit() {
+    const val = sessionStorage.getItem('unit');
+    if (val) return JSON.parse(val);
+    return null;
+  },
+  set unit(unitList) {
+    sessionStorage.setItem('unit', JSON.stringify(unitList));
+  },
+  saveUnit(unitList) {
+    sessionStorage.setItem('unit', JSON.stringify(unitList));
+  },
+  get userInfo() {
+    const val = sessionStorage.getItem('userInfo');
+    if (val) return JSON.parse(val);
+    return null;
+  },
+  set userInfo(userInfo) {
+    sessionStorage.setItem('userInfo', JSON.stringify(userInfo));
+  },
+  saveUserInfo(userInfo) {
+    sessionStorage.setItem('userInfo', JSON.stringify(userInfo));
+  },
+};

+ 0 - 5
src/views/About.vue

@@ -1,5 +0,0 @@
-<template>
-  <div class="about">
-    <h1>This is an about page</h1>
-  </div>
-</template>

+ 23 - 10
src/views/Home.vue

@@ -1,18 +1,31 @@
 <template>
-  <div class="home">
-    <img alt="Vue logo" src="../assets/logo.png" />
-    <HelloWorld msg="Welcome to Your Vue.js App" />
+  <div id="home">
+    <frame></frame>
   </div>
 </template>
 
 <script>
-// @ is an alias to /src
-import HelloWorld from "@/components/HelloWorld.vue";
-
+import frame from '@/layout/home/layout.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
-  name: "Home",
-  components: {
-    HelloWorld
-  }
+  name: 'home',
+  props: {},
+  components: { frame },
+  data: () => {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 </script>
+
+<style lang="less" scoped></style>

+ 199 - 0
src/views/home/index.vue

@@ -0,0 +1,199 @@
+<template>
+  <div id="index">
+    <el-col :span="12" class="phontoNews">
+      <photoNews :photoNews="photoNews"> </photoNews>
+    </el-col>
+    <el-col :span="12" class="news">
+      <news :chuangxinList="chuangxinList" :guoneiList="guoneiList" :zhengwuList="zhengwuList" :meitiList="meitiList"></news>
+    </el-col>
+    <el-col :span="8" class="notice">
+      <notice :tongzhiList="tongzhiList"></notice>
+    </el-col>
+    <el-col :span="16" class="zhengwu">
+      <zhengwu :zhengwu="zhengwu"></zhengwu>
+    </el-col>
+    <el-col :span="24" class="gongzhong">
+      <gongzhong :gongzhongList="gongzhongList"></gongzhong>
+    </el-col>
+    <el-col :span="24" class="link">
+      <linkInfo :linkList="linkList"></linkInfo>
+    </el-col>
+  </div>
+</template>
+
+<script>
+import photoNews from './parts/photoNews.vue';
+import news from './parts/news.vue';
+import notice from './parts/notice.vue';
+import zhengwu from './parts/zhengwu.vue';
+import gongzhong from './parts/gongzhong.vue';
+import linkInfo from './parts/linkInfo.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {
+    // photoNews: { type: Array, default: () => [] }, //图片新闻
+    // chuangxinList: { type: Array, default: () => [] }, //科技政务图片旁边新闻
+    // guoneiList: { type: Array, default: () => [] }, //科技政务图片旁边国内动态
+    // zhengwuList: { type: Array, default: () => [] }, //科技政务图片旁边政务活动
+    // meitiList: { type: Array, default: () => [] }, //科技政务图片旁边媒体焦距
+    // tongzhiList: { type: Array, default: () => [] }, //通知公告
+    // zhengwu: { type: Array, default: () => [] }, //政务公开
+    // gongzhongList: { type: Array, default: () => [] }, //公众参与
+    // linkList: { type: Array, default: () => [] }, //友情链接
+  },
+  components: { photoNews, news, notice, zhengwu, gongzhong, linkInfo },
+  data: () => {
+    return {
+      // 图片新闻
+      tpxwList: [],
+      // 创新吉林
+      cxjlList: [],
+      // 国内动态
+      gndtList: [],
+      // 媒体聚焦
+      mtjjList: [],
+      // 通知公告
+      tzggList: [],
+      // 政务活动
+      zwhdList: [],
+      // 公众参与
+      gongzhongList: [
+        {
+          url: 'http://kjt.jl.gov.cn/gzcy/tzxx/',
+          pic: require('@/assets/home/gk1.png'),
+          title: '厅长信箱',
+        },
+        {
+          url: 'http://kjt.jl.gov.cn/gzcy/zxzx/',
+          pic: require('@/assets/home/gk2.png'),
+          title: '在线咨询',
+        },
+        {
+          url: 'http://kjt.jl.gov.cn/gzcy/jdts/',
+          pic: require('@/assets/home/gk3.png'),
+          title: '监督投诉',
+        },
+        {
+          url: 'http://kjt.jl.gov.cn/gzcy/jyxc/',
+          pic: require('@/assets/home/gk4.png'),
+          title: '建言献策',
+        },
+        {
+          url: 'http://kjt.jl.gov.cn/gzcy/wsdc/',
+          pic: require('@/assets/home/gk5.png'),
+          title: '网上调查',
+        },
+        {
+          title: '党政资料',
+          url: 'http://139.210.167.203/free-technological-management/PersonalFiles/getPersonalFileList?pageNumber=1',
+          pic: require('@/assets/home/gk6.png'),
+        },
+      ],
+      // 政务公开
+      zhengwu: [
+        {
+          title: '高企认定',
+          url: 'http://kjt.jl.gov.cn/bsfw/gxjsqyrd/',
+          pic: require('@/assets/home/zw1.png'),
+        },
+        {
+          title: '成果登记',
+          url: 'http://kjt.jl.gov.cn/bsfw/kjcgdj/',
+          pic: require('@/assets/home/zw2.png'),
+        },
+        {
+          title: '合同登记',
+          url: 'http://kjt.jl.gov.cn/bsfw/jshtdj/',
+          pic: require('@/assets/home/zw3.png'),
+        },
+        {
+          title: '计划管理',
+          url: 'http://kjt.jl.gov.cn/bsfw/kjjhxmsb/',
+          pic: require('@/assets/home/zw4.png'),
+        },
+        {
+          title: '奖励申报',
+          url: 'http://kjt.jl.gov.cn/bsfw/kjjlsb/',
+          pic: require('@/assets/home/zw5.png'),
+        },
+        {
+          title: '专利申请',
+          url: 'http://kjt.jl.gov.cn/bsfw/zlsq/',
+          pic: require('@/assets/home/zw6.png'),
+        },
+        {
+          title: '相关下载',
+          url: 'http://kjt.jl.gov.cn/bsfw/xzzx/',
+          pic: require('@/assets/home/zw7.png'),
+        },
+        {
+          title: '政务信息公开',
+          url: 'http://kjt.jl.gov.cn/xxgk/',
+          pic: require('@/assets/home/zw8.png'),
+        },
+      ],
+      // 友情链接
+      linkList: [],
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.phontoNews {
+  float: left;
+  width: 590px;
+  height: 400px;
+  overflow: hidden;
+  margin: 0 10px 10px 0;
+  background-color: #fff;
+}
+.news {
+  float: left;
+  width: 600px;
+  height: 400px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.notice {
+  float: left;
+  width: 390px;
+  height: 320px;
+  margin: 0 10px 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.zhengwu {
+  float: left;
+  width: 800px;
+  height: 320px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.gongzhong {
+  height: 240px;
+  margin: 0 0 10px 0;
+  background-color: #fff;
+}
+.link {
+  float: left;
+  width: 100%;
+  height: 100px;
+  overflow: hidden;
+  background-color: #fff;
+}
+</style>

+ 70 - 0
src/views/home/parts/gongzhong.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="gongzhong">
+    <el-col :span="24" class="gongzhong">
+      <el-col :span="24" class="title">{{ title }}</el-col>
+      <el-col class="context" :span="4" v-for="(item, index) in gongzhongList" :key="index">
+        <el-link :underline="false" :href="item.url" target="_blank">
+          <el-image class="image" :src="item.pic"></el-image>
+          <el-col :span="24" class="pic_title">{{ item.title }}</el-col>
+        </el-link>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'gongzhong',
+  props: {
+    gongzhongList: null,
+  },
+  components: {},
+  data: () => ({
+    title: '公众参与',
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.gongzhong {
+  height: 240px;
+  overflow: hidden;
+  padding: 20px;
+}
+.title {
+  font-size: 22px;
+  color: #2c3350;
+  font-weight: bold;
+  margin: 0 0 10px 0;
+}
+.context {
+  width: 185px;
+  height: 160px;
+  background-color: #f8f8f8;
+  margin-right: 10px;
+  text-align: center;
+  border: 1px solid #dee9f9;
+}
+.context:last-child {
+  margin: 0;
+}
+.pic_title {
+  background-color: #22529a;
+  width: 185px;
+  line-height: 30px;
+  height: 30px;
+  font-size: 16px;
+  color: #fff;
+  margin: 37px 0 0 -1px;
+}
+.context .image {
+  margin: 30px 0 0 0;
+}
+.context:hover {
+  background-color: #dee9f9;
+  color: #3981e5;
+}
+</style>

+ 57 - 0
src/views/home/parts/linkInfo.vue

@@ -0,0 +1,57 @@
+<template>
+  <div id="linkInfo">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="2" class="leftTitle">
+          <span>友情链接</span>
+        </el-col>
+        <el-col :span="22">
+          <el-col :span="6" class="list" v-for="(item, index) in linkList" :key="index">
+            <el-link :underline="false" :href="item.url" target="_blank">
+              <el-image style="width:245px;height:53px;" :src="item.pic"></el-image>
+            </el-link>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'linkInfo',
+  props: {
+    linkList: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  padding: 20px;
+}
+.info .leftTitle {
+  text-align: center;
+  height: 60px;
+  line-height: 60px;
+}
+.info .leftTitle span {
+  font-size: 22px;
+  font-weight: bold;
+  color: #2e3351;
+}
+.list {
+  width: 258px;
+  height: 60px;
+  line-height: 60px;
+  margin: 0 10px 0 0;
+}
+.list:last-child {
+  margin: 0;
+}
+</style>

+ 176 - 0
src/views/home/parts/news.vue

@@ -0,0 +1,176 @@
+<template>
+  <div id="news">
+    <el-col :span="24" class="tab">
+      <el-tabs type="border-card">
+        <el-tab-pane>
+          <span slot="label">创新吉林</span>
+          <el-col :span="24" class="list">
+            <ul>
+              <li
+                class="chuangxinList"
+                v-for="(item, index) in chuangxinList"
+                :key="index"
+                @click="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+              >
+                <el-col :span="19" class="title textOver">{{ item.title }}</el-col>
+                <el-col :span="4" class="date"> {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</el-col>
+              </li>
+            </ul>
+            <!-- <el-col class="more" :span="24">查看更多</el-col> -->
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane>
+          <span slot="label">国内动态</span>
+          <el-col :span="24" class="list">
+            <ul>
+              <li
+                class="chuangxinList"
+                v-for="(item, index) in guoneiList"
+                :key="index"
+                @click="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+              >
+                <el-col :span="19" class="title textOver">{{ item.title }}</el-col>
+                <el-col :span="4" class="date"> {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</el-col>
+              </li>
+            </ul>
+            <!-- <el-col class="more" :span="24">查看更多</el-col> -->
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane>
+          <span slot="label">政务活动</span>
+          <el-col :span="24" class="list">
+            <ul>
+              <li
+                class="chuangxinList"
+                v-for="(item, index) in zhengwuList"
+                :key="index"
+                @click="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+              >
+                <el-col :span="19" class="title textOver">{{ item.title }}</el-col>
+                <el-col :span="4" class="date"> {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</el-col>
+              </li>
+            </ul>
+            <!-- <el-col class="more" :span="24">查看更多</el-col> -->
+          </el-col>
+        </el-tab-pane>
+        <el-tab-pane>
+          <span slot="label">媒体焦距</span>
+          <el-col :span="24" class="list">
+            <ul>
+              <li
+                class="chuangxinList"
+                v-for="(item, index) in meitiList"
+                :key="index"
+                @click="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+              >
+                <el-col :span="19" class="title textOver">{{ item.title }}</el-col>
+                <el-col :span="4" class="date"> {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</el-col>
+              </li>
+            </ul>
+            <!-- <el-col class="more" :span="24">查看更多</el-col> -->
+          </el-col>
+        </el-tab-pane>
+      </el-tabs>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'news',
+  props: {
+    chuangxinList: null,
+    guoneiList: null,
+    zhengwuList: null,
+    meitiList: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+ul {
+  padding: 0;
+  margin: 0;
+}
+li {
+  padding: 0;
+  margin: 0;
+}
+.list {
+  padding: 0 20px 0 20px;
+  color: #95a3c0;
+}
+.list ul {
+  padding: 0 0 0 20px;
+  max-height: 280px;
+  overflow: hidden;
+}
+.chuangxinList {
+  width: 540px;
+  padding: 0 0 7px 0;
+}
+.chuangxinList:hover {
+  cursor: pointer;
+}
+.chuangxinList:hover .title {
+  color: #22529a;
+}
+.chuangxinList:hover .date {
+  color: #22529a;
+}
+.list .title {
+  margin: 0 20px 0 0;
+  color: #6d6d77;
+}
+.date {
+  text-align: right;
+}
+/deep/.el-tabs--border-card > .el-tabs__content {
+  padding: 0;
+}
+/deep/.el-tabs--border-card > .el-tabs__header {
+  background-color: transparent;
+  border-bottom: none;
+}
+/deep/.el-tabs--border-card {
+  border: none;
+  box-shadow: none;
+}
+/deep/.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
+  border-right-color: transparent;
+  border-left-color: transparent;
+}
+/deep/.el-tabs__item {
+  font-size: 22px;
+  font-weight: bold;
+  height: 60px;
+  line-height: 60px;
+}
+/deep/.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
+  color: #2c3350;
+}
+/deep/.el-tabs__header {
+  padding: 0 20px;
+}
+/deep/.el-tabs__item {
+  padding: 0 20px 0 0;
+}
+/deep/.el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2) {
+  padding-left: 0;
+}
+.more {
+  width: 100%;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
+  background: #f5f5f5;
+  font-size: 16px;
+  color: #60636d;
+  margin: 10px 0 0 0;
+}
+</style>

+ 105 - 0
src/views/home/parts/notice.vue

@@ -0,0 +1,105 @@
+<template>
+  <div id="notice">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="topInfo">
+          <el-col :span="20" class="left">{{ title }}</el-col>
+          <el-col :span="4" class="more">
+            <el-link :underline="false" @click="moreClick()"><el-image :src="more"></el-image></el-link>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <ul>
+            <li
+              class="zixunList"
+              v-for="(item, index) in tongzhiList"
+              :key="index"
+              @click="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+            >
+              <el-link :underline="false">
+                <span class="title textOver">{{ item.title }}</span>
+                <span class="date textOver">{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
+              </el-link>
+            </li>
+          </ul>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'notice',
+  props: {
+    tongzhiList: null,
+  },
+  components: {},
+  data: () => ({
+    title: '通知公告',
+    more: require('@/assets/home/更多.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    moreClick() {
+      this.$router.push({ path: '/government/governmentList' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+ul {
+  padding: 0;
+  margin: 0;
+}
+li {
+  padding: 0;
+  margin: 0;
+  color: #999;
+}
+.info {
+  width: 100%;
+  height: 320px;
+  overflow: hidden;
+  padding: 20px;
+  background-color: #fff;
+}
+.topInfo {
+  height: 30px;
+  line-height: 30px;
+  margin: 0 0 10px 0;
+}
+.topInfo .left {
+  font-size: 22px;
+  color: #2c3350;
+  font-weight: bold;
+}
+.topInfo .more {
+  height: 30px;
+  text-align: right;
+  padding: 6px 0;
+}
+.list {
+  padding: 0 0 0 20px;
+  height: 230px;
+  overflow: hidden;
+}
+.zixunList {
+  padding: 0 0 5px 0;
+}
+.zixunList .title {
+  font-size: 14px;
+  color: #60626e;
+  display: inline-block;
+  width: 230px;
+  margin: 0 20px 0 0;
+}
+.zixunList .date {
+  font-size: 14px;
+  color: #abaab8;
+  float: right;
+  max-width: 90px;
+}
+</style>

+ 55 - 0
src/views/home/parts/photoNews.vue

@@ -0,0 +1,55 @@
+<template>
+  <div id="phontoNews">
+    <el-col :span="24" class="info">
+      <div class="block">
+        <el-carousel height="360px">
+          <el-carousel-item
+            v-for="(item, index) in photoNews"
+            :key="index"
+            @click.native="$router.push({ path: '/government/governmentDetail', query: { id: item.id } })"
+          >
+            <el-image style="width:100%;height:360px;" :src="item.picture"></el-image>
+            <p class="title textOver">{{ item.title }}</p>
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'phontoNews',
+  props: {
+    photoNews: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.info {
+  padding: 20px;
+}
+/deep/.el-carousel__indicators {
+  display: none;
+}
+.title {
+  position: absolute;
+  bottom: 0;
+  width: 97%;
+  height: 30px;
+  line-height: 30px;
+  padding: 0 10px;
+  color: #fff;
+  background: #22529a;
+}
+</style>

+ 90 - 0
src/views/home/parts/policyrightcont.vue

@@ -0,0 +1,90 @@
+<template>
+  <div id="policyrightcont">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="topInfo">
+          <span>{{ columnTitle }}</span>
+        </el-col>
+        <el-col :span="24" class="infoMess">
+          <el-col :span="24" class="title">
+            {{ policyInfo.title }}
+          </el-col>
+          <el-col :span="24" class="infoDate">
+            <p>
+              <span>发布人:{{ policyInfo.publish }}</span>
+              <span>来源:{{ policyInfo.orgin }}</span>
+              <span>发布时间: {{ policyInfo.meta && policyInfo.meta.createdAt ? new Date(policyInfo.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
+            </p>
+          </el-col>
+          <el-col v-if="policyInfo.picture" class="image">
+            <el-image style="width:50%" :src="policyInfo.picture"></el-image>
+          </el-col>
+          <el-col :span="24" class="content">
+            <p v-html="policyInfo.content"></p>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'policyrightcont',
+  props: {
+    columnTitle: null,
+    policyInfo: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  padding: 0;
+  margin: 0;
+}
+.info {
+  min-height: 800px;
+  padding: 0 20px;
+  background-color: #fff;
+}
+.topInfo {
+  height: 60px;
+  line-height: 60px;
+  font-size: 22px;
+}
+.infoMess .title {
+  line-height: 30px;
+  text-align: center;
+  font-size: 16px;
+  font-weight: bold;
+  color: #000000;
+  margin: 0 0 20px 0;
+}
+.infoDate {
+  height: 36px;
+  line-height: 36px;
+}
+.infoDate p {
+  width: 700px;
+  background: #eeeeee;
+  margin: 0 105px;
+}
+.infoDate p span {
+  font-size: 14px;
+  color: #000;
+  padding: 0 0 0 80px;
+}
+.infoMess .image {
+  text-align: center;
+  margin: 20px 0 0 0;
+}
+.content {
+  padding: 0px 0 20px 0;
+}
+</style>

+ 102 - 0
src/views/home/parts/zhengwu.vue

@@ -0,0 +1,102 @@
+<template>
+  <div id="zhengwu">
+    <el-col :span="24" class="zhengwu">
+      <el-col :span="24" class="topTitle">{{ title }}</el-col>
+      <el-col :span="24" class="list">
+        <ul>
+          <li v-for="(item, index) in zhengwu" :key="index">
+            <el-link :underline="false" :href="item.url" target="_blank">
+              <el-image class="image" :src="item.pic"></el-image>
+              <el-col class="title">{{ item.title }}</el-col>
+            </el-link>
+          </li>
+        </ul>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'zhengwu',
+  props: {
+    zhengwu: null,
+  },
+  components: {},
+  data: () => ({
+    title: '政务公开',
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+ul {
+  padding: 0;
+  margin: 0;
+}
+li {
+  padding: 0;
+  margin: 0;
+  list-style: none;
+}
+.zhengwu {
+  padding: 20px 20px 20px 20px;
+  height: 320px;
+}
+.topTitle {
+  font-size: 22px;
+  color: #2c3350;
+  font-weight: bold;
+  margin: 0 0 10px 0;
+}
+.list ul li {
+  float: left;
+  border: 1px solid #dee9f9;
+  width: 180px;
+  height: 110px;
+  margin: 0 10px 10px 0;
+  text-align: center;
+}
+.list ul li:nth-child(4n) {
+  margin: 0 0 10px 0;
+}
+.list ul li .image {
+  margin: 20px 0 0 0;
+}
+.list ul li .title {
+  font-size: 18px;
+  color: #3981e5;
+  margin: 10px 0;
+}
+.list ul li:hover {
+  background-color: #dee9f9;
+}
+// .tubiao {
+//   border: 1px solid #dee9f9;
+//   width: 180px;
+//   height: 110px;
+//   margin: 0 10px 10px 0;
+//   text-align: center;
+// }
+// .tubiao .pic_title {
+//   display: block;
+//   float: left;
+//   width: 178px;
+//   height: 30px;
+//   font-size: 22px;
+//   line-height: 30px;
+//   text-align: center;
+//   color: #3981e5;
+//   font-size: 18px;
+// }
+// .tubiao .image {
+//   margin: 20px 0 0 0;
+// }
+// .tubiao:hover {
+//   background-color: #dee9f9;
+//   color: #3981e5;
+// }
+</style>

+ 78 - 1
vue.config.js

@@ -1,3 +1,80 @@
+const path = require('path');
 module.exports = {
-  lintOnSave: false
+  publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
+  // outputDir: process.env.VUE_APP_ROUTER,
+  configureWebpack: config => {
+    Object.assign(config, {
+      // 开发生产共同配置
+      resolve: {
+        alias: {
+          '@': path.resolve(__dirname, './src'),
+          '@c': path.resolve(__dirname, './src/components'),
+          '@a': path.resolve(__dirname, './src/assets'),
+        },
+      },
+    });
+  },
+  devServer: {
+    port: '8002',
+    //api地址前缀
+    proxy: {
+      '/weixin': {
+        target: 'http://smart.cc-lotus.info',
+        changeOrigin: true,
+        ws: true,
+      },
+      '/files': {
+        target: 'http://free.liaoningdoupo.com',
+      },
+      '/api/setting': {
+        target: 'http://free.liaoningdoupo.com',
+        // target: 'http://free.liaoningdoupo.com', //http://free.liaoningdoupo.com
+        changeOrigin: true,
+        ws: true,
+      },
+      '/api/affairs': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+      },
+      '/api/policy': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+      },
+      '/api/record': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+      },
+      '/api/serve': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+        // pathRewrite: { '^/api/affairs': '/api' },
+      },
+      '/api/talent': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+        // pathRewrite: { '^/api/affairs': '/api' },
+      },
+      '/api/market': {
+        target: 'http://free.liaoningdoupo.com',
+        changeOrigin: true,
+        ws: true,
+        // pathRewrite: { '^/api/affairs': '/api' },
+      },
+      '/api/live': {
+        target: 'http://10.16.10.72:9009',
+        changeOrigin: true,
+        ws: true,
+        // pathRewrite: { '^/api/affairs': '/api' },
+      },
+      '/ws': {
+        target: 'http://free.liaoningdoupo.com',
+        ws: true,
+      },
+    },
+  },
 };