Commit 680dfdeb authored by 郝聪敏's avatar 郝聪敏

添加eslint

parent c4c3cb8f
/build/ node_modules/*
/config/ build/*
/dist/ config/*
/*.js dist/*
lib/*
static/*
\ No newline at end of file
// https://eslint.org/docs/user-guide/configuring
module.exports = { module.exports = {
root: true, root: true,
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint',
}, },
env: { env: {
browser: true, browser: true,
}, },
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention extends: [
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 'plugin:vue/essential',
extends: ['plugin:vue/essential', 'airbnb-base'], 'standard',
// required to lint *.vue files ],
plugins: [ plugins: [
'vue' 'vue',
], ],
// check if imports actually resolve
settings: {
'import/resolver': {
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
rules: { rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js']
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'global-require': 'off',
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 防止iview的标签报错 // 防止iview的标签报错
"vue/no-parsing-error": [1, { "x-invalid-end-tag": false }], "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
"linebreak-style": 0, },
'indent': [0, 2],
"comma-dangle": 0,
"semi": 0,
"max-len": 0,
"no-tabs": 0,
"no-mixed-spaces-and-tabs": 0,
"eol-last": 0,
"key-spacing": 0
}
} }
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev", "start": "npm run dev",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --fix --cache --ext .js,.vue src",
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
"babel-core": "^6.22.1", "babel-core": "^6.22.1",
"babel-eslint": "^8.2.1", "babel-eslint": "^8.2.6",
"babel-helper-vue-jsx-merge-props": "^2.0.3", "babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1", "babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0", "babel-plugin-syntax-jsx": "^6.18.0",
...@@ -39,13 +39,17 @@ ...@@ -39,13 +39,17 @@
"chalk": "^2.0.1", "chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"eslint": "^4.15.0", "eslint": "^5.16.0",
"eslint-config-airbnb-base": "^11.3.0", "eslint-config-airbnb-base": "^11.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-friendly-formatter": "^3.0.0", "eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-webpack": "^0.8.3", "eslint-import-resolver-webpack": "^0.8.3",
"eslint-loader": "^1.7.1", "eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.7.0", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-vue": "^4.0.0", "eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.0.1",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1", "friendly-errors-webpack-plugin": "^1.6.1",
...@@ -69,7 +73,8 @@ ...@@ -69,7 +73,8 @@
"webpack": "^3.6.0", "webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0", "webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1", "webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0" "webpack-merge": "^4.1.0",
"husky": "^3.1.0"
}, },
"engines": { "engines": {
"node": ">= 6.0.0", "node": ">= 6.0.0",
...@@ -79,5 +84,10 @@ ...@@ -79,5 +84,10 @@
"> 1%", "> 1%",
"last 2 versions", "last 2 versions",
"not ie <= 8" "not ie <= 8"
] ],
} "husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
}
\ No newline at end of file
...@@ -5,21 +5,21 @@ ...@@ -5,21 +5,21 @@
</template> </template>
<script> <script>
window.onload = function() { window.onload = function () {
  document.addEventListener('touchstart', function(event) { document.addEventListener('touchstart', function (event) {
    if (event.touches.length > 1) { if (event.touches.length > 1) {
      event.preventDefault() event.preventDefault()
    } }
  }) })
  document.addEventListener('gesturestart', function(event) { document.addEventListener('gesturestart', function (event) {
    event.preventDefault() event.preventDefault()
  }) })
} }
export default { export default {
name: 'App', name: 'App',
data() { data () {
return { return {
appClass: 'pc', appClass: 'pc'
} }
}, },
created: function () { created: function () {
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
this.appClass = 'mobile' this.appClass = 'mobile'
} }
} }
}; }
</script> </script>
<style> <style>
...@@ -46,8 +46,7 @@ export default { ...@@ -46,8 +46,7 @@ export default {
-khtml-user-select: text !important; /*早期浏览器*/ -khtml-user-select: text !important; /*早期浏览器*/
-moz-user-select: text !important; /*火狐*/ -moz-user-select: text !important; /*火狐*/
-ms-user-select: text !important; /*IE10*/ -ms-user-select: text !important; /*IE10*/
user-select: text !important; user-select: text !important;
} }
.pc { .pc {
...@@ -59,28 +58,28 @@ export default { ...@@ -59,28 +58,28 @@ export default {
min-width: unset; min-width: unset;
min-height: unset; min-height: unset;
} }
::-webkit-scrollbar ::-webkit-scrollbar
{ {
width: 8px; width: 8px;
height: 8px; height: 8px;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
/*定义滚动条轨道 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track ::-webkit-scrollbar-track
{ {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px; border-radius: 10px;
background-color: #Eff4f6; background-color: #Eff4f6;
} }
/*定义滑块 内阴影+圆角*/ /*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb ::-webkit-scrollbar-thumb
{ {
border-radius: 10px; border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #BDBDBD; background-color: #BDBDBD;
} }
/* .ivu-btn-primary{ /* .ivu-btn-primary{
background: #0092FF!important background: #0092FF!important
} */ } */
......
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 获取个人信息 // 获取个人信息
export function getpersonMassage(params) { export function getpersonMassage (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/me`,params,{headers: { return axios.get(`${sapi}/api/login/me`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 用户退出 // 用户退出
export function loginOUT() { export function loginOUT () {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/login/logout`,{headers: { return axios.get(`${sapi}/api/login/logout`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//通过某一来源查询简历信息 // 通过某一来源查询简历信息
export function adoptOneSeeResumeList(parmars) { export function adoptOneSeeResumeList (parmars) {
return axios.post(`${sapi}/api/resume/findListBySource`,parmars,{headers: { return axios.post(`${sapi}/api/resume/findListBySource`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//通过渠道机简历信息 // 通过渠道机简历信息
export function getChannelMassage() { export function getChannelMassage () {
return axios.get(`${sapi}/api/resume/getSourceList`,{headers: { return axios.get(`${sapi}/api/resume/getSourceList`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 判断是否为超级管理员 // 判断是否为超级管理员
export function judeAdmin() { export function judeAdmin () {
return axios.get(`${sapi}/api/user/isAdmin`,{headers: { return axios.get(`${sapi}/api/user/isAdmin`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
\ No newline at end of file })
}
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 更改约面信息 // 更改约面信息
export function changeinterviewMassage(parmars) { export function changeinterviewMassage (parmars) {
return axios.post(`${sapi}/api/resumeInterview/update`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/update`, parmars, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 重启面试 // 重启面试
export function oppenInterview(tid,tstatus) { export function oppenInterview (tid, tstatus) {
console.log(tid,tstatus) console.log(tid, tstatus)
return axios.post(`${sapi}/api/resumeFlow/reset/${tid}/${tstatus}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/reset/${tid}/${tstatus}`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 终止面试 // 终止面试
export function SInterview(tid) { export function SInterview (tid) {
return axios.post(`${sapi}/api/resumeFlow/end/${tid}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/end/${tid}`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 面试管理查询 // 面试管理查询
export function SerchList(parmars, status) { export function SerchList (parmars, status) {
return axios.post(`${sapi}/api/interview/findListByQueryVO`,parmars,{headers: { return axios.post(`${sapi}/api/interview/findListByQueryVO`, parmars, {
'Content-Type':'application/json;', headers: {
'X-Requested-With':'XMLHttpRequest', 'Content-Type': 'application/json;',
status 'X-Requested-With': 'XMLHttpRequest',
}}) status
}
})
} }
//查看简历详情页 // 查看简历详情页
export function seedetail (parmars) { export function seedetail (parmars) {
return axios.get(`${sapi}/api/html/get/${parmars.uid}`,{headers: { return axios.get(`${sapi}/api/html/get/${parmars.uid}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//面试官查询 // 面试官查询
export function Serchinterviewor() { export function Serchinterviewor () {
return axios.get(`${sapi}/api/interview/findInterviewerList`) return axios.get(`${sapi}/api/interview/findInterviewerList`)
} }
//邀约人查询 // 邀约人查询
export function SerchInvitationOwer() { export function SerchInvitationOwer () {
return axios.post(`${sapi}/api/interview/findInviterList`,{headers: { return axios.post(`${sapi}/api/interview/findInviterList`, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
//新增约面信息 // 新增约面信息
export function NewAddInterview(parmars) { export function NewAddInterview (parmars) {
return axios.post(`${sapi}/api/resumeInterview/add`,parmars,{headers: { return axios.post(`${sapi}/api/resumeInterview/add`, parmars, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
// 查询记录 // 查询记录
export function recodeLIST (parmars) { export function recodeLIST (parmars) {
return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/history/${parmars.resumeId}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 变更状态 // 变更状态
export function changestatus (tid,tstatus) { export function changestatus (tid, tstatus) {
return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${tid}/${tstatus}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/uploadStatus/${tid}/${tstatus}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 获取终止面试前的前一个状态 // 获取终止面试前的前一个状态
export function formstatus (parmars) { export function formstatus (parmars) {
return axios.post(`${sapi}/api/resumeFlow/getPreReset/${parmars.resumeId}`,{headers: { return axios.post(`${sapi}/api/resumeFlow/getPreReset/${parmars.resumeId}`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
\ No newline at end of file })
}
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
//登录 // 登录
export function login(params) { export function login (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/login/doLogin`,params,{headers: { return axios.post(`${sapi}/api/login/doLogin`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
}
// 修改密码
export function updatePsd (params) {
// params=qs.stringify(params)
return axios.post(`${sapi}/api/login/modifyPassword`, params, {
headers: {
'Content-Type': 'application/json'
}
})
} }
//修改密码
export function updatePsd(params) {
// params=qs.stringify(params)
return axios.post(`${sapi}/api/login/modifyPassword`,params,{headers: {
'Content-Type':'application/json'
}})
}
\ No newline at end of file
This diff is collapsed.
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
//账号列表查询 // 账号列表查询
export function queryaccountList(params) { export function queryaccountList (params) {
return axios.post(`${sapi}/api/user/findList`,params,{headers: { return axios.post(`${sapi}/api/user/findList`, params, {
'Content-Type':'application/json;', headers: {
}}) 'Content-Type': 'application/json;'
}
})
} }
//添加账户 // 添加账户
export function addAccount (params) { export function addAccount (params) {
return axios.post(`${sapi}/api/user/add`,params,{headers: { return axios.post(`${sapi}/api/user/add`, params, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//删除单条账户 // 删除单条账户
export function Delateaccount(parmars){ export function Delateaccount (parmars) {
return axios.get(`${sapi}/api/user/delete/${parmars.id}`,{headers: { return axios.get(`${sapi}/api/user/delete/${parmars.id}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//批量删除 // 批量删除
export function delateAllAccount(DelateARR){ export function delateAllAccount (DelateARR) {
return axios.post(`${sapi}//api/user/delete`,JSON.stringify(DelateARR),{headers: { return axios.post(`${sapi}//api/user/delete`, JSON.stringify(DelateARR), {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//恢复初始密码 // 恢复初始密码
export function recoveryPassword(parmars){ export function recoveryPassword (parmars) {
return axios.post(`${sapi}/api/user/initial/${parmars.id}`,{headers: { return axios.post(`${sapi}/api/user/initial/${parmars.id}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//查询邮箱列表 // 查询邮箱列表
export function queryemailList(parmars){ export function queryemailList (parmars) {
return axios.post(`${sapi}/api/email/list`,parmars,{headers: { return axios.post(`${sapi}/api/email/list`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 同步邮箱 // 同步邮箱
export function Synchronization(parmars){ export function Synchronization (parmars) {
return axios.post(`${sapi}/api/email/bindAndSync`,parmars,{headers: { return axios.post(`${sapi}/api/email/bindAndSync`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 解绑邮箱 // 解绑邮箱
export function jiebangEmail(id){ export function jiebangEmail (id) {
return axios.post(`${sapi}/api/email/unbind/${id}`,{headers: { return axios.post(`${sapi}/api/email/unbind/${id}`, {
'Content-Type':'application/x-www-form-urlencoded' headers: {
}}) 'Content-Type': 'application/x-www-form-urlencoded'
}
})
} }
// 修改邮箱并重新绑定 // 修改邮箱并重新绑定
export function updateemailTWO(parmars){ export function updateemailTWO (parmars) {
return axios.post(`${sapi}/api/email/modify`,parmars,{headers: { return axios.post(`${sapi}/api/email/modify`, parmars, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
} }
})
}
// 批量解绑邮箱 // 批量解绑邮箱
export function UntyingAll(UntyingAllARR){ export function UntyingAll (UntyingAllARR) {
return axios.post(`${sapi}/api/email/unbind/batch`,JSON.stringify(UntyingAllARR),{headers: { return axios.post(`${sapi}/api/email/unbind/batch`, JSON.stringify(UntyingAllARR), {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 获取二维码 // 获取二维码
export function getErcode(){ export function getErcode () {
return axios.get(`${sapi}/api/qrCode/getInterviewQrcode`,{headers: { return axios.get(`${sapi}/api/qrCode/getInterviewQrcode`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// //修改账户 // //修改账户
export function updateAccount(parmars){ export function updateAccount (parmars) {
return axios.post(`${sapi}/api/user/modify/${parmars.id}`,parmars,{headers: { return axios.post(`${sapi}/api/user/modify/${parmars.id}`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
} }
\ No newline at end of file })
}
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 提交应聘登记表 // 提交应聘登记表
export function submitMassage(params) { export function submitMassage (params) {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.post(`${sapi}/api/interview/arrive`,params,{headers: { return axios.post(`${sapi}/api/interview/arrive`, params, {
'Content-Type':'application/json' }}) headers: { 'Content-Type': 'application/json' }
} })
\ No newline at end of file }
import axios from '../service/http.service' import axios from '../service/http.service'
import { import {
sapi sapi
} from '../config' } from '../config'
import qs from 'qs' import qs from 'qs'
// 获取上传批次号 // 获取上传批次号
export function getuploadNumber() { export function getuploadNumber () {
// params=qs.stringify(params) // params=qs.stringify(params)
return axios.get(`${sapi}/api/resume/upload/batchNum`,{headers: { return axios.get(`${sapi}/api/resume/upload/batchNum`, {
'Content-Type':'application/json' headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
//上传文件 // 上传文件
export function uploadfile(parmars) { export function uploadfile (parmars) {
return axios.post(`${sapi}/api/resume/upload`,parmars,{headers: { return axios.post(`${sapi}/api/resume/upload`, parmars, {
// 'Content-Type':'multipart/form-data', headers: {
processData : false, // 'Content-Type':'multipart/form-data',
contentType : false, processData: false,
async: false, contentType: false,
}}) async: false
}
})
} }
// 查询上传列表记录 // 查询上传列表记录
export function serchList(parmars) { export function serchList (parmars) {
return axios.post(`${sapi}/api/resume/upload/history`,parmars,{headers: { return axios.post(`${sapi}/api/resume/upload/history`, parmars, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 查询简历详情 // 查询简历详情
export function serchRESUMEdetail(parmars) { export function serchRESUMEdetail (parmars) {
return axios.get(`${sapi}/api/html/get/${parmars.uid}`,{headers: { return axios.get(`${sapi}/api/html/get/${parmars.uid}`, {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
// 查询简历详情 // 查询简历详情
export function deleteREsumeUPLOad(deleteallArr) { export function deleteREsumeUPLOad (deleteallArr) {
return axios.post(`${sapi}/api/resume/delete`,JSON.stringify(deleteallArr),{headers: { return axios.post(`${sapi}/api/resume/delete`, JSON.stringify(deleteallArr), {
'Content-Type':'application/json', headers: {
}}) 'Content-Type': 'application/json'
}
})
} }
...@@ -4,73 +4,73 @@ ...@@ -4,73 +4,73 @@
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import CKEDITOR from 'CKEDITOR'; import CKEDITOR from 'CKEDITOR'
export default { export default {
name: 'ckeditor', name: 'ckeditor',
props: { props: {
height: { height: {
default: '400px' default: '400px'
},
width: {
default: '100%'
},
color: {
default: '#ffffff'
},
uploadUrl: {
require: true,
default: ''
},
tokenUrl: {
default: ''
},
value: {
require: true,
default: ''
}
}, },
data() { width: {
return { default: '100%'
isInit: false
};
}, },
watch: { color: {
value:{ default: '#ffffff'
deep: true,
immediate:true,
handler(value) {
this.isInit&&this.editor.setData(value.value)
}
}
}, },
mounted() { uploadUrl: {
this.init() require: true,
default: ''
}, },
beforeDestroy() { tokenUrl: {
default: ''
}, },
methods: { value: {
init () { require: true,
CKEDITOR.replace('editor', { default: ''
height: this.height, }
width: this.width, },
uiColor: this.color, data () {
lang: 'zh-cn', return {
filebrowserImageUploadUrl: this.uploadUrl, isInit: false
filebrowserUploadMethod: 'form' }
}); },
this.editor = CKEDITOR.instances.editor; watch: {
setTimeout(()=> { value: {
this.isInit = true deep: true,
}, 1000) immediate: true,
}, handler (value) {
getValue(){ this.isInit && this.editor.setData(value.value)
return this.editor.getData()
} }
}
},
mounted () {
this.init()
},
beforeDestroy () {
},
methods: {
init () {
CKEDITOR.replace('editor', {
height: this.height,
width: this.width,
uiColor: this.color,
lang: 'zh-cn',
filebrowserImageUploadUrl: this.uploadUrl,
filebrowserUploadMethod: 'form'
})
this.editor = CKEDITOR.instances.editor
setTimeout(() => {
this.isInit = true
}, 1000)
}, },
components: {} getValue () {
}; return this.editor.getData()
}
},
components: {}
}
</script> </script>
<style lang="less" rel="stylesheet/less" scoped> <style lang="less" rel="stylesheet/less" scoped>
</style> </style>
\ No newline at end of file
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<editor @getValue='getInfo' :uploadUrl='uploadUrl' :value='value' height='400px'></editor> <editor @getValue='getInfo' :uploadUrl='uploadUrl' :value='value' height='400px'></editor>
<div slot='footer'> <div slot='footer'>
<Button @click='getInfo'>获取内容</Button> <Button @click='getInfo'>获取内容</Button>
</div> </div>
</Modal> </Modal>
<Form ref="formInline" :model="formInline" :rules="ruleInline" inline> <Form ref="formInline" :model="formInline" :rules="ruleInline" inline>
<FormItem prop="user"> <FormItem prop="user">
...@@ -26,67 +26,74 @@ ...@@ -26,67 +26,74 @@
</Form> </Form>
</div> </div>
</template> </template>
<script>
import editor from './ckeditor.vue'
import {sapi} from '../config/index.js'
import localStorage from '../service/localstorage.service.js'
export default {
data () {
return {
modal: true,
fullscreen: true,
content: '<h2>I am Example</h2>',
content1: '<h2>I am Example</h2>',
uploadUrl: `${sapi}/api/ckeditor/uploadImage?token=${localStorage.get('token')}&&backUrl=/getimage`,
value: '22',
editorOption: {
// some quill options
},
formInline: {
user: '',
password: ''
},
ruleInline: {
user: [
{ required: false, message: 'Please fill in the user name', trigger: 'blur', pattern:/^1[3456789]\d{9}$/, validator: function(rule, value, call){
console.log(rule, value)
return call(new Error()) } }
],
password: [
{ required: true, message: 'Please fill in the password.', trigger: 'blur' },
{ type: 'string', min: 6, message: 'The password length cannot be less than 6 bits', trigger: 'blur' }
]
}
}
},
watch:{},
components: {
editor
},
// manually control the data synchronization
// 如果需要手动控制数据同步,父组件需要显式地处理changed事件
methods: {
getInfo(value) {
console.log(value)
},
handleSubmit(name) {
// this.$refs[name].validate((valid) => {
// if (valid) {
// this.$Message.success('Success!');
// } else {
// this.$Message.error('Fail!');
// }
// })
this.$refs[name].validateField('user', (error) => {
console.log('------', error)
})
}
<script>
import editor from './ckeditor.vue'
import { sapi } from '../config/index.js'
import localStorage from '../service/localstorage.service.js'
export default {
data () {
return {
modal: true,
fullscreen: true,
content: '<h2>I am Example</h2>',
content1: '<h2>I am Example</h2>',
uploadUrl: `${sapi}/api/ckeditor/uploadImage?token=${localStorage.get('token')}&&backUrl=/getimage`,
value: '22',
editorOption: {
// some quill options
}, },
computed: { formInline: {
user: '',
password: ''
}, },
mounted() { ruleInline: {
user: [
{
required: false,
message: 'Please fill in the user name',
trigger: 'blur',
pattern: /^1[3456789]\d{9}$/,
validator: function (rule, value, call) {
console.log(rule, value)
return call(new Error())
}
}
],
password: [
{ required: true, message: 'Please fill in the password.', trigger: 'blur' },
{ type: 'string', min: 6, message: 'The password length cannot be less than 6 bits', trigger: 'blur' }
]
} }
} }
</script> },
\ No newline at end of file watch: {},
components: {
editor
},
// manually control the data synchronization
// 如果需要手动控制数据同步,父组件需要显式地处理changed事件
methods: {
getInfo (value) {
console.log(value)
},
handleSubmit (name) {
// this.$refs[name].validate((valid) => {
// if (valid) {
// this.$Message.success('Success!');
// } else {
// this.$Message.error('Fail!');
// }
// })
this.$refs[name].validateField('user', (error) => {
console.log('------', error)
})
}
},
computed: {
},
mounted () {
}
}
</script>
...@@ -2,25 +2,24 @@ ...@@ -2,25 +2,24 @@
<div></div> <div></div>
</template> </template>
<script> <script>
function GetQueryString(name) { function GetQueryString (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配 var r = window.location.search.substr(1).match(reg) // 获取url中"?"符后的字符串并正则匹配
var context = ""; var context = ''
if (r != null) if (r != null) { context = r[2] }
context = r[2]; reg = null
reg = null; r = null
r = null; return context == null || context == '' || context == 'undefined' ? '' : decodeURIComponent(context)
return context == null || context == "" || context == "undefined" ? "" : decodeURIComponent(context); }
} export default {
export default{
data () { data () {
return {} return {}
}, },
mounted() { mounted () {
console.log(777) console.log(777)
window.parent.CKEDITOR.tools.callFunction(GetQueryString("CKEditorFuncNum"),GetQueryString("ImageUrl"),GetQueryString("Message")) window.parent.CKEDITOR.tools.callFunction(GetQueryString('CKEditorFuncNum'), GetQueryString('ImageUrl'), GetQueryString('Message'))
} }
} }
</script> </script>
\ No newline at end of file
This diff is collapsed.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</template> </template>
<script> <script>
export default{ export default {
name: 'loading', name: 'loading',
props: { props: {
width: { width: {
......
const sapi = "http://recruitapi-ai3.liangkebang.net" const sapi = 'http://recruitapi-ai3.liangkebang.net'
export { export {
sapi sapi
} }
\ No newline at end of file
module.exports = process.env.NODE_ENV === 'production' ? require('./prod.config.js') : require('./env.config.js') module.exports = process.env.NODE_ENV === 'production' ? require('./prod.config.js') : require('./env.config.js')
\ No newline at end of file
...@@ -2,4 +2,4 @@ const sapi = '//api.stantoo.com' ...@@ -2,4 +2,4 @@ const sapi = '//api.stantoo.com'
export { export {
sapi sapi
} }
\ No newline at end of file
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'; import Vue from 'vue'
import iView from 'iview'; import { Notice } from iView from 'iview'
import 'iview/dist/styles/iview.css'; import 'iview/dist/styles/iview.css'
import App from './App'; import App from './App'
import router from './router'; import router from './router'
import initRouter from './service/init.service.js' import initRouter from './service/init.service.js'
import 'vue-happy-scroll/docs/happy-scroll.css' import 'vue-happy-scroll/docs/happy-scroll.css'
import {Notice} from 'iview'
import store from '../src/store' import store from '../src/store'
Vue.use(iView); Vue.use(iView)
Vue.use(Notice) Vue.use(Notice)
Vue.config.productionTip = false; Vue.config.productionTip = false
initRouter.init(router) initRouter.init(router)
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
...@@ -19,5 +19,5 @@ new Vue({ ...@@ -19,5 +19,5 @@ new Vue({
router, router,
store, store,
components: { App }, components: { App },
template: '<App/>', template: '<App/>'
}); })
This diff is collapsed.
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div class="login"> <div class="login">
<div class="login-content"> <div class="login-content">
<div class="loginContent-left"> <div class="loginContent-left">
<div class="logimg"> <div class="logimg">
<img src="http://xyqbui.lkbang.net/image/logo99.png"> <img src="http://xyqbui.lkbang.net/image/logo99.png">
</div> </div>
</div> </div>
<div class="loginContent-right"> <div class="loginContent-right">
<div class="logo"> <div class="logo">
<img src="http://xyqbui.lkbang.net/image/log.jpg"> <img src="http://xyqbui.lkbang.net/image/log.jpg">
<h3>登录</h3> <h3>登录</h3>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</Form> </Form>
<Button type="primary" class="loginBtu" @click.prevent="login">登录</Button> <Button type="primary" class="loginBtu" @click.prevent="login">登录</Button>
</div> </div>
<div class="copy"> <div class="copy">
<p>量化派为你提供全程服务</p> <p>量化派为你提供全程服务</p>
<p>量化派版权所有</p> <p>量化派版权所有</p>
...@@ -38,72 +38,71 @@ ...@@ -38,72 +38,71 @@
</template> </template>
<script> <script>
import { login} from '../../api/login.server.js' import { login } from '../../api/login.server.js'
import localstorage from '../../service/localstorage.service.js' import localstorage from '../../service/localstorage.service.js'
export default { export default {
data () { data () {
return { return {
channelarr:[], channelarr: [],
notecontent:'', notecontent: '',
noteconTime:false, noteconTime: false,
ISIDMIN:'', ISIDMIN: '',
formInline: { formInline: {
user: '', user: '',
password: '' password: ''
}, },
ruleInline: { ruleInline: {
user: [ user: [
{ required: true, pattern:/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱账号', trigger: 'blur' } { required: true, pattern: /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/, message: '请输入正确的邮箱账号', trigger: 'blur' }
], ],
password: [ password: [
{ required: true, message: '请输入正确的密码', trigger: 'blur' }, { required: true, message: '请输入正确的密码', trigger: 'blur' }
// { type: 'string', min: 4, message: '请输入正确的密码', trigger: 'blur' } // { type: 'string', min: 4, message: '请输入正确的密码', trigger: 'blur' }
] ]
} }
} }
}, },
methods: { methods: {
handleSubmit(name) { handleSubmit (name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
this.$Message.success('Success!'); this.$Message.success('Success!')
} else { } else {
this.$Message.error('Fail!'); this.$Message.error('Fail!')
} }
}) })
}, },
login(){ login () {
let params={ const params = {
userCode:this.formInline.user, userCode: this.formInline.user,
password:this.formInline.password password: this.formInline.password
} }
if(this.formInline.user==''||this.formInline.password==''){ if (this.formInline.user == '' || this.formInline.password == '') {
return return
} }
login(params).then(res=>{ login(params).then(res => {
if(res.data.body.code=='100'){ if (res.data.body.code == '100') {
this.$router.push({name:'update',params:{userCode:this.formInline.user}}) this.$router.push({ name: 'update', params: { userCode: this.formInline.user } })
return return
}
if(res.data.success==true){
this.ISIDMIN=res.data.body
localstorage.set('token', res.data.body.token)
this.$router.push({name:"allResume"})
localstorage.set('isADMIN',JSON.stringify(this.ISIDMIN))
return
}
if(res.data.success==false){
this.noteconTime=true
this.notecontent=res.data.body.message
setTimeout(() => {
this.noteconTime=false
}, 3000)
return
}
})
}
} }
if (res.data.success == true) {
this.ISIDMIN = res.data.body
localstorage.set('token', res.data.body.token)
this.$router.push({ name: 'allResume' })
localstorage.set('isADMIN', JSON.stringify(this.ISIDMIN))
return
}
if (res.data.success == false) {
this.noteconTime = true
this.notecontent = res.data.body.message
setTimeout(() => {
this.noteconTime = false
}, 3000)
}
})
} }
}
}
</script> </script>
<style scoped> <style scoped>
.login{ .login{
...@@ -169,7 +168,7 @@ export default { ...@@ -169,7 +168,7 @@ export default {
height:100px; height:100px;
margin-top: 80px; margin-top: 80px;
margin-left: 7% margin-left: 7%
} }
.copy p{ .copy p{
font-size: 17px; font-size: 17px;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div class="updatePsd"> <div class="updatePsd">
<div class="updatePsd-content"> <div class="updatePsd-content">
<div class="updatePsdContent-left"> <div class="updatePsdContent-left">
<div class="logimg"> <div class="logimg">
<img src="http://xyqbui.lkbang.net/image/logo99.png"> <img src="http://xyqbui.lkbang.net/image/logo99.png">
</div> </div>
</div> </div>
<div class="updatePsdContent-right"> <div class="updatePsdContent-right">
<div class="logo"> <div class="logo">
<img src="http://xyqbui.lkbang.net/image/log.jpg"> <img src="http://xyqbui.lkbang.net/image/log.jpg">
<h3>首次登录请修改密码</h3> <h3>首次登录请修改密码</h3>
...@@ -38,130 +38,124 @@ ...@@ -38,130 +38,124 @@
</template> </template>
<script> <script>
import { updatePsd} from '../../api/login.server.js' import { updatePsd } from '../../api/login.server.js'
export default { export default {
data () { data () {
return { return {
formInline: { formInline: {
passwordTwo: '', passwordTwo: '',
password: '' password: ''
}, },
fistcontent:true, fistcontent: true,
twocontent:false, twocontent: false,
twocontentmessage:'', twocontentmessage: '',
channelarr:[], channelarr: [],
Massage:'', Massage: '',
ISIDMIN:'', ISIDMIN: ''
} }
}, },
methods: { methods: {
handleSubmit(name) { handleSubmit (name) {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
this.$Message.success('Success!'); this.$Message.success('Success!')
} else { } else {
this.$Message.error('Fail!'); this.$Message.error('Fail!')
} }
}) })
}, },
loginT(){ loginT () {
let params={ const params = {
userCode:this.$route.params.userCode, userCode: this.$route.params.userCode,
password:this.formInline.password, password: this.formInline.password,
confirmPassWord:this.formInline.passwordTwo confirmPassWord: this.formInline.passwordTwo
} }
if(this.formInline.passwordTwo!==this.formInline.password){ if (this.formInline.passwordTwo !== this.formInline.password) {
this.twocontentmessage='输入密码不一致,请重新输入' this.twocontentmessage = '输入密码不一致,请重新输入'
this.twocontent=true this.twocontent = true
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.passwordTwo.length<4||this.formInline.password.length<4){ if (this.formInline.passwordTwo.length < 4 || this.formInline.password.length < 4) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
this.twocontent=true this.twocontent = true
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length>20){ if (this.formInline.password.length > 20) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length<4){ if (this.formInline.password.length < 4) {
this.twocontentmessage='请输入4-20位密码' this.twocontentmessage = '请输入4-20位密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.password.length==0){ if (this.formInline.password.length == 0) {
this.twocontentmessage='密码不能为空' this.twocontentmessage = '密码不能为空'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
if(this.formInline.passwordTwo.length==0){ if (this.formInline.passwordTwo.length == 0) {
this.twocontentmessage='请输入相同的确认密码' this.twocontentmessage = '请输入相同的确认密码'
setTimeout(() => { setTimeout(() => {
this.twocontent=false this.twocontent = false
}, 3000) }, 3000)
return return
} }
updatePsd(params).then(res=>{ updatePsd(params).then(res => {
if(res.data.success==true){ if (res.data.success == true) {
this.ISIDMIN=res.data.body this.ISIDMIN = res.data.body
localStorage.setItem('isADMIN',JSON.stringify(this.ISIDMIN)) localStorage.setItem('isADMIN', JSON.stringify(this.ISIDMIN))
localStorage.setItem('token',res.data.body.token) localStorage.setItem('token', res.data.body.token)
this.$router.replace({name:'allResume'}) this.$router.replace({ name: 'allResume' })
}
if(res.data.success==false){
this.Massage=res.data.body.message
this.twocontent=true
this.twocontentmessage=this.Massage
setTimeout(() => {
this.twocontent=false
}, 3000)
}
})
},
verification(){
if(this.formInline.password==123456){
this.twocontentmessage='输入密码与初始密码相同,请重新输入'
setTimeout(() => {
this.twocontent=false
}, 3000)
}
if(this.formInline.password.length==0){
this.fistcontent=true
}
if(this.formInline.password==''){
this.fistcontent=true
}
if(this.formInline.password.length<4){
this.fistcontent=true
}
if(this.formInline.password.length>4){
this.fistcontent=false
}
if(this.formInline.password.length>20){
this.fistcontent=true
}
},
} }
if (res.data.success == false) {
this.Massage = res.data.body.message
this.twocontent = true
this.twocontentmessage = this.Massage
setTimeout(() => {
this.twocontent = false
}, 3000)
}
})
},
verification () {
if (this.formInline.password == 123456) {
this.twocontentmessage = '输入密码与初始密码相同,请重新输入'
setTimeout(() => {
this.twocontent = false
}, 3000)
}
if (this.formInline.password.length == 0) {
this.fistcontent = true
}
if (this.formInline.password == '') {
this.fistcontent = true
}
if (this.formInline.password.length < 4) {
this.fistcontent = true
}
if (this.formInline.password.length > 4) {
this.fistcontent = false
}
if (this.formInline.password.length > 20) {
this.fistcontent = true
}
} }
}
}
</script> </script>
<style scoped> <style scoped>
.updatePsd{ .updatePsd{
......
This diff is collapsed.
This diff is collapsed.
...@@ -135,45 +135,45 @@ ...@@ -135,45 +135,45 @@
</div> </div>
</template> </template>
<script> <script>
import {seedetail} from '../../api/resume.server' import { seedetail } from '../../api/resume.server'
import localStorage from '../../service/localstorage.service.js' import localStorage from '../../service/localstorage.service.js'
import { import {
sapi sapi
}from '../../config' } from '../../config'
export default { export default {
data(){ data () {
return { return {
resume:{}, resume: {},
riList:[], riList: [],
roList:[], roList: [],
rpList:[], rpList: [],
reList:[], reList: [],
downresume:'', downresume: '',
detialID:'', detialID: '',
showBtn:'', showBtn: ''
} }
}, },
methods: { methods: {
getDETAIL(){ getDETAIL () {
this.detialID=this.$route.query.ID this.detialID = this.$route.query.ID
this.showBtn=this.$route.query.noShowBtn this.showBtn = this.$route.query.noShowBtn
let token = this.$route.query.token || '' const token = this.$route.query.token || ''
let parmars={ const parmars = {
uid:this.$route.query.id uid: this.$route.query.id
// uid:"0646215721cc43ccb51ff3e979959e35" // uid:"0646215721cc43ccb51ff3e979959e35"
}
seedetail(parmars).then(res=>{
this.resume=res.data.body.resume
this.riList=res.data.body.riList
this.roList=res.data.body.roList
this.rpList=res.data.body.rpList
this.reList=res.data.body.reList
})
},
},
mounted(){
this.getDETAIL()
} }
seedetail(parmars).then(res => {
this.resume = res.data.body.resume
this.riList = res.data.body.riList
this.roList = res.data.body.roList
this.rpList = res.data.body.rpList
this.reList = res.data.body.reList
})
}
},
mounted () {
this.getDETAIL()
}
} }
</script> </script>
<style scoped> <style scoped>
...@@ -329,4 +329,3 @@ export default { ...@@ -329,4 +329,3 @@ export default {
/* border: 1px solid red */ /* border: 1px solid red */
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</div> </div>
<p class="xiazai" @click="downPic">下载</p> <p class="xiazai" @click="downPic">下载</p>
<!-- <p style="margin-top:40px"><span>请点击&nbsp;</span> <!-- <p style="margin-top:40px"><span>请点击&nbsp;</span>
<a href="http://192.168.28.10:7086/acceptInterview?isResufe=false" <a href="http://192.168.28.10:7086/acceptInterview?isResufe=false"
style="text-decoration:none;width:100px;height:30px;background:#0092ff;color:white;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important">接受面试安排</a>&nbsp; style="text-decoration:none;width:100px;height:30px;background:#0092ff;color:white;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important">接受面试安排</a>&nbsp;
<a href="http://192.168.28.10:7086/acceptInterview?isResufe=true" <a href="http://192.168.28.10:7086/acceptInterview?isResufe=true"
style="text-decoration:none;width:100px;height:30px;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important;border:1px solid #0092ff;">拒绝面试安排</a>&nbsp; style="text-decoration:none;width:100px;height:30px;display:inline-block; text-align: center;line-height:30px;border-radius:5px!important;border:1px solid #0092ff;">拒绝面试安排</a>&nbsp;
...@@ -16,34 +16,34 @@ ...@@ -16,34 +16,34 @@
</div> </div>
</template> </template>
<script> <script>
import {getErcode,downloadErcode} from '../../api/stystem.server.js' import { getErcode, downloadErcode } from '../../api/stystem.server.js'
import { import {
sapi sapi
} from '../../config' } from '../../config'
export default { export default {
data(){ data () {
return { return {
url:'', url: '',
url2:'' url2: ''
} }
}, },
methods:{ methods: {
//取到二维码 // 取到二维码
getercode(){ getercode () {
getErcode().then(res=>{ getErcode().then(res => {
if(res.data.success==true){ if (res.data.success == true) {
this.url=res.data.body this.url = res.data.body
} }
}) })
}, },
downPic (img) { downPic (img) {
window.location.href=`${sapi}/api/qrCode/downQrCode` window.location.href = `${sapi}/api/qrCode/downQrCode`
} }
}, },
mounted(){ mounted () {
this.getercode() this.getercode()
} }
} }
</script> </script>
<style> <style>
...@@ -63,6 +63,6 @@ export default { ...@@ -63,6 +63,6 @@ export default {
border-radius: 5px ; border-radius: 5px ;
position: absolute; position: absolute;
left: 230px; left: 230px;
top:270px top:270px
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import Vue from 'vue'; import Vue from 'vue'
import Router from 'vue-router'; import Router from 'vue-router'
const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home'); const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home')
// const changepsd = r => require.ensure([], () => r(require('@/components/changepsd.vue')), 'changepsd'); // const changepsd = r => require.ensure([], () => r(require('@/components/changepsd.vue')), 'changepsd');
const login = r => require.ensure([], () => r(require('@/page/login/login.vue')), 'login'); const login = r => require.ensure([], () => r(require('@/page/login/login.vue')), 'login')
const update = r => require.ensure([], () => r(require('@/page/login/update.vue')), 'update'); const update = r => require.ensure([], () => r(require('@/page/login/update.vue')), 'update')
const pdfdetail = r =>require.ensure([], () => r(require('@/page/resume/pdfdetail.vue')),'pdfdetail') const pdfdetail = r => require.ensure([], () => r(require('@/page/resume/pdfdetail.vue')), 'pdfdetail')
const resumeDetail = r =>require.ensure([], () => r(require('@/page/resume/resumeDetail.vue')),'resumeDetail') const resumeDetail = r => require.ensure([], () => r(require('@/page/resume/resumeDetail.vue')), 'resumeDetail')
const interview = r => require.ensure([], () => r(require('@/page/interview/interview.vue')), 'interview'); const interview = r => require.ensure([], () => r(require('@/page/interview/interview.vue')), 'interview')
const allResume = r => require.ensure([], () => r(require('@/page/resume/allResume.vue')), 'allResume'); const allResume = r => require.ensure([], () => r(require('@/page/resume/allResume.vue')), 'allResume')
const channel = r => require.ensure([], () => r(require('@/page/resume/channel.vue')), 'channel'); const channel = r => require.ensure([], () => r(require('@/page/resume/channel.vue')), 'channel')
const account = r => require.ensure([], () => r(require('@/page/system/account.vue')), 'account'); const account = r => require.ensure([], () => r(require('@/page/system/account.vue')), 'account')
const emailMange = r => require.ensure([], () => r(require('@/page/system/emailMange.vue')), 'emailMange'); const emailMange = r => require.ensure([], () => r(require('@/page/system/emailMange.vue')), 'emailMange')
const QRcode = r => require.ensure([], () => r(require('@/page/system/QRcode.vue')), 'QRcode'); const QRcode = r => require.ensure([], () => r(require('@/page/system/QRcode.vue')), 'QRcode')
const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue')), 'upload'); const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue')), 'upload')
const sweepCode = r => require.ensure([], () => r(require('@/page/sweepCode/sweepCode.vue')), 'sweepCode'); const sweepCode = r => require.ensure([], () => r(require('@/page/sweepCode/sweepCode.vue')), 'sweepCode')
const editor = r => require.ensure([], () => r(require('@/components/editor.vue')), 'editor'); const editor = r => require.ensure([], () => r(require('@/components/editor.vue')), 'editor')
const getimage = r => require.ensure([], () => r(require('@/components/getimage.vue')), 'getimage'); const getimage = r => require.ensure([], () => r(require('@/components/getimage.vue')), 'getimage')
//z注释 // z注释
Vue.use(Router); Vue.use(Router)
export default new Router({ export default new Router({
mode: 'history', mode: 'history',
routes: [ routes: [
{ {
path: '/', path: '/',
redirect: '/home', redirect: '/home'
}, { }, {
path: '/login', path: '/login',
name: 'login', name: 'login',
...@@ -35,20 +35,20 @@ export default new Router({ ...@@ -35,20 +35,20 @@ export default new Router({
allowBack: false allowBack: false
} }
}, },
{ {
path:'/sweepCode', path: '/sweepCode',
name:'sweepCode', name: 'sweepCode',
component:sweepCode component: sweepCode
}, },
{ {
path:'/update', path: '/update',
name:'update', name: 'update',
component:update component: update
}, },
{ {
path:'/getimage', path: '/getimage',
name:'getimage', name: 'getimage',
component:getimage component: getimage
}, },
{ {
path: '/resumeDetail', path: '/resumeDetail',
...@@ -106,6 +106,6 @@ export default new Router({ ...@@ -106,6 +106,6 @@ export default new Router({
component: upload component: upload
} }
] ]
}, }
], ]
}); })
This diff is collapsed.
import Cookie from 'js-cookie' import Cookie from 'js-cookie'
export default{ export default {
set: function (name, value) {Cookie.set(name, value)}, set: function (name, value) { Cookie.set(name, value) },
get: function (name) { get: function (name) {
return Cookie.get(name) return Cookie.get(name)
}, },
remove: function (name) {Cookie.remove(name)} remove: function (name) { Cookie.remove(name) }
} }
\ No newline at end of file
This diff is collapsed.
import localstorage from './localstorage.service.js' import localstorage from './localstorage.service.js'
export default{ export default {
init: function (router) { init: function (router) {
router.beforeEach((to, form, next) => { router.beforeEach((to, form, next) => {
let token = localstorage.get('token') const token = localstorage.get('token')
if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { //登录页面不能后退 if (to.meta && !to.meta.allowBack && window.history && window.history.pushState) { // 登录页面不能后退
history.pushState(null, null, document.URL) history.pushState(null, null, document.URL)
} }
if (to.name =='login' || to.name =='update' || to.name =='sweepCode'|| to.name== 'resumeDetail'|| to.name== 'pdfdetail'){ if (to.name == 'login' || to.name == 'update' || to.name == 'sweepCode' || to.name == 'resumeDetail' || to.name == 'pdfdetail') {
next() next()
return return
} }
if(!token){ if (!token) {
window.location.href = `${window.location.origin}/login` window.location.href = `${window.location.origin}/login`
return return
} }
next() next()
}) })
} }
} }
\ No newline at end of file
export default{ export default {
set: function (name, value) {window.localStorage.setItem(name, value)}, set: function (name, value) { window.localStorage.setItem(name, value) },
get: function (name) { get: function (name) {
return window.localStorage.getItem(name) return window.localStorage.getItem(name)
}, },
remove: function (name) {window.localStorage.removeItem(name)} remove: function (name) { window.localStorage.removeItem(name) }
} }
\ No newline at end of file
module.exports = require('es6-promise'); module.exports = require('es6-promise')
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -3,5 +3,3 @@ export const COOKIE_HIDE = 'COOKIE_HIDE' ...@@ -3,5 +3,3 @@ export const COOKIE_HIDE = 'COOKIE_HIDE'
export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE' export const ADD_INTERVIEWEE = 'ADD_INTERVIEWEE'
export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE' export const REMOVE_INTERVIEWEE = 'REMOVE_INTERVIEWEE'
export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE' export const CLEAR_INTERVIEWEE = 'CLEAR_INTERVIEWEE'
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment