Browse Source

first commit

master
lucky 5 years ago
commit
f68f81c850
  1. 3
      .browserslistrc
  2. 8
      .editorconfig
  3. 3
      .env
  4. 10
      .env.development
  5. 10
      .env.production
  6. 47
      .eslintrc.js
  7. 23
      .gitignore
  8. 13
      .prettierrc
  9. 24
      README.md
  10. 13
      babel.config.js
  11. 1
      commitlint.config.js
  12. 13847
      package-lock.json
  13. 53
      package.json
  14. BIN
      public/favicon.ico
  15. BIN
      public/img/icons/android-chrome-192x192.png
  16. BIN
      public/img/icons/android-chrome-512x512.png
  17. BIN
      public/img/icons/android-chrome-maskable-192x192.png
  18. BIN
      public/img/icons/android-chrome-maskable-512x512.png
  19. BIN
      public/img/icons/apple-touch-icon-120x120.png
  20. BIN
      public/img/icons/apple-touch-icon-152x152.png
  21. BIN
      public/img/icons/apple-touch-icon-180x180.png
  22. BIN
      public/img/icons/apple-touch-icon-60x60.png
  23. BIN
      public/img/icons/apple-touch-icon-76x76.png
  24. BIN
      public/img/icons/apple-touch-icon.png
  25. BIN
      public/img/icons/favicon-16x16.png
  26. BIN
      public/img/icons/favicon-32x32.png
  27. BIN
      public/img/icons/msapplication-icon-144x144.png
  28. BIN
      public/img/icons/mstile-150x150.png
  29. 3
      public/img/icons/safari-pinned-tab.svg
  30. 18
      public/index.html
  31. 2
      public/robots.txt
  32. 15
      rest/http-client.env.json
  33. 51
      rest/project.http
  34. 105
      src/App.vue
  35. BIN
      src/assets/arrow.png
  36. BIN
      src/assets/build.png
  37. BIN
      src/assets/bullhorn.png
  38. BIN
      src/assets/code.png
  39. BIN
      src/assets/enterprise-banner.png
  40. 21
      src/assets/icon/iconfont.css
  41. BIN
      src/assets/icon/iconfont.eot
  42. 29
      src/assets/icon/iconfont.svg
  43. BIN
      src/assets/icon/iconfont.ttf
  44. BIN
      src/assets/icon/iconfont.woff
  45. BIN
      src/assets/image.jpeg
  46. BIN
      src/assets/image.png
  47. BIN
      src/assets/jiagou.png
  48. BIN
      src/assets/join-us.png
  49. BIN
      src/assets/logo.png
  50. BIN
      src/assets/logo_bottom.png
  51. BIN
      src/assets/new01.png
  52. BIN
      src/assets/new02.png
  53. BIN
      src/assets/round.png
  54. BIN
      src/assets/server01.png
  55. BIN
      src/assets/server02.png
  56. BIN
      src/assets/server03.png
  57. BIN
      src/assets/settleIn.png
  58. BIN
      src/assets/t-top.png
  59. 181
      src/common/platform.styl
  60. 503
      src/common/portrait.styl
  61. 72
      src/components/Banner/Banner.vue
  62. 32
      src/components/BreadCrumb/BreadCrumb.vue
  63. 65
      src/components/CoreOrgan/CoreOrgan.vue
  64. 88
      src/components/FooterPage/FooterPage.vue
  65. 28
      src/components/FooterPage/FriendShip.vue
  66. 245
      src/components/HeadNav/HeadNav.vue
  67. 148
      src/components/Index/IndexNewList.vue
  68. 140
      src/components/Introduce/AddShopping.vue
  69. 38
      src/components/Introduce/CompanyProfile.vue
  70. 48
      src/components/Introduce/ContactMap.vue
  71. 115
      src/components/Introduce/ContactUs.vue
  72. 132
      src/components/Introduce/DeriveEnterprise.vue
  73. 308
      src/components/Introduce/IntentionModel.vue
  74. 466
      src/components/Introduce/Model.vue
  75. 81
      src/components/Introduce/PartnerShip.styl
  76. 97
      src/components/Introduce/PartnerShip.vue
  77. 46
      src/components/Introduce/RichText.vue
  78. 132
      src/components/PlatformList/Fruit.vue
  79. 238
      src/components/PlatformList/PlatformList.vue
  80. 79
      src/components/Rotation/Rotation.vue
  81. 248
      src/components/User/MechanismSignUp.vue
  82. 230
      src/components/User/PersonalSignUp.vue
  83. 29
      src/config/api-user.js
  84. 114
      src/config/api.js
  85. 19
      src/config/selComment.js
  86. 30
      src/config/setting.js
  87. 19
      src/config/user.js
  88. 33
      src/main.js
  89. 78
      src/plugins/ant-design-vue.js
  90. 77
      src/plugins/axios.js
  91. 34
      src/registerServiceWorker.js
  92. 313
      src/router/index.js
  93. 7
      src/store/index.js
  94. 146
      src/store/modules/home/actions.js
  95. 7
      src/store/modules/home/getters.js
  96. 6
      src/store/modules/home/index.js
  97. 292
      src/store/modules/home/mutations.js
  98. 61
      src/store/modules/home/state.js
  99. 143
      src/store/modules/user/actions.js
  100. 7
      src/store/modules/user/getters.js

3
.browserslistrc

@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead

8
.editorconfig

@ -0,0 +1,8 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 140
root = true

3
.env

@ -0,0 +1,3 @@
VUE_APP_MODE=production
VUE_APP_PREVIEW=false
VUE_APP_URL=http://www.sxwikionline.com/

10
.env.development

@ -0,0 +1,10 @@
VUE_APP_MODE=development
VUE_APP_NODE_ENV=development
VUE_APP_SCENE=greenvalley
VUE_APP_BASE_URL=http://www.sxwikionline.com/
VUE_APP_API_URL=http://www.sxwikionline.com/gateway
VUE_APP_PROXY_URL=/gateway
VUE_APP_PUBLIC_PATH=/greenvalley
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws
VUE_APP_TITLE=绿谷在线
VUE_APP_DESCRIPTION=绿谷在线管理后台

10
.env.production

@ -0,0 +1,10 @@
VUE_APP_MODE=production
VUE_APP_NODE_ENV=production
VUE_APP_SCENE=greenvalley
VUE_APP_BASE_URL=http://www.sxwikionline.com/
VUE_APP_API_URL=http://www.sxwikionline.com/gateway
VUE_APP_PROXY_URL=/gateway
VUE_APP_PUBLIC_PATH=/greenvalley
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws
VUE_APP_TITLE=绿谷在线
VUE_APP_DESCRIPTION=绿谷在线管理后台

47
.eslintrc.js

@ -0,0 +1,47 @@
/*
* Copyright (c) 2019.
* author: wally
* email: 18603454788@163.com
*/
module.exports = {
root: true,
env: { browser: true, node: true },
extends: ['plugin:vue/recommended', 'plugin:vue/essential'],
rules: {
'vue/html-self-closing': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state'] }],
'max-len': ['error', { code: 140, tabWidth: 2 }],
'object-curly-newline': ['error', { multiline: true }],
'arrow-parens': ['error', 'as-needed'],
'linebreak-style': 'off',
'vue/attributes-order': 'off',
'no-param-reassign': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/html-indent': 'off',
},
parserOptions: { parser: 'babel-eslint' },
overrides: [
{
files: ['**/__tests__/*.{j,t}s?(x)'],
env: { jest: true },
},
],
globals: {
Vue: true,
VueRouter: true,
Vuex: true,
axios: true,
_: true,
Vuetify: true,
vuetify: true,
},
};

23
.gitignore

@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

13
.prettierrc

@ -0,0 +1,13 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"arrowParens": "avoid",
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"proseWrap": "always",
"endOfLine": "lf"
}

24
README.md

@ -0,0 +1,24 @@
# green-valley
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

13
babel.config.js

@ -0,0 +1,13 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [
[
"import",
{
libraryName: "ant-design-vue",
libraryDirectory: "es",
style: true
}
]
]
};

1
commitlint.config.js

@ -0,0 +1 @@
module.exports = {extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint']};

13847
package-lock.json

File diff suppressed because it is too large

53
package.json

@ -0,0 +1,53 @@
{
"name": "green-valley",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"ant-design-vue": "^1.2.4",
"compression-webpack-plugin": "^6.1.1",
"core-js": "^3.6.5",
"echarts": "^4.9.0",
"moment": "^2.29.1",
"quill": "^1.3.7",
"register-service-worker": "^1.7.1",
"stylus": "^0.54.8",
"vue": "^2.6.11",
"vue-baidu-map": "^0.21.22",
"vue-dompurify-html": "^2.3.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"axios": "^0.18.0",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.11.0",
"css-loader": "^5.0.1",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"less": "^2.7.3",
"less-loader": "^4.1.0",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"svg-sprite-loader": "^5.0.0",
"vue-cli-plugin-ant-design": "^1.0.1",
"vue-cli-plugin-axios": "^0.0.4",
"vue-template-compiler": "^2.6.11"
}
}

BIN
public/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
public/img/icons/android-chrome-192x192.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
public/img/icons/android-chrome-512x512.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
public/img/icons/android-chrome-maskable-192x192.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
public/img/icons/android-chrome-maskable-512x512.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/img/icons/apple-touch-icon-120x120.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
public/img/icons/apple-touch-icon-152x152.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
public/img/icons/apple-touch-icon-180x180.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
public/img/icons/apple-touch-icon-60x60.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
public/img/icons/apple-touch-icon-76x76.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
public/img/icons/apple-touch-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
public/img/icons/favicon-16x16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

BIN
public/img/icons/favicon-32x32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
public/img/icons/msapplication-icon-144x144.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/img/icons/mstile-150x150.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

3
public/img/icons/safari-pinned-tab.svg

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 215 B

18
public/index.html

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=KPWvSuCuXmgphVhYM6tVHmlkav3TGpu5"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

2
public/robots.txt

@ -0,0 +1,2 @@
User-agent: *
Disallow:

15
rest/http-client.env.json

@ -0,0 +1,15 @@
{
"$shared": {
"version": "v1",
"identifier": "wally",
"credential": "111111"
},
"dev": {
"name": "dev",
"url": "http://192.168.0.99/gateway"
},
"local": {
"version": "v2",
"url": "http://192.168.0.99/gateway"
}
}

51
rest/project.http

@ -0,0 +1,51 @@
# @tall = {{url}}/tall/v1.0
@tall = https://www.tall.wiki/gateway/tall/v1.0
@greenvalley = http://www.sxwikionline.com/gateway/greenvalley
@type = content-type: application/json;charset=utf-8
### login
# @name login
POST {{tall}}/users/signin
{{type}}
{
"client": 1,
"type": 3,
"data": {
"identifier": "whj",
"credential": "123456"
}
}
### send code
GET {{tall}}/users/smscode?phone=16603418748
### phone login
# @name phonelogin
POST {{tall}}/users/signin
{{type}}
{
"client": 1,
"type": 1,
"data": {
"identifier": "16603418748",
"credential": "1111"
}
}
### 根据团队id查看研发团队相关信息
POST {{greenvalley}}/user/userSer
{{type}}
Authorization: Bearer {{login.response.body.$.data.token}}
{
"param": {
}
}

105
src/App.vue

@ -0,0 +1,105 @@
<template>
<a-config-provider :locale="zh_CN">
<div id="app">
<head-nav class="head-nav" />
<router-view></router-view>
<friend-ship class="friend" />
<footer-page class="footer" />
<div id="components-back-top-demo-custom">
<a-back-top>
<div class="ant-back-top-inner"></div>
</a-back-top>
</div>
</div>
</a-config-provider>
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex';
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
import HeadNav from './components/HeadNav/HeadNav.vue';
import FooterPage from './components/FooterPage/FooterPage.vue';
import FriendShip from './components/FooterPage/FriendShip.vue';
export default {
name: 'App',
components: { HeadNav, FooterPage, FriendShip },
data() {
return { zh_CN };
},
computed: mapState('user', ['anyringToken']),
updated() {
window.scroll(0, 0);
},
created() {
console.log('process.env ', process.env);
const userId = '1218763410024566784';
const params = { userId };
this.getUserId(params);
if (sessionStorage.getItem('store')) {
this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))));
}
window.addEventListener('beforeunload', () => {
sessionStorage.setItem('store', JSON.stringify(this.$store.state));
});
},
methods: { ...mapActions('user', ['getUserId']) },
};
</script>
<style>
html,
body,
#app {
min-height: 100%;
}
#app {
background: transparent;
}
body {
background: #f5f5f5 !important;
padding-top: 80px;
}
body::-webkit-scrollbar {
width: 0;
}
.head-nav {
height: 80px;
width: 100%;
top: 0;
background: white;
box-shadow: 0 0 10px #ccc;
position: fixed !important;
z-index: 100;
}
.friend {
height: 64px;
}
.footer {
width: 100%;
background: #0d1f32;
bottom: 0;
}
#components-back-top-demo-custom .ant-back-top {
bottom: 100px;
right: 70px;
}
#components-back-top-demo-custom .ant-back-top-inner {
height: 60px;
width: 60px;
line-height: 60px;
background: url('assets/t-top.png') center no-repeat;
background-size: contain;
}
.BMap_cpyCtrl {
display: none;
}
.anchorBL {
display: none;
}
</style>

BIN
src/assets/arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

BIN
src/assets/build.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 KiB

BIN
src/assets/bullhorn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

BIN
src/assets/code.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/assets/enterprise-banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

21
src/assets/icon/iconfont.css

@ -0,0 +1,21 @@
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1606814380789'); /* IE9 */
src: url('iconfont.eot?t=1606814380789#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALAAAsAAAAABnAAAAJ0AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAp8gRABNgIkAwgLBgAEIAWEbQcvG7UFyJ6aPClS2/jAQpBlKUHgLEQQraGzf/cfBIUoGRWCjoqLMLFRrXRVrTH1bMRfztXeEwobfUDy1DOlP3OusGk5nTSH6gmFJ0tKIY+nBgQ4ZZ5fe/U+cbjXxvJA5jvvchlj0FiTJnUBxoEU0N4YbeEC+QD+h7ELXMJlAs2GJMUOR6aWoE1mzQrEm22q0JbzyzJLNQpVzcYsvio1Fp/FAXwJfx//IR9tFMrEqrh4HTag75dmZ6SPmhefIEBA20skLACZuKmNn2kUjNmoOd5kDOyrNPil1bVvE3v954mKVdwKBqDknqSu7Fb5C5DpzRiwMuoDpJaW1veXVeV5b+lxhVLteX355ZA+rS0ZjT+ex05fRr8/jR493lS0+Eefi/THEQbKv8zAm9u5cn11ob622gISIuUCqogn3i5OR1tKlzE/z2iuVkMfQC0tEYA/mX852tS7eVtLBj//5s/CKbVc+kDjvh3BP5L2bMm63LIWWZXWpgtjGs9d1awZddjd7Xusoe+G0qFR3205GwymSBpNEDN1AaUWi6g02kGzeaPbW/QQGkVuwpxNgNDpEoV235B0uiJm6hdK/f5R6YxGNLuLngNbTIXdcSBQlWgQrUZsnQfMscuOqHQBzZKniqw8ZCkoIjtEculsMTWKAYo5lkRlMy8lI0xwn4yA69DzOAkFd1CXaUvKsJDJsLo7pXXuQ4cDAlJJyEBoagibjgswv7PUUfr+AmQq8ahES1NNUIGEiN0/kZOW7UEc1QS9mu7llkiZKU+SGIIROB8xAsYhj4cjwvpxDqST0qwR0VBBxm7H+mrS6+v8r9sFzSxjEfaIpHzjuuoBAAA=') format('woff2'),
url('iconfont.woff?t=1606814380789') format('woff'),
url('iconfont.ttf?t=1606814380789') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1606814380789#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 14px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-local:before {
content: "\e662";
font-size: 20px;
}

BIN
src/assets/icon/iconfont.eot

Binary file not shown.

29
src/assets/icon/iconfont.svg

@ -0,0 +1,29 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="local" unicode="&#58978;" d="M720.0256 262.9504c115.168 115.5392 115.168 303.0336 0 418.5664-114.9376 115.3088-301.12 115.3088-416.0512 0-115.168-115.5328-115.168-303.0272 0-418.56L512 54.2464l208.0256 208.704z m-506.7072-90.3616c-164.96 165.4912-164.96 433.8048 0 599.296 164.96 165.4848 432.4032 165.4848 597.3632 0 164.96-165.4912 164.96-433.8048 0-599.296L512-127.0592l-298.6816 299.648zM512 345.6c-70.6944 0-128 57.3056-128 128s57.3056 128 128 128 128-57.3056 128-128-57.3056-128-128-128z" horiz-adv-x="1024" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 1018 B

BIN
src/assets/icon/iconfont.ttf

Binary file not shown.

BIN
src/assets/icon/iconfont.woff

Binary file not shown.

BIN
src/assets/image.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
src/assets/image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
src/assets/jiagou.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
src/assets/join-us.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
src/assets/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/assets/logo_bottom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/assets/new01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
src/assets/new02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
src/assets/server01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
src/assets/server02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
src/assets/server03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
src/assets/settleIn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/t-top.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

181
src/common/platform.styl

@ -0,0 +1,181 @@
.nav-box {
height: 66px;
background: #000000;
line-height: 66px;
padding: 0 9%;
color: #fff;
font-size: 16px;
font-weight: bold;
div {
margin-right: 56px;
cursor: pointer;
}
}
.nav-box-active {
color: #13ACC4 !important;
}
.top-box {
overflow: hidden;
background: -webkit-linear-gradient(left, #6569FA , #13ACC4);
position: relative;
}
.top-title {
position: absolute;
top: 70px;
left: 4%;
padding: 0;
font-size: 50px;
color: #fff;
}
@media only screen and (max-width: 1500px) {
.top-title {
font-size: 40px;
}
}
.top-content {
float: right;
margin: 70px 0;
margin-right: 12%;
width: 62%;
padding: 0;
font-size: 16px;
color: #fff;
line-height: 36px;
}
.circular {
height: 20px;
width: 20px;
background: #13ACC4;
border-radius: 50%;
top: 50%;
margin-top: -10px;
position: absolute;
}
.center-box {
overflow: hidden;
background: #fff;
padding: 0 9%;
position: relative;
}
.center-title {
position: absolute;
top: 40%;
font-size: 30px;
color: #000;
}
.center-content {
float: right;
margin: 160px 0;
width: 79%;
line-height: 36px;
font-size: 16px;
}
.bottom-box {
// height: 830px;
overflow: hidden;
position: relative;
padding: 0 9%;
}
.bottom-title {
position: absolute;
top: 20%;
font-size: 30px;
color: #000;
}
.bottom-content {
float: right;
margin: 100px 0;
width: 79%;
}
.partner-box {
// height: 1060px;
overflow: hidden;
position: relative;
padding: 0 9%;
background: #fff;
}
.partner-title {
position: absolute;
top: 15%;
font-size: 30px;
color: #000;
}
.partner-content {
float: right;
margin: 100px 0;
width: 79%;
}
.join-box {
// height: 300px;
overflow: hidden;
position: relative;
padding: 0 9%;
}
.join-title {
position: absolute;
top: 40%;
font-size: 30px;
color: #000;
}
.join-content {
float: right;
margin: 70px 0;
font-size: 16px;
width: 79%;
color: rgba(0,0,0,0.65);
line-height: 36px;
}
.content-box {
position: relative;
padding: 0 9%;
}
.introduce-box {
width: 60%;
overflow: hidden;
position: relative;
background: #fff;
box-shadow: 0 3px 6px rgba(0,0,0,0.16)
cursor: pointer;
padding: 30px;
}
.introduce-title {
margin-top: 24px;
font-size: 30px;
color: rgba(0,0,0,0.85);
}
.introduce-content {
font-size: 16px;
color: rgba(0,0,0,0.65);
}
.flow-path {
background: -webkit-linear-gradient(left, #13ACC4 , #fff);
padding: 80px 9%;
position: relative;
}
.flow-title {
position: absolute;
top: 40%;
font-size: 30px;
color: #fff;
}
.flow-content {
margin-left: 20%;
width:80%;
font-size: 16px;
color: #fff;
}
.login-color {
color: #096DD9;
cursor: pointer;
}

503
src/common/portrait.styl

@ -0,0 +1,503 @@
// padding
.pa-0 {
padding: 0px;
}
.pa-1 {
padding: 4px;
}
.pa-2 {
padding: 8px;
}
.pa-3 {
padding: 12px;
}
.pa-4 {
padding: 16px;
}
.pa-5 {
padding: 20px;
}
.pb-3 {
padding-bottom: 12px;
}
.pb-4 {
padding-bottom: 16px;
}
.pb-5 {
padding-bottom: 20px;
}
.pb-10 {
padding-bottom: 40px;
}
.px-1{
padding-left: 4px;
padding-right: 4px;
}
.px-2{
padding-left: 8px;
padding-right: 8px;
}
.px-3{
padding-left: 12px;
padding-right: 12px;
}
.px-4{
padding-left: 16px;
padding-right: 16px;
}
.px-5{
padding-left: 20px;
padding-right: 20px;
}
.px-6{
padding-left: 24px;
padding-right: 24px;
}
.px-10{
padding-left: 40px;
padding-right: 40px;
}
.py-1{
padding-top: 4px;
padding-bottom: 4px;
}
.py-2{
padding-top: 8px;
padding-bottom: 8px;
}
.py-3{
padding-top: 12px;
padding-bottom: 12px;
}
.py-4{
padding-top: 16px;
padding-bottom: 16px;
}
.py-5{
padding-top: 20px;
padding-bottom: 20px;
}
.py-10{
padding-top: 40px;
padding-bottom: 40px;
}
// margin
.ma-2 {
margin: 8px;
}
.ma-3 {
margin: 12px;
}
.mx-2{
margin-left: 8px;
margin-right: 8px;
}
.my-2{
margin-top: 8px;
margin-bottom: 8px;
}
.my-3{
margin-top: 12px;
margin-bottom: 12px;
}
.my-4{
margin-top: 16px;
margin-bottom: 16px;
}
.my-5{
margin-top: 20px;
margin-bottom: 20px;
}
.mt-1{
margin-top: 4px;
}
.mt-2{
margin-top: 8px;
}
.mt-3{
margin-top: 12px;
}
.mt-4{
margin-top: 16px;
}
.mt-8{
margin-top: 32px;
}
.mb-1{
margin-bottom: 4px;
}
.mb-2{
margin-bottom: 8px;
}
.mb-3{
margin-bottom: 12px;
}
.mb-4{
margin-bottom: 16px;
}
.mb-5{
margin-bottom: 20px;
}
.mb-6{
margin-bottom: 24px;
}
.mb-7{
margin-bottom: 28px;
}
.mb-8{
margin-bottom: 32px;
}
.mb-9{
margin-bottom: 36px;
}
.mb-10{
margin-bottom: 40px;
}
.ml-2{
margin-left: 8px;
}
.ml-3{
margin-left: 12px;
}
.ml-4{
margin-left: 16px;
}
.ml-5{
margin-left: 20px;
}
.ml-6{
margin-left: 24px;
}
.ml-7{
margin-left: 28px;
}
.ml-8{
margin-left: 32px;
}
.mr-1{
margin-right: 4px;
}
.mr-2{
margin-right: 8px;
}
.mr-3{
margin-right: 12px;
}
.mr-4{
margin-right: 16px;
}
.mr-5{
margin-right: 20px;
}
.mr-6{
margin-right: 24px;
}
.mr-7{
margin-right: 28px;
}
.mr-8{
margin-right: 32px;
}
// background
.white {
background: white;
}
// flex
.d-flex{
display: flex;
}
.flex-wrap{
flex-wrap: wrap;
}
.flex-nowrap{
flex-wrap: nowrap;
}
.flex-column{
flex-direction: column;
}
.flex-column-reverse{
flex-direction: column-reverse;
}
.flex-row{
flex-direction: row;
}
.flex-row-reverse{
flex-direction: row-reverse;
}
.justify-center{
justify-content: center;
}
.justify-space-between{
justify-content: space-between;
}
.align-center{
align-items: center
}
.align-start{
align-items: flex-start
}
.align-end{
align-items: flex-end
}
.flex-1{
display: flex;
flex: 1;
}
.flex-3{
display: flex;
flex: 3;
}
// other
.inner {
width: 82%;
margin: 0 auto;
}
.pointer{
cursor:pointer;
}
.fill-height{
height:100%;
}
.fill-width{
width:100%;
}
img{
max-width: 100%
}
// font
.font-big{
font-size: 60px;
}
.font-small{
font-size: 30px;
line-height: 40px;
}
.font-bold{
font-weight: bold;
}
@media only screen and (max-width: 1400px) {
.font-big{
font-size: 45px;
}
.font-small{
font-size: 26px;
line-height: 36px;
}
}
.font-bold-32{
font-size: 32px;
font-weight: bold;
}
.font-32{
font-size: 32px;
}
.font-bold-24{
font-size: 24px;
font-weight: bold;
}
.font-24{
font-size: 24px;
}
.font-20{
font-size: 20px;
}
.font-bold-20{
font-size: 20px;
font-weight: bold;
}
.font-bold-16{
font-size: 16px;
font-weight: bold;
}
.font-16{
font-size: 16px;
}
.font-bold-14{
font-size: 14px;
font-weight: bold;
}
.font-14{
font-size: 14px;
}
.font-12{
font-size: 12px;
}
.icon-size{
font-size: 20px;
}
h2{
font-size: 24px;
font-weight: bold;
color: rgba(0,0,0,.85)
}
.baseColor{
color: #13ACC4
}
.bg{
background: #F5F5F5
}
.ant-btn {
color: #13acc4 !important;
border-color: #13acc4 !important;
}
.ant-btn-primary{
background-color: #13ACC4
border-color: #13ACC4;
color: #fff!important;
}
.ant-btn-link:hover, .ant-btn-link:focus{
color: #13ACC4;
}
.ant-btn-link{
border-color: transparent!important;
}
.ant-btn-primary-disabled, .ant-btn-primary.disabled, .ant-btn-primary[disabled], .ant-btn-primary-disabled:hover, .ant-btn-primary.disabled:hover, .ant-btn-primary[disabled]:hover, .ant-btn-primary-disabled:focus, .ant-btn-primary.disabled:focus, .ant-btn-primary[disabled]:focus, .ant-btn-primary-disabled:active, .ant-btn-primary.disabled:active, .ant-btn-primary[disabled]:active, .ant-btn-primary-disabled.active, .ant-btn-primary.disabled.active, .ant-btn-primary[disabled].active{
border-color: #d9d9d9!important;
color: rgba(0, 0, 0, 0.25)!important;
}
.ant-btn-disabled, .ant-btn.disabled, .ant-btn[disabled], .ant-btn-disabled:hover, .ant-btn.disabled:hover, .ant-btn[disabled]:hover, .ant-btn-disabled:focus, .ant-btn.disabled:focus, .ant-btn[disabled]:focus, .ant-btn-disabled:active, .ant-btn.disabled:active, .ant-btn[disabled]:active, .ant-btn-disabled.active, .ant-btn.disabled.active, .ant-btn[disabled].active{
color: rgba(0, 0, 0, 0.25)!important;
border-color: #d9d9d9!important;
}
.ant-carousel .slick-list .slick-slide.slick-active div{
display: block !important;
}
.base-bg{
background: #13ACC4
}
.second-base-bg{
background: #AACD06
}
//
.white--text{
color: #fff
}
.title-color{
color: rgba(0,0,0,.85)
}
.textColor{
color: rgba(0,0,0,.65)
}
.secondary{
color: rgba(0,0,0,.45)
}
// line-height
.line-height-30{
line-height: 30px
}
.line-height-36{
line-height: 36px
}

72
src/components/Banner/Banner.vue

@ -0,0 +1,72 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div class="head">
<a-carousel :autoplay="false">
<div :key="item.id" v-for="item in bannerLists">
<img :src="item.url" alt />
<div id="banner-box"></div>
</div>
</a-carousel>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
showPage: {
type: Number,
default: 11,
},
},
data() {
return {};
},
computed: mapState('home', ['bannerLists']),
mounted() {
window.addEventListener('scroll', this.handleScroll);
setTimeout(() => {
document.querySelector('#banner-box').scrollIntoView({
behavior: 'smooth', //
block: 'start', //
});
}, 1000);
},
async created() {
this.setBannerLists([]);
await this.getQueryRotation(this.showPage);
},
methods: {
...mapMutations('home', ['setBannerLists']),
...mapActions('home', ['getQueryRotation']),
},
};
</script>
<style lang="stylus" scoped>
.head {
background: white;
max-height: 440px;
overflow: hidden;
position: relative;
}
#banner-box {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 80px;
opacity: 0;
}
</style>

32
src/components/BreadCrumb/BreadCrumb.vue

@ -0,0 +1,32 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<a-breadcrumb>
<a-breadcrumb-item>绿谷生物</a-breadcrumb-item>
<a-breadcrumb-item :key="index" v-for="(item,index) in arr">
<router-link :to="item.url">{{ item.name }}</router-link>
</a-breadcrumb-item>
</a-breadcrumb>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
arr: {
type: Array,
default: () => [],
},
},
data() {
return {};
},
};
</script>
<style lang="stylus" scoped></style>

65
src/components/CoreOrgan/CoreOrgan.vue

@ -0,0 +1,65 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="words-content">
<span class="font-16 white line-height-36" v-dompurify-html="content"></span>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import { getPageDetail } from 'config/api';
export default {
name: 'RichText',
props: {
title: {
type: String,
default: '',
},
},
data() {
return { content: '' };
},
// computed: mapState('home', ['titleCode']),
async created() {
// this.setContent('');
await this.getPageDetail(this.title);
},
methods: {
// ...mapMutations('home', ['setContent']),
// ...mapActions('home', ['getPageDetail']),
async getPageDetail(titleCode) {
try {
const params = {
param: { titleCode },
};
const res = await getPageDetail(params);
const { code, msg, data } = res.data;
if (code === 200) {
if (data && data.length > 0 && data[0] && data[0].length > 0 && data[0][0].detail) {
this.content = data[0][0].detail.content;
}
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
console.log(error);
}
},
},
};
</script>

88
src/components/FooterPage/FooterPage.vue

@ -0,0 +1,88 @@
<template>
<div>
<div class="footer">
<div class="d-flex flex-nowrap inner">
<div class="box">
<img class="pic" src="~assets/logo_bottom.png" />
</div>
<div class="box flex-1 d-flex flex-column" style="padding-left: 13%;">
<div class="title">发现</div>
<span>创新挑战</span>
<span>创新平台</span>
<span>孵化平台</span>
<span>产业平台</span>
<span>在线社区</span>
</div>
<div class="box flex-1 d-flex flex-column">
<div class="title">资讯</div>
<span>行业资讯</span>
<span>活动公告</span>
<span>国家政策</span>
<span>行业资讯</span>
<span>省级政策</span>
</div>
<div class="box flex-1 d-flex flex-column">
<div class="title">联系我们</div>
<span>我要入驻</span>
<span>人才招聘</span>
<div>400-789-789</div>
</div>
<div class="box">
<img
class="pic"
src="https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/logo/lvgu.jpg"
/>
</div>
</div>
</div>
<div class="xian"></div>
<div class="font-12 align-center text">
Copyright © 2020 The Project by
<span style="color:#2E54EA">CCSENS</span>. All Rights Reserved
</div>
</div>
</template>
<script>
export default {
data() {
return { str: '头部导航栏' };
},
};
</script>
<style lang="stylus" scoped>
.footer {
color: #D7D7D7;
}
.pic {
width: 130px;
}
.box {
margin-top: 58px;
.title {
font-size: 18px;
margin-bottom: 18px;
}
span {
font-size: 12px;
line-height: 24px;
}
}
.xian {
width: 100%;
height: 1px;
background: rgba(204, 204, 204, 0.35);
margin-top: 100px;
}
.text {
text-align: center;
line-height: 90px;
}
</style>

28
src/components/FooterPage/FriendShip.vue

@ -0,0 +1,28 @@
<template>
<div class="friend">
<div class="inner">
{{ str }}
<span :key="index" class="mx-2" v-for="(list,index) in lists">{{ list }}</span>
</div>
</div>
</template>
<script>
export default {
data() {
return {
str: '友情链接:',
lists: ['科技部', '发改委', '工信部', '太原市综改区', '山西省科技厅', '山西省工信厅', '山西省发改委', '太原市科技厅', '太原市发改委'],
};
},
};
</script>
<style lang="stylus" scoped>
.friend {
line-height: 64px;
background: #fff;
font-size: 12px;
color: rgba(0, 0, 0, 0.65);
}
</style>

245
src/components/HeadNav/HeadNav.vue

@ -0,0 +1,245 @@
<template>
<div class="white d-flex flex-row flex-nowrap px-10 align-center">
<img @click="jumUrl('/')" alt class="logo-img" src="@/assets/logo.png" style="cursor: pointer" />
<div class="flex-1 ml-8">
<a-dropdown
:disabled="item.children.length > 0 ? false : true"
:key="a"
class="list-down"
v-for="(item, a) in list"
>
<a @click="jumUrl(item.url)" class="ant-dropdown-link">
{{ item.name }}&nbsp;&nbsp;
<a-icon type="down" v-show="item.children.length > 0" />
</a>
<a-menu slot="overlay">
<a-menu-item
:key="b"
class="px-6 py-3"
style="text-align: center"
v-for="(con, b) in item.children"
>
<a @click="jumUrl(con.url)">{{ con.title }}</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
<div class="d-flex flex-nowrap align-center">
<a-icon class="icon-head pointer icon-head-right" type="search" />
<a-tooltip placement="bottom">
<template slot="title">
<span>点击查看购物车</span>
</template>
<a-icon
@click="$router.push('/Cart')"
class="baseColor icon-head icon-head-right pointer"
type="shopping-cart"
/>
</a-tooltip>
<router-link tag="span" to="/login">
<a-icon class="icon-head pointer" style="right: 50px" type="user" />
</router-link>
</div>
</div>
</template>
<script>
import { mapMutations } from 'vuex';
export default {
data() {
return {
str: '这是头部导航',
list: [
{
name: '关于我们',
url: '/About/Introduce',
children: [
{
title: '公司介绍',
url: '/About/Introduce',
},
{
title: '组织机构',
url: '/About/Organ',
},
{
title: '合作伙伴',
url: '/About/Partner',
},
{
title: '衍生企业',
url: '/About/SpinOffs',
},
],
},
{
name: '创新政策',
children: [],
url: '/Policy',
},
{
name: '创新平台',
children: [
{
title: '协同创新中心',
url: '/NewPlatform/NewCore',
},
{
title: '创新资源平台',
url: '/NewPlatform/News',
},
{
title: '创新服务',
url: '/NewPlatform/NewService',
},
],
url: '/NewPlatform/NewCore',
},
{
name: '孵化平台',
url: '/IncubationPlatform/MakerSpace',
children: [
{
title: '众创空间',
url: '/IncubationPlatform/MakerSpace',
},
// {
// title: '',
// url: '/IncubationPlatform/PublicLaboratory',
// },
// {
// title: '',
// url: '/IncubationPlatform/PilotBase',
// },
// {
// title: '',
// url: '/IncubationPlatform/Tutor',
// },
// {
// title: '',
// url: '/IncubationPlatform/Partner',
// },
{
title: '创业服务',
url: '/IncubationPlatform/Services',
},
{
title: '产品展示',
url: '/IncubationPlatform/Products',
},
],
},
{
name: '产业平台',
children: [
{
title: '产业创新联盟',
url: '/Industry/Union',
},
{
title: '产业服务',
url: '/Industry/Serve',
},
{
title: '衍生企业',
url: '/Industry/Enterprise',
},
],
url: '/Industry/Union',
},
{
name: '知识平台',
children: [],
url: '/Knowledge',
},
{
name: '活动公告',
children: [],
url: '/Activity',
},
{
name: '创新挑战',
children: [
{
title: '需求征集',
url: '/Challenge/Solicitation',
},
{
title: '项目发布',
url: '/Challenge/Release',
},
{
title: '结果公告',
url: '/Challenge/Notice',
},
],
url: '/Challenge/Solicitation',
},
{
name: '交流社区',
children: [],
url: '/Community',
},
{
name: '联系我们',
children: [],
url: '/ContactUs',
},
],
};
},
methods: {
jumUrl(url) {
if (this.$route.path !== url) {
this.$router.push(url);
}
},
},
};
</script>
<style lang="stylus" scoped>
.head {
height: 80px;
width: 100%;
background: white;
// position: relative;
}
.list-down {
margin-right: 20px;
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
}
.logo-img {
height: 50px;
}
.icon-head {
font-size: 24px;
}
.icon-head-right {
margin-right: 32px;
}
@media only screen and (max-width: 1400px) {
.list-down {
margin-right: 18px;
font-size: 14px;
}
.logo-img {
height: 44px;
}
.icon-head {
font-size: 24px;
}
.icon-head-right {
margin-right: 24px;
}
}
</style>

148
src/components/Index/IndexNewList.vue

@ -0,0 +1,148 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div class="index-wrap">
<div class="d-flex flex-nowrap align-center baseColor" v-if="i === 0">
<span class="font-bold-24">行业资讯</span>
<img class="bullhorn ml-4" src="@/assets/bullhorn.png" />
<div class="flex-1"></div>
<a-button
@click="$router.push('/ItInformation')"
class="d-flex align-end font-16 baseColor pa-0"
style="display: inline-block;"
type="link"
>
more
<a-icon style="font-size:12px" type="right" />
</a-button>
</div>
<div class="d-flex flex-nowrap align-center baseColor" v-else>
<span class="font-bold-24">活动公告</span>
<img class="bullhorn ml-4" src="@/assets/bullhorn.png" />
<div class="flex-1"></div>
<a-button
@click="$router.push('/Activity')"
class="d-flex align-end font-16 baseColor pa-0"
style="display: inline-block;"
type="link"
>
more
<a-icon style="font-size:12px" type="right" />
</a-button>
</div>
<div class="policy-box" v-if="lists && lists[i].news && lists[i].news.length>0">
<div :key="index" class="div-box" v-for="(item, index) in lists[i].news">
<div @click="jumpDetails(item)" class="d-flex flex-nowrap" style="cursor: pointer">
<div class="time d-flex flex-column align-center mr-5" v-if="item.releaseTime">
<span class="font-20">{{ monthEnglish[item.releaseTime.split('-')[1] - 1] }}.</span>
<span class="font-bold-32 day">{{ item.releaseTime.split(' ')[0].split('-')[2] }}</span>
</div>
<div class="d-flex flex-1 flex-column">
<div class="item-title">{{ item.title }}</div>
<div class="original"></div>
<div class="item-content">{{ item.content }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import { front } from 'config/api';
export default {
name: 'IndexNewList',
props: {
i: {
type: Number,
default: 0,
},
lists: {
type: Array,
default: () => [],
},
},
data() {
return { monthEnglish: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Spt', 'Oct', 'Nov', 'Dec'] };
},
methods: {
...mapMutations('home', ['setActDetail']),
//
jumpDetails(item) {
this.setActDetail(item);
this.$router.push('/ActDetails');
},
},
};
</script>
<style scoped lang="stylus">
.index-wrap {
width: 90%;
height: 400px;
margin: 15px auto 15px auto;
overflow: hidden;
opacity: 1;
}
.bullhorn {
width: 25px;
height: 25px;
}
.policy-box {
.div-box {
position: relative;
background: #fff;
padding-top: 24px;
height: 114px;
.time {
color: rgba(0, 0, 0, 0.25);
.day {
position: relative;
top: -15px;
}
}
}
}
.item-title {
overflow: hidden;
display: -webkit-box;
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
font-family: Microsoft YaHei;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.original {
position: relative;
top: 1px;
left: 0;
width: 30px;
height: 2px;
background: #13ACC4;
}
.item-content {
overflow: hidden;
display: -webkit-box;
margin-top: 8px;
line-height: 28px;
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
font-family: Microsoft YaHei;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>

140
src/components/Introduce/AddShopping.vue

@ -0,0 +1,140 @@
<template>
<div>
<a-button type="primary" @click="showModal" class="shopping">
{{ str }}
</a-button>
<a-icon id="ddd" type="shopping-cart" />
<a-modal width="50%" :title="title" :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel">
<a-form :form="form">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="项目信息简述">
<a-textarea v-model.trim="describe" style="height: 120px" placeholder="请输入项目信息简述..." />
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { addCar } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'NewModel',
props: {
typeData: {
type: Object,
default: null,
},
},
data() {
return {
form: this.$form.createForm(this, { name: 'submit' }),
title: '加入购物车',
str: '加入购物车',
visible: false,
formItemLayout,
formTailLayout,
confirmLoading: false,
pageX: 0,
pageY: 0,
WinWidth: 0,
WinHeight: 0,
describe: '', //
};
},
methods: {
//
showModal(event) {
this.pageX = event.clientX;
this.pageY = event.clientY;
this.visible = true;
},
//
handleCancel(e) {
this.visible = false;
},
//
async handleOk() {
this.confirmLoading = true;
try {
const params = {
param: {
description: this.describe,
serviceId: this.typeData.Id,
type: this.typeData.type,
},
};
const res = await addCar(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('加入购物车成功');
this.visible = false;
this.confirmLoading = false;
this.describe = '';
this.anma();
} else {
this.$message.error(msg);
}
} catch (error) {
this.$message.error(error);
}
},
//
anma() {
this.WinWidth = window.innerWidth;
this.WinHeight = window.innerHeight;
var d = document.getElementById('ddd');
d.style.top = this.pageY - d.offsetHeight * 0.5 + 'px';
console.log(d.offsetWidth);
d.style.right = this.WinWidth - this.pageX - d.offsetWidth * 0.5 + 'px';
d.style.display = 'block';
setTimeout(() => {
d.style.display = 'none';
}, 900);
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
#ddd {
color: #13acc4;
font-size: 50px;
display: none;
z-index: 1000;
animation: animations 1s cubic-bezier(0.5, 0.5, 0.5, 0.5);
position: fixed;
}
@keyframes animations {
0% {
}
99% {
top: 0;
right: -50px;
font-size: 20px;
}
100% {
transform: none;
}
}
</style>

38
src/components/Introduce/CompanyProfile.vue

@ -0,0 +1,38 @@
<template>
<div>
<a-modal
:footer="null"
:title="profile.title"
:visible="showProfile"
@cancel="handleCancel"
@ok="handleCancel"
>
<p>{{ profile.description }}</p>
</a-modal>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
props: {
showProfile: {
type: Boolean,
default: false,
},
},
data() {
return { ModalText: 'Content of the modal', };
},
computed: mapState('home', ['profile']),
methods: {
handleCancel(e) {
this.$emit('closeProfile');
},
},
};
</script>

48
src/components/Introduce/ContactMap.vue

@ -0,0 +1,48 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<!--百度地图容器-->
<div id="map" style="width:100%;height:392px;"></div>
</template>
<script>
export default {
name: 'ContactMap',
components: {},
data() {
return {};
},
mounted() {
// API
var map = new BMap.Map('map'); // Map
// ,
var point = new BMap.Point(112.549977, 37.794254);
map.centerAndZoom(point, 18);
var marker = new BMap.Marker(point); //
// marker.setTitle('绿');
map.addOverlay(marker); //
var content = '<table>';
content = content + '<tr><td> 绿谷生物</td></tr>';
content = content + '<tr><td></td></tr>';
content = content + '<tr><td> 山西省太原市晋阳街202号英语周报大厦八层</td></tr>';
content += '</table>';
var infowindow = new BMap.InfoWindow(content);
marker.openInfoWindow(infowindow);
// nulladdOverlay
marker.setAnimation(Animation);
//
map.addControl(new BMap.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP] }));
map.setCurrentCity('太原'); //
map.enableScrollWheelZoom(true); //
},
methods: {},
};
</script>
<style lang="stylus" scoped></style>

115
src/components/Introduce/ContactUs.vue

@ -0,0 +1,115 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="contact d-flex flex-nowrap">
<contact-map class="flex-1" />
<div class="contact-right">
<div>
<a-icon class="baseColor icon-size" type="user" />
<p>
高璨
<span class="ml-6">19935658782</span>
</p>
</div>
<div>
<a-icon class="baseColor icon-size" type="phone" />
<p>
0351 5223175
<span class="ml-6">0351 5223179</span>
</p>
</div>
<div>
<a-icon class="baseColor icon-size" type="mail" />
<p>lgzc2020@163.com</p>
</div>
<div>
<i class="iconfont icon-local baseColor"></i>
<p>山西省太原市晋阳街202号英语周报大厦八层</p>
</div>
<div class="code-box">
<a-icon class="baseColor icon-size" type="wechat" />
<img
alt
src="https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/logo/lvgu.jpg"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import ContactMap from './ContactMap.vue';
export default {
name: 'RichText',
components: { ContactMap },
data() {
return {
sort: [
{ id: 1, component: 'title' },
{ id: 2, component: 'content' },
{ id: 3, component: 'picture' },
],
str: '联系我们组件',
img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1641353646,126669045&fm=26&gp=0.jpg',
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.contact {
height: 394px;
position: relative;
border: 1px solid rgba(112, 112, 112, 0.14901960784313725);
background: #fff;
}
.contact-img {
width: 790px;
height: 100%;
}
.contact-right {
height: 100%;
width: 360px;
padding: 0 24px;
div {
margin-top: 24px;
height: 24px;
line-height: 24px;
position: relative;
p {
position: absolute;
left: 40px;
top: 0;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
}
}
}
.code-box {
margin-top: 44px !important;
img {
position: absolute;
width: 120px;
height: 120px;
left: 40px;
}
}
</style>

132
src/components/Introduce/DeriveEnterprise.vue

@ -0,0 +1,132 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div class="enterprise-bg" v-if="newPartners && newPartners.length > 0">
<div class="d-flex flex-wrap inner py-10">
<div
:class="(index+1)%3===0? 'enterprise-box1' : ''"
:key="index"
@click="openProfile(item.name,item.description)"
class="enterprise-box d-flex flex-column align-center justify-center white mb-8"
v-for="(item,index) in newPartners"
>
<img :src="item.logoUrl" class="enterprise-pic my-2" v-if="list.logoUrl" />
<div class="font-bold-24 title-color my-2">{{ item.name }}</div>
<div
class="font-16 textColor d-flex flex-wrap align-start fill-width enterprise-txt"
>{{ item.description }}</div>
<div class="d-flex flex-nowrap fill-width py-5 enterprise-more">
<div class="flex-1"></div>
<span class="font-16 baseColor">
了解更多
<a-icon type="arrow-right" />
</span>
</div>
</div>
<company-profile :show-profile="showProfile" @closeProfile="closeProfile" v-if="showProfile" />
</div>
<div class="inner d-flex flex-row-reverse pb-10 enterprise-page">
<a-pagination
:default-page-size="6"
:total="newPartners.length"
@change="onChange"
show-less-items
v-model="current"
v-show="newPartners.length > 6"
/>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import CompanyProfile from './CompanyProfile.vue';
export default {
name: 'DeriveEnterprise',
components: { CompanyProfile },
props: {
title: {
type: String,
default: '',
},
typeOfPlatform: {
type: String,
default: '',
},
},
data() {
return {
current: 1,
showProfile: false, //
};
},
computed: {
...mapState('home', ['partners', 'profile']),
newPartners() {
let { partners } = this;
let arr = [];
if (partners && partners.length > 0) {
for (let i = 0; i < partners.length; i++) {
const element = partners[i];
for (let j = 0; j < element.backendSearchList.length; j++) {
const item = element.backendSearchList[j];
arr.push(item);
}
}
return arr;
}
return arr;
},
},
async created() {
this.setPartners([]);
const { title, typeOfPlatform } = this;
const params = {
param: {
pageNum: this.current,
pageSize: 6,
type: title === '合作伙伴' ? 1 : 2,
typeOfPlatform: typeOfPlatform === '关于我们' ? 2 : 1,
},
};
await this.getFrontSearchCompany(params);
},
methods: {
...mapMutations('home', ['setPartners', 'setProfile']),
...mapActions('home', ['getFrontSearchCompany']),
//
onChange(current) {
this.current = current;
},
//
openProfile(title, description) {
this.setProfile(null);
const profile = {
title,
description,
};
this.setProfile(profile);
this.showProfile = true;
},
closeProfile() {
this.showProfile = false;
},
},
};
</script>
<style lang="stylus" scoped>
@import './PartnerShip.styl';
</style>

308
src/components/Introduce/IntentionModel.vue

@ -0,0 +1,308 @@
<template>
<div>
<a-button @click="showModal">{{ typeData.type === 1 ? '意向填报' : '直接购买' }}</a-button>
<a-modal
:confirm-loading="confirmLoading"
:title="typeData.type === 1 ? '意向填报' : '产品购买'"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司名称"
>
<a-input placeholder="请输入公司名称..." v-model.trim="platform.companyName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系人"
required
>
<a-input placeholder="请输入联系人..." v-model.trim="platform.manName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话.."
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="platform.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="项目信息简述"
required
>
<a-textarea
placeholder="请输入项目信息简述..."
style="height: 120px"
v-model.trim="platform.describe"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
v-show="typeData.type === 0"
>
<a-upload
:action="action"
:default-file-list="fileList"
@change="fileChange"
list-type="picture"
name="files"
>
<a-button>
<a-icon type="upload" />点击上传附件
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { serviceApply, upload } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'NewModel',
props: {
typeData: {
type: Object,
default: null,
},
},
data() {
return {
form: this.$form.createForm(this, { name: 'submit' }),
action: upload,
fileList: [],
visible: false,
formItemLayout,
formTailLayout,
confirmLoading: false,
platform: {
companyName: '', //
manName: '', //
tel: '', //
describe: '', //
code: '', //
files: [], // Id
isTel: false,
},
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
};
},
computed: mapState('user', ['picCode']),
async created() {
this.sendPicCode();
await this.getUserSer();
if (this.userSer) {
if (this.userSer.name) {
this.platform.manName = this.userSer.name;
}
if (this.userSer.phone) {
this.platform.tel = this.userSer.phone;
}
if (this.userSer.companyName) {
this.platform.companyName = this.userSer.companyName;
}
}
},
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
...mapActions('home', ['getUserSer']),
//
showModal() {
this.visible = true;
},
//
handleCancel(e) {
this.visible = false;
},
//
changePhone(e) {
this.platform.tel = e.target.value;
this.platform.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.platform.tel);
},
//
handleOk() {
if (!this.platform.manName) {
this.$message.error('请输入联系人');
} else if (!this.platform.tel) {
this.$message.error('请输入联系电话');
} else if (!this.platform.code) {
this.$message.error('请输入验证码');
} else if (!this.platform.describe) {
this.$message.error('请输入项目信息简述');
} else {
if (this.platform.isTel) {
for (var i = 0; i < this.fileList.length; i++) {
this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id);
}
this.subMitAdd();
// console.log(this.platform.files);
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const params = {
param: {
code: this.platform.code,
companyName: this.platform.companyName,
contactName: this.platform.manName,
contactPhone: this.platform.tel,
description: this.platform.describe,
filesId: this.platform.files,
serviceId: this.typeData.Id,
type: this.typeData.type,
},
};
const res = await serviceApply(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.platform) {
this.platform[key] = '';
}
this.platform.isTel = false;
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getCode() {
console.log(111);
try {
const params = {
phone: this.platform.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
console.log(error);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
fileChange(info) {
this.fileList = info.fileList;
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
</style>

466
src/components/Introduce/Model.vue

@ -0,0 +1,466 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<a-button @click="showModal" type="primary">立即加入</a-button>
<a-modal
:confirm-loading="confirmLoading"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk(type)"
title="招聘信息"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="姓名"
required
>
<a-input placeholder="请输入姓名" v-model.trim="recruit.name" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="性别"
>
<!-- 单选 -->
<a-radio-group v-model="recruit.sex">
<a-radio :value="0"></a-radio>
<a-radio :value="1"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="出生年月"
>
<!-- 时间选择器时间点 -->
<a-date-picker @change="changeBirthday" class="fill-width" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="参加工作时间"
>
<!-- 时间选择器时间点 -->
<a-date-picker @change="changeStartJob" class="fill-width" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话"
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="recruit.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="recruit.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="电子邮箱"
>
<!-- 电子邮箱 -->
<a-input
@change="changeEamil"
placeholder="请输入电子邮箱..."
type="email"
v-decorator="['email', { rules: emailRules }]"
/>
</a-form-item>
<!-- 是否在职 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="是否在职"
>
<!-- 单选 -->
<a-radio-group v-model="recruit.inWork">
<a-radio :value="1"></a-radio>
<a-radio :value="2"></a-radio>
</a-radio-group>
</a-form-item>
<!-- 现居住地 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="现居住地"
>
<a-input placeholder="请输入现居住地" v-model.trim="recruit.address" />
</a-form-item>
<!-- 户口所在地 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="户口所在地"
>
<a-input placeholder="请输入户口所在地" v-model.trim="recruit.birthdayPlace" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="求职意向"
>
<a-textarea placeholder="请输入求职意向..." v-model.trim="recruit.jobWilling" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="工作经历"
>
<a-textarea placeholder="请输入工作经历..." v-model.trim="recruit.jobExpirence" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="教育经历"
>
<a-textarea placeholder="请输入教育经历..." v-model.trim="recruit.educationExpirence" />
</a-form-item>
<!-- 语言能力 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="语言能力"
>
<a-textarea placeholder="请输入语言能力" v-model.trim="recruit.language" />
</a-form-item>
<!-- 专业技能 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="专业技能"
>
<a-textarea placeholder="请输入专业技能" v-model.trim="recruit.skill" />
</a-form-item>
<!-- 获得证书 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="获得证书"
>
<a-textarea placeholder="请输入获得证书" v-model.trim="recruit.zhengShu" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="自我评价"
>
<a-textarea placeholder="请输入自我评价..." v-model.trim="recruit.personalDescription" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
>
<a-upload
:action="action"
:default-file-list="fileList"
@change="fileChange"
list-type="picture"
name="files"
>
<a-button>
<a-icon type="upload" />点击上传附件
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { JoinPlatform, upload, joinUs } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const formTailLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: 'Model',
components: {},
data() {
return {
visible: false,
confirmLoading: false,
type: '',
formItemLayout,
formTailLayout,
form: this.$form.createForm(this, { name: 'submit' }),
value: 0,
inWorkValue: 1,
recruit: {
name: '', //
sex: 0, //
birthday: '', //
startJob: '', //
tel: '', //
code: '',
isTel: false, //
email: '', //
isEmail: false, //
inWork: 1, //
address: '', //
birthdayPlace: '', //
jobWilling: '', //
jobExpirence: '', //
educationExpirence: '', //
personalDescription: '', //
language: '', //
skill: '', //
zhengShu: '', //
files: [], // Id
},
action: upload,
fileList: [],
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
emailRules: [
{
pattern: new RegExp(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),
whitespace: true,
message: '请输入正确的邮箱格式',
},
],
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
};
},
computed: mapState('user', ['picCode']),
created() {
this.sendPicCode();
},
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
showModal() {
this.visible = true;
},
//
changePhone(e) {
this.recruit.tel = e.target.value;
this.recruit.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.recruit.tel);
},
//
changeEamil(e) {
this.recruit.email = e.target.value;
this.recruit.isEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(this.recruit.email);
},
handleOk(type) {
if (!this.recruit.name) {
this.$message.error('姓名为必填项');
} else if (!this.recruit.tel) {
this.$message.error('电话为必填项');
} else if (!this.recruit.jobWilling) {
this.$message.error('求职意向为必填项');
} else if (this.recruit.email && this.recruit.isEmail === false) {
this.$message.error('请输入正确的邮箱格式');
} else {
if (this.recruit.isTel) {
for (var i = 0; i < this.fileList.length; i++) {
this.recruit.files = this.recruit.files.concat(this.fileList[i].response.data[0].id);
}
this.subMitAdd();
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const {
name,
sex,
birthday,
startJob,
tel,
email,
inWork,
address,
birthdayPlace,
jobWilling,
jobExpirence,
educationExpirence,
language,
skill,
zhengShu,
personalDescription,
files,
} = this.recruit;
let params = {};
let res = {};
params = {
param: {
name, //
gender: sex, //
birthday, //
startJob, //
phone: tel, //
code: this.recruit.code, //
email, //
inWork, //
address, //
birthdayPlace, //
jobWilling, //
jobExpirence, //
educationExpirence, //
language, //
skill, //
zhengShu, //
personalDescription, //
files, // Id
},
};
res = await joinUs(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.recruit) {
this.recruit[key] = '';
}
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
handleCancel(e) {
this.visible = false;
},
fileChange(info) {
this.fileList = info.fileList;
},
changeBirthday(date, dateString) {
this.recruit.birthday = this.$moment(date).unix();
// console.log(this.$moment(date).unix(), dateString);
},
changeStartJob(date, dateString) {
this.recruit.startJob = this.$moment(date).unix();
// console.log(this.$moment(date).unix(), dateString);
},
//
async getCode() {
try {
const params = {
phone: this.recruit.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
throw new Error(`SignIn.vue method getCode: ${error}`);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
</style>

81
src/components/Introduce/PartnerShip.styl

@ -0,0 +1,81 @@
//
.logo-box{
width: 22%;
margin-right: 4%;
border-radius: 4px;
margin-bottom: 50px;
.logo-pic-box{
height: 90px;
width: 90px;
border-radius: 50%;
background: #fff;
line-height: 90px;
text-align: center;
box-shadow: 6px 6px 6px #eee;
.logo-pic{
height: 70px
}
.logo-text{
height: 100%;
font-size: 12px;
line-height: 20px;
}
}
}
.logo-box1{
margin-right: 0!important;
}
//
.enterprise-bg{
width: 100%;
background: url('../../assets/enterprise-banner.png') right no-repeat;
background-size: 100% 100%;
}
.enterprise-box{
width: 26%;
height: 382px;
margin-right: 11%;
position: relative;
padding: 0 16px;
.enterprise-pic{
height: 166px
}
.enterprise-txt{
display: -webkit-box;
overflow: hidden;
white-space: normal !important;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
text-align: justify;
line-height: 28px;
}
.enterprise-more{
position: absolute;
bottom: 0;
right: 12px;
}
}
.enterprise-box1{
margin-right: 0!important;
}
.enterprise-page >>> .ant-pagination-item-active{
background: #13ACC4;
}
.enterprise-page >>> .ant-pagination-item-active a{
color: #fff;
}

97
src/components/Introduce/PartnerShip.vue

@ -0,0 +1,97 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div v-if="partners && partners.length > 0">
<div :key="index" class="mb-4" v-for="(item,index) in partners">
<p
class="font-bold-24 title-color"
>{{ item.typeOfTech===0 ? '高校' : item.typeOfTech===1 ? '院所' : '企业' }}</p>
<div
class="d-flex flex-wrap pointer"
v-if="item.backendSearchList && item.backendSearchList.length > 0"
>
<div
:class="(i+1)%4===0? 'logo-box1' : ''"
:key="i"
@click="openProfile(list.name,list.description)"
class="logo-box d-flex flex-column align-center justify-center"
v-for="(list,i) in item.backendSearchList"
>
<div class="logo-pic-box">
<img :src="list.logoUrl" class="logo-pic pa-2" v-if="list.logoUrl" />
<div class="d-flex flex-column justify-center logo-text" v-else>{{ list.name }}</div>
</div>
<div class="font-16 title-color mt-3">{{ list.name }}</div>
</div>
</div>
</div>
<company-profile :show-profile="showProfile" @closeProfile="closeProfile" v-if="showProfile" />
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import CompanyProfile from './CompanyProfile.vue';
export default {
name: 'PartnerShip',
components: { CompanyProfile },
props: {
title: {
type: String,
default: '',
},
typeOfPlatform: {
type: String,
default: '',
},
},
data() {
return { showProfile: false };
},
computed: mapState('home', ['partners', 'profile']),
async created() {
this.setPartners([]);
const { title, typeOfPlatform } = this;
const params = {
param: {
pageNum: 1,
// pageSize: -1,
type: title === '合作伙伴' ? 1 : 2,
typeOfPlatform: typeOfPlatform === '关于我们' ? 2 : 1,
},
};
await this.getFrontSearchCompany(params);
},
methods: {
...mapMutations('home', ['setPartners', 'setProfile']),
...mapActions('home', ['getFrontSearchCompany']),
//
openProfile(title, description) {
this.setProfile(null);
const profile = {
title,
description,
};
this.setProfile(profile);
this.showProfile = true;
},
closeProfile() {
this.showProfile = false;
},
},
};
</script>
<style lang="stylus" scoped>
@import './PartnerShip.styl';
</style>

46
src/components/Introduce/RichText.vue

@ -0,0 +1,46 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="words-content">
<span
class="font-16 textColor line-height-36"
v-dompurify-html="content"
v-if="titleCode === title"
></span>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
title: {
type: String,
default: '',
},
},
data() {
return {};
},
computed: mapState('home', ['content', 'titleCode']),
async created() {
this.setContent('');
await this.getPageDetail(this.title);
},
methods: {
...mapMutations('home', ['setContent']),
...mapActions('home', ['getPageDetail']),
},
};
</script>

132
src/components/PlatformList/Fruit.vue

@ -0,0 +1,132 @@
<template>
<div>
<div class="inner d-flex flex-wrap">
<div :class="(index + 1) % 4 === 0 ? 'margin-0' : ''" :key="index" class="item-box" v-for="(item, index) in list">
<p @click="detail(item.id)" class="font-24 my-3" style="cursor: pointer">{{ item.name }}</p>
<p @click="detail(item.id)" class="font-16" style="color: rgba(0, 0, 0, 0.45); cursor: pointer">编号{{ item.identifier }}</p>
<p class="font-16 baseColor item-more">
<!-- <a-button type="primary" style="cursor: pointer">转化意向填报</a-button> -->
<intention-model style="cursor: pointer" :type-data="getId(item.id)" />
</p>
</div>
</div>
<div class="inner">
<a-pagination
:current="achCurrent"
:page-size="pageSize"
:total="total"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
v-show="total > 12"
/>
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import { selRes } from 'config/api';
import IntentionModel from '../Introduce/IntentionModel.vue';
export default {
name: 'PlatformList',
components: { IntentionModel },
data() {
return {
list: [],
pageSize: 12,
total: 0,
typeData: {
type: 2,
Id: '',
},
};
},
computed: mapState('home', ['achList', 'achIpt', 'achCurrent']),
watch: {
achList(val) {
this.getData();
},
achIpt(val) {
if (val.isBtn === 1) {
this.getData();
}
},
},
created() {
this.getData();
},
methods: {
...mapMutations('home', ['setAchCurrent', 'setAchId']),
//
onShowSizeChange(current, size) {
this.setAchCurrent(current);
this.getData();
},
//
async getData() {
try {
const params = {
param: {
content: this.achIpt.content,
modelIds: this.achList,
pageNum: this.achCurrent,
pageSize: 12,
},
};
const res = await selRes(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data.list;
this.total = parseInt(data.total);
}
} catch (error) {
console.log(error);
}
},
//
detail(id) {
this.setAchId(id);
this.$router.push('/NewPlatform/AchDet');
},
getId(Id) {
return (this.typeData = {
type: 2,
Id,
});
},
},
};
</script>
<style lang="stylus" scoped>
.pagination {
margin: 40px 0;
text-align: right;
}
.item-box {
position: relative;
width: 20.5%;
background: #fff;
margin-right: 6%;
border-radius: 4px;
margin-bottom: 40px;
padding: 10px;
padding-bottom: 60px;
}
.margin-0 {
margin-right: 0% !important;
}
.item-more {
position: absolute;
bottom: 10px;
right: 10px;
text-align: right;
margin-bottom: 0 !important;
margin-top: 40px;
}
</style>

238
src/components/PlatformList/PlatformList.vue

@ -0,0 +1,238 @@
<template>
<div>
<div class="inner d-flex flex-wrap">
<div
:class="(index + 1) % 4 === 0 ? 'margin-0' : ''"
:key="index"
class="item-box mb-8"
v-for="(item, index) in list"
>
<img :src="item.picUrl" style="height: 220px; width: 100%" v-if="item.picUrl" />
<img :src="item.visitLocation" style="height: 220px; width: 100%" v-else />
<p class="font-24 my-4 title">{{ item.name }}</p>
<p
@click="jump(item.id)"
class="font-16 baseColor"
style="text-align: right; cursor: pointer"
>了解更多</p>
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:page-size="pageSize"
:total="total"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
v-show="total > 8"
/>
</div>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import { selInstrument, searchFront, selProduct } from 'config/api';
export default {
name: 'PlatformList',
data() {
return {
list: [],
pageSize: 8,
total: 20,
current: 1,
};
},
computed: mapState('home', ['listState', 'labList', 'LabIpt', 'insList', 'InsIpt', 'shareCurrent', 'productList', 'productIpt']),
watch: {
shareCurrent(val) {
console.log(val);
this.monitor(this.listState);
},
labList(val) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
},
LabIpt(val) {
if (this.LabIpt.isBtn === 1) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
}
},
insList(val) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
},
InsIpt(val) {
if (this.InsIpt.isBtn === 1) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
}
},
productList(val) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
},
productIpt(val) {
if (this.productIpt.isBtn === 1) {
if (this.shareCurrent === 1) {
this.monitor(this.listState);
}
this.current = 1;
this.setShareCurrent(1);
}
},
},
created() {
this.current = this.shareCurrent;
if (this.listState === 0) {
this.getSear();
} else if (this.listState === 1) {
this.getSelI();
} else {
this.getProductLists();
}
},
methods: {
...mapMutations('home', ['setShareCurrent']),
//
async getSelI() {
try {
const params = {
param: {
content: this.InsIpt.content, //
modelIds: this.insList, // ID
pageNum: this.shareCurrent,
pageSize: this.pageSize,
},
};
const res = await selInstrument(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data.list;
this.total = parseInt(data.total);
}
} catch (error) {
console.log(error);
}
},
//
async getSear() {
try {
const params = {
param: {
name: this.LabIpt.content, //
moldIds: this.labList, // ID
pageNum: this.shareCurrent,
pageSize: this.pageSize,
},
};
const res = await searchFront(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data.list;
this.total = parseInt(data.total);
}
} catch (error) {
console.log(error);
}
},
//
async getProductLists() {
try {
const params = {
param: {
content: this.productIpt.content, //
modelIds: this.productList, // ID
pageNum: this.shareCurrent,
pageSize: this.pageSize,
},
};
const res = await selProduct(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data.list;
this.total = parseInt(data.total);
}
} catch (error) {
console.log(error);
}
},
//
onShowSizeChange(current, size) {
this.current = current;
this.setShareCurrent(this.current);
},
//
monitor(val) {
if (val === 0) {
this.getSear();
} else if (val === 1) {
this.getSelI();
} else {
this.getProductLists();
}
},
// /
jump(id) {
if (this.listState === 0) {
this.$router.push({
path: '/NewPlatform/Share/Institute',
name: 'Institute',
params: { id },
});
} else if (this.listState === 1) {
this.$router.push({
path: '/NewPlatform/Share/InsDet',
name: 'InsDet',
params: { id },
});
} else if (this.listState === 3) {
this.$router.push({
path: '/NewPlatform/Share/InsDet',
name: 'InsDet',
params: { id },
});
}
},
},
};
</script>
<style lang="stylus" scoped>
.pagination {
margin: 40px 0;
text-align: right;
}
.item-box {
width: 20.5%;
margin-right: 6%;
border-radius: 4px;
.title {
text-align: center;
}
}
.margin-0 {
margin-right: 0 !important;
}
</style>

79
src/components/Rotation/Rotation.vue

@ -0,0 +1,79 @@
<template>
<div class="head">
<img class="settle-in" src="~assets/settleIn.png" />
<a-carousel :autoplay-speed="time" autoplay>
<div :key="item.id" class="img-box" v-for="item in lists">
<img :src="item.url" alt />
</div>
</a-carousel>
</div>
</template>
<script>
import { queryRotation } from 'config/api';
export default {
data() {
return {
time: 10000,
lists: [],
};
},
created() {
this.getData();
},
methods: {
async getData() {
try {
const params = { param: { showPage: 0 } };
const res = await queryRotation(params);
const { code, data, msg } = res.data;
if (code === 200) {
this.lists = data;
} else {
this.$message.error(error);
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>
<style lang="stylus">
.head {
background: white;
max-height: 440px;
overflow: hidden;
position: relative;
}
.settle-in {
position: absolute;
top: 10%;
right: 9%;
z-index: 9;
}
.img-box {
height: 380px;
width: 100%;
img {
height: 100%;
width: 100%;
}
}
.ant-carousel >>> .slick-slide {
text-align: center;
height: 160px;
line-height: 160px;
background: #364d79;
overflow: hidden;
}
.ant-carousel >>> .slick-slide h3 {
color: #fff;
}
</style>

248
src/components/User/MechanismSignUp.vue

@ -0,0 +1,248 @@
<template>
<div>
<!-- 机构注册 -->
<a-row class="d-flex flex-nowrap mt-4 pb-10" type="flex">
<a-col :span="8" class="explain" flex="auto">
<a-form :form="form" @submit="handleSignUp">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
help="支持中文、字母、数字、“_”的组合且不能为纯数字,4-20位字符"
label="登录用户名"
required
>
<a-input v-decorator="['account']" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="单位性质"
required
>
<a-select placeholder="请选择单位性质" v-decorator="['nature']">
<a-select-option value="1">高校</a-select-option>
<a-select-option value="2">初中</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
help="不能超过100个字符"
label="机构全称"
required
>
<a-input v-decorator="['fullName']" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
help="统一社会信用代码、组织机构代码由字母和数字组成,分别为18/9位字符"
label="统一社会信用代码或组织机构代码"
required
>
<a-input v-decorator="['code']" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="登录密码"
required
>
<a-input-password
placeholder="密码由字母和数字混合组成,6-16位字符"
v-decorator="['password', { rules: passwordRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="确认密码"
>
<a-input-password
placeholder="请再次输入您设置的密码"
v-decorator="['againCredential', { rules: againPassword }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="手机"
>
<a-input
@change="changePhone"
placeholder="该手机号用于账号激活、登录及找回密码"
type="number"
v-decorator="['phone', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button
@click="changePicCode"
class="code_img ml-2"
size="small"
type="primary"
v-else
>重新获取</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input
placeholder="请输入验证码"
type="number"
v-decorator="['smsCode', { rules: codeRules }]"
/>
<a-button class="ml-2" disabled type="primary" v-if="showInterval">重新发送 {{ interval }}</a-button>
<a-button
:disabled="phone && phone.length !== 11"
@click="getCode"
class="ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="来源"
>
<a-select placeholder="请选择来源" v-decorator="['source']">
<a-select-option value="1">绿谷</a-select-option>
</a-select>
</a-form-item>
<div class="d-flex flex-row-reverse">
<a-button block class="my-5" html-type="submit" style="width: 75%" type="primary">立即注册</a-button>
</div>
</a-form>
<div class="d-flex flex-row-reverse mt-1">
<div class="d-flex flex-wrap" style="width: 75%">
<div class="flex-1"></div>
<router-link tag="span" to="/login">
<span class="baseColor">已有账号去登录</span>
</router-link>
</div>
</div>
</a-col>
<a-col :span="4" flex="150px">
<div class="d-flex flex-column">
<div>说明</div>
<div>1. 注册后即可登录部分功能需平台人员审核后才能使用</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
import { mapActions, mapState } from 'vuex';
import mixin from 'views/User/mixin';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'MechanismSignUp',
mixins: [mixin],
data() {
return {
formItemLayout,
formTailLayout,
form: this.$form.createForm(this, { name: 'mechanismSignUp' }),
phone: '',
codeNum: '',
};
},
computed: mapState('user', ['picCode']),
created() {
this.sendPicCode();
},
methods: {
...mapActions('user', ['signUp', 'sendCode', 'sendPicCode']),
changePhone(e) {
this.phone = e.target.value;
},
//
changePicCode() {
this.sendPicCode();
},
//
async getCode() {
try {
const params = {
phone: this.form.getFieldValue('phone'),
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
throw new Error(`mechanismSignUp.vue method getCode: ${error}`);
}
},
//
async handleSignUp(e) {
e.preventDefault();
this.form.validateFields(async (err, values) => {
if (!err) {
console.log('Received values of form: ', values);
try {
const { account, password, phone, smsCode, source } = values;
const params = { account, password, phone, smsCode, source };
console.log('params: ', params);
await this.signUp(params);
// TODO:
} catch (error) {
console.log(`mechanismSignUp.vue methods handleSignUp: ${error}`);
}
}
});
return;
},
},
};
</script>
<style lang="stylus" scoped>
.explain {
padding-right: 28px;
margin-right: 28px;
border-right: 1px solid #EEEEEE;
}
.code_img {
width: 102px !important;
height: 32px !important;
}
</style>

230
src/components/User/PersonalSignUp.vue

@ -0,0 +1,230 @@
<template>
<div>
<!-- 个人注册 -->
<a-row class="d-flex flex-nowrap mt-4 pb-10" type="flex">
<a-col :span="8" class="explain" flex="auto">
<a-form :form="form" @submit="handleSignUp">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
help="支持中文、字母、数字、“_”的组合且不能为纯数字,4-20位字符"
label="登录用户名"
required
>
<a-input v-decorator="['account']" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
help="不能超过20个字符"
label="昵称"
required
>
<a-input maxlength="20" v-decorator="['nickname']" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="登录密码"
>
<a-input-password
placeholder="密码由字母和数字混合组成,6-16位字符"
v-decorator="['password', { rules: passwordRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="确认密码"
>
<a-input-password
placeholder="请再次输入您设置的密码"
v-decorator="['againCredential', { rules: againPassword }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="手机"
>
<a-input
@change="changePhone"
placeholder="该手机号用于账号激活、登录及找回密码"
type="number"
v-decorator="['phone', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button
@click="changePicCode"
class="code_img ml-2"
size="small"
type="primary"
v-else
>重新获取</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input
placeholder="请输入验证码"
type="number"
v-decorator="['smsCode', { rules: codeRules }]"
/>
<a-button class="ml-2" disabled type="primary" v-if="showInterval">重新发送 {{ interval }}</a-button>
<a-button
:disabled="phone && phone.length !== 11"
@click="getCode"
class="ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="来源"
>
<a-select placeholder="请选择来源" v-decorator="['source']">
<a-select-option value="1">绿谷</a-select-option>
</a-select>
</a-form-item>
<div class="d-flex flex-row-reverse">
<a-button block class="my-5" html-type="submit" style="width: 75%" type="primary">立即注册</a-button>
</div>
</a-form>
<div class="d-flex flex-row-reverse mt-1">
<div class="d-flex flex-wrap" style="width: 75%">
<div class="flex-1"></div>
<router-link tag="span" to="/login">
<span class="baseColor">已有账号去登录</span>
</router-link>
</div>
</div>
</a-col>
<a-col :span="4" flex="150px">
<div class="d-flex flex-column">
<div>说明</div>
<div>1. 个人用户无法享受完整服务尽可能使用公司 注册</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
import { mapActions, mapState } from 'vuex';
import mixin from 'views/User/mixin';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'PersonalSignUp',
mixins: [mixin],
data() {
return {
formItemLayout,
formTailLayout,
form: this.$form.createForm(this, { name: 'personalSignUp' }),
phone: '',
codeNum: '',
};
},
computed: mapState('user', ['picCode']),
created() {
this.sendPicCode();
},
methods: {
...mapActions('user', ['signUp', 'sendCode', 'sendPicCode']),
changePhone(e) {
this.phone = e.target.value;
},
//
changePicCode() {
this.sendPicCode();
},
//
async getCode() {
try {
const params = {
phone: this.form.getFieldValue('phone'),
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
throw new Error(`personalSignUp.vue method getCode: ${error}`);
}
},
//
async handleSignUp(e) {
e.preventDefault();
this.form.validateFields(async (err, values) => {
if (!err) {
console.log('Received values of form: ', values);
try {
const { account, password, phone, smsCode, source } = values;
const params = { account, password, phone, smsCode, source };
console.log('params: ', params);
await this.signUp(params);
//
const { query } = this.$route;
this.$router.replace({ path: '/', query });
} catch (error) {
console.log(`personalSignUp.vue methods handleSignUp: ${error}`);
}
}
});
return;
},
},
};
</script>
<style lang="stylus" scoped>
.explain {
padding-right: 28px;
margin-right: 28px;
border-right: 1px solid #EEEEEE;
}
.code_img {
width: 102px !important;
height: 32px !important;
}
</style>

29
src/config/api-user.js

@ -0,0 +1,29 @@
/*
* Copyright (c) 2020.
* author: wally
* email: 18603454788@163.com
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const tall = `${proxyUrl}/tall/v1.0`;
// console.log('tall: ', tall);
const users = `${tall}/users`;
// 用户登录
export const signIn = params => axios.post(`${users}/signin`, params);
// 注册
export const signUp = params => axios.post(`${users}/signup`, params);
// 图片验证码
export const getPicCode = () => axios.get(`${users}/code`);
// 发送验证码
export const getSmscode = params => axios.get(`${users}/smscode`, params);
// 通过手机号修改密码
export const changePassword = params => axios.post(`${users}/password`, params);
// 通过userId获取token
export const getUserId = params => axios.get(`${users}/userId`, params);

114
src/config/api.js

@ -0,0 +1,114 @@
/*
* Copyright (c) 2019.
* author: wally
* email: 18603454788@163.com
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const greenvalley = `${proxyUrl}/greenvalley`;
// const page = `${greenvalley}/page`; // 创新平台相关操作
const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口
const activity = `${greenvalley}/activity`; // 创新政策相关接口
const Business = `${greenvalley}/Business`; // 衍生企业和合作伙伴查询
const carousel = `${greenvalley}/carousel`; // 轮播图相关接口
const page = `${greenvalley}/page`; // 页面详情相关接口
const achInstr = `${greenvalley}/achInstr`; // 轮播图相关接口
const service = `${greenvalley}/service`; // 服务相关接口
const user = `${greenvalley}/user`; // 用户相关接口
const product = `${greenvalley}/product`; // 产品相关接口
const tutorRelated = `${greenvalley}/tutorRelated`; // 导师相关接口
// websocket基础地址
export const WS_BASE_URL = msgUrl;
// 查询政策列表
export const selLikePolicy = params => axios.post(`${policy}/selLikePolicy`, params);
// 查询政策详情
export const selPolicy = params => axios.post(`${policy}/selPolicy`, params);
// 申请加入三大平台
export const JoinPlatform = params => axios.post(`${greenvalley}/platform/JoinPlatform`, params);
// 上传附件
export const upload = `${greenvalley}/file/upload`;
// 加入我们
export const joinUs = params => axios.post(`${greenvalley}/PersonApply/joinUs`, params);
// 查询轮播图
export const queryRotation = params => axios.post(`${carousel}/query`, params);
// 查询行业政策列表
export const industryInfo = params => axios.post(`${greenvalley}/industryInfo/beforeSearch`, params);
// 查询活动公告列表
export const front = params => axios.post(`${activity}/query/front`, params);
// 申请加入活动
export const apply = params => axios.post(`${activity}/apply`, params);
// 查询衍生企业
export const frontSearchFriend = params => axios.post(`${Business}/FrontSearchFriend`, params);
// 查询合作伙伴
export const frontSearchCompany = params => axios.post(`${Business}/FrontSearchCompany`, params);
// 介绍页面详情查询
export const getPageDetail = params => axios.post(`${page}/detail`, params);
// 分类查询
export const selModel = params => axios.post(`${achInstr}/selModel`, params);
// 仪器列表查询
export const selInstrument = params => axios.post(`${achInstr}/selInstrument`, params);
// 仪器详情查询
export const selInstrumentMes = params => axios.post(`${achInstr}/selInstrumentMes`, params);
// 通过研究院(实验室)Id查询仪器列表
export const selInstrumentByRes = params => axios.post(`${achInstr}/selInstrumentByRes`, params);
// 研究院(实验室)列表查询
export const searchFront = params => axios.post(`${greenvalley}/institute/searchFront`, params);
// 研究院团队详情查询
export const teamSearch = params => axios.post(`${greenvalley}/teamGuide/teamSearch`, params);
// 成果列表查询
export const selRes = params => axios.post(`${achInstr}/selRes`, params);
// 成果详情查询
export const selResMes = params => axios.post(`${achInstr}/selResMes`, params);
// 服务列表查询
export const selService = params => axios.post(`${greenvalley}/serviceProject/selService`, params);
// 服务详情查询
export const selContent = params => axios.post(`${greenvalley}/serviceProject/selContent`, params);
// 查询用户购物车
export const SearchCar = params => axios.post(`${service}/SearchCar`, params);
// 服务/设备/成果直接申请(意向填报)
export const serviceApply = params => axios.post(`${service}/serviceApply`, params);
// 加入购物车
export const addCar = params => axios.post(`${service}/addCar`, params);
// 查询用户购物车
export const searchCar = params => axios.post(`${service}/SearchCar`, params);
// 加入购物车后购买
export const carAndBuy = params => axios.post(`${service}/CarAndBuy`, params);
// 登录人信息
export const getUserSer = params => axios.post(`${user}/userSer`, params);
// 查询 产品列表
export const selProduct = params => axios.post(`${product}/selProduct`, params);
// 查询 产品列表 详情
export const selProductMes = params => axios.post(`${product}/selProductMes`, params);
// 查询 创业导师
export const selTeacher = () => axios.post(`${tutorRelated}/selTeacher`);

19
src/config/selComment.js

@ -0,0 +1,19 @@
/*
* Copyright (c) 2019.
* author: wally
* email: 18603454788@163.com
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const greenvalley = `${proxyUrl}/greenvalley`;
const comment = `${greenvalley}/comment`; // 交流社区
// 发帖
export const addComment = params => axios.post(`${comment}/addComment`, params);
// 发帖查询
export const selComment = params => axios.post(`${comment}/selComment`, params);
// 跟帖发表(评论发表)
export const insComment = params => axios.post(`${comment}/insComment`, params);
// 跟帖查询(评论查询)
export const selCommunity = params => axios.post(`${comment}/selCommunity`, params);

30
src/config/setting.js

@ -0,0 +1,30 @@
const title = process.env.VUE_APP_TITLE;
const description = process.env.VUE_APP_DESCRIPTION;
const baseUrl = process.env.VUE_APP_BASE_URL;
const apiUrl = process.env.VUE_APP_API_URL;
const proxyUrl = process.env.VUE_APP_PROXY_URL;
const publicPath = process.env.VUE_APP_PUBLIC_PATH;
const msgUrl = process.env.VUE_APP_MSG_URL;
module.exports = {
// 首页标题
title,
// 首页描述信息
description,
// 基础地址
baseUrl,
// api基础地址
apiUrl,
// 消息系统地址
msgUrl,
// api代理地址
proxyUrl,
// 生成文件目录 publicPath
publicPath,
};

19
src/config/user.js

@ -0,0 +1,19 @@
/*
* Copyright (c) 2019.
* author: wally
* email: 18603454788@163.com
*/
// 用户登录client
export const SIGN_IN_CLIENTS = { mp: 0, h5: 1, android: 2, ios: 3 };
// 用户登录类型
export const SIGN_IN_TYPES = {
mp: 0,
phone: 1,
email: 2,
username: 3,
wx: 4,
wx_web: 5,
wb: 6,
};

33
src/main.js

@ -0,0 +1,33 @@
// @ts-ignore
import Vue from 'vue';
import './plugins/axios';
import App from './App.vue';
import './registerServiceWorker';
import router from './router';
import store from './store';
import './plugins/ant-design-vue.js';
import 'common/portrait.styl';
import 'common/platform.styl';
import './assets/icon/iconfont.css';
import VueDOMPurifyHTML from 'vue-dompurify-html';
import moment from 'moment'; //导入文件
import echarts from 'echarts';
import BaiduMap from 'vue-baidu-map';
Vue.prototype.$moment = moment; //赋值使用
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false;
Vue.use(VueDOMPurifyHTML);
Vue.use(BaiduMap, {
/* Visit http://lbsyun.baidu.com/apiconsole/key for details about app key. */
ak: 'YOUR_APP_KEY',
});
window.vm = new Vue({
router,
store,
render: h => h(App),
}).$mount('#app');

78
src/plugins/ant-design-vue.js

@ -0,0 +1,78 @@
import Vue from 'vue';
import {
Pagination,
Button,
Input,
message,
notification,
Modal,
Tag,
Table,
Tabs,
Icon,
Empty,
Form,
Select,
Upload,
Badge,
Popconfirm,
DatePicker,
Switch,
Radio,
Dropdown,
Menu,
Row,
Col,
Timeline,
Checkbox,
BackTop,
Carousel,
Avatar,
Layout,
Breadcrumb,
Tooltip,
} from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue';
Vue.component(ConfigProvider.name, ConfigProvider);
Vue.use(Pagination);
Vue.use(Button);
Vue.use(Input);
Vue.use(Modal);
Vue.use(Tag);
Vue.use(Table);
Vue.use(Tabs);
Vue.use(Icon);
Vue.use(Empty);
Vue.use(Form);
Vue.use(Select);
Vue.use(Upload);
Vue.use(Badge);
Vue.use(Popconfirm);
Vue.use(DatePicker);
Vue.use(Switch);
Vue.use(Radio);
Vue.use(Dropdown);
Vue.use(Menu);
Vue.use(Row);
Vue.use(Col);
Vue.use(Timeline);
Vue.use(Checkbox);
Vue.use(BackTop);
Vue.use(Carousel);
Vue.use(Avatar);
Vue.use(Layout);
Vue.use(Breadcrumb);
Vue.use(Tooltip);
Vue.prototype.$message = message;
Vue.prototype.$notification = notification;
Vue.prototype.$info = Modal.info;
Vue.prototype.$success = Modal.success;
Vue.prototype.$error = Modal.error;
Vue.prototype.$warning = Modal.warning;
Vue.prototype.$confirm = Modal.confirm;
message.config({
duration: 3,
maxCount: 3,
});

77
src/plugins/axios.js

@ -0,0 +1,77 @@
'use strict';
import Vue from 'vue';
import axios from 'axios';
import router from '../router/index';
import store from '../store/index';
// Full config: https://github.com/axios/axios#request-config
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
let config = {
// baseURL: process.env.baseURL || process.env.apiUrl || ""
timeout: 60 * 1000, // Timeout
// withCredentials: true, // Check cross-site Access-Control
};
const _axios = axios.create(config);
axios.interceptors.request.use(
function(config) {
let token = store.state.anyringToken || sessionStorage.getItem('anyringToken');
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
return config;
},
function(error) {
// Do something with request error
return Promise.reject(error);
},
);
// Add a response interceptor
axios.interceptors.response.use(
function(response) {
if (response.data && response.data.code >= 400 && response.data.code < 500) {
store.commit('user/sign', '');
router.replace({
path: '/user/login',
query: { redirect: router.currentRoute.fullPath },
});
}
// Do something with response data
return response;
},
function(error) {
// Do something with response error
return Promise.reject(error);
},
);
Plugin.install = function(Vue) {
Vue.axios = _axios;
window.axios = _axios;
Object.defineProperties(Vue.prototype, {
axios: {
get() {
return _axios;
},
},
$axios: {
get() {
return _axios;
},
},
$http: {
get() {
return _axios;
},
},
});
};
Vue.use(Plugin);
export default Plugin;

34
src/registerServiceWorker.js

@ -0,0 +1,34 @@
/* eslint-disable no-console */
import { register } from "register-service-worker";
if (process.env.NODE_ENV === "production") {
register(`${process.env.BASE_URL}service-worker.js`, {
ready() {
console.log(
"App is being served from cache by a service worker.\n" +
"For more details, visit https://goo.gl/AFskqB"
);
},
registered() {
console.log("Service worker has been registered.");
},
cached() {
console.log("Content has been cached for offline use.");
},
updatefound() {
console.log("New content is downloading.");
},
updated() {
console.log("New content is available; please refresh.");
},
offline() {
console.log(
"No internet connection found. App is running in offline mode."
);
},
error(error) {
console.error("Error during service worker registration:", error);
}
});
}

313
src/router/index.js

@ -0,0 +1,313 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from 'views/FirstPage/FirstPage.vue';
Vue.use(VueRouter);
const routes = [
// 首页
{
path: '/',
name: 'Home',
component: Home,
},
// 登录界面
{
path: '/login',
name: 'Login',
component: () => import(/* webpackChunkName: "Login" */ 'views/User/Login.vue'),
},
// 注册界面
{
path: '/register',
name: 'Register',
component: () => import(/* webpackChunkName: "register" */ 'views/User/Register.vue'),
},
// 修改密码
{
path: '/forget-password',
name: 'ForgetPassword',
component: () => import(/* webpackChunkName: "forget-password" */ 'views/User/ForgetPassword.vue'),
},
// 关于我们界面
{
path: '/About/Introduce',
name: 'About',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/About.vue'),
children: [
{
path: '/About/Introduce',
name: 'Introduce',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Introduce.vue'),
},
{
path: '/About/Organ',
name: 'Organ',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Organ.vue'),
},
{
path: '/About/Partner',
name: 'Partner',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Partner.vue'),
},
{
path: '/About/SpinOffs',
name: 'SpinOffs',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/SpinOffs.vue'),
},
],
},
// 政策界面
{
path: '/Policy',
name: 'Policy',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/Policy.vue'),
},
// 政策详情界面
{
path: '/Policy/PolicyDetails',
name: 'PolicyDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/PolicyDetails.vue'),
},
// 交流社区界面
{
path: '/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Community.vue'),
},
// 交流社区发帖界面
{
path: '/Posting',
name: 'Posting',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Posting.vue'),
},
// 交流帖子详情页
{
path: '/ComDetails',
name: 'ComDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/ComDetails.vue'),
},
// 行业资讯界面
{
path: '/ItInformation',
name: 'ItInformation',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ItInformation/ItInformation.vue'),
},
// 活动公告界面
{
path: '/Activity',
name: 'Activity',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/Activity.vue'),
},
// 活动公告详情界面
{
path: '/ActDetails',
name: 'ActDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/ActDetails.vue'),
},
// 联系我们界面
{
path: '/ContactUs',
name: 'ContactUs',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ContactUs/ContactUs.vue'),
},
// 创新平台
{
path: '/NewPlatform/NewCore',
name: 'NewPlatform',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/NewPlatform.vue'),
children: [
{
path: '/NewPlatform/NewCore',
name: 'Core',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Core.vue'),
},
{
path: '/NewPlatform/News',
name: 'News',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Platform.vue'),
},
{
path: '/NewPlatform/NewService',
name: 'Service',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Service.vue'),
},
{
path: '/NewPlatform/ServiceDet',
name: 'ServiceDet',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/ServiceDet.vue'),
},
{
// 科技资源开放共享服务平台
path: '/NewPlatform/Share',
name: 'Share',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Share.vue'),
},
{
// 科技资源开放共享服务平台 > 研究院(实验室)详情页
path: '/NewPlatform/Share/Institute',
name: 'Institute',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/ShareChild/Institute.vue'),
},
{
// 科技资源开放共享服务平台 > 仪器详情页
path: '/NewPlatform/Share/InsDet',
name: 'InsDet',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/ShareChild/InsDet.vue'),
},
{
// 知识产权与技术转移转化服务平台
path: '/NewPlatform/Transfer',
name: 'Transfer',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Transfer.vue'),
},
{
// 创新服务
path: '/NewPlatform/Develop',
name: 'Develop',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Develop.vue'),
},
{
// 成果详情页
path: '/NewPlatform/AchDet',
name: 'AchDet',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/AchDet.vue'),
},
],
},
// 孵化平台
{
path: '/IncubationPlatform/MakerSpace',
name: 'IncubationPlatform',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/IncubationPlatform.vue'),
children: [
// 众创空间
{
path: '/IncubationPlatform/MakerSpace',
name: 'MakerSpace',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/MakerSpace.vue'),
},
// 孵化场所
{
path: '/IncubationPlatform/Incubator',
name: 'Incubator',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Incubator.vue'),
},
// 公共实验室
{
path: '/IncubationPlatform/PublicLaboratory',
name: 'PublicLaboratory',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/PublicLaboratory.vue'),
},
// 中试基地
{
path: '/IncubationPlatform/PilotBase',
name: 'PilotBase',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/PilotBase.vue'),
},
// 创业导师
{
path: '/IncubationPlatform/Tutor',
name: 'Tutor',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Tutor.vue'),
},
// 合作伙伴
{
path: '/IncubationPlatform/Partner',
name: 'Partner',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Partner.vue'),
},
// 创业服务
{
path: '/IncubationPlatform/Services',
name: 'Services',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Services.vue'),
},
// 产品展示
{
path: '/IncubationPlatform/Products',
name: 'Products',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Products.vue'),
},
// 实体众创空间
{
path: '/IncubationPlatform/MakerSpace/EntitySpace',
name: 'EntitySpace',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/place/EntitySpace.vue'),
},
// 虚拟众创空间
{
path: '/IncubationPlatform/MakerSpace/VirtualSpace',
name: 'VirtualSpace',
component: () =>
import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/place/VirtualSpace.vue'),
},
],
},
// 购物车
{
path: '/Cart',
name: 'Cart',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Cart/Cart.vue'),
},
{
// 创新挑战
path: '/Challenge/Solicitation',
name: 'Challenge',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Challenge.vue'),
children: [
{
path: '/Challenge/Solicitation',
name: 'Solicitation',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Solicitation.vue'),
},
{
path: '/Challenge/Release',
name: 'Release',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Release.vue'),
},
{
path: '/Challenge/Notice',
name: 'Notice',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Notice.vue'),
},
],
},
{
// 产业平台
path: '/Industry/Union',
name: 'Industry',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Industry.vue'),
children: [
{
path: '/Industry/Union',
name: 'Union',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Union.vue'),
},
{
path: '/Industry/Serve',
name: 'Serve',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Serve.vue'),
},
{
path: '/Industry/Enterprise',
name: 'Enterprise',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Enterprise.vue'),
},
],
},
// 知识平台界面
{
path: '/Knowledge',
name: 'Knowledge',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Knowledge/Knowledge.vue'),
},
];
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes,
});
export default router;

7
src/store/index.js

@ -0,0 +1,7 @@
import Vue from 'vue';
import Vuex from 'vuex';
import home from './modules/home/index';
import user from './modules/user/index';
Vue.use(Vuex);
export default new Vuex.Store({ modules: { home, user } });

146
src/store/modules/home/actions.js

@ -0,0 +1,146 @@
import axios from 'axios';
import { message } from 'ant-design-vue';
import { industryInfo, front, getPageDetail, queryRotation, frontSearchCompany, getUserSer } from '@/config/api';
const actions = {
/**
* 获取行业资讯列表
* @param {any} commit
* @param {object} params 提交的数据
*/
async getIndustryInfoList({ commit }, params) {
try {
const res = await industryInfo(params);
const { code, msg, data } = res.data;
if (code === 200) {
return data;
} else {
message.error(msg || '获取失败');
throw msg;
}
} catch (error) {
throw error || '获取失败';
}
},
/**
* 获取活动公告列表
* @param {any} commit
* @param {object} params 提交的数据
*/
async getFrontList({ commit }, params) {
try {
const res = await front(params);
const { code, msg, data } = res.data;
if (code === 200) {
return data;
} else {
message.error(msg || '获取失败');
throw msg;
}
} catch (error) {
throw error || '获取失败';
}
},
/**
* 介绍页面详情查询
* @param {any} commit
* @param {object} titleCode 提交的数据
*/
async getPageDetail({ commit }, titleCode) {
try {
const params = { param: { titleCode } };
const res = await getPageDetail(params);
const { code, msg, data } = res.data;
if (code === 200) {
if (data && data.length > 0 && data[0] && data[0].length > 0 && data[0][0].detail) {
commit('setContent', data[0][0].detail.content);
commit('setTitleCode', data[0][0].detail.titleCode);
}
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
/**
* 介绍页面详情查询
* @param {any} commit
* @param {object} showPage 页面显示位置
* 0 首页
* 11 关于我们-公司介绍
* 12 关于我们-组织机构
* 32 创新平台-创新资源平台
* 33 创新平台-创新服务
* 41 孵化平台-众创空间
* 42 孵化平台-公共实验室
* 43 孵化平台-中试基地
* 44 孵化平台-创业导师
* 46 孵化平台-创业服务
* 52 产业平台-产业服务
* 100 XX服务详情
*/
async getQueryRotation({ commit }, showPage) {
try {
const params = { param: { showPage } };
const res = await queryRotation(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setBannerLists', data);
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
/**
* 合作伙伴查询
* @param {any} commit
* @param {object} params 提交的数据
*/
async getFrontSearchCompany({ commit }, params) {
try {
const res = await frontSearchCompany(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setPartners', data);
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
/**
* 获取登录人信息
* @param {any} commit
*/
async getUserSer({ commit }) {
try {
const token = sessionStorage.getItem('anyringToken');
if (!token) return;
const params = { param: {} };
const res = await getUserSer(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setUserSer', data);
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
};
export default actions;

7
src/store/modules/home/getters.js

@ -0,0 +1,7 @@
const getters = {};
// 域定制导航展示形式
// 0 -> 无特殊导航文字
// 1 -> 横向定制导航
// 2 -> 纵向定制导航
export default getters;

6
src/store/modules/home/index.js

@ -0,0 +1,6 @@
import mutations from './mutations';
import actions from './actions';
import state from './state';
import getters from './getters';
export default { namespaced: true, state, getters, mutations, actions };

292
src/store/modules/home/mutations.js

@ -0,0 +1,292 @@
import { List } from 'ant-design-vue';
const mutations = {
/**
* 设置登录人信息
* @param {object} state
* @param {object} userSer
*/
setUserSer(state, userSer) {
state.userSer = { ...userSer };
},
/**
* 获取显示政策的ID
* @param {object} state
* @param {Number} num
*/
setPolicyId(state, num) {
state.policyId = num;
},
/**
* 改变当前政策页数
* @param {object} state
* @param {Number} num
*/
setCurrent(state, num) {
state.current = num;
},
/**
* 改变当前政策列表
* @param {object} state
* @param {object} data
*/
setPolicyStatus(state, data) {
state.policyStatus = { ...data };
},
/**
* 改变当前政策页数
* @param {object} state
* @param {Number} num
*/
setComCurrent(state, num) {
state.comCurrent = num;
},
/**
* 查看帖子详情
* @param {object} state
* @param {object} data
*/
setPostDetail(state, data) {
state.postDetail = { ...data };
},
/**
* 改变当前帖子所选类型
* @param {object} state
* @param {Number} num
*/
setPostVal(state, num) {
state.postVal = num;
},
/**
* 改变当前帖子搜索框内容
* @param {object} state
* @param {object} obj
*/
setPostIpCon(state, data) {
state.postIpCon = data;
},
/**
* 改变当前活动公告搜索类型
* @param {object} state
* @param {List} list
*/
setActList(state, list) {
state.actList = list;
},
/**
* 改变当前活动公告搜索框内容
* @param {object} state
* @param {string} str
*/
setActIpCon(state, str) {
state.actIpCon = str;
},
/**
* 改变当前活动公告处于第几页
* @param {object} state
* @param {Number} num
*/
setActCurrent(state, num) {
state.actCurrent = num;
},
/**
* 存储当前活动公告详情
* @param {object} state
* @param {object} data
*/
setActDetail(state, data) {
state.actDetail = { ...data };
},
/**
* 存储介绍页图文详情
* @param {object} state
* @param {object} data
*/
setContent(state, data) {
state.content = data;
},
/**
* 存储介绍页TitleCode
* @param {object} state
* @param {object} code
*/
setTitleCode(state, code) {
state.titleCode = code;
},
/**
* 改变子页面banner图
* @param {object} state
* @param {List} list
*/
setBannerLists(state, list) {
state.bannerLists = list;
},
/**
* 设置合作伙伴 衍生企业
* @param {object} state
* @param {List} list
*/
setPartners(state, list) {
state.partners = list;
},
/**
* 改变公司介绍内容
* @param {object} state
* @param {object} data
*/
setProfile(state, data) {
state.profile = data;
},
/**
* 改变知识产权与技术转移转化服务平台-成果类型所选类型
* @param {object} state
* @param {List} list
*/
setAchList(state, list) {
state.achList = list;
},
/**
* 改变知识产权与技术转移转化服务平台-搜索框内容
* @param {object} state
* @param {object} obj
*/
setAchIpt(state, obj) {
state.achIpt = { ...obj };
},
/**
* 改变知识产权与技术转移转化服务平台-搜索框内容
* @param {object} state
* @param {number} num
*/
setAchCurrent(state, num) {
state.achCurrent = num;
},
/**
* 知识产权与技术转移转化服务平台-成果详情页Id
* @param {object} state
* @param {number} num
*/
setAchId(state, num) {
state.achId = num;
},
/**
* 科技资源开放共享服务平台-列表展示数据0实验室1仪器//默认0)
* @param {object} state
* @param {number} num
*/
setListState(state, num) {
state.listState = num;
},
/**
* 科技资源开放共享服务平台-列表当前处于第几页
* @param {object} state
* @param {number} num
*/
setShareCurrent(state, num) {
state.shareCurrent = num;
},
/**
* 改变科技资源开放共享服务平台-实验室所选类型
* @param {object} state
* @param {List} list
*/
setLabList(state, list) {
state.labList = list;
},
/**
* 改变科技资源开放共享服务平台-实验室搜索框内容
* @param {object} state
* @param {object} obj
*/
setLabIpt(state, obj) {
state.LabIpt = { ...obj };
},
/**
* 改变科技资源开放共享服务平台-仪器所选类型
* @param {object} state
* @param {List} list
*/
setInsList(state, list) {
state.insList = list;
},
/**
* 改变科技资源开放共享服务平台-仪器搜索框内容
* @param {object} state
* @param {object} obj
*/
setInsIpt(state, obj) {
state.InsIpt = { ...obj };
},
/**
* 改变当前查看的研究院 详情的 id
* @param {object} state
* @param {number} num
*/
setLabId(state, num) {
state.LabId = num;
},
/**
* 改变孵化平台-产品展示所选类型所选类型
* @param {object} state
* @param {List} list
*/
setProductList(state, list) {
state.productList = list;
},
/**
* 改变孵化平台-产品展示所选类型搜索框内容
* @param {object} state
* @param {object} obj
*/
setProductIpt(state, obj) {
state.productIpt = { ...obj };
},
/**
* 改变当前孵化平台-产品展示 详情的 id
* @param {object} state
* @param {number} num
*/
setProductId(state, num) {
state.productId = num;
},
/**
* 存储服务详情导航
* @param {object} state
* @param {object} data
*/
setServiceArr(state, data) {
state.serviceArr = data;
},
};
export default mutations;

61
src/store/modules/home/state.js

@ -0,0 +1,61 @@
const state = {
userSer: null, // 登录人信息
policyId: 0,
current: 1, // 政策当前处于第几页,默认1
comCurrent: 1, // 帖子列表当前处于第几页,默认1
policyStatus: {
bw: 0,
sx: 0,
zg: 0,
value: 1, // 搜索框当前选项value
code: 'title', // 搜索框当前选项code
policyText: ['标题', '地区', '发布部门'], // 搜索框选项列表
iptCon: '', // 搜索框input内容
},
postDetail: {}, // 当前帖子详情
postVal: 0, // 当前帖子所选类型
postIpCon: '', // 帖子搜索框内容
actList: [], // 活动公告当前所选类型
actIpCon: '', // 活动公告搜索框内容
actCurrent: 1, // 活动公告当前处于第几页
actDetail: {}, // 当前活动公告详情
content: '', // 介绍页图文
titleCode: '', // 介绍页titleCode
bannerLists: [], // 子页面banner图
partners: [], // 合作伙伴 衍生企业
// 公司介绍
profile: {},
achList: [], // 知识产权与技术转移转化服务平台-成果类型所选类型
achIpt: {
// 知识产权与技术转移转化服务平台-搜索框内容
content: '',
isBtn: 0,
},
achCurrent: 1, // 知识产权与技术转移转化服务平台-成果列表页数
achId: 0, // 知识产权与技术转移转化服务平台-成果详情页Id
listState: 0, // 科技资源开放共享服务平台-列表展示数据(0:成果,1:仪器//默认0, 2:研究院,3:产品)
shareCurrent: 1, // 科技资源开放共享服务平台-列表当前处于第几页
labList: [], // 科技资源开放共享服务平台-实验室所选类型
LabIpt: {
// 实验室搜索框内容
content: '',
isBtn: 0,
},
insList: [], // 科技资源开放共享服务平台-仪器所选类型
InsIpt: {
// 仪器搜索框内容
content: '',
isBtn: 0,
},
LabId: 0, // 当前研究院详情Id
productList: [], // 孵化平台-产品展示所选类型
productIpt: {
// 产品展示搜索框内容
content: '',
isBtn: 0,
},
productId: 0, // 当前产品详情Id
serviceArr: [], // 服务详情导航
};
export default state;

143
src/store/modules/user/actions.js

@ -0,0 +1,143 @@
import axios from 'axios';
import { message } from 'ant-design-vue';
import { getSmscode, getPicCode, signIn, changePassword, signUp, getUserId } from '@/config/api-user';
const actions = {
/**
* sendCode 发送验证码
* @param {any} commit
* @param {object} params 提交的数据
* @param {string} params.phone 手机号
*/
async sendCode({ commit }, params) {
try {
const res = await getSmscode({ params });
const { code, msg, data } = res.data;
if (code === 200) {
return data;
} else {
message.error(msg || '发送失败');
throw msg;
}
} catch (error) {
throw error || '发送失败';
}
},
/**
* sendPicCode 获取图片验证码
* @param {any} commit
* @param {object} params 提交的数据
*/
async sendPicCode({ commit }) {
try {
const res = await getPicCode();
const { code, msg, data } = res.data;
if (code === 200) {
commit('setPicCode', data);
return data;
} else {
throw msg;
}
} catch (error) {
throw error || '获取失败';
}
},
/**
* signIn 登录
* @param {any} commit
* @param {string} identifier 身份标识 手机号 用户名
* @param {string} credential 身份凭证 验证码 密码
* @return {Promise} result 服务器返回信息
*/
async signIn({ commit }, params) {
const hideLoading = message.loading('登录中', 0);
try {
const res = await signIn(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('sign', data.token);
commit('setUser', data);
hideLoading();
message.success('登录成功');
return data;
} else {
hideLoading();
throw msg || '登录失败';
}
} catch (error) {
hideLoading();
throw error || '登录失败';
}
},
/**
* 修改密码 忘记密码
* @param {any} commit
* @param {object} params 要提交的参数
*/
async changePassword({ commit }, params) {
try {
const res = await changePassword(params);
const { code, msg, data } = res.data;
if (code === 200) {
message.success('修改密码成功');
return data;
} else {
throw msg || '修改密码失败';
}
} catch (error) {
throw error || '修改密码失败';
}
},
/**
* singUp 注册新用户
* @param {any} commit
* @param {object} params 提交的数据
* @param {string} params.account 用户名
* @param {string} params.password 密码
* @param {string} params.phone 手机号
* @param {string} params.smsCode 验证码
*/
async signUp({ commit }, params) {
try {
const res = await signUp(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('sign', data.token);
commit('setUser', data);
message.success('注册成功');
return data;
} else {
throw msg || '注册失败';
}
} catch (error) {
throw error || '注册失败';
}
},
/**
* 通过userId获取token
* @param {any} commit
* @param {object} params 提交的参数
*/
async getUserId({ commit }, params) {
try {
const res = await getUserId({ params });
const { code, msg, data } = res.data;
if (code === 200) {
commit('sign', data.token);
commit('setUser', data);
return data;
} else {
throw msg;
}
} catch (error) {
throw error || '获取个人信息失败';
}
},
};
export default actions;

7
src/store/modules/user/getters.js

@ -0,0 +1,7 @@
const getters = {};
// 域定制导航展示形式
// 0 -> 无特殊导航文字
// 1 -> 横向定制导航
// 2 -> 纵向定制导航
export default getters;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save