Browse Source

v0.5 more

master
DESKTOP-00SUCB6\Administrator 4 years ago
parent
commit
25e93044b9
  1. 28
      package-lock.json
  2. 2
      package.json
  3. 14
      public/config.js
  4. BIN
      public/template/001/img/互联网大会/banner-bg.png
  5. BIN
      public/template/001/img/互联网大会/top-banner.jpg
  6. BIN
      public/template/001/img/公共服务/banner-bg.png
  7. BIN
      public/template/001/img/公共服务/platform-1.jpg
  8. BIN
      public/template/001/img/公共服务/platform-2.jpg
  9. BIN
      public/template/001/img/关于联盟/banner-bg.png
  10. BIN
      public/template/001/img/联盟成果/banner-bg.png
  11. BIN
      public/template/001/img/转型升级论坛/banner-bg.png
  12. BIN
      public/template/001/img/转型升级论坛/top-banner.jpg
  13. 26
      src/api/company.js
  14. 50
      src/api/login.js
  15. 25
      src/api/notice.js
  16. BIN
      src/assets/public/platform-1.jpg
  17. BIN
      src/assets/public/platform-2.jpg
  18. 61
      src/components/banner/index.vue
  19. 2
      src/main.js
  20. 87
      src/router/index.js
  21. 58
      src/store/index.js
  22. 21
      src/utils/auth.js
  23. 7
      src/utils/request.js
  24. 46
      src/utils/validate.js
  25. 146
      src/views/forum/news.vue
  26. 121
      src/views/home/index.vue
  27. 96
      src/views/layout/components/header.vue
  28. 4
      src/views/layout/components/scroll.vue
  29. 63
      src/views/login/index.vue
  30. 417
      src/views/login/register.vue
  31. 392
      src/views/login/retrievePassword.vue
  32. 146
      src/views/meeting/news.vue
  33. 128
      src/views/notice/noticeShow.vue
  34. 31
      src/views/noticeShow.vue
  35. 87
      src/views/public/platform.vue
  36. 114
      src/views/search/index.vue
  37. 12
      src/views/template.vue

28
package-lock.json

@ -2970,6 +2970,11 @@
"integrity": "sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=",
"dev": true
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
},
"check-types": {
"version": "8.0.3",
"resolved": "https://registry.npm.taobao.org/check-types/download/check-types-8.0.3.tgz?cache=0&sync_timestamp=1579455903027&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheck-types%2Fdownload%2Fcheck-types-8.0.3.tgz",
@ -3641,6 +3646,11 @@
"which": "^1.2.9"
}
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
},
"crypto-browserify": {
"version": "3.12.0",
"resolved": "https://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz",
@ -6351,8 +6361,7 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz",
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4="
},
"is-callable": {
"version": "1.1.5",
@ -6670,6 +6679,11 @@
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz",
"integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ=="
},
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"js-message": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/js-message/download/js-message-1.0.5.tgz",
@ -7085,6 +7099,16 @@
"object-visit": "^1.0.0"
}
},
"md5": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
"requires": {
"charenc": "0.0.2",
"crypt": "0.0.2",
"is-buffer": "~1.1.6"
}
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npm.taobao.org/md5.js/download/md5.js-1.3.5.tgz",

2
package.json

@ -17,7 +17,9 @@
"element-ui": "^2.13.1",
"jquery": "^3.5.1",
"js-cookie": "^2.2.1",
"js-md5": "^0.7.3",
"jsencrypt": "^3.0.0-rc.1",
"md5": "^2.3.0",
"qs": "^6.9.4",
"vue": "^2.6.11",
"vue-loader": "^15.9.2",

14
public/config.js

@ -1,8 +1,10 @@
config = {
API_URL: 'http://172.119.51.18:8081',
COCKPIT_API_URL: 'http://www.fatoaniic.com/api',
LOGIN_URL: 'http://www.fatoaniic.com/#/login',
APP_URL:'http://nmsj.org.cn/',
SHOW_URL: "http://121.36.65.171:8787/file/",
UPLOAD_URL: "http://www.fatoaniic.com/api/api-ftp/ftp/upload",
API_URL: 'http://172.119.51.140:8081',
CODE_URL: 'http://172.119.51.140:8082',
UPLOAD_URL: "http://172.119.51.140:8082/attachment/uploadOne",
// COCKPIT_API_URL: 'http://www.fatoaniic.com/api',
// LOGIN_URL: 'http://www.fatoaniic.com/#/login',
// APP_URL:'http://nmsj.org.cn/',
// SHOW_URL: "http://121.36.65.171:8787/file/",
}

BIN
public/template/001/img/互联网大会/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
public/template/001/img/互联网大会/top-banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
public/template/001/img/公共服务/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
public/template/001/img/公共服务/platform-1.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
public/template/001/img/公共服务/platform-2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
public/template/001/img/关于联盟/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
public/template/001/img/联盟成果/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
public/template/001/img/转型升级论坛/banner-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

BIN
public/template/001/img/转型升级论坛/top-banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

26
src/api/company.js

@ -0,0 +1,26 @@
import request from '@/utils/request';
//区域查询接口
export function getArea(params) {
return request({
baseURL:config.CODE_URL,
url: '/common/getComboList_2/40010/'+params,
method: 'get'
});
}
//行业大类查询接口
export function getBigIndustryList() {
return request({
baseURL:config.CODE_URL,
url: '/common/getComboList_1/40008',
method: 'get'
});
}
//行业小类查询接口
export function getSmallIndustryList(params) {
return request({
baseURL:config.CODE_URL,
url: '/common/getComboList_2/40009/'+params,
method: 'get'
});
}

50
src/api/login.js

@ -3,7 +3,7 @@ import request from '@/utils/request';
//登录接口
export function login(param) {
return request({
url: '/api-login/login/login',
url: '/userWeb/login',
method: 'post',
data:param
});
@ -11,23 +11,46 @@ export function login(param) {
//登出接口
export function logout() {
return request({
url: '/regback/user/logout',
baseURL:config.CODE_URL,
url: '/common/logout',
method: 'post'
});
}
//注册账户
export function registerUser(params) {
return request({
url: '/userWeb/register',
method: 'post',
tokenParams:true
data:params
});
}
//普通账户修改密码
export function updatePass(params) {
//添加用户时校验用户是否存在
export function existsUserName(params) {
return request({
url: '/api-login/user/updatePassword',
baseURL:config.CODE_URL,
url: '/user/checkUserInfo',
method: 'post',
data:params
});
}
//注册账户
export function registerUser(params) {
//忘记密码-重设密码
export function setUpPassword(params) {
return request({
url: '/userWeb/forGetPassword',
method: 'post',
data:params
});
}
//普通账户修改密码
export function updatePass(params) {
return request({
url: '/api-login/user/registerUser',
url: '/api-login/user/updatePassword',
method: 'post',
data:params
});
@ -48,14 +71,7 @@ export function userToTelphone(params) {
params
});
}
//忘记密码-重设密码
export function setUpPassword(params) {
return request({
url: '/api-login/user/setUpPassword',
method: 'post',
data:params
});
}
//验证短信验证码
export function smsVerification(params) {
return request({

25
src/api/notice.js

@ -1,5 +1,30 @@
import request from '@/utils/request';
//获取文章列表信息
export function getNoticeList(params) {
return request({
url: '/contentWeb/search',
method: 'post',
data:params
});
}
//获取文章列表信息
export function getNoticeList2(params) {
return request({
url: '/contentWeb/getContentList',
method: 'post',
data:params
});
}
//获取多个类型文章分页列表信息
export function getNoticeListByMoreType(params) {
return request({
url: '/contentWeb/searchTypes',
method: 'post',
data:params
});
}
//获取文章详情
export function getNoticeInfo(params) {
return request({

BIN
src/assets/public/platform-1.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
src/assets/public/platform-2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

61
src/components/banner/index.vue

@ -0,0 +1,61 @@
<template>
<div class="banner">
<img class="banner-bg" :src="_getImage(title,'banner-bg.png')"/>
<div class="banner-content">
<span class="banner-title">{{title}}</span>
</div>
</div>
</template>
<script>
export default {
name:"banner",
data(){
return {
title:this.$route.query.title || this.$route.matched[1].meta.title
}
},
watch:{
'$route'(to,from){
this.title = this.$route.query.title || this.$route.matched[1].meta.title
}
}
}
</script>
<style lang="scss" scoped>
.banner {
position: relative;
.banner-bg {
width: 100%;
}
.banner-content {
position: absolute;
width: 1200px;
height: 50px;
left: 50%;
transform: translateX(-50%);
bottom: 100px;
background: transparent;
color: #fff;
font-size: 30px;
font-weight: 600;
}
.banner-title {
position: relative;
&::before {
content: " ";
position: absolute;
left: 0;
bottom: -10px;
width: 50px;
height: 4px;
background: #fff;
transition: All 0.3s ease-in-out;
}
&:hover {
&::before {
width: 100%;
}
}
}
}
</style>

2
src/main.js

@ -6,7 +6,9 @@ import 'element-ui/lib/theme-chalk/index.css'
import App from './App.vue'
import router from './router'
import store from './store'
import md5 from 'js-md5'; //md5 加密
import * as echarts from 'echarts';
Vue.prototype.$md5 = md5
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.use(ElementUI)

87
src/router/index.js

@ -1,6 +1,8 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/layout/Layout.vue';
import mytemplate from '../views/template.vue';
Vue.use(VueRouter)
const routes = [
@ -24,82 +26,95 @@ const routes = [
{
path: 'introduce',
name: 'introduceUnion',
meta: {title: '联盟介绍', icon: 'register', noCache: true},
meta: {title: '联盟介绍', icon: 'register', noCache: true,typeId:'LMJS'},
},
{
path: 'rules',
name: 'rulesUnion',
meta: {title: '联盟章程', icon: 'register', noCache: true},
meta: {title: '联盟章程', icon: 'register', noCache: true,typeId:'LMZC'},
},
{
path: 'frame',
name: 'frameUnion',
meta: {title: '组织架构', icon: 'register', noCache: true},
meta: {title: '组织架构', icon: 'register', noCache: true,typeId:'ZZJG'},
},
{
path: 'member',
name: 'memberUnion',
meta: {title: '联盟成员', icon: 'register', noCache: true},
meta: {title: '联盟成员', icon: 'register', noCache: true,typeId:'LMCY'},
},
{
path: 'us',
name: 'usUnion',
meta: {title: '联系我们', icon: 'register', noCache: true},
meta: {title: '联系我们', icon: 'register', noCache: true,typeId:'LXWM'},
}
]
},
{
path: 'meeting',
name: 'meeting',
component: mytemplate,
meta: { title: '互联网大会', icon: 'register', noCache: true },
children: [
{
path: 'introduce',
name: 'introduceMeeting',
meta: {title: '大会介绍', icon: 'register', noCache: true,titleId:'4'},
meta: {title: '大会介绍', icon: 'register', noCache: true,typeId:'DHJS'},
},
{
path: 'schedule',
name: 'scheduleMeeting',
meta: {title: '会议日程', icon: 'register', noCache: true,titleId:'7'},
meta: {title: '会议日程', icon: 'register', noCache: true,typeId:'HYRC'},
},
{
path: 'news',
name: 'newsMeeting',
meta: {title: '大会新闻', icon: 'register', noCache: true},
name: 'newsMeeting',
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/meeting/news.vue')
},
meta: {title: '大会新闻', icon: 'register', noCache: true},
},
{
path: 'replay',
name: 'replayMeeting',
meta: {title: '大会回看', icon: 'register', noCache: true},
}
// {
// path: 'replay',
// name: 'replayMeeting',
// meta: {title: '大会回看', icon: 'register', noCache: true,typeId:'DHHK'},
// }
]
},
{
path: 'forum',
name: 'forum',
component: mytemplate,
meta: { title: '转型升级论坛', icon: 'register', noCache: true },
children: [
{
path: 'introduce',
name: 'introduceForum',
meta: {title: '论坛介绍', icon: 'register', noCache: true},
meta: {title: '论坛介绍', icon: 'register', noCache: true,typeId:'LTJS'},
},
{
path: 'schedule',
name: 'scheduleForum',
meta: {title: '论坛日程', icon: 'register', noCache: true},
meta: {title: '论坛日程', icon: 'register', noCache: true,typeId:'LTRC'},
},
{
path: 'news',
name: 'newsForum',
name: 'newsForum',
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/forum/news.vue')
},
meta: {title: '论坛新闻', icon: 'register', noCache: true},
},
{
path: 'replay',
name: 'replayForum',
meta: {title: '论坛回顾', icon: 'register', noCache: true},
}
// {
// path: 'replay',
// name: 'replayForum',
// meta: {title: '论坛回顾', icon: 'register', noCache: true,typeId:'LTHG'},
// }
]
},
{
@ -110,34 +125,41 @@ const routes = [
{
path: 'whitepaper',
name: 'whitepaper',
meta: {title: '白皮书', icon: 'register', noCache: true},
meta: {title: '白皮书', icon: 'register', noCache: true,typeId:'BPS'},
},
{
path: 'benchmark',
name: 'benchmark',
meta: {title: '技术标准', icon: 'register', noCache: true},
meta: {title: '技术标准', icon: 'register', noCache: true,typeId:'JSBZ'},
},
{
path: 'electronicMeetings ',
name: 'electronicMeetings ',
meta: {title: '电子会刊', icon: 'register', noCache: true},
meta: {title: '电子会刊', icon: 'register', noCache: true,typeId:'DZHK'},
},
{
path: 'example',
name: 'example',
meta: {title: '应用案例', icon: 'register', noCache: true},
meta: {title: '应用案例', icon: 'register', noCache: true,typeId:'YYAL'},
}
]
},
{
path: 'public',
name: 'public',
component: mytemplate,
meta: { title: '公共服务', icon: 'register', noCache: true },
children: [
{
path: 'platform',
name: 'platform',
meta: {title: '平台', icon: 'register', noCache: true},
name: 'platform',
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/public/platform.vue')
},
meta: {title: '平台', icon: 'register', noCache: true},
}
]
},
@ -174,7 +196,14 @@ const routes = [
path: '/noticeShow',
name:'noticeShow',
component: () =>
import ('../views/noticeShow.vue'),
import ('../views/notice/noticeShow.vue'),
hidden: true
},
{
path: '/search',
name:'search',
component: () =>
import ('../views/search/index.vue'),
hidden: true
},
],

58
src/store/index.js

@ -1,16 +1,34 @@
import Vue from 'vue'
import Vuex from 'vuex'
import {login, logout} from '@/api/login';
Vue.use(Vuex)
import { setTitle,getTitle } from '@/utils/auth'
import {
setTitle,
getTitle,
removeTitle,
getToken,
setToken,
removeToken,
getName,
setName,
removeName,
} from '@/utils/auth'
export default new Vuex.Store({
state: {
title:getTitle() || '北京顺鑫控股集团有限公司二级节点'
title:getTitle() || '北京顺鑫控股集团有限公司二级节点',
token: getToken() || '',
name: getName() || '',
},
mutations: {
SET_TITLE: (state, token) => {
state.token = token;
},
SET_TOKEN: (state, token) => {
state.token = token;
},
SET_NAME: (state, name) => {
state.name = name;
},
},
actions: {
// 标题变化
@ -21,10 +39,42 @@ export default new Vuex.Store({
resolve();
});
},
// 登录
Login({commit}, param) {
//登录获取登录权限
return new Promise((resolve, reject) => {
login(param).then(response => {
const data = response.data
setToken(data.token)
setName(data.account)
commit('SET_TOKEN', data.token)
commit('SET_NAME', data.account)
resolve(data)
}).catch(error => {
reject(error)
})
})
},
//登出
LogOut({commit, state}) {
return new Promise((resolve, reject) => {
logout().then(() => {
commit('SET_TOKEN', '');
commit('SET_NAME', "")
removeToken();
removeName()
resolve();
}).catch(error => {
reject(error);
});
});
},
},
modules: {
},
getters: {
title: state => state.title
title: state => state.title,
name: state => state.name,
token: state => state.token
}
})

21
src/utils/auth.js

@ -1,6 +1,8 @@
import Cookies from 'js-cookie'
const title = 'COCKPIT-TITLE';
const TokenKey = 'cfiiu-t';
const NameKey = 'cfiiu-n';
export function getTitle() {
return Cookies.get(title)
@ -12,3 +14,22 @@ export function removeTitle() {
return Cookies.remove(title)
}
export function getToken() {
return Cookies.get(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
}
export function removeToken() {
return Cookies.remove(TokenKey)
}
export function getName() {
return Cookies.get(NameKey)
}
export function setName(name) {
return Cookies.set(NameKey, name)
}
export function removeName() {
return Cookies.remove(NameKey)
}

7
src/utils/request.js

@ -3,6 +3,7 @@ import { Message, MessageBox } from 'element-ui'
import store from '../store/index'
import qs from 'qs'
import router from '@/router'
import { getToken } from '@/utils/auth'
axios.defaults.withCredentials = true;
var isToken = true
// 创建axios实例
@ -19,9 +20,9 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use((config) => {
// let isKey = false
// if (store.getters.token && !config.isLogin) {
// config.headers['token'] = getToken()
// }
if (store.getters.token && !config.isLogin) {
config.headers['token'] = getToken()
}
if (config.method == 'post' || config.method == 'put') {
// let sData = ''

46
src/utils/validate.js

@ -3,24 +3,58 @@
*/
/* 合法身份证ID*/
export function validateIDCard(textval) {
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
return reg.test(textval)
export function validateIDCard(idCard){
//15位和18位身份证号码的正则表达式
var regIdCard=/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
//如果通过该验证,说明身份证格式正确,但准确性还需计算
if(regIdCard.test(idCard)){
if(idCard.length==18){
var idCardWi=new Array( 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ); //将前17位加权因子保存在数组里
var idCardY=new Array( 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2 ); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
var idCardWiSum=0; //用来保存前17位各自乖以加权因子后的总和
for(var i=0;i<17;i++){
idCardWiSum+=idCard.substring(i,i+1)*idCardWi[i];
}
var idCardMod=idCardWiSum%11;//计算出校验码所在数组的位置
var idCardLast=idCard.substring(17);//得到最后一位身份证号码
//如果等于2,则说明校验码是10,身份证号码最后一位应该是X
if(idCardMod==2){
if(idCardLast=="X"||idCardLast=="x"){
// alert("恭喜通过验证啦!");
return true
}else{
return false
}
}else{
//用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
if(idCardLast==idCardY[idCardMod]){
// alert("恭喜通过验证啦!");
return true
}else{
return false
}
}
} else {
return true
}
}else{
return false
}
}
/* 校验邮箱*/
export function validateEmail(str) {
var checkEmail = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var checkEmail = /^([a-zA-Z\d])(\w|\-)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/;
return checkEmail.test(str)
}
/* 检验手机号ID*/
export function validatePhone(textval) {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
return reg.test(textval)
}
/* 合法uri*/
export function validateURL(textval) {
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
const urlregex = /^(http:\/\/|https:\/\/)*([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return urlregex.test(textval)
}

146
src/views/forum/news.vue

@ -0,0 +1,146 @@
<template>
<div class="app-container">
<img class="banner-bg" :src="_getImage('转型升级论坛','top-banner.jpg')"/>
<br><br><br>
<span class="title">论坛新闻</span>
<el-divider></el-divider>
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,4)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;"><span style="color:#01496E;"></span>{{item.title}}</p>
</div>
<span class="text-date">{{item.issueStartTime}}</span>
</div>
<el-pagination
layout="prev, pager, next"
:current-page.sync="currentPage"
:page-size="10"
:total="total">
</el-pagination>
</div>
</template>
<script>
import {getNoticeList} from "@/api/notice"
export default {
name: "newsForum",
data() {
return {
noticeList:[],
currentPage:1,
total:0
};
},
mounted() {
this.initData()
},
methods:{
initData(){
let params = {
"pageNum": this.currentPage,
"pageSize": 10,
"search": {
"type": "LTXW"
},
"sort": ""
}
getNoticeList(params).then(res => {
console.log(res);
this.noticeList = res.data.list
this.total = res.data.count
})
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.banner-bg {
position: relative;
width: 100%;
}
.title {
position: relative;
color: #1e50ae;
font-size: 18px;
padding: 0 10px;
font-weight: bold;
font-family: 微软雅黑;
&::before {
content: " ";
position: absolute;
left: 0;
bottom: -25px;
width: 100%;
height: 4px;
background: #1e50ae;
}
}
.notice-list {
position: relative;
background-color: rgba(255,255,255,0);
cursor: pointer;
color: #999999;
font-family:PingFang SC;
border-bottom: 1px dotted #dcdcdc;
margin: 10px 30px;
.date-block {
position: relative;
display: inline-block;
vertical-align: top;
width: 67px;
height: 67px;
margin: 10px 10px 10px 0;
padding: 13px 0;
background-color: #E4E4E4;
}
.content-block {
position: relative;
display: inline-block;
width: calc(100% - 90px);
height: 46px;
padding: 0 15px;
&::before {
content: " ";
position: absolute;
top: 28%;
left: -10px;
width: 6px;
height: 6px;
background: #8D8D8D;
border-radius: 50%;
}
}
.content-block-first {
position: relative;
display: inline-block;
width: calc(100% - 90px);
height: 103px;
padding: 0 15px;
}
.text-date {
text-align: center;
font-size: 14px;
vertical-align: super;
}
.text-title {
font-size: 18px;
margin: 6px 0;
font-weight:500;
color: #666666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-content {
font-size: 14px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
}
&:hover {
.text-title {
color: #3893c7;
}
}
}
</style>

121
src/views/home/index.vue

@ -4,11 +4,11 @@
<div class="block-content">
<div class="block1-carousel">
<el-carousel height="450px">
<el-carousel-item v-for="item in carouselPicList" :key="item">
<img style="height:450px;width:100%;" :src="item" />
<el-carousel-item v-for="(item,index) in carouselPicList" :key="index">
<img style="height:450px;width:100%;" :src="item.imgUrl" />
<div class="carousel-bg">
<span class="font-size-16">联盟介绍</span>
<p class="content">在工业和信息化部的大力支持和指导下由中国信息通信研究院联合制造业通信业互联网等企业于2016年2月1日共同发起成立..</p>
<span class="font-size-16">{{item.title}}</span>
<p class="content">{{item.description}}</p>
<br><br><br>
<a class="color-white mybutton-1">查看更多 >></a>
</div>
@ -28,11 +28,11 @@
<div class="other-box flex-box">
<div class="button flex-1" style="background:#004471;"><i class="el-icon-user"></i>加入联盟</div>
</div>
<div class="other-box flex-box">
<!-- <div class="other-box flex-box">
<div class="button flex-1"><i class="el-icon-document"></i>章程</div>
<div class="button flex-1"><i class="el-icon-user-solid"></i>成员</div>
<div class="button flex-1"><i class="el-icon-s-management"></i>组织构架</div>
</div>
</div> -->
</div>
</div>
@ -40,10 +40,10 @@
<div class="block2">
<el-row class="block-content" style="padding-bottom:30px;">
<div class="left-box">
<div class="title-box is-active" name="title-box" @click="changeTitleBox">
<div class="title-box is-active" name="title-box" @click="changeTitleBox($event,'LMDTLX')">
<span class="color-white title-2">联盟动态 <br><span class="font-size-21" style="opacity: 0.4;">NEWS</span></span>
</div>
<div class="title-box" name="title-box" @click="changeTitleBox">
<div class="title-box" name="title-box" @click="changeTitleBox($event,'HYZXLX')">
<span class="color-white title-2">行业资讯 <br><span class="font-size-21" style="opacity: 0.4;">INFORMATION</span></span>
</div>
</div>
@ -53,20 +53,20 @@
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,6)" :key="index">
<div class="content-block-first" v-if="index == 0">
<p class="text-title">{{item.title}}</p>
<p class="text-content">{{item.content.replace(/<[^>]+>/g,"")}}</p>
<p class="text-content">{{item.description}}</p>
</div>
<div v-else class="content-block">
<p class="text-title" style="font-size:14px;">{{item.title}}</p>
</div>
<span class="text-date">{{item.sendtime}}</span>
<span class="text-date">{{item.issueStartTime}}</span>
</div>
</el-col>
<el-col :span="12">
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,7)" :key="index">
<div class="notice-list" v-for="(item,index) in noticeList.slice(7,13)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;">{{item.title}}</p>
</div>
<span class="text-date">{{item.sendtime}}</span>
<span class="text-date">{{item.issueStartTime}}</span>
</div>
</el-col>
</el-row>
@ -90,18 +90,13 @@
<p class="font-size-18" style="opacity: 0.4;text-align: center;">RESULTS</p>
<br><br><br>
<div>
<div class="tab-box fruit01-bg">
<p class="title-1" style="z-index:10;">白皮书</p>
<br><br>
<a class="content" style="z-index:10;">查看更多 >></a>
</div>
<div class="tab-box fruit02-bg">
<p class="title-1" style="z-index:10;">技术标准</p>
<br><br>
<a class="content" style="z-index:10;">查看更多 >></a>
</div>
<div class="tab-box fruit03-bg">
<p class="title-1" style="z-index:10;">电子会刊</p>
<div class="tab-box fruit01-bg">
<p class="title-1" style="z-index:10;">白皮书</p>
<br><br>
<a class="content" style="z-index:10;">查看更多 >></a>
</div>
@ -110,11 +105,17 @@
<br><br>
<a class="content" style="z-index:10;">查看更多 >></a>
</div>
<div class="tab-box fruit03-bg">
<p class="title-1" style="z-index:10;">电子会刊</p>
<br><br>
<a class="content" style="z-index:10;">查看更多 >></a>
</div>
</div>
<br><br>
<el-row>
<el-col :span="12">
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,4)" :key="index">
<div class="notice-list" v-for="(item,index) in informationList.slice(0,4)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;"><span style="color:#01496E;">白皮书</span>{{item.title}}</p>
</div>
@ -122,7 +123,7 @@
</div>
</el-col>
<el-col :span="12">
<div class="notice-list" v-for="(item,index) in noticeList.slice(4,8)" :key="index">
<div class="notice-list" v-for="(item,index) in informationList.slice(4,8)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;"><span style="color:#01496E;">白皮书</span>{{item.title}}</p>
</div>
@ -134,7 +135,7 @@
</div>
<div class="block4">
<div class="block-content">
<h1 class="title-0">服务
<h1 class="title-0">服务
<span class="bottom-line" style="color:#01496E;"></span>
</h1>
<el-divider></el-divider>
@ -174,31 +175,78 @@
</div>
</template>
<script>
import {getNoticeList,getNoticeListByMoreType} from "@/api/notice.js"
export default {
name:'home',
data(){
return {
carouselPicList:[
require('../../assets/home/carousel-1.png'),
require('../../assets/home/carousel-2.png'),
require('../../assets/home/carousel-3.png'),
// require('../../assets/home/carousel-1.png'),
// require('../../assets/home/carousel-2.png'),
// require('../../assets/home/carousel-3.png'),
],
newsList:[],
informationList:[],
noticeList:[ //
{sendtime:'2020-05-10',title:'工业和信息化部办公厅关于推动工业互联网加快发展',content:'各省、自治区、直辖市及计划单列市、新疆生产建设兵团工业和信息化主 管部门,各省、自治区、直辖市通信管理局,中国电信集团有限公司。'},
{sendtime:'2020-05-09',title:'工业和信息化部办公厅关于公布2019年工业互联网试2019年工业互联网试',content:'各省、自治区、直辖市及计划单列市工业和信息化主管部门,各省、自治区 、直辖市通信管理局,各有关单位。'},
{sendtime:'2020-05-08',title:'北京市经济和信息化局关于开展2020年工信部工业互',content:'各有关单位:根据工信部及我局工作安排,现将2020年工信部工业互联网 创新发展工程项目(以下简称“项目”)有关工作通知如下。'},
{sendtime:'2020-05-07',title:'江门市工业和信息化局转发关于组织推进 “5G+工业”',content:'各市(含定州、辛集市)工业和信息化局、通信发展管理办公室,中国联通 河北分公司、中国电信河北分公司、中国移动河北分公司、河北广电网络。'},
{sendtime:'2020-05-08',title:'关于进一步加快工业互联网发展的通知',content:'各省、自治区、直辖市及计划单列市工业和信息化主管部门,各省、自治区 、直辖市通信管理局,各有关单位。'},
{sendtime:'2020-05-07',title:'关于天津市钢铁、水泥企业 2018年度工序单位产品',content:'按照工业和信息化部《2019年工业节能监察重点工作计划》(工信部节函 〔2019〕77号)和《关于下达2019年国家重大工业节能监察任务及经费。'},
{sendtime:'2020-06-07',title:'ssssssssssssssss 2018年度工序单位产品',content:'按照工业和信息化部《2019年工业节能监察重点工作计划》(工信部节函 〔2019〕77号)和《关于下达2019年国家重大工业节能监察任务及经费。'},
// {sendtime:'2020-05-10',title:'',content:' '},
// {sendtime:'2020-05-09',title:'20192019',content:' '},
// {sendtime:'2020-05-08',title:'2020',content:'2020 '},
// {sendtime:'2020-05-07',title:' 5G+',content:' 广'},
// {sendtime:'2020-05-08',title:'',content:' '},
// {sendtime:'2020-05-07',title:' 2018',content:'2019 2019772019'},
// {sendtime:'2020-06-07',title:'ssssssssssssssss 2018',content:'2019 2019772019'},
],
}
},
mounted(){
this.initCarousel()
this.initNewsOrInformation("LMDTLX")
this.initNoticeByMoreType()
},
methods:{
changeTitleBox(e){
initCarousel(){
let carouselParams = {
"pageNum": 1,
"pageSize": 5,
"search": {
"isHomeSlideshow":1,
},
"sort": ""
}
getNoticeList(carouselParams).then(res => {
if(res.data && res.data.list.length > 0)
this.carouselPicList = res.data.list
})
},
initNewsOrInformation(type){
let newsParams = {
"pageNum": 1,
"pageSize": 13,
"search": {
"type": type //
},
"sort": ""
}
getNoticeList(newsParams).then(res => {
if(res.data && res.data.list.length > 0)
this.noticeList = res.data.list
})
},
initNoticeByMoreType(){
let params = {
"pageNum": 1,
"pageSize": 8,
"search": {
"type": "JSBZ,YYAL,DZHK,BPS"
},
"sort": ""
}
getNoticeListByMoreType(params).then(res => {
if(res.data && res.data.list.length > 0)
this.informationList = res.data.list
})
},
changeTitleBox(e,type){
let aDoc = document.getElementsByName("title-box")
for (let i = 0; i < aDoc.length; i++) {
const element = aDoc[i];
@ -206,6 +254,7 @@ export default {
}
e.currentTarget.className = "title-box is-active"
// e.target.className = "title-box is-active"
this.initNewsOrInformation(type)
}
}
@ -216,7 +265,7 @@ export default {
position: relative;
width: 1200px;
margin: 0 auto;
padding: 50px 0;
padding: 30px 0;
}
.block1 {
position: relative;
@ -249,7 +298,7 @@ export default {
position: relative;
width: 100%;
padding: 20px;
height: 340px;
height: 394px;
color: #646464;
background: #fff;
}

96
src/views/layout/components/header.vue

@ -2,7 +2,23 @@
<div>
<div class="top-content">
<span>欢迎访问中国食品工业互联网产业联盟</span>
<span class="float-right"> <a href="#/">返回首页</a> <el-divider direction="vertical"></el-divider><a href="#/register"></a><el-divider direction="vertical"></el-divider><a href="#/login"></a></span>
<span class="float-right">
<a href="#/">返回首页</a>
<el-divider direction="vertical"></el-divider>
<span v-if="!name">
<a href="#/register">加入联盟</a>
<el-divider direction="vertical"></el-divider>
<a href="#/login">登录</a>
</span>
<span v-else>
<span>欢迎{{name}}</span>
<el-divider direction="vertical"></el-divider>
<a >个人中心</a>
<el-divider direction="vertical"></el-divider>
<a @click="logout">退出</a>
</span>
</span>
</div>
<el-header style="height:84px;box-shadow: 0px 3px 7px 0px #DADADA;" id="topHeight" v-if="!searchFlag">
<div class="header-content">
@ -39,11 +55,11 @@
<span class="myTitle" slot="title">{{item.meta.title}}</span>
</template>
<template v-for="child in item.children">
<router-link :to="{name:'noticeShow',query:{id:child.meta.titleId}}" :key="child.name">
<el-menu-item :index="child.path">
<a @click="jumpRouter(child,item.meta.title)" :key="child.name">
<el-menu-item :index="child.name">
<span class="myTitle" slot="title">{{child.meta.title}}</span>
</el-menu-item>
</router-link>
</a>
</template>
</el-submenu>
</template>
@ -62,6 +78,7 @@
</template>
<script>
import {mapGetters} from 'vuex';
export default {
name: "myHeader",
props: {
@ -70,8 +87,14 @@ export default {
default: false
}
},
computed: {
...mapGetters([
'name'
])
},
data() {
return {
// username:this.$store.getters.name || "",
routes: [],
variables:"",
top:true,
@ -79,6 +102,11 @@ export default {
sSearch:''
};
},
watch:{
$name(newVal,oldVal){
console.log(newVal,oldVal);
}
},
created(){
this.variables = this._getCss2("styles", "variables.scss")
},
@ -88,10 +116,26 @@ export default {
methods:{
search(){
},
jumpRouter(item,title)
{
if(item.meta.typeId)
{
this.$router.push({name:'noticeShow',query:{'id':item.meta.typeId,'title':title}})
} else {
this.$router.push({name:item.name})
}
},
closeSearch() {
this.searchFlag = false,
this.sSearch = ''
},
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload() // vue-router bug\
this.$router.push({path: "/"});
})
}
}
};
@ -140,26 +184,26 @@ export default {
color: #fff;
border: 1px solid #fff;
}
@media screen and (min-width: 1300px) and (max-width: 1500px) {
.logo {
// width: 420px;
height: 70px;
}
}
@media screen and (min-width: 1000px) and (max-width: 1300px) {
.logo {
display: none;
}
.logo2 {
display: inline-block;
}
}
@media screen and (max-width: 1000px) {
.logo {
display: none;
}
.logo2 {
display: none;
}
}
// @media screen and (min-width: 1300px) and (max-width: 1500px) {
// .logo {
// // width: 420px;
// height: 70px;
// }
// }
// @media screen and (min-width: 1000px) and (max-width: 1300px) {
// .logo {
// display: none;
// }
// .logo2 {
// display: inline-block;
// }
// }
// @media screen and (max-width: 1000px) {
// .logo {
// display: none;
// }
// .logo2 {
// display: none;
// }
// }
</style>

4
src/views/layout/components/scroll.vue

@ -1,8 +1,8 @@
<template>
<div>
<div class="kefu-block">
<!-- <div class="kefu-block">
<div class="kefu-img"></div>
</div>
</div> -->
<div class="top-block" v-show="showTop" @click="toTopScroll">
<div class="top-img"></div>
</div>

63
src/views/login/index.vue

@ -76,9 +76,9 @@
/>
</el-row>
<div class="remember-block">
<el-checkbox v-model="remember">记住密码</el-checkbox>
<!-- <el-checkbox v-model="remember">记住密码</el-checkbox> -->
<router-link :to="{name:'retrievePassword'}">
<a class="click_link float-right">忘记密码</a>
<a class="click_link">忘记密码</a>
</router-link>
</div>
<el-button
@ -93,7 +93,6 @@
</template>
<script>
import {JSEncrypt} from "jsencrypt"; //
export default {
name: "Login",
data() {
@ -114,11 +113,8 @@ export default {
}
};
return {
APP_URL: config.API_URL,
//
PUBLIC_KEY:
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsD1gI70BxYujhNw8NpaVKRXkcRofoeUbN9Dj5m3i3h9XAIS6LkjI01L4ieRpTHnMEzoXUY8a2/svDf//xuHuDJlZBNtCXK4DPx5x4zHdUWDjFGpWlMQzhsqQlfs0tkN5gP095g27L0ki/NrRuBpgxP1q2dHKpL37sBF8XNRpedwIDAQAB",
loginForm: {
code_url: config.CODE_URL,
loginForm: {
//form
username: "",
password: "",
@ -137,16 +133,16 @@ export default {
loading: false, //loading
pwdType: "password", //
codeSrc: "",
remember: false //
remember: false, //
randomNum:''
};
},
created() {
this._getCss("login", "login");
},
mounted() {
this.codeSrc =
this.APP_URL + "/api-login/common/verifycode?" + Math.random();
this.getKeysList();
this.randomNum = Math.random().toString().substring(0,13)
this.codeSrc = this.code_url + "/common/getVerificationCode/" + this.randomNum;
},
methods: {
//
@ -157,54 +153,41 @@ export default {
this.pwdType = "password";
}
},
//
passwordEncryption(password) {
const encryptor = new JSEncrypt();
encryptor.setPublicKey(this.PUBLIC_KEY);
const passwordEncryp = encryptor.encrypt(password);
return passwordEncryp;
},
//
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true;
const params = {
username:this.loginForm.username,
account:this.loginForm.username,
password:this.$md5(this.loginForm.password),
vercode:this.loginForm.vercode
t:this.randomNum,
verificationCode:this.loginForm.vercode
}
// this.$store
// .dispatch("Login", params)
// .then(data => {
// this.loading = false;
// this.$router.push({path: "/"});
// })
// .catch(() => {
// this.loading = false;
// this.refreshCode();
// });
this.$store
.dispatch("Login", params)
.then(data => {
this.loading = false;
this.$router.push({path: "/"});
})
.catch(() => {
this.loading = false;
this.refreshCode();
});
} else {
console.log("error submit!!");
return false;
}
});
},
getKeysList() {
// this.$store
// .dispatch("keyWords")
// .then(data => {
// })
// .catch(() => {
// });
},
//
refreshCode: function () {
this.randomNum = Math.random().toString().substring(0,13)
document
.getElementById("codePic")
.setAttribute(
"src",
this.APP_URL + "/api-login/common/verifycode?" + Math.random()
this.code_url + "/common/getVerificationCode/" + this.randomNum
);
}
}

417
src/views/login/register.vue

@ -7,8 +7,8 @@
<el-row>
<p class="tab-title">登录信息</p>
<el-col :span="11" >
<el-form-item label="用户名:" :label-width="formLabelWidth" prop="userName">
<el-input v-model="form.userName" auto-complete="new-password" size="small" placeholder="请输入用户名"></el-input>
<el-form-item label="用户名:" :label-width="formLabelWidth" prop="account">
<el-input v-model="form.account" auto-complete="new-password" size="small" placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item label="密码:" :label-width="formLabelWidth" prop="password">
<el-input type="password" v-model="form.password" auto-complete="new-password" size="small" placeholder="请输入密码"></el-input>
@ -16,8 +16,8 @@
<el-form-item :label-width="formLabelWidth">
<check-password-strong :sValue="form.password"></check-password-strong>
</el-form-item>
<el-form-item label="确认密码:" :label-width="formLabelWidth" prop="again">
<el-input type="password" v-model="form.again" autocomplete="off" size="small" placeholder="请再次输入密码"></el-input>
<el-form-item label="确认密码:" :label-width="formLabelWidth" prop="confirmPassword">
<el-input type="password" v-model="form.confirmPassword" autocomplete="off" size="small" placeholder="请再次输入密码"></el-input>
</el-form-item>
</el-col>
<el-col :span="2" style="height:1px;"></el-col>
@ -28,11 +28,11 @@
<el-form-item label="邮箱:" :label-width="formLabelWidth" prop="email">
<el-input v-model="form.email" autocomplete="off" size="small" placeholder="请输入邮箱"></el-input>
</el-form-item>
<el-form-item label="手机号:" :label-width="formLabelWidth" prop="telPhone" ref="telPhone">
<el-input v-model.number="form.telPhone" autocomplete="off" size="small" placeholder="请输入手机号"></el-input>
<el-form-item label="手机号:" :label-width="formLabelWidth" prop="phone" ref="phone">
<el-input v-model.number="form.phone" autocomplete="off" minlength="11" maxlength="11" size="small" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="验证码:" :label-width="formLabelWidth" prop="code">
<el-input v-model="form.code" autocomplete="off" size="small" style="width:180px;" placeholder="请输入验证码"></el-input>
<el-form-item label="验证码:" :label-width="formLabelWidth" prop="verificationCode">
<el-input v-model="form.verificationCode" autocomplete="off" minlength="4" maxlength="4" size="small" style="width:180px;" placeholder="请输入验证码"></el-input>
<img id="codePic" :src="codeSrc" alt="点击刷新" class="code-pic" @click="refreshCode"/>
<img :src="_getImage('login','refresh.png')" alt="点击刷新" class="code-refresh" @click="refreshCode" />
</el-form-item>
@ -42,24 +42,24 @@
<el-row>
<p class="tab-title">企业信息</p>
<el-col :span="11">
<el-form-item label="企业名称:" :label-width="formLabelWidth" prop="name">
<el-input v-model="form.name" autocomplete="off" placeholder="请输入企业名称"></el-input>
<el-form-item label="企业名称:" :label-width="formLabelWidth" prop="companyRegisterVo.name">
<el-input v-model="form.companyRegisterVo.name" autocomplete="off" placeholder="请输入企业名称"></el-input>
</el-form-item>
<el-form-item label="企业类型:" :label-width="formLabelWidth" prop="typeId">
<el-form-item label="企业类型:" :label-width="formLabelWidth" prop="companyRegisterVo.typeId">
<!-- 企业类型的下拉菜单 -->
<el-select v-model="form.typeId" placeholder="请选择企业类型">
<el-select v-model="form.companyRegisterVo.typeId" placeholder="请选择企业类型">
<el-option label="政府机关" :value="1"></el-option>
<el-option label="研究机构" :value="2"></el-option>
<el-option label="社会团体" :value="3"></el-option>
<el-option label="企事业单位" :value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="统一社会信用代码:" :label-width="formLabelWidth" prop="code">
<el-input v-model="form.code" autocomplete="off" placeholder="请输入统一社会信用代码"></el-input>
<el-form-item label="统一社会信用代码:" :label-width="formLabelWidth" prop="companyRegisterVo.code">
<el-input v-model="form.companyRegisterVo.code" autocomplete="off" placeholder="请输入统一社会信用代码"></el-input>
</el-form-item>
<el-form-item label="法人证件类型:" :label-width="formLabelWidth" prop="ceId">
<el-form-item label="法人证件类型:" :label-width="formLabelWidth" prop="companyRegisterVo.ceId">
<!-- 法人证件类型的下拉菜单 -->
<el-select v-model="form.ceId" placeholder="请选择法人证件类型">
<el-select v-model="form.companyRegisterVo.ceId" placeholder="请选择法人证件类型">
<el-option label="中国居民身份证" :value="1"></el-option>
<el-option label="港澳居民往来内地通行证" :value="2"></el-option>
<el-option label="台湾居民往来大陆通行证" :value="3"></el-option>
@ -68,16 +68,16 @@
<el-option label="护照" :value="6"></el-option>
</el-select>
</el-form-item>
<el-form-item label="法人证件号码:" :label-width="formLabelWidth" prop="enCeNumber">
<el-input v-model="form.enCeNumber" autocomplete="off" placeholder="请输入法人证件号码"></el-input>
<el-form-item label="法人证件号码:" :label-width="formLabelWidth" prop="companyRegisterVo.enCeNumber">
<el-input v-model="form.companyRegisterVo.enCeNumber" autocomplete="off" placeholder="请输入法人证件号码"></el-input>
</el-form-item>
</el-col>
<el-col :span="2" style="height:1px;"></el-col>
<el-col :span="11">
<el-form-item label="所属行业:" :label-width="formLabelWidth" prop="inBigId">
<el-form-item label="所属行业:" :label-width="formLabelWidth" prop="companyRegisterVo.inBigId">
<!-- 行业大类的下拉菜单 -->
<el-select
v-model="form.inBigId"
v-model="form.companyRegisterVo.inBigId"
placeholder="行业大类"
style="width:calc(50% - 10px);margin-right: 20px;"
@change="changeSmallIndustry(true)"
@ -86,12 +86,12 @@
v-for="(item,index) in bigIndustryType"
:key="index"
:label="item.name"
:value="item.id"
:value="item.value"
></el-option>
</el-select>
<!-- 行业小类的下拉菜单 -->
<el-select
v-model="form.inSmallId"
v-model="form.companyRegisterVo.inSmallId"
placeholder="行业小类"
style="width:calc(50% - 10px);"
>
@ -99,18 +99,20 @@
v-for="(item,index) in smallIndustryType"
:key="index"
:label="item.name"
:value="item.id"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="法人姓名:" :label-width="formLabelWidth" prop="enLegalName">
<el-input v-model="form.enLegalName" autocomplete="off" placeholder="请输入法人姓名"></el-input>
<el-form-item label="法人姓名:" :label-width="formLabelWidth" prop="companyRegisterVo.enLegalName">
<el-input v-model="form.companyRegisterVo.enLegalName" autocomplete="off" placeholder="请输入法人姓名"></el-input>
</el-form-item>
<el-form-item label="法人证件:" :label-width="formLabelWidth" prop="enCeAddressZ">
<el-form-item label="法人证件:" :label-width="formLabelWidth" prop="companyRegisterVo.enCeAddressZ">
<div class="flex-box">
<el-upload
class="avatar-uploader flex-1"
:action="upload_file"
:headers="upload_headers"
:data="upload_data"
:show-file-list="false"
:on-success="handlePhotoSuccess"
:before-upload="beforeAvatarUpload"
@ -121,6 +123,8 @@
<el-upload
class="avatar-uploader flex-1"
:action="upload_file"
:headers="upload_headers"
:data="upload_data"
:show-file-list="false"
:on-success="handleReverseSuccess"
:before-upload="beforeAvatarUpload"
@ -129,82 +133,84 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
<el-form-item label-width="150px" prop="enCeAddressF"></el-form-item>
<el-form-item label-width="150px" prop="companyRegisterVo.enCeAddressF"></el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="企业简介:" :label-width="formLabelWidth" prop="enIntroduction">
<el-form-item label="企业简介:" :label-width="formLabelWidth" prop="companyRegisterVo.enIntroduction">
<!-- <el-input v-model="form.enIntroduction" autocomplete="off"></el-input> -->
<el-input type="textarea" v-model="form.enIntroduction" placeholder="请输入企业简介"></el-input>
<el-input type="textarea" v-model="form.companyRegisterVo.enIntroduction" placeholder="请输入企业简介"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="组织/单位注册所在地:" :label-width="formLabelWidth" prop="areaId">
<el-form-item label="组织/单位注册所在地:" :label-width="formLabelWidth" prop="companyRegisterVo.areaId">
<!-- <v-distpicker @selected="onSelected" class="my-distpicker"></v-distpicker> -->
<el-select
v-model="form.provinceId"
v-model="form.companyRegisterVo.provinceId"
placeholder="省"
style="width:calc(33.3% - 7px);margin-right:10px;"
@change="changeArea(form.provinceId,1,true)"
@change="changeArea(form.companyRegisterVo.provinceId,1,true)"
>
<el-option
v-for="(item,index) in provinces"
:key="index"
:label="item.name"
:value="item.id"
:value="parseInt(item.value)"
></el-option>
</el-select>
<el-select
v-model="form.cityId"
v-model="form.companyRegisterVo.cityId"
placeholder="市"
style="width:calc(33.3% - 7px);margin-right:10px;"
@change="changeArea(form.cityId,2,true)"
@change="changeArea(form.companyRegisterVo.cityId,2,true)"
>
<el-option
v-for="(item,index) in citys"
:key="index"
:label="item.name"
:value="item.id"
:value="parseInt(item.value)"
></el-option>
</el-select>
<el-select v-model="form.areaId" placeholder="区" style="width:calc(33.3% - 7px);">
<el-select v-model="form.companyRegisterVo.areaId" placeholder="区" style="width:calc(33.3% - 7px);">
<el-option
v-for="(item,index) in areas"
:key="index"
:label="item.name"
:value="item.id"
:value="parseInt(item.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="官方网址:" :label-width="formLabelWidth" prop="enOffWeb">
<el-input v-model="form.enOffWeb" autocomplete="off" placeholder="请输入官方网址"></el-input>
<el-form-item label="官方网址:" :label-width="formLabelWidth" prop="companyRegisterVo.enOffWeb">
<el-input v-model="form.companyRegisterVo.enOffWeb" autocomplete="off" placeholder="请输入官方网址"></el-input>
</el-form-item>
<el-form-item label="联系人姓名:" :label-width="formLabelWidth" prop="conName">
<el-input v-model="form.conName" autocomplete="off" placeholder="请输入联系人姓名"></el-input>
<el-form-item label="联系人姓名:" :label-width="formLabelWidth" prop="companyRegisterVo.conName">
<el-input v-model="form.companyRegisterVo.conName" autocomplete="off" placeholder="请输入联系人姓名"></el-input>
</el-form-item>
<el-form-item label="联系人电话:" :label-width="formLabelWidth" prop="telPhone">
<el-input v-model="form.telPhone" autocomplete="off" placeholder="请输入联系人电话"></el-input>
<el-form-item label="联系人电话:" :label-width="formLabelWidth" prop="companyRegisterVo.phone">
<el-input v-model="form.companyRegisterVo.phone" autocomplete="off" minlength="11" maxlength="11" placeholder="请输入联系人电话"></el-input>
</el-form-item>
<el-form-item label="联系人邮箱:" :label-width="formLabelWidth" prop="email">
<el-input v-model="form.email" autocomplete="off" placeholder="请输入联系人邮箱"></el-input>
<el-form-item label="联系人邮箱:" :label-width="formLabelWidth" prop="companyRegisterVo.email">
<el-input v-model="form.companyRegisterVo.email" autocomplete="off" placeholder="请输入联系人邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="2" style="height:1px;"></el-col>
<el-col :span="11">
<el-form-item label="注册详细地址:" :label-width="formLabelWidth" prop="enDetAddress">
<el-input v-model="form.enDetAddress" autocomplete="off" placeholder="请输入注册详细地址"></el-input>
<el-form-item label="注册详细地址:" :label-width="formLabelWidth" prop="companyRegisterVo.enDetAddress">
<el-input v-model="form.companyRegisterVo.enDetAddress" autocomplete="off" placeholder="请输入注册详细地址"></el-input>
</el-form-item>
<el-form-item label="组织/单位营业执照:" :label-width="formLabelWidth" prop="enOpeAddress">
<el-form-item label="组织/单位营业执照:" :label-width="formLabelWidth" prop="companyRegisterVo.enOpeAddress">
<div class="flex-box">
<el-upload
class="avatar-uploader"
:action="upload_file"
:headers="upload_headers"
:data="upload_data"
:show-file-list="false"
:on-success="handleLicenceSuccess"
:before-upload="beforeAvatarUpload"
@ -216,8 +222,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item :label-width="formLabelWidth" style="text-align: center;">
<el-button type="primary" size="small" @click="submitForm('userInfo')" style="width:200px;text-align: center;">注册</el-button>
@ -234,8 +238,10 @@
<script>
import CheckPasswordStrong from '@/components/CheckPasswordStrong';
import {sendMessage, registerUser} from "@/api/login"
import {registerUser,existsUserName} from "@/api/login"
import { getToken } from '@/utils/auth'
import {validateEmail, validatePhone, validateIDCard, validateChinese,validateURL} from "@/utils/validate"
import { getBigIndustryList,getSmallIndustryList,getArea } from "@/api/company";
export default {
name: 'register',
components: {
@ -249,12 +255,93 @@ export default {
callback()
}
};
const checkIsUserdUser = (rule, value, callback) => {
if (validateChinese(value)) {
return callback(new Error('用户名不可为中文'));
} else {
if (!this.isEdit) {
existsUserName({account: this.form.account}).then(res => {
callback()
}).catch(err => {
return callback(new Error(err.message));
})
} else {
callback()
}
}
};
const checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
if (validatePhone(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
}
}
}
const checkEmail = (rule, value, callback) => {
if (!validateEmail(value)) {
return callback(new Error('请输入正确格式的Email'));
} else {
callback();
}
}
const checkIDNum = (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入身份证件号码'));
} else if (this.form.typeId == 1 && !validateIDCard(value)) {
return callback(new Error('请输入正确格式的身份证件号码'));
} else {
callback();
}
}
//
const checkPhotoZ = (rule, value, callback) => {
if ("" == value || !value) {
return callback(new Error("请上传正面法人证件照"));
} else {
callback();
}
};
//
const checkPhotoF = (rule, value, callback) => {
if ("" == value || !value) {
return callback(new Error("请上传反面法人证件照"));
} else {
callback();
}
};
//
const checkPhotoOpe = (rule, value, callback) => {
if ("" == value || !value) {
return callback(new Error("请上传营业执照"));
} else {
callback();
}
};
//
const checkURL = (rule, value, callback) => {
if (value && !validateURL(value)) {
return callback(new Error("请输入正确格式的网址"));
} else {
callback();
}
};
return {
sendStatus: false,
timer: 60,
code_url: config.CODE_URL,
codeSrc: '',
formLabelWidth: '160px',
upload_file: config.UPLOAD_URL, //
upload_headers:{
powerToken: '800580795f01449f9100c4d2983d13c9'
},
upload_data:{
uploadType:'1',
suffixType:'8',
folder:'company'
},
bigIndustryType: [], //
smallIndustryType: [], //
photoUrl: "", //
@ -268,85 +355,187 @@ export default {
areas: [], //-
form: {
name: '',
userName: '',
account: '',
password: '',
again: '',
confirmPassword: '',
email: '',
telPhone: '',
// code:'',
code: ''
phone: '',
verificationCode: '',
t:'',
"companyRegisterVo": {
"areaId": "",
"areaName": "",
"ceId": "",
"cityId": "",
"cityName": "",
"code": "",
"conName": "",
"email": "",
"enCeAddressF": "",
"enCeAddressZ": "",
"enCeNumber": "",
"enDetAddress": "",
"enIntroduction": "",
"enLegalName": "",
"enOffWeb": "",
"enOpeAddress": "",
"inBigId": "",
"inSmallId": "",
"name": "",
"phone": "",
"provinceId": "",
"provinceName": "",
"typeId": ""
},
},
rules: {
name: [
{required: true, message: '请输入姓名', trigger: 'blur'}
],
userName: [
{required: true, message: '请输入用户名', trigger: 'blur'}
account: [
{required: true, message: '请输入用户名', trigger: 'blur'},
{validator: checkIsUserdUser, trigger: 'blur'}
],
password: [
{required: true, message: '请输入新密码', trigger: 'blur'},
{min: 8, max: 12, message: '长度在 8 到 12 个字符', trigger: 'blur'}
],
again: [
confirmPassword: [
{required: true, message: '请再次输入新密码', trigger: 'blur'},
{validator: checkAgainPassword, trigger: 'blur'}
],
email: [
{required: true, message: '请输入邮箱', trigger: 'blur'}
{required: true, message: '请输入邮箱', trigger: 'blur'},
{validator: checkEmail, trigger: 'blur'}
],
telPhone: [
{required: true, message: '请输入手机号', trigger: 'blur'}
phone: [
{required: true, validator: checkPhone, trigger: 'blur'}
],
// code: [
// { required: true, message: '', trigger: 'blur' }
// ],
code: [
{required: true, message: '请输入短信验证码', trigger: 'blur'}
]
verificationCode: [
{ required: true, message: '请输入验证码', trigger: 'blur' }
],
companyRegisterVo:{
name: [{required: true, message: "请输入企业名称", trigger: "blur"}],
code: [
{required: true, message: "请输入统一社会信用代码", trigger: "blur"}
],
typeId: [
{required: true, message: "请选择企业类型", trigger: "click"}
],
inBigId: [
//
{required: true, message: "请选择行业类型", trigger: "click "}
],
enLegalName: [
{required: true, message: "请输入法人姓名", trigger: "blur"}
],
ceId: [
{required: true, message: "请选择法人证件类型", trigger: "click"}
],
enCeNumber: [
{required: true, message: "请输入法人证件号码", trigger: "blur"}
// { type: 'number', message: ''}
],
enIntroduction: [
{required: true, message: "请输入企业简介", trigger: "blur"}
],
enDetAddress: [
{required: true, message: "请输入注册地详细地址", trigger: "blur"}
],
enOffWeb: [{validator: checkURL, trigger: "blur"}],
enCeAddressZ: [
{required: true, validator: checkPhotoZ, trigger: "blur"}
],
enCeAddressF: [
{required: true, validator: checkPhotoF, trigger: "blur"}
],
enOpeAddress: [
{required: true, validator: checkPhotoOpe, trigger: "blur"}
],
conName: [
{required: true, message: "请输入联系人姓名", trigger: "blur"}
],
phone: [{required: true, validator: checkPhone, trigger: "blur"}],
email: [{required: true, validator: checkEmail, trigger: "blur"}],
areaId: [
{required: true, message: "请选择注册区域", trigger: "change"}
]
}
},
}
},
mounted() {
this.codeSrc = config.API_URL+"/api-login/common/verifycode?" + Math.random()
this.form.t = Math.random().toString().substring(0,13)
this.codeSrc = this.code_url + "/common/getVerificationCode/" + this.form.t;
this.initData()
},
methods: {
goLogin() {
this.$router.push({name: 'login'})
},
refreshCode:function(){
document.getElementById("codePic").setAttribute("src",config.API_URL+"/api-login/common/verifycode?" + Math.random())
//
initData() {
//
getBigIndustryList().then(res => {
this.bigIndustryType = res.data;
});
this.changeArea("0", 0);
},
getSendMessage() {
this.$refs['userInfo'].validateField('telPhone', (valid) => {
if (valid) {
console.log('telPhone error');
return false;
} else {
sendMessage({telPhone: this.form.telPhone}).then(res => {
this.$message({
message: res.msg,
type: 'success'
});
this.timer = 60
this.sendStatus = true
var flag = setInterval(() => {
if (this.timer == 0) {
clearInterval(flag)
this.sendStatus = false
} else {
this.timer--
}
}, 1000)
})
//
changeArea(pid, type, clean) {
getArea(pid).then(res => {
if (type == 0) {
this.provinces = res.data;
} else if (type == 1) {
if (clean) {
this.form.companyRegisterVo.cityId = "";
this.form.companyRegisterVo.areaId = "";
}
this.citys = res.data;
} else if (type == 2) {
if (clean) {
this.form.companyRegisterVo.areaId = "";
}
this.areas = res.data;
}
});
},
goLogin() {
this.$router.push({name: 'login'})
},
//
refreshCode: function () {
this.form.t = Math.random().toString().substring(0,13)
document
.getElementById("codePic")
.setAttribute(
"src",
this.code_url + "/common/getVerificationCode/" + this.form.t
);
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let temp1 = this.provinces.filter(item => {
if(item.value == this.form.companyRegisterVo.provinceId)
return item
})
this.form.provinceName = temp1[0].name
let temp2 = this.citys.filter(item => {
if(item.value == this.form.companyRegisterVo.cityId)
return item
})
this.form.cityName = temp2[0].name
let temp3 = this.areas.filter(item => {
if(item.value == this.form.companyRegisterVo.areaId)
return item
})
this.form.areaName = temp3[0].name
let param = JSON.parse(JSON.stringify(this.form))
param.password = this.$md5(param.password)
param.confirmPassword = this.$md5(param.confirmPassword)
registerUser(this.form).then(res => {
console.log(res);
this.$message({
message: '注册成功!',
type: 'success'
@ -365,27 +554,27 @@ export default {
},
//
changeSmallIndustry(clean) {
// if (clean) {
// this.formData.inSmallId = "";
// }
// getSmallIndustryList({pid: this.formData.inBigId}).then(res => {
// this.smallIndustryType = res.data;
// });
if (clean) {
this.form.companyRegisterVo.inSmallId = "";
}
getSmallIndustryList(this.form.companyRegisterVo.inBigId).then(res => {
this.smallIndustryType = res.data;
});
},
///
handleLicenceSuccess(res, file) {
// this.businessLicenceUrl = URL.createObjectURL(file.raw);
// this.formData.enOpeAddress = res;
this.businessLicenceUrl = URL.createObjectURL(file.raw);
this.form.companyRegisterVo.enOpeAddress = res.data;
},
//
handlePhotoSuccess(res, file) {
// this.photoUrl = URL.createObjectURL(file.raw);
// this.formData.enCeAddressZ = res;
this.photoUrl = URL.createObjectURL(file.raw);
this.form.companyRegisterVo.enCeAddressZ = res.data;
},
//
handleReverseSuccess(res, file) {
// this.reversePhotoUrl = URL.createObjectURL(file.raw);
// this.formData.enCeAddressF = res;
this.reversePhotoUrl = URL.createObjectURL(file.raw);
this.form.companyRegisterVo.enCeAddressF = res.data;
},
//
beforeAvatarUpload(file) {

392
src/views/login/retrievePassword.vue

@ -1,286 +1,208 @@
<template>
<div class="app-container">
<div class="app-main">
<div class="content-block">
<el-steps
:space="180"
:active="stepActive"
finish-status="process"
process-status="wait"
align-center
>
<el-step title="输入账号"></el-step>
<el-step title="安全验证"></el-step>
<el-step title="重置密码"></el-step>
<el-step title="成功"></el-step>
</el-steps>
<div class="flex-box">
<div class="step-block">
<el-form :model="step0" :rules="step0Rules" ref="step0" v-show="stepActive == 1">
<el-form-item label="账号:" :label-width="formLabelWidth" prop="username">
<el-input v-model="step0.username" autocomplete="off" size="small"></el-input>
</el-form-item>
<el-form-item :label-width="formLabelWidth">
<el-button
type="danger"
size="small"
style="width:250px;"
@click="submitForm('step0')"
>下一步</el-button>
</el-form-item>
</el-form>
<el-form :model="step1" :rules="step1Rules" ref="step1" v-show="stepActive == 2">
<el-form-item label="手机号:" :label-width="formLabelWidth">
<span>{{step1.telPhone}}</span>
</el-form-item>
<!-- <el-form-item label="验证码:" :label-width="formLabelWidth" prop="tcode">
<el-input v-model="step1.tcode" autocomplete="off" size="small" style="width:110px;"></el-input>
<img id="codePic" :src="codeSrc" alt="点击刷新" class="code-pic">
<img src="../../assets/login/refresh.png" alt="点击刷新" class="code-refresh" @click="refreshCode">
</el-form-item>-->
<el-form-item label="短信验证码:" :label-width="formLabelWidth" prop="code">
<el-input
v-model.number="step1.code"
autocomplete="off"
size="small"
style="width:110px;margin-right:5px;"
></el-input>
<!-- <el-button type="danger" size="small ">获取验证码</el-button> -->
<el-button
type="danger"
style="width:100px;"
size="small"
@click="getSendMessage"
:disabled="sendStatus"
>{{!sendStatus?'获取验证码':codeTimer+'秒'}}</el-button>
</el-form-item>
<el-form-item :label-width="formLabelWidth">
<el-button
type="danger"
size="small"
style="width:250px;"
@click="submitForm('step1')"
>下一步</el-button>
</el-form-item>
</el-form>
<el-form :model="step2" :rules="step2Rules" ref="step2" v-show="stepActive == 3">
<el-form-item label="手机号:" :label-width="formLabelWidth">
<span>{{step2.telPhone}}</span>
</el-form-item>
<el-form-item label="新密码:" :label-width="formLabelWidth" prop="newPass">
<el-input type="password" v-model="step2.newPass" autocomplete="off" size="small"></el-input>
</el-form-item>
<el-form-item label="确认新密码:" :label-width="formLabelWidth" prop="again">
<el-input type="password" v-model="step2.again" autocomplete="off" size="small"></el-input>
</el-form-item>
<el-form-item :label-width="formLabelWidth">
<el-button
type="danger"
size="small"
style="width:250px;"
@click="submitForm('step2')"
>下一步</el-button>
</el-form-item>
</el-form>
<div class="flex-box-column" v-show="stepActive == 4">
<i class="el-icon-success my-success"></i>
<p class="font-size-21 font-weight-bold text-center fontSize1">恭喜您密码修改成功</p>
<span class="font-size-13 text-center">
{{timer}}秒后自动跳回登录页面
<el-link :underline="false" type="primary" @click="goLogin">立即登录</el-link>
</span>
<div class="app-container">
<div class="app-main">
<div class="content-block">
<h1>密码找回</h1>
<el-divider></el-divider>
<el-form :model="form" :rules="rules" ref="ruleForm">
<el-form-item label="用户名:" :label-width="formLabelWidth" prop="account">
<el-input type="text" v-model="form.account" auto-complete="new-password" placeholder="请输入用户名(必填)"></el-input>
</el-form-item>
<el-form-item label="电话:" :label-width="formLabelWidth" prop="phone">
<el-input v-model.number="form.phone" autocomplete="off" minlength="11" maxlength="11"
placeholder="请输入电话号码(必填)"></el-input>
</el-form-item>
<el-form-item label="邮箱:" :label-width="formLabelWidth" prop="email">
<el-input v-model="form.email" autocomplete="off" placeholder="请输入邮箱(必填)"></el-input>
</el-form-item>
<el-form-item label="新密码:" :label-width="formLabelWidth" prop="newPassword">
<el-input type="password" v-model="form.newPassword" auto-complete="new-password" placeholder="请输入新密码(必填)"></el-input>
</el-form-item>
<el-form-item label="确认新密码:" :label-width="formLabelWidth" prop="confirmPassword">
<el-input type="password" v-model="form.confirmPassword" autocomplete="off" placeholder="请再次输入新密码(必填)"></el-input>
</el-form-item>
<el-form-item label="验证码" :label-width="formLabelWidth" prop="verificationCode">
<el-row>
<el-col :span="12">
<el-input
v-model="form.verificationCode"
name="vercode"
type="text"
auto-complete="off"
minlength="4"
maxlength="4"
placeholder="请输入验证码"
@keyup.enter.native="handleLogin"
/>
</el-col>
<el-col :span="12">
<img id="codePic" :src="codeSrc" alt="点击刷新" class="code-pic" @click="refreshCode"/>
<img
:src="_getImage('login','refresh.png')"
alt="点击刷新"
class="code-refresh"
@click="refreshCode"
/>
</el-col>
</el-row>
</el-form-item>
<div class="text-center">
<el-button type="danger" size="mini" @click="submitForm('ruleForm')">保存</el-button>
<el-button type="info" size="mini" @click="resetForm('ruleForm')">重置</el-button>
</div>
</el-form>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {
userToTelphone,
sendMessage,
smsVerification,
setUpPassword
} from "@/api/login";
import {validateEmail, validatePhone, validateChinese} from "@/utils/validate"
export default {
name: "retrievePassword",
data() {
const checkAgainPassword = (rule, value, callback) => {
if (value != this.step2.newPass) {
return callback(new Error("两次输入密码不一致"));
} else {
callback();
}
};
name: "retrievePassword",
data() {
const checkAgainPassword = (rule, value, callback) => {
if (value != this.step2.newPass) {
return callback(new Error("两次输入密码不一致"));
} else {
callback();
}
};
const checkIsUserdUser = (rule, value, callback) => {
if (validateChinese(value)) {
return callback(new Error('用户名不可为中文'));
} else {
callback()
}
};
const checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
if (validatePhone(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
}
}
}
const checkEmail = (rule, value, callback) => {
if (!validateEmail(value)) {
return callback(new Error('请输入正确格式的Email'));
} else {
callback();
}
}
return {
timer: 10, //
tagTimer: null, //
stepActive: 1, //
formLabelWidth: "120px", //formlable
codeSrc: "", //
step0: {
//1
username: ""
},
step0Rules: {
//1
username: [{ required: true, message: "请输入账号", trigger: "blur" }]
},
step1: {
//2
telPhone: "",
// tcode:'',
code: null
},
step1Rules: {
//2
// tcode: [
// { required: true, message: '', trigger: 'blur' }
// ],
code: [{ required: true, message: "请输入短信验证码", trigger: "blur" }]
},
step2: {
//3
telPhone: "",
newPass: "",
again: ""
},
step2Rules: {
//3
newPass: [
{ required: true, message: "请输入新密码", trigger: "blur" },
{ min: 8, max: 12, message: "长度在 8 到 12 个字符", trigger: "blur" }
],
again: [
{ required: true, message: "请再次输入新密码", trigger: "blur" },
{ validator: checkAgainPassword, trigger: "blur" }
]
},
sendStatus: false,
codeTimer: 60
};
code_url: config.CODE_URL,
formLabelWidth: '150px',
form:{
account:'',
email:'',
phone:'',
newPassword:'',
confirmPassword:'',
verificationCode:'',
t:''
},
rules: { //
account: [
{required: true, message: '请输入用户名', trigger: 'blur'},
{validator: checkIsUserdUser, trigger: 'blur'}
],
phone: [
{required: true, validator: checkPhone, trigger: 'blur'}
],
email: [
{required: true, message: '请填写邮箱', trigger: 'blur'},
{validator: checkEmail, trigger: 'blur'}
],
newPassword: [
{required: true, message: '请输入新密码', trigger: 'blur'},
{min: 8, max: 12, message: '长度在 8 到 12 个字符', trigger: 'blur'}
],
confirmPassword: [
{required: true, message: '请再次输入新密码', trigger: 'blur'},
{validator: checkAgainPassword, trigger: 'blur'}
],
verificationCode: [
{required: true, message: '请填写验证码', trigger: 'blur'},
],
},
codeSrc:''
}
},
mounted() {
// this.codeSrc = config.API_URL+"/api-login/common/verifycode?" + Math.random()
this.form.t = Math.random().toString().substring(0,13)
this.codeSrc = this.code_url + "/common/getVerificationCode/" + this.form.t;
},
methods: {
//
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
if (formName == "step0") {
userToTelphone({ userName: this.step0.username }).then(res => {
this.step1.telPhone = res.data;
this.step2.telPhone = res.data;
this.stepActive++;
});
} else if (formName == "step1") {
smsVerification(this.step1).then(res => {
this.stepActive++;
});
} else if (formName == "step2") {
const param = {
userName: this.step0.username,
password: this.step2.newPass,
telPhone: this.step2.telPhone,
code: this.step1.code
};
setUpPassword(param).then(res => {
this.stepActive++;
this.startTimer();
});
}
setUpPassword(this.form).then(res => {
console.log(res);
this.$message({
message: res.message,
type: "success"
});
this.$router.push({path:'/'})
})
} else {
console.log("error submit!!");
return false;
}
});
},
getSendMessage() {
sendMessage({ telPhone: this.step1.telPhone }).then(res => {
this.$message({
message: res.msg,
type: "success"
});
this.codeTimer = 60;
this.sendStatus = true;
var flag = setInterval(() => {
if (this.codeTimer == 0) {
clearInterval(flag);
this.sendStatus = false;
} else {
this.codeTimer--;
}
}, 1000);
});
},
//
startTimer() {
this.timer = 10;
this.tagTimer = setInterval(() => {
if (this.timer == 0) {
this.goLogin();
} else {
this.timer--;
}
}, 1000);
},
//
goLogin() {
clearInterval(this.tagTimer);
this.$router.push({ name: "login" });
//form
resetForm(formName) {
this.$refs[formName].resetFields();
},
//
refreshCode: function() {
refreshCode: function () {
this.form.t = Math.random().toString().substring(0,13)
document
.getElementById("codePic")
.setAttribute(
"src",
config.API_URL + "/api-login/common/verifycode?" + Math.random()
);
.getElementById("codePic")
.setAttribute(
"src",
this.code_url + "/common/getVerificationCode/" + this.form.t
);
}
}
};
</script>
<style lang="scss" scoped>
.content-block {
height: calc(100vh - 469px);
min-height: 300px;
padding: 50px;
// padding: 50px;
}
.el-steps {
justify-content: center;
.el-form {
margin: 50px auto;
width: 500px;
}
.step-block {
// width: 500px;
padding: 80px 50px;
}
.code-refresh {
position: absolute;
// right: 2px;
right: 10px;
top: 10px;
width: 25px;
height: 20px;
width: 30px;
height: 25spx;
cursor: pointer;
}
.code-pic {
margin: 0 5px;
border: 1px solid rgba(220, 220, 220, 1);
border-radius: 3px;
width: 90px;
height: 32px;
width: 120px;
height: 40px;
vertical-align: middle;
// cursor: pointer;
}
.my-success {
font-size: 80px;
color: #20c05c;
}
.fontSize1 {
margin: 30px 0;
}
</style>

146
src/views/meeting/news.vue

@ -0,0 +1,146 @@
<template>
<div class="app-container">
<img class="banner-bg" :src="_getImage('互联网大会','top-banner.jpg')"/>
<br><br><br>
<span class="title">大会新闻</span>
<el-divider></el-divider>
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,4)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;"><span style="color:#01496E;"></span>{{item.title}}</p>
</div>
<span class="text-date">{{item.issueStartTime}}</span>
</div>
<el-pagination
layout="prev, pager, next"
:current-page.sync="currentPage"
:page-size="10"
:total="total">
</el-pagination>
</div>
</template>
<script>
import {getNoticeList} from "@/api/notice"
export default {
name: "newsMeeting",
data() {
return {
noticeList:[],
currentPage:1,
total:0
};
},
mounted() {
this.initData()
},
methods:{
initData(){
let params = {
"pageNum": this.currentPage,
"pageSize": 10,
"search": {
"type": "DHXW"
},
"sort": ""
}
getNoticeList(params).then(res => {
console.log(res);
this.noticeList = res.data.list
this.total = res.data.count
})
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.banner-bg {
position: relative;
width: 100%;
}
.title {
position: relative;
color: #1e50ae;
font-size: 18px;
padding: 0 10px;
font-weight: bold;
font-family: 微软雅黑;
&::before {
content: " ";
position: absolute;
left: 0;
bottom: -25px;
width: 100%;
height: 4px;
background: #1e50ae;
}
}
.notice-list {
position: relative;
background-color: rgba(255,255,255,0);
cursor: pointer;
color: #999999;
font-family:PingFang SC;
border-bottom: 1px dotted #dcdcdc;
margin: 10px 30px;
.date-block {
position: relative;
display: inline-block;
vertical-align: top;
width: 67px;
height: 67px;
margin: 10px 10px 10px 0;
padding: 13px 0;
background-color: #E4E4E4;
}
.content-block {
position: relative;
display: inline-block;
width: calc(100% - 90px);
height: 46px;
padding: 0 15px;
&::before {
content: " ";
position: absolute;
top: 28%;
left: -10px;
width: 6px;
height: 6px;
background: #8D8D8D;
border-radius: 50%;
}
}
.content-block-first {
position: relative;
display: inline-block;
width: calc(100% - 90px);
height: 103px;
padding: 0 15px;
}
.text-date {
text-align: center;
font-size: 14px;
vertical-align: super;
}
.text-title {
font-size: 18px;
margin: 6px 0;
font-weight:500;
color: #666666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-content {
font-size: 14px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
}
&:hover {
.text-title {
color: #3893c7;
}
}
}
</style>

128
src/views/notice/noticeShow.vue

@ -0,0 +1,128 @@
<template>
<div>
<banner></banner>
<div class="content">
<div class="app-container">
<h2 class="text-center">{{noticeTitle}}</h2>
<p v-if="source" class="text-center font-size-13"><br>
<span style="margin-right:30px;">发布于{{issueStartTime}}</span>来源
<span style="color:#8a8a8a;">{{source}}</span>
</p>
<el-divider></el-divider>
<p class="ql-editor" v-html="content"></p>
</div>
</div>
</div>
</template>
<script>
import banner from '@/components/banner';
import {getNoticeInfo,getNoticeList} from "@/api/notice"
import 'quill/dist/quill.snow.css'
export default {
name:"noticeShow",
data(){
return {
ID: this.$route.query.id || '',
content:``,
// title:this.$route.query.title || '',
noticeTitle:'',
source:'',
issueStartTime:''
}
},
components: {
banner
},
watch:{
'$route'(to,from){
this.resetDara()
this.initData()
}
},
mounted(){
this.initData()
},
methods:{
//id
initData() {
if(this.ID)
{
let params = {
"pageNum": 1,
"pageSize": 1,
"search": {
"type": this.ID
},
"sort": ""
}
getNoticeList(params).then(res => {
if(res.data && res.data.list.length > 0)
{
getNoticeInfo(res.data.list[0].id).then(res => {
if (res.data) {
this.content = res.data.content
this.noticeTitle = res.data.title
this.source = res.data.source
this.issueStartTime = res.data.issueStartTime
}
})
}
})
}
},
resetDara(){
this.ID = this.$route.query.id || '',
this.content = ``,
// this.title = this.$route.query.title || '',
this.noticeTitle = '',
this.source = ''
this.issueStartTime = ""
}
}
}
</script>
<style lang="scss" scoped>
.banner {
position: relative;
.banner-bg {
width: 100%;
}
.banner-content {
position: absolute;
width: 1200px;
height: 50px;
left: 50%;
transform: translateX(-50%);
bottom: 100px;
background: transparent;
color: #fff;
font-size: 30px;
font-weight: 600;
}
.banner-title {
position: relative;
&::before {
content: " ";
position: absolute;
left: 0;
bottom: -10px;
width: 50px;
height: 4px;
background: #fff;
transition: All 0.3s ease-in-out;
}
&:hover {
&::before {
width: 100%;
}
}
}
}
.content {
position: relative;
min-height: 500px;
background: #dddddd91;
}
</style>

31
src/views/noticeShow.vue

@ -1,31 +0,0 @@
<template>
<div class="app-container">
<p class="ql-editor" v-html="content"></p>
</div>
</template>
<script>
import {getNoticeInfo} from "@/api/notice"
import 'quill/dist/quill.snow.css'
export default {
name:"noticeShow",
data(){
return {
ID: this.$route.query.id || '',
content:``
}
},
mounted(){
this.initData()
},
methods:{
//id
initData() {
getNoticeInfo(this.ID).then(res => {
if (res.data) {
this.content = res.data.content
}
})
},
}
}
</script>

87
src/views/public/platform.vue

@ -0,0 +1,87 @@
<template>
<div class="app-container">
<p class="title">平台</p>
<div class="platform-box platform-bg-1">
<a class="title-1" style="z-index:1000;" target="_blank" href="http://wwww.ftiia.com/">食品行业工业互联网标识解析二级节点</a>
</div>
<div class="platform-box platform-bg-2">
<a class="title-1" style="z-index:1000;" target="_blank" href="">食品工业智能制造平台</a>
</div>
<div class="platform-box platform-bg-1">
<a class="title-1" style="z-index:1000;" target="_blank" href="http://platform.ftiia.com/">工业互联网公共服务平台</a>
</div>
</div>
</template>
<script>
export default {
name: "platform",
data() {
return {
};
},
mounted() {
},
methods:{
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.title {
position: relative;
height: 60px;
cursor: default;
line-height: 60px;
margin: 15px 0;
font-size: 28px;
color: #000;
}
.title-1 {
position: relative;
display: inline-block;
cursor: pointer;
height: 60px;
line-height: 60px;
margin: 15px 0;
font-size: 24px;
// color: #fff;
}
.platform-box {
position: relative;
display: inline-block;
cursor: pointer;
vertical-align: top;
width: 320px;
height: 330px;
margin-right: 20px;
padding: 15px 40px;
color: #fff;
&:last-child {
margin-right: 0;
}
&:after {
content: " ";
position: absolute;
left: 0;
top: 0;
width: 0;
height: 100%;
background: rgba(0,0,0,0.5);
transition:none;
// z-index: 5;
}
&:hover {
&:after {
width: 100%;
transition: All 0.3s ease-in-out;
}
}
}
.platform-bg-1 {
background: url('../../assets/public/platform-1.jpg') no-repeat;
background-size: 100% 100%;
}
.platform-bg-2 {
background: url('../../assets/public/platform-2.jpg') no-repeat;
background-size: 100% 100%;
}
</style>

114
src/views/search/index.vue

@ -0,0 +1,114 @@
<template>
<div class="app-container">
<div class="app-main">
<p class="font-size-24 font-weight-bold line-height-2em">查询结果</p>
<el-divider></el-divider>
<div class="notice-list" v-for="(item,index) in noticeList.slice(0,10)" :key="index">
<div class="content-block">
<p class="text-title" style="font-size:14px;"><span style="color:#01496E;">白皮书</span>{{item.title}}</p>
</div>
<span class="text-date">{{item.sendtime}}</span>
</div>
<el-pagination
layout="prev, pager, next"
:current-page.sync="currentPage"
:page-size="10"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name:"search",
data(){
return {
noticeList:[
{sendtime:'2020-05-10',title:'工业和信息化部办公厅关于推动工业互联网加快发展工业和信息化部办公厅关于推动工业互联网加快发展',content:'各省、自治区、直辖市及计划单列市、新疆生产建设兵团工业和信息化主 管部门,各省、自治区、直辖市通信管理局,中国电信集团有限公司。'},
{sendtime:'2020-05-09',title:'工业和信息化部办公厅关于公布2019年工业互联网试2019年工业互联网试',content:'各省、自治区、直辖市及计划单列市工业和信息化主管部门,各省、自治区 、直辖市通信管理局,各有关单位。'},
{sendtime:'2020-05-08',title:'北京市经济和信息化局关于开展2020年工信部工业互',content:'各有关单位:根据工信部及我局工作安排,现将2020年工信部工业互联网 创新发展工程项目(以下简称“项目”)有关工作通知如下。'},
{sendtime:'2020-05-07',title:'江门市工业和信息化局转发关于组织推进 “5G+工业”',content:'各市(含定州、辛集市)工业和信息化局、通信发展管理办公室,中国联通 河北分公司、中国电信河北分公司、中国移动河北分公司、河北广电网络。'},
{sendtime:'2020-05-08',title:'关于进一步加快工业互联网发展的通知',content:'各省、自治区、直辖市及计划单列市工业和信息化主管部门,各省、自治区 、直辖市通信管理局,各有关单位。'},
{sendtime:'2020-05-07',title:'关于天津市钢铁、水泥企业 2018年度工序单位产品',content:'按照工业和信息化部《2019年工业节能监察重点工作计划》(工信部节函 〔2019〕77号)和《关于下达2019年国家重大工业节能监察任务及经费。'},
{sendtime:'2020-06-07',title:'ssssssssssssssss 2018年度工序单位产品',content:'按照工业和信息化部《2019年工业节能监察重点工作计划》(工信部节函 〔2019〕77号)和《关于下达2019年国家重大工业节能监察任务及经费。'},
],
currentPage:1,
total:0
}
},
mounted(){
},
methods:{
}
}
</script>
<style lang="scss" scoped>
.notice-list {
position: relative;
background-color: rgba(255,255,255,0);
cursor: pointer;
color: #999999;
font-family:PingFang SC;
border-bottom: 1px dotted #dcdcdc;
margin: 0 30px;
height: 46px;
.content-block {
position: relative;
display: inline-block;
width: calc(100% - 150px);
height: 46px;
line-height: 46px;
padding: 0 15px;
&::before {
content: " ";
position: absolute;
top: 20px;
left: -10px;
width: 6px;
height: 6px;
background: #8D8D8D;
border-radius: 50%;
}
}
.content-block-first {
position: relative;
display: inline-block;
width: calc(100% - 90px);
height: 103px;
padding: 0 15px;
}
.text-date {
position: relative;
display: inline-block;
height: 46px;
width: 150px;
line-height: 46px;
text-align: center;
font-size: 14px;
vertical-align: bottom;
}
.text-title {
font-size: 18px;
// margin: 6px 0;
font-weight:500;
color: #666666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-content {
font-size: 14px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient: vertical;
}
&:hover {
.text-title {
color: #3893c7;
}
}
}
</style>

12
src/views/template.vue

@ -0,0 +1,12 @@
<template>
<div>
<router-view name="banner"/>
<router-view/>
</div>
</template>
<script>
export default {
name:"mytemplate"
}
</script>
Loading…
Cancel
Save